Merge branch 'dev' into 503-build-dedicated-interface-to-display-hub-details
This commit is contained in:
@@ -28,6 +28,7 @@ export 'src/entities/business/business_setting.dart';
|
||||
export 'src/entities/business/hub.dart';
|
||||
export 'src/entities/business/hub_department.dart';
|
||||
export 'src/entities/business/vendor.dart';
|
||||
export 'src/entities/business/cost_center.dart';
|
||||
|
||||
// Events & Assignments
|
||||
export 'src/entities/events/event.dart';
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
|
||||
/// Represents a financial cost center used for billing and tracking.
|
||||
class CostCenter extends Equatable {
|
||||
const CostCenter({
|
||||
required this.id,
|
||||
required this.name,
|
||||
this.code,
|
||||
});
|
||||
|
||||
/// Unique identifier.
|
||||
final String id;
|
||||
|
||||
/// Display name of the cost center.
|
||||
final String name;
|
||||
|
||||
/// Optional alphanumeric code associated with this cost center.
|
||||
final String? code;
|
||||
|
||||
@override
|
||||
List<Object?> get props => <Object?>[id, name, code];
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
|
||||
import 'cost_center.dart';
|
||||
|
||||
/// The status of a [Hub].
|
||||
enum HubStatus {
|
||||
/// Fully operational.
|
||||
@@ -14,7 +16,6 @@ enum HubStatus {
|
||||
|
||||
/// Represents a branch location or operational unit within a [Business].
|
||||
class Hub extends Equatable {
|
||||
|
||||
const Hub({
|
||||
required this.id,
|
||||
required this.businessId,
|
||||
@@ -22,6 +23,7 @@ class Hub extends Equatable {
|
||||
required this.address,
|
||||
this.nfcTagId,
|
||||
required this.status,
|
||||
this.costCenter,
|
||||
});
|
||||
/// Unique identifier.
|
||||
final String id;
|
||||
@@ -41,6 +43,9 @@ class Hub extends Equatable {
|
||||
/// Operational status.
|
||||
final HubStatus status;
|
||||
|
||||
/// Assigned cost center for this hub.
|
||||
final CostCenter? costCenter;
|
||||
|
||||
@override
|
||||
List<Object?> get props => <Object?>[id, businessId, name, address, nfcTagId, status];
|
||||
List<Object?> get props => <Object?>[id, businessId, name, address, nfcTagId, status, costCenter];
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ class OneTimeOrder extends Equatable {
|
||||
this.hub,
|
||||
this.eventName,
|
||||
this.vendorId,
|
||||
this.hubManagerId,
|
||||
this.roleRates = const <String, double>{},
|
||||
});
|
||||
/// The specific date for the shift or event.
|
||||
@@ -33,6 +34,9 @@ class OneTimeOrder extends Equatable {
|
||||
/// Selected vendor id for this order.
|
||||
final String? vendorId;
|
||||
|
||||
/// Optional hub manager id.
|
||||
final String? hubManagerId;
|
||||
|
||||
/// Role hourly rates keyed by role id.
|
||||
final Map<String, double> roleRates;
|
||||
|
||||
@@ -44,6 +48,7 @@ class OneTimeOrder extends Equatable {
|
||||
hub,
|
||||
eventName,
|
||||
vendorId,
|
||||
hubManagerId,
|
||||
roleRates,
|
||||
];
|
||||
}
|
||||
|
||||
@@ -27,6 +27,8 @@ class OrderItem extends Equatable {
|
||||
this.hours = 0,
|
||||
this.totalValue = 0,
|
||||
this.confirmedApps = const <Map<String, dynamic>>[],
|
||||
this.hubManagerId,
|
||||
this.hubManagerName,
|
||||
});
|
||||
|
||||
/// Unique identifier of the order.
|
||||
@@ -83,6 +85,12 @@ class OrderItem extends Equatable {
|
||||
/// List of confirmed worker applications.
|
||||
final List<Map<String, dynamic>> confirmedApps;
|
||||
|
||||
/// Optional ID of the assigned hub manager.
|
||||
final String? hubManagerId;
|
||||
|
||||
/// Optional Name of the assigned hub manager.
|
||||
final String? hubManagerName;
|
||||
|
||||
@override
|
||||
List<Object?> get props => <Object?>[
|
||||
id,
|
||||
@@ -103,5 +111,7 @@ class OrderItem extends Equatable {
|
||||
totalValue,
|
||||
eventName,
|
||||
confirmedApps,
|
||||
hubManagerId,
|
||||
hubManagerName,
|
||||
];
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ class PermanentOrder extends Equatable {
|
||||
this.hub,
|
||||
this.eventName,
|
||||
this.vendorId,
|
||||
this.hubManagerId,
|
||||
this.roleRates = const <String, double>{},
|
||||
});
|
||||
|
||||
@@ -23,6 +24,7 @@ class PermanentOrder extends Equatable {
|
||||
final OneTimeOrderHubDetails? hub;
|
||||
final String? eventName;
|
||||
final String? vendorId;
|
||||
final String? hubManagerId;
|
||||
final Map<String, double> roleRates;
|
||||
|
||||
@override
|
||||
@@ -33,6 +35,7 @@ class PermanentOrder extends Equatable {
|
||||
hub,
|
||||
eventName,
|
||||
vendorId,
|
||||
hubManagerId,
|
||||
roleRates,
|
||||
];
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ class RecurringOrder extends Equatable {
|
||||
this.hub,
|
||||
this.eventName,
|
||||
this.vendorId,
|
||||
this.hubManagerId,
|
||||
this.roleRates = const <String, double>{},
|
||||
});
|
||||
|
||||
@@ -39,6 +40,9 @@ class RecurringOrder extends Equatable {
|
||||
/// Selected vendor id for this order.
|
||||
final String? vendorId;
|
||||
|
||||
/// Optional hub manager id.
|
||||
final String? hubManagerId;
|
||||
|
||||
/// Role hourly rates keyed by role id.
|
||||
final Map<String, double> roleRates;
|
||||
|
||||
@@ -52,6 +56,7 @@ class RecurringOrder extends Equatable {
|
||||
hub,
|
||||
eventName,
|
||||
vendorId,
|
||||
hubManagerId,
|
||||
roleRates,
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user