dev merge
This commit is contained in:
@@ -37,9 +37,11 @@ class ShiftDetail extends Equatable {
|
||||
this.assignmentStatus,
|
||||
this.applicationStatus,
|
||||
this.clockInMode,
|
||||
required this.allowClockInOverride,
|
||||
this.allowClockInOverride = false,
|
||||
this.geofenceRadiusMeters,
|
||||
this.nfcTagId,
|
||||
this.breakDurationMinutes,
|
||||
this.isBreakPaid = false,
|
||||
});
|
||||
|
||||
/// Deserialises from the V2 API JSON response.
|
||||
@@ -75,6 +77,8 @@ class ShiftDetail extends Equatable {
|
||||
allowClockInOverride: json['allowClockInOverride'] as bool? ?? false,
|
||||
geofenceRadiusMeters: json['geofenceRadiusMeters'] as int?,
|
||||
nfcTagId: json['nfcTagId'] as String?,
|
||||
breakDurationMinutes: json['breakDurationMinutes'] as int?,
|
||||
isBreakPaid: json['isBreakPaid'] as bool? ?? false,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -156,6 +160,12 @@ class ShiftDetail extends Equatable {
|
||||
/// NFC tag identifier for NFC-based clock-in.
|
||||
final String? nfcTagId;
|
||||
|
||||
/// Optional break duration in minutes.
|
||||
final int? breakDurationMinutes;
|
||||
|
||||
/// Whether the break is paid.
|
||||
final bool isBreakPaid;
|
||||
|
||||
/// Duration of the shift in hours.
|
||||
double get durationHours {
|
||||
return endTime.difference(startTime).inMinutes / 60;
|
||||
@@ -193,6 +203,8 @@ class ShiftDetail extends Equatable {
|
||||
'allowClockInOverride': allowClockInOverride,
|
||||
'geofenceRadiusMeters': geofenceRadiusMeters,
|
||||
'nfcTagId': nfcTagId,
|
||||
'breakDurationMinutes': breakDurationMinutes,
|
||||
'isBreakPaid': isBreakPaid,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -224,5 +236,7 @@ class ShiftDetail extends Equatable {
|
||||
allowClockInOverride,
|
||||
geofenceRadiusMeters,
|
||||
nfcTagId,
|
||||
breakDurationMinutes,
|
||||
isBreakPaid,
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user