refactor: Enhance StaffPayment model and PaymentHistoryItem widget with shift details

This commit is contained in:
Achintha Isuru
2026-03-04 13:37:42 -05:00
parent 256f9fd678
commit 38007d32bc
4 changed files with 50 additions and 12 deletions

View File

@@ -28,6 +28,12 @@ class StaffPayment extends Equatable {
required this.amount,
required this.status,
this.paidAt,
this.shiftTitle,
this.shiftLocation,
this.locationAddress,
this.hoursWorked,
this.hourlyRate,
this.workedTime,
});
/// Unique identifier.
final String id;
@@ -47,6 +53,24 @@ class StaffPayment extends Equatable {
/// When the payment was successfully processed.
final DateTime? paidAt;
/// Title of the shift worked.
final String? shiftTitle;
/// Location/hub name of the shift.
final String? shiftLocation;
/// Address of the shift location.
final String? locationAddress;
/// Number of hours worked.
final double? hoursWorked;
/// Hourly rate for the shift.
final double? hourlyRate;
/// Work session duration or status.
final String? workedTime;
@override
List<Object?> get props => <Object?>[id, staffId, assignmentId, amount, status, paidAt];
List<Object?> get props => <Object?>[id, staffId, assignmentId, amount, status, paidAt, shiftTitle, shiftLocation, locationAddress, hoursWorked, hourlyRate, workedTime];
}