feat: Add event name to order items and refactor navigation and shift data access to use direct object properties.

This commit is contained in:
Achintha Isuru
2026-02-22 21:07:57 -05:00
parent 0980c6584b
commit 9e38fb7d5f
8 changed files with 150 additions and 93 deletions

View File

@@ -87,9 +87,10 @@ class ShiftsConnectorRepositoryImpl implements ShiftsConnectorRepository {
final String orderTypeStr = sr.shift.order.orderType.stringValue
.toUpperCase();
final Map<String, dynamic> orderJson = sr.shift.order.toJson();
final DateTime? startDate = _service.toDateTime(orderJson['startDate']);
final DateTime? endDate = _service.toDateTime(orderJson['endDate']);
final dc.ListShiftRolesByVendorIdShiftRolesShiftOrder order =
sr.shift.order;
final DateTime? startDate = _service.toDateTime(order.startDate);
final DateTime? endDate = _service.toDateTime(order.endDate);
final String startTime = startDt != null
? DateFormat('HH:mm').format(startDt)
@@ -102,8 +103,8 @@ class ShiftsConnectorRepositoryImpl implements ShiftsConnectorRepository {
orderType: orderTypeStr,
startDate: startDate,
endDate: endDate,
recurringDays: sr.shift.order.recurringDays,
permanentDays: sr.shift.order.permanentDays,
recurringDays: order.recurringDays,
permanentDays: order.permanentDays,
startTime: startTime,
endTime: endTime,
);