fix(routes): update worker home route to worker main
feat(localization): add benefits and auto-match sections in English and Spanish fix(staff_main): handle route changes safely in StaffMainCubit
This commit is contained in:
@@ -25,7 +25,7 @@ class AppModule extends Module {
|
||||
// Set the initial route to the authentication module
|
||||
r.module("/", module: staff_authentication.StaffAuthenticationModule());
|
||||
|
||||
r.module('/worker-home', module: staff_main.StaffMainModule());
|
||||
r.module('/worker-main', module: staff_main.StaffMainModule());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -409,6 +409,50 @@
|
||||
"applied_for": "Applied for $title",
|
||||
"time_range": "$start - $end"
|
||||
}
|
||||
,
|
||||
"benefits": {
|
||||
"title": "Your Benefits",
|
||||
"view_all": "View all",
|
||||
"hours_label": "hours",
|
||||
"items": {
|
||||
"sick_days": "Sick Days",
|
||||
"vacation": "Vacation",
|
||||
"holidays": "Holidays"
|
||||
}
|
||||
},
|
||||
"auto_match": {
|
||||
"title": "Auto-Match",
|
||||
"finding_shifts": "Finding shifts for you",
|
||||
"get_matched": "Get matched automatically",
|
||||
"matching_based_on": "Matching based on:",
|
||||
"chips": {
|
||||
"location": "Location",
|
||||
"availability": "Availability",
|
||||
"skills": "Skills"
|
||||
}
|
||||
},
|
||||
"improve": {
|
||||
"title": "Improve Yourself",
|
||||
"items": {
|
||||
"training": {
|
||||
"title": "Training Section",
|
||||
"description": "Improve your skills and get certified.",
|
||||
"page": "/krow-university"
|
||||
},
|
||||
"podcast": {
|
||||
"title": "Krow Podcast",
|
||||
"description": "Listen to tips from top workers.",
|
||||
"page": "/krow-university"
|
||||
}
|
||||
}
|
||||
},
|
||||
"more_ways": {
|
||||
"title": "More Ways To Use Krow",
|
||||
"items": {
|
||||
"benefits": { "title": "Krow Benefits", "page": "/benefits" },
|
||||
"refer": { "title": "Refer a Friend", "page": "/worker-profile" }
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"staff_main": {
|
||||
|
||||
@@ -365,4 +365,102 @@
|
||||
"pending_badge": "PENDIENTE APROBACIÓN",
|
||||
"paid_badge": "PAGADO"
|
||||
}
|
||||
,
|
||||
"staff": {
|
||||
"home": {
|
||||
"header": {
|
||||
"welcome_back": "Welcome back",
|
||||
"user_name_placeholder": "Krower"
|
||||
},
|
||||
"banners": {
|
||||
"complete_profile_title": "Complete Your Profile",
|
||||
"complete_profile_subtitle": "Get verified to see more shifts",
|
||||
"availability_title": "Availability",
|
||||
"availability_subtitle": "Update your availability for next week"
|
||||
},
|
||||
"quick_actions": {
|
||||
"find_shifts": "Find Shifts",
|
||||
"availability": "Availability",
|
||||
"messages": "Messages",
|
||||
"earnings": "Earnings"
|
||||
},
|
||||
"sections": {
|
||||
"todays_shift": "Today's Shift",
|
||||
"scheduled_count": "$count scheduled",
|
||||
"tomorrow": "Tomorrow",
|
||||
"recommended_for_you": "Recommended for You",
|
||||
"view_all": "View all"
|
||||
},
|
||||
"empty_states": {
|
||||
"no_shifts_today": "No shifts scheduled for today",
|
||||
"find_shifts_cta": "Find shifts →",
|
||||
"no_shifts_tomorrow": "No shifts for tomorrow",
|
||||
"no_recommended_shifts": "No recommended shifts"
|
||||
},
|
||||
"pending_payment": {
|
||||
"title": "Pending Payment",
|
||||
"subtitle": "Payment processing",
|
||||
"amount": "$amount"
|
||||
},
|
||||
"recommended_card": {
|
||||
"act_now": "• ACT NOW",
|
||||
"one_day": "One Day",
|
||||
"today": "Today",
|
||||
"applied_for": "Applied for $title",
|
||||
"time_range": "$start - $end"
|
||||
},
|
||||
"benefits": {
|
||||
"title": "Your Benefits",
|
||||
"view_all": "View all",
|
||||
"hours_label": "hours",
|
||||
"items": {
|
||||
"sick_days": "Sick Days",
|
||||
"vacation": "Vacation",
|
||||
"holidays": "Holidays"
|
||||
}
|
||||
},
|
||||
"auto_match": {
|
||||
"title": "Auto-Match",
|
||||
"finding_shifts": "Finding shifts for you",
|
||||
"get_matched": "Get matched automatically",
|
||||
"matching_based_on": "Matching based on:",
|
||||
"chips": {
|
||||
"location": "Location",
|
||||
"availability": "Availability",
|
||||
"skills": "Skills"
|
||||
}
|
||||
},
|
||||
"improve": {
|
||||
"title": "Improve Yourself",
|
||||
"items": {
|
||||
"training": {
|
||||
"title": "Training Section",
|
||||
"description": "Improve your skills and get certified.",
|
||||
"page": "/krow-university"
|
||||
},
|
||||
"podcast": {
|
||||
"title": "Krow Podcast",
|
||||
"description": "Listen to tips from top workers.",
|
||||
"page": "/krow-university"
|
||||
}
|
||||
}
|
||||
},
|
||||
"more_ways": {
|
||||
"title": "More Ways To Use Krow",
|
||||
"items": {
|
||||
"benefits": { "title": "Krow Benefits", "page": "/benefits" },
|
||||
"refer": { "title": "Refer a Friend", "page": "/worker-profile" }
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"staff_main": {
|
||||
"tabs": {
|
||||
"shifts": "Shifts",
|
||||
"payments": "Payments",
|
||||
"home": "Home",
|
||||
"clock_in": "Clock In",
|
||||
"profile": "Profile"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ class StaffMainCubit extends Cubit<StaffMainState> implements Disposable {
|
||||
}
|
||||
|
||||
void _onRouteChanged() {
|
||||
if (isClosed) return;
|
||||
final String path = Modular.to.path;
|
||||
int newIndex = state.currentIndex;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
abstract class StaffMainRoutes {
|
||||
static const String modulePath = '/worker-home';
|
||||
static const String modulePath = '/worker-main';
|
||||
|
||||
static const String shifts = '/shifts';
|
||||
static const String payments = '/payments';
|
||||
|
||||
Reference in New Issue
Block a user