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:
@@ -4,6 +4,15 @@ import 'package:equatable/equatable.dart';
|
||||
///
|
||||
/// Can be between a business and the platform, or a business and staff.
|
||||
class BizContract extends Equatable {
|
||||
|
||||
const BizContract({
|
||||
required this.id,
|
||||
required this.businessId,
|
||||
required this.name,
|
||||
required this.startDate,
|
||||
this.endDate,
|
||||
required this.contentUrl,
|
||||
});
|
||||
/// Unique identifier.
|
||||
final String id;
|
||||
|
||||
@@ -22,15 +31,6 @@ class BizContract extends Equatable {
|
||||
/// URL to the document content (PDF/HTML).
|
||||
final String contentUrl;
|
||||
|
||||
const BizContract({
|
||||
required this.id,
|
||||
required this.businessId,
|
||||
required this.name,
|
||||
required this.startDate,
|
||||
this.endDate,
|
||||
required this.contentUrl,
|
||||
});
|
||||
|
||||
@override
|
||||
List<Object?> get props => [id, businessId, name, startDate, endDate, contentUrl];
|
||||
List<Object?> get props => <Object?>[id, businessId, name, startDate, endDate, contentUrl];
|
||||
}
|
||||
@@ -19,6 +19,14 @@ enum BusinessStatus {
|
||||
///
|
||||
/// This is the top-level organizational entity in the system.
|
||||
class Business extends Equatable {
|
||||
|
||||
const Business({
|
||||
required this.id,
|
||||
required this.name,
|
||||
required this.registrationNumber,
|
||||
required this.status,
|
||||
this.avatar,
|
||||
});
|
||||
/// Unique identifier for the business.
|
||||
final String id;
|
||||
|
||||
@@ -34,14 +42,6 @@ class Business extends Equatable {
|
||||
/// URL to the business logo.
|
||||
final String? avatar;
|
||||
|
||||
const Business({
|
||||
required this.id,
|
||||
required this.name,
|
||||
required this.registrationNumber,
|
||||
required this.status,
|
||||
this.avatar,
|
||||
});
|
||||
|
||||
@override
|
||||
List<Object?> get props => [id, name, registrationNumber, status, avatar];
|
||||
List<Object?> get props => <Object?>[id, name, registrationNumber, status, avatar];
|
||||
}
|
||||
@@ -2,6 +2,15 @@ import 'package:equatable/equatable.dart';
|
||||
|
||||
/// Represents payroll and operational configuration for a [Business].
|
||||
class BusinessSetting extends Equatable {
|
||||
|
||||
const BusinessSetting({
|
||||
required this.id,
|
||||
required this.businessId,
|
||||
required this.prefix,
|
||||
required this.overtimeEnabled,
|
||||
this.clockInRequirement,
|
||||
this.clockOutRequirement,
|
||||
});
|
||||
/// Unique identifier for the settings record.
|
||||
final String id;
|
||||
|
||||
@@ -20,17 +29,8 @@ class BusinessSetting extends Equatable {
|
||||
/// Requirement method for clocking out.
|
||||
final String? clockOutRequirement;
|
||||
|
||||
const BusinessSetting({
|
||||
required this.id,
|
||||
required this.businessId,
|
||||
required this.prefix,
|
||||
required this.overtimeEnabled,
|
||||
this.clockInRequirement,
|
||||
this.clockOutRequirement,
|
||||
});
|
||||
|
||||
@override
|
||||
List<Object?> get props => [
|
||||
List<Object?> get props => <Object?>[
|
||||
id,
|
||||
businessId,
|
||||
prefix,
|
||||
|
||||
@@ -14,6 +14,15 @@ enum HubStatus {
|
||||
|
||||
/// Represents a branch location or operational unit within a [Business].
|
||||
class Hub extends Equatable {
|
||||
|
||||
const Hub({
|
||||
required this.id,
|
||||
required this.businessId,
|
||||
required this.name,
|
||||
required this.address,
|
||||
this.nfcTagId,
|
||||
required this.status,
|
||||
});
|
||||
/// Unique identifier.
|
||||
final String id;
|
||||
|
||||
@@ -32,15 +41,6 @@ class Hub extends Equatable {
|
||||
/// Operational status.
|
||||
final HubStatus status;
|
||||
|
||||
const Hub({
|
||||
required this.id,
|
||||
required this.businessId,
|
||||
required this.name,
|
||||
required this.address,
|
||||
this.nfcTagId,
|
||||
required this.status,
|
||||
});
|
||||
|
||||
@override
|
||||
List<Object?> get props => [id, businessId, name, address, nfcTagId, status];
|
||||
List<Object?> get props => <Object?>[id, businessId, name, address, nfcTagId, status];
|
||||
}
|
||||
|
||||
@@ -4,6 +4,12 @@ import 'package:equatable/equatable.dart';
|
||||
///
|
||||
/// Used for more granular organization of staff and events (e.g. "Kitchen", "Service").
|
||||
class HubDepartment extends Equatable {
|
||||
|
||||
const HubDepartment({
|
||||
required this.id,
|
||||
required this.hubId,
|
||||
required this.name,
|
||||
});
|
||||
/// Unique identifier.
|
||||
final String id;
|
||||
|
||||
@@ -13,12 +19,6 @@ class HubDepartment extends Equatable {
|
||||
/// Name of the department.
|
||||
final String name;
|
||||
|
||||
const HubDepartment({
|
||||
required this.id,
|
||||
required this.hubId,
|
||||
required this.name,
|
||||
});
|
||||
|
||||
@override
|
||||
List<Object?> get props => [id, hubId, name];
|
||||
List<Object?> get props => <Object?>[id, hubId, name];
|
||||
}
|
||||
Reference in New Issue
Block a user