diff --git a/apps/mobile/packages/features/client/orders/create_order/lib/src/domain/arguments/one_time_order_arguments.dart b/apps/mobile/packages/features/client/orders/create_order/lib/src/domain/arguments/one_time_order_arguments.dart index 308e74b1..a0e2d189 100644 --- a/apps/mobile/packages/features/client/orders/create_order/lib/src/domain/arguments/one_time_order_arguments.dart +++ b/apps/mobile/packages/features/client/orders/create_order/lib/src/domain/arguments/one_time_order_arguments.dart @@ -10,6 +10,7 @@ class OneTimeOrderPositionArgument extends UseCaseArgument { required this.endTime, this.roleName, this.lunchBreak, + this.hourlyRateCents, }); /// The role ID for this position. @@ -30,9 +31,19 @@ class OneTimeOrderPositionArgument extends UseCaseArgument { /// Break duration label (e.g. `'MIN_30'`, `'NO_BREAK'`), if set. final String? lunchBreak; + /// Hourly rate in cents for this position, if set. + final int? hourlyRateCents; + @override - List get props => - [roleId, roleName, workerCount, startTime, endTime, lunchBreak]; + List get props => [ + roleId, + roleName, + workerCount, + startTime, + endTime, + lunchBreak, + hourlyRateCents, + ]; } /// Typed arguments for [CreateOneTimeOrderUseCase]. @@ -84,6 +95,7 @@ class OneTimeOrderArguments extends UseCaseArgument { p.lunchBreak != 'NO_BREAK' && p.lunchBreak!.isNotEmpty) 'lunchBreakMinutes': breakMinutesFromLabel(p.lunchBreak!), + if (p.hourlyRateCents != null) 'hourlyRateCents': p.hourlyRateCents, }; }).toList(); diff --git a/apps/mobile/packages/features/client/orders/create_order/lib/src/domain/arguments/permanent_order_arguments.dart b/apps/mobile/packages/features/client/orders/create_order/lib/src/domain/arguments/permanent_order_arguments.dart index 859097fd..47bcb943 100644 --- a/apps/mobile/packages/features/client/orders/create_order/lib/src/domain/arguments/permanent_order_arguments.dart +++ b/apps/mobile/packages/features/client/orders/create_order/lib/src/domain/arguments/permanent_order_arguments.dart @@ -9,6 +9,7 @@ class PermanentOrderPositionArgument extends UseCaseArgument { required this.startTime, required this.endTime, this.roleName, + this.hourlyRateCents, }); /// The role ID for this position. @@ -26,9 +27,18 @@ class PermanentOrderPositionArgument extends UseCaseArgument { /// Shift end time in HH:mm format. final String endTime; + /// Hourly rate in cents for this position, if set. + final int? hourlyRateCents; + @override - List get props => - [roleId, roleName, workerCount, startTime, endTime]; + List get props => [ + roleId, + roleName, + workerCount, + startTime, + endTime, + hourlyRateCents, + ]; } /// Typed arguments for [CreatePermanentOrderUseCase]. @@ -95,6 +105,7 @@ class PermanentOrderArguments extends UseCaseArgument { 'workerCount': p.workerCount, 'startTime': toUtcTimeHHmm(startDate, p.startTime), 'endTime': toUtcTimeHHmm(startDate, p.endTime), + if (p.hourlyRateCents != null) 'hourlyRateCents': p.hourlyRateCents, }; }).toList(); diff --git a/apps/mobile/packages/features/client/orders/create_order/lib/src/domain/arguments/recurring_order_arguments.dart b/apps/mobile/packages/features/client/orders/create_order/lib/src/domain/arguments/recurring_order_arguments.dart index ef219e07..7a340df7 100644 --- a/apps/mobile/packages/features/client/orders/create_order/lib/src/domain/arguments/recurring_order_arguments.dart +++ b/apps/mobile/packages/features/client/orders/create_order/lib/src/domain/arguments/recurring_order_arguments.dart @@ -9,6 +9,7 @@ class RecurringOrderPositionArgument extends UseCaseArgument { required this.startTime, required this.endTime, this.roleName, + this.hourlyRateCents, }); /// The role ID for this position. @@ -26,9 +27,18 @@ class RecurringOrderPositionArgument extends UseCaseArgument { /// Shift end time in HH:mm format. final String endTime; + /// Hourly rate in cents for this position, if set. + final int? hourlyRateCents; + @override - List get props => - [roleId, roleName, workerCount, startTime, endTime]; + List get props => [ + roleId, + roleName, + workerCount, + startTime, + endTime, + hourlyRateCents, + ]; } /// Typed arguments for [CreateRecurringOrderUseCase]. @@ -100,6 +110,7 @@ class RecurringOrderArguments extends UseCaseArgument { 'workerCount': p.workerCount, 'startTime': toUtcTimeHHmm(startDate, p.startTime), 'endTime': toUtcTimeHHmm(startDate, p.endTime), + if (p.hourlyRateCents != null) 'hourlyRateCents': p.hourlyRateCents, }; }).toList(); diff --git a/apps/mobile/packages/features/client/orders/create_order/lib/src/presentation/blocs/one_time_order/one_time_order_bloc.dart b/apps/mobile/packages/features/client/orders/create_order/lib/src/presentation/blocs/one_time_order/one_time_order_bloc.dart index e40aa20f..e7f50954 100644 --- a/apps/mobile/packages/features/client/orders/create_order/lib/src/presentation/blocs/one_time_order/one_time_order_bloc.dart +++ b/apps/mobile/packages/features/client/orders/create_order/lib/src/presentation/blocs/one_time_order/one_time_order_bloc.dart @@ -265,6 +265,8 @@ class OneTimeOrderBloc extends Bloc startTime: p.startTime, endTime: p.endTime, lunchBreak: p.lunchBreak, + hourlyRateCents: + role != null ? (role.costPerHour * 100).round() : null, ); }).toList(); diff --git a/apps/mobile/packages/features/client/orders/create_order/lib/src/presentation/blocs/permanent_order/permanent_order_bloc.dart b/apps/mobile/packages/features/client/orders/create_order/lib/src/presentation/blocs/permanent_order/permanent_order_bloc.dart index fae8ee4d..ed6f2ac3 100644 --- a/apps/mobile/packages/features/client/orders/create_order/lib/src/presentation/blocs/permanent_order/permanent_order_bloc.dart +++ b/apps/mobile/packages/features/client/orders/create_order/lib/src/presentation/blocs/permanent_order/permanent_order_bloc.dart @@ -360,6 +360,8 @@ class PermanentOrderBloc extends Bloc workerCount: p.count, startTime: p.startTime, endTime: p.endTime, + hourlyRateCents: + role != null ? (role.costPerHour * 100).round() : null, ); }).toList(); diff --git a/apps/mobile/packages/features/client/orders/create_order/lib/src/presentation/blocs/recurring_order/recurring_order_bloc.dart b/apps/mobile/packages/features/client/orders/create_order/lib/src/presentation/blocs/recurring_order/recurring_order_bloc.dart index ce226789..65a48ff4 100644 --- a/apps/mobile/packages/features/client/orders/create_order/lib/src/presentation/blocs/recurring_order/recurring_order_bloc.dart +++ b/apps/mobile/packages/features/client/orders/create_order/lib/src/presentation/blocs/recurring_order/recurring_order_bloc.dart @@ -380,6 +380,8 @@ class RecurringOrderBloc extends Bloc workerCount: p.count, startTime: p.startTime, endTime: p.endTime, + hourlyRateCents: + role != null ? (role.costPerHour * 100).round() : null, ); }).toList();