Add order entities and mocks for client order feature

Introduces new domain entities for order types and one-time orders, along with their positions. Adds a mock OrderRepository to the data_connect package and wires it into the module. Updates localization files for new order flows and refactors Equatable usage for consistency. Also adds a minus icon to the design system.
This commit is contained in:
Achintha Isuru
2026-01-22 16:47:39 -05:00
parent 7090efb583
commit 4b3125de1a
80 changed files with 2472 additions and 531 deletions

View File

@@ -4,6 +4,12 @@ import 'package:equatable/equatable.dart';
///
/// Examples: "Food Hygiene Level 2", "SIA Badge".
class Certificate extends Equatable {
const Certificate({
required this.id,
required this.name,
required this.isRequired,
});
/// Unique identifier.
final String id;
@@ -13,12 +19,6 @@ class Certificate extends Equatable {
/// Whether this certificate is mandatory for platform access or specific roles.
final bool isRequired;
const Certificate({
required this.id,
required this.name,
required this.isRequired,
});
@override
List<Object?> get props => [id, name, isRequired];
List<Object?> get props => <Object?>[id, name, isRequired];
}

View File

@@ -5,6 +5,13 @@ import 'package:equatable/equatable.dart';
/// Examples: "Waiter", "Security Guard", "Bartender".
/// Linked to a [SkillCategory].
class Skill extends Equatable {
const Skill({
required this.id,
required this.categoryId,
required this.name,
required this.basePrice,
});
/// Unique identifier.
final String id;
@@ -17,13 +24,6 @@ class Skill extends Equatable {
/// Default hourly rate suggested for this skill.
final double basePrice;
const Skill({
required this.id,
required this.categoryId,
required this.name,
required this.basePrice,
});
@override
List<Object?> get props => [id, categoryId, name, basePrice];
List<Object?> get props => <Object?>[id, categoryId, name, basePrice];
}

View File

@@ -2,17 +2,17 @@ import 'package:equatable/equatable.dart';
/// Represents a broad category of skills (e.g. "Hospitality", "Logistics").
class SkillCategory extends Equatable {
const SkillCategory({
required this.id,
required this.name,
});
/// Unique identifier.
final String id;
/// Display name.
final String name;
const SkillCategory({
required this.id,
required this.name,
});
@override
List<Object?> get props => [id, name];
List<Object?> get props => <Object?>[id, name];
}

View File

@@ -4,6 +4,14 @@ import 'package:equatable/equatable.dart';
///
/// Examples: "Black Shirt" (Uniform), "Safety Boots" (Equipment).
class SkillKit extends Equatable {
const SkillKit({
required this.id,
required this.skillId,
required this.name,
required this.isRequired,
required this.type,
});
/// Unique identifier.
final String id;
@@ -19,14 +27,6 @@ class SkillKit extends Equatable {
/// Type of kit ('uniform' or 'equipment').
final String type;
const SkillKit({
required this.id,
required this.skillId,
required this.name,
required this.isRequired,
required this.type,
});
@override
List<Object?> get props => [id, skillId, name, isRequired, type];
List<Object?> get props => <Object?>[id, skillId, name, isRequired, type];
}

View File

@@ -26,6 +26,15 @@ enum StaffSkillStatus {
/// Represents a staff member's qualification in a specific [Skill].
class StaffSkill extends Equatable {
const StaffSkill({
required this.id,
required this.staffId,
required this.skillId,
required this.level,
required this.experienceYears,
required this.status,
});
/// Unique identifier.
final String id;
@@ -44,15 +53,6 @@ class StaffSkill extends Equatable {
/// Verification status.
final StaffSkillStatus status;
const StaffSkill({
required this.id,
required this.staffId,
required this.skillId,
required this.level,
required this.experienceYears,
required this.status,
});
@override
List<Object?> get props => [id, staffId, skillId, level, experienceYears, status];
List<Object?> get props => <Object?>[id, staffId, skillId, level, experienceYears, status];
}