feat: Implement language selection feature in staff profile onboarding

This commit is contained in:
Achintha Isuru
2026-02-19 15:45:24 -05:00
parent 5cf0c91ebe
commit 4d935cd80c
7 changed files with 209 additions and 19 deletions

View File

@@ -16,14 +16,14 @@ class StaffPaths {
/// Generate child route based on the given route and parent route
///
/// This is useful for creating nested routes within modules.
static String childRoute(String parent, String child) {
static String childRoute(String parent, String child) {
final String childPath = child.replaceFirst(parent, '');
// check if the child path is empty
if (childPath.isEmpty) {
return '/';
}
}
// ensure the child path starts with a '/'
if (!childPath.startsWith('/')) {
return '/$childPath';
@@ -31,7 +31,7 @@ class StaffPaths {
return childPath;
}
// ==========================================================================
// AUTHENTICATION
// ==========================================================================
@@ -107,8 +107,7 @@ class StaffPaths {
/// Path format: `/worker-main/shift-details/{shiftId}`
///
/// Example: `/worker-main/shift-details/shift123`
static String shiftDetails(String shiftId) =>
'$shiftDetailsRoute/$shiftId';
static String shiftDetails(String shiftId) => '$shiftDetailsRoute/$shiftId';
// ==========================================================================
// ONBOARDING & PROFILE SECTIONS
@@ -117,8 +116,17 @@ class StaffPaths {
/// Personal information onboarding.
///
/// Collect basic personal information during staff onboarding.
static const String onboardingPersonalInfo =
'/worker-main/onboarding/personal-info/';
static const String onboardingPersonalInfo = '/worker-main/personal-info/';
// ==========================================================================
// PERSONAL INFORMATION & PREFERENCES
// ==========================================================================
/// Language selection page.
///
/// Allows staff to select their preferred language for the app interface.
static const String languageSelection =
'/worker-main/personal-info/language-selection/';
/// Emergency contact information.
///