feat: add benefit history feature with lazy loading and pagination
- Implemented `getBenefitsHistory` method in `HomeRepository` to retrieve paginated benefit history. - Enhanced `BenefitsOverviewCubit` to manage loading and displaying benefit history. - Created `BenefitHistoryPage` for full-screen display of benefit history with infinite scroll support. - Added `BenefitHistoryPreview` widget for expandable history preview in benefit cards. - Introduced `BenefitHistoryRow` to display individual history records. - Updated `BenefitsOverviewState` to include history management fields. - Added new entities and use cases for handling benefit history. - Created design system documentation for UI patterns and known gaps.
This commit is contained in:
@@ -60,6 +60,20 @@ extension StaffNavigator on IModularNavigator {
|
||||
safePush(StaffPaths.benefits);
|
||||
}
|
||||
|
||||
/// Navigates to the full history page for a specific benefit.
|
||||
void toBenefitHistory({
|
||||
required String benefitId,
|
||||
required String benefitTitle,
|
||||
}) {
|
||||
safePush(
|
||||
StaffPaths.benefitHistory,
|
||||
arguments: <String, dynamic>{
|
||||
'benefitId': benefitId,
|
||||
'benefitTitle': benefitTitle,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
void toStaffMain() {
|
||||
safePushNamedAndRemoveUntil('${StaffPaths.main}/home/', (_) => false);
|
||||
}
|
||||
|
||||
@@ -75,6 +75,9 @@ class StaffPaths {
|
||||
/// Benefits overview page.
|
||||
static const String benefits = '/worker-main/home/benefits';
|
||||
|
||||
/// Benefit history page for a specific benefit.
|
||||
static const String benefitHistory = '/worker-main/home/benefits/history';
|
||||
|
||||
/// Shifts tab - view and manage shifts.
|
||||
///
|
||||
/// Browse available shifts, accepted shifts, and shift history.
|
||||
|
||||
Reference in New Issue
Block a user