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

@@ -11,6 +11,13 @@ enum PreferenceType {
/// Represents a business's specific preference for a staff member.
class BusinessStaffPreference extends Equatable {
const BusinessStaffPreference({
required this.id,
required this.businessId,
required this.staffId,
required this.type,
});
/// Unique identifier.
final String id;
@@ -23,13 +30,6 @@ class BusinessStaffPreference extends Equatable {
/// Whether they are a favorite or blocked.
final PreferenceType type;
const BusinessStaffPreference({
required this.id,
required this.businessId,
required this.staffId,
required this.type,
});
@override
List<Object?> get props => [id, businessId, staffId, type];
List<Object?> get props => <Object?>[id, businessId, staffId, type];
}

View File

@@ -4,6 +4,15 @@ import 'package:equatable/equatable.dart';
///
/// Penalties are issued for no-shows, cancellations, or poor conduct.
class PenaltyLog extends Equatable {
const PenaltyLog({
required this.id,
required this.staffId,
required this.assignmentId,
required this.reason,
required this.points,
required this.issuedAt,
});
/// Unique identifier.
final String id;
@@ -22,15 +31,6 @@ class PenaltyLog extends Equatable {
/// When the penalty was issued.
final DateTime issuedAt;
const PenaltyLog({
required this.id,
required this.staffId,
required this.assignmentId,
required this.reason,
required this.points,
required this.issuedAt,
});
@override
List<Object?> get props => [id, staffId, assignmentId, reason, points, issuedAt];
List<Object?> get props => <Object?>[id, staffId, assignmentId, reason, points, issuedAt];
}

View File

@@ -2,6 +2,15 @@ import 'package:equatable/equatable.dart';
/// Represents a rating given to a staff member by a client.
class StaffRating extends Equatable {
const StaffRating({
required this.id,
required this.staffId,
required this.eventId,
required this.businessId,
required this.rating,
this.comment,
});
/// Unique identifier.
final String id;
@@ -20,15 +29,6 @@ class StaffRating extends Equatable {
/// Optional feedback text.
final String? comment;
const StaffRating({
required this.id,
required this.staffId,
required this.eventId,
required this.businessId,
required this.rating,
this.comment,
});
@override
List<Object?> get props => [id, staffId, eventId, businessId, rating, comment];
List<Object?> get props => <Object?>[id, staffId, eventId, businessId, rating, comment];
}