Clean up widget code and update a dependency:
- Remove redundant const qualifiers and tidy widget children in several skeleton/header widgets for consistent style.
- Add super.key to TaxFormsProgressOverview, TaxFormStatusBadge, and AccountCard constructors.
- Simplify AccountCard by consolidating its constructor into a single const declaration.
- Minor fixes: adjust Image.onError parameter, reformat CircleAvatar/Icon construction in edit_profile_page.
- Add bloc ^8.1.4 to staff/authentication pubspec.
These changes are stylistic and aim to improve consistency and constructor patterns across the codebase.
Add local krow_domain dependency to client, staff apps and client home package. Numerous UI/widget cleanups across features: add const where applicable, use explicit List<Widget> types and List<Widget>.generate, add super.key to constructors, tighten BlocProvider generics, replace some Containers with SizedBox, and simplify InputDecoration/Border constructors. Fix API error handler to return a const UnknownException. Update internal imports to package-style paths (staff_home, staff_payments, staff_main repository interface) and normalize Flutter imports (use material.dart). Add missing braces for early returns in tax form pages. Mostly formatting and small API/typing refactors with no behavioral changes intended.
- Introduced ShiftCard widget to standardize the display of shift information across different states (assigned, completed, cancelled, pending).
- Removed redundant card implementations (_CompletedShiftCard, MyShiftCard, ShiftAssignmentCard) and replaced them with ShiftCard.
- Updated localization for empty states and shift titles in HistoryShiftsTab and MyShiftsTab.
- Enhanced MyShiftsTab to track submitted shifts locally and show appropriate actions based on shift status.
- Added meta package dependency for improved type annotations.
Ensure sign-out cleans up background work and feature state: import BackgroundTaskService and FeatureGate, invoke BackgroundTaskService.cancelAll() inside a try/catch in the sign-out finally block, and call FeatureGate.instance.clearScopes(). Existing client/staff session clearing and handleSignOut() are preserved.
Rename and expose numeric parser (from _parseDouble to parseDouble) with a doc comment so other modules can reuse it. Update ClockIn repository mapping to populate orderId and prefer clientName for the shift title, and map latitude/longitude using Shift.parseDouble. Remove outdated TODOs and remove the selected/today badge text from the shift card UI. These changes consolidate parsing logic, improve today-shift mapping fidelity, and simplify the shift card display.
- Refactored multiple repository implementations across client and staff features to directly use endpoint objects without accessing the `path` property.
- Introduced a new `FeatureGate` class for client-side feature gating based on user scopes, allowing for better access control to API endpoints.
- Added `ApiEndpoint` class to represent API endpoints with their paths and required scopes for future feature gating.
- Updated ClientOrderQueryRepositoryImpl to replace V2ApiEndpoints with ClientEndpoints for vendor, role, hub, and manager retrieval methods.
- Modified ViewOrdersRepositoryImpl to utilize ClientEndpoints for order viewing, editing, and vendor retrieval.
- Refactored ReportsRepositoryImpl to switch from V2ApiEndpoints to ClientEndpoints for various report fetching methods.
- Changed SettingsRepositoryImpl to use AuthEndpoints for sign-out functionality.
- Adjusted AuthRepositoryImpl to replace V2ApiEndpoints with AuthEndpoints for phone authentication and sign-out processes.
- Updated ProfileSetupRepositoryImpl to utilize StaffEndpoints for profile setup.
- Refactored AvailabilityRepositoryImpl to switch from V2ApiEndpoints to StaffEndpoints for availability management.
- Changed ClockInRepositoryImpl to use StaffEndpoints for clock-in and clock-out functionalities.
- Updated HomeRepositoryImpl to replace V2ApiEndpoints with StaffEndpoints for dashboard and profile completion retrieval.
- Refactored PaymentsRepositoryImpl to utilize StaffEndpoints for payment summaries and history.
- Changed ProfileRepositoryImpl to switch from V2ApiEndpoints to StaffEndpoints for staff profile and section status retrieval.
- Updated CertificatesRepositoryImpl to use StaffEndpoints for certificate management.
- Refactored DocumentsRepositoryImpl to switch from V2ApiEndpoints to StaffEndpoints for document management.
- Changed TaxFormsRepositoryImpl to utilize StaffEndpoints for tax form management.
- Updated BankAccountRepositoryImpl to switch from V2ApiEndpoints to StaffEndpoints for bank account management.
- Refactored TimeCardRepositoryImpl to use StaffEndpoints for time card retrieval.
- Changed AttireRepositoryImpl to utilize StaffEndpoints for attire management.
- Updated EmergencyContactRepositoryImpl to switch from V2ApiEndpoints to StaffEndpoints for emergency contact management.
- Refactored ExperienceRepositoryImpl to use StaffEndpoints for industry and skill retrieval.
- Changed PersonalInfoRepositoryImpl to switch from V2ApiEndpoints to StaffEndpoints for personal information management.
- Updated FaqsRepositoryImpl to utilize StaffEndpoints for FAQs retrieval.
- Refactored PrivacySettingsRepositoryImpl to switch from V2ApiEndpoints to StaffEndpoints for privacy settings management.
- Changed ShiftsRepositoryImpl to use StaffEndpoints for shift management and retrieval.
- Updated StaffMainRepositoryImpl to switch from V2ApiEndpoints to StaffEndpoints for profile completion checks.
Replace string-based role handling with a typed UserRole enum. Adds src/entities/enums/user_role.dart and exports it from krow_domain. Update SessionHandlerMixin to use List<UserRole> and change fetchUserRole to return UserRole?. V2SessionService now derives the role via UserRole.fromSessionData, and client/staff SessionListener widgets pass const <UserRole>[...] when initializing the auth listener. This centralizes role derivation and eliminates scattered role string literals.
Consolidate and reorder imports in the client authentication repository by moving the auth_repository_interface import to the top and removing the duplicate import. Also remove the unused UnauthorizedAppException reference from the imported symbols. In the staff authentication repository, drop the unused requiresProfileSetup variable (extracted from API response) and tidy up minor whitespace—removing dead code and silencing analyzer warnings.
- Removed data_connect package from mobile pubspec.yaml.
- Added documentation for V2 profile migration status and QA findings.
- Implemented new session management with ClientSessionStore and StaffSessionStore.
- Created V2SessionService for handling user sessions via the V2 API.
- Developed use cases for cancelling late worker assignments and submitting worker reviews.
- Added arguments and use cases for payment chart retrieval and profile completion checks.
- Implemented repository interfaces and their implementations for staff main and profile features.
- Ensured proper error handling and validation in use cases.
- Implemented StaffPersonalInfo entity for staff profile data.
- Created ReportSummary entity for summarizing report metrics.
- Added SpendReport and SpendDataPoint entities for spend reporting.
- Introduced AssignedShift, CancelledShift, CompletedShift, OpenShift, PendingAssignment, ShiftDetail, TodayShift entities for shift management.
- Developed ClientSession and StaffSession entities for user session management.
Update BackgroundGeofenceService to register the periodic geofence task with a 15-minute interval instead of 10 seconds. This reduces frequent wakeups and resource usage and better matches typical platform background scheduling constraints.
- Added localization for hourly rate in English and Spanish.
- Updated background geofence service to use localized notification titles and bodies.
- Enhanced ClockInBloc to compute time window flags for check-in/check-out availability.
- Updated ClockInState and ClockInEvent to include check-in/check-out availability flags and messages.
- Refactored ClockInActionSection to display availability messages based on computed flags.
- Ensured compliance with design system for user-facing strings and notification messages.
- Added a validation pipeline for clock-in actions, including geofence, time window, and override notes validators.
- Created a context class for passing validation data and results.
- Implemented check-in interaction strategies for swipe and NFC methods, encapsulating their UI and behavior.
- Removed redundant utility functions and centralized time formatting in a new utility file.
- Enhanced the notification service to handle clock-in and clock-out notifications separately.
- Updated the ClockInBloc to utilize the new validation and notification services.
- Cleaned up the ClockInActionSection widget to use the new interaction strategies and removed unnecessary listeners.
- Deleted old geofence_event.dart and geofence_state.dart files.
- Created new geofence_event.dart and geofence_state.dart files under a dedicated geofence directory.
- Moved clock_in_bloc.dart, clock_in_event.dart, and clock_in_state.dart to a new clock_in directory for better organization.
- Updated import paths throughout the codebase to reflect the new structure.
- Implemented new ClockInBloc and GeofenceBloc classes to handle clock-in and geofence functionalities respectively.
- Enhanced event and state management for clock-in operations, including handling location verification and geofence checks.