Added My Schedule tab in attendance screen

Allow 1 Day, Whole Week and Date Range swapping
This commit is contained in:
2026-03-22 11:52:25 +08:00
parent ba155885c0
commit 049ab2c794
17 changed files with 2515 additions and 305 deletions
+3
View File
@@ -12,6 +12,7 @@ class DutySchedule {
required this.checkInAt,
required this.checkInLocation,
required this.relieverIds,
this.swapRequestId,
});
final String id;
@@ -24,6 +25,7 @@ class DutySchedule {
final DateTime? checkInAt;
final Object? checkInLocation;
final List<String> relieverIds;
final String? swapRequestId;
factory DutySchedule.fromMap(Map<String, dynamic> map) {
final relieversRaw = map['reliever_ids'];
@@ -47,6 +49,7 @@ class DutySchedule {
: AppTime.parse(map['check_in_at'] as String),
checkInLocation: map['check_in_location'],
relieverIds: relievers,
swapRequestId: map['swap_request_id'] as String?,
);
}
}
+5
View File
@@ -12,6 +12,7 @@ class PassSlip {
this.approvedAt,
this.slipStart,
this.slipEnd,
this.requestedStart,
});
final String id;
@@ -24,6 +25,7 @@ class PassSlip {
final DateTime? approvedAt;
final DateTime? slipStart;
final DateTime? slipEnd;
final DateTime? requestedStart;
/// Whether the slip is active (approved but not yet completed).
bool get isActive => status == 'approved' && slipEnd == null;
@@ -52,6 +54,9 @@ class PassSlip {
slipEnd: map['slip_end'] == null
? null
: AppTime.parse(map['slip_end'] as String),
requestedStart: map['requested_start'] == null
? null
: AppTime.parse(map['requested_start'] as String),
);
}
}