Use StaffPaths and core imports across staff modules

Centralize and standardize routing by introducing StaffPaths constants (shiftDetailsRoute, formI9, formW4) and using StaffPaths.childRoute in multiple staff feature modules instead of hardcoded paths. Add package:krow_core/core.dart imports where needed, clean up minor formatting/constructor spacing, make some route callbacks explicitly typed, replace shiftDetails string interpolation with the new constant, and remove a debug print from phone verification. These changes unify route definitions and add explicit tax-form routes (I-9 and W-4).
This commit is contained in:
Achintha Isuru
2026-02-04 18:36:37 -05:00
parent 3b11c49d90
commit ccf8930126
14 changed files with 85 additions and 33 deletions

View File

@@ -91,6 +91,11 @@ class StaffPaths {
// SHIFT MANAGEMENT
// ==========================================================================
/// Shift details route.
///
/// View detailed information for a specific shift.
static const String shiftDetailsRoute = '/worker-main/shift-details';
/// Shift details page (dynamic).
///
/// View detailed information for a specific shift.
@@ -98,7 +103,7 @@ class StaffPaths {
///
/// Example: `/worker-main/shift-details/shift123`
static String shiftDetails(String shiftId) =>
'/worker-main/shift-details/$shiftId';
'$shiftDetailsRoute/$shiftId';
// ==========================================================================
// ONBOARDING & PROFILE SECTIONS
@@ -153,6 +158,16 @@ class StaffPaths {
/// Manage W-4, tax withholding, and related tax documents.
static const String taxForms = '/worker-main/tax-forms';
/// Form I-9 - Employment Eligibility Verification.
///
/// Complete and manage I-9 employment verification form.
static const String formI9 = '/worker-main/tax-forms/i9';
/// Form W-4 - Employee's Withholding Certificate.
///
/// Complete and manage W-4 tax withholding form.
static const String formW4 = '/worker-main/tax-forms/w4';
/// Time card - view detailed time tracking records.
///
/// Access detailed time entries and timesheets.