Commit Graph

93 Commits

Author SHA1 Message Date
Achintha Isuru
9039aa63d6 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.
2026-03-18 17:21:30 -04:00
Achintha Isuru
3a5f2cc9c6 feat(shifts): implement submit for approval functionality
- Added `submitForApproval` method to `ShiftsRepositoryInterface` and its implementation in `ShiftsRepositoryImpl`.
- Created `SubmitForApprovalUseCase` to handle the submission logic.
- Updated `ShiftsBloc` to handle `SubmitForApprovalEvent` and manage submission state.
- Enhanced `HistoryShiftsTab` and `MyShiftsTab` to support submission actions and display appropriate UI feedback.
- Refactored date utilities for better calendar management and filtering of past shifts.
- Improved UI components for better spacing and alignment.
- Localized success messages for shift submission actions.
2026-03-18 14:37:55 -04:00
Achintha Isuru
9ee8467632 Refactor widgets & imports; add krow_domain
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.
2026-03-18 10:27:31 -04:00
Achintha Isuru
b6a655a261 feat: enhance API error handling and response structure; introduce ApiException for V2 error codes 2026-03-17 14:15:26 -04:00
Achintha Isuru
e1d30c124b feat: migrate experience management to V2 API; add support for industries and skills 2026-03-17 13:44:48 -04:00
Achintha Isuru
020c785b6f Cancel background tasks and clear feature scopes
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.
2026-03-17 12:22:09 -04:00
Achintha Isuru
376b4e4431 feat: Update API endpoint usage in repositories to remove redundant path property
- 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.
2026-03-17 12:01:06 -04:00
Achintha Isuru
57bba8ab4e Refactor API endpoint usage across multiple repositories to use ClientEndpoints and StaffEndpoints
- 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.
2026-03-17 11:40:15 -04:00
Achintha Isuru
31231c1e6d feat(api): refactor API endpoints to use structured ApiEndpoint class and introduce new endpoint files 2026-03-17 11:26:44 -04:00
Achintha Isuru
eccd2c6dbd Use UserRole enum for session role handling
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.
2026-03-17 11:19:54 -04:00
Achintha Isuru
cc4e2664b6 feat(auth): enhance session management with proactive token refresh and error handling 2026-03-17 11:09:12 -04:00
Achintha Isuru
ba5bf8e1d7 refactor(session): migrate V2 session listener initialization to improve dependency injection and role handling 2026-03-17 10:55:18 -04:00
Achintha Isuru
b289ed3b02 feat(auth): add staff-specific sign-out endpoint and enhance session management 2026-03-17 10:21:57 -04:00
Achintha Isuru
b31a615092 feat: Migrate staff profile features from Data Connect to V2 REST API
- 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.
2026-03-16 22:45:06 -04:00
Achintha Isuru
4834266986 feat: add entities for staff personal info, reports, shifts, and user sessions
- 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.
2026-03-16 15:59:22 -04:00
Achintha Isuru
28a219bbea Refactor clock-in feature: Introduce validation pipeline and interaction strategies
- 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.
2026-03-14 19:58:43 -04:00
Achintha Isuru
08a4326da4 feat: Add task execution callback registration to BackgroundTaskService and update geofence dispatcher to use it 2026-03-14 00:59:39 -04:00
Achintha Isuru
8fcf1d9d98 feat: Enhance background geofence functionality with notifications and localization support 2026-03-13 21:44:39 -04:00
Achintha Isuru
accff00155 feat: Enhance geofence functionality with new status banners and utility functions 2026-03-13 16:34:09 -04:00
Achintha Isuru
7b576c0ed4 feat: Implement notification and storage services, geofence management, and BLoC for geofence verification
- Add NotificationService for handling local notifications.
- Introduce StorageService for key-value storage using SharedPreferences.
- Create DeviceLocation model to represent geographic locations.
- Define LocationPermissionStatus enum for managing location permissions.
- Implement BackgroundGeofenceService for periodic geofence checks while clocked in.
- Develop GeofenceServiceImpl for geofence proximity verification using LocationService.
- Create GeofenceResult model to encapsulate geofence check results.
- Define GeofenceServiceInterface for geofence service abstraction.
- Implement GeofenceBloc to manage geofence verification and background tracking.
- Create events and states for GeofenceBloc to handle various geofence scenarios.
- Add GeofenceStatusBanner widget to display geofence verification status in the UI.
2026-03-13 16:01:26 -04:00
Achintha Isuru
316a148726 feat: Implement review order flow for one-time, recurring, and permanent orders
- Added ReviewOrderPage to handle order review before submission.
- Created ReviewOrderArguments model to pass data between pages.
- Implemented schedule sections for one-time, recurring, and permanent orders.
- Enhanced navigation flow to confirm order submission after review.
- Refactored order submission logic in OneTimeOrderPage, PermanentOrderPage, and RecurringOrderPage.
- Introduced utility functions for time parsing and scheduling.
- Created reusable widgets for displaying order information in the review section.
- Updated navigation methods to use popSafe for safer back navigation.
- Added MainActivity for Android platform integration.
2026-03-09 19:49:23 -04:00
Achintha Isuru
2484c6cff2 Refactor code structure for improved readability and maintainability 2026-03-09 16:26:53 -04:00
Achintha Isuru
7a5c130289 refactor: change singleton registrations to lazySingleton for improved performance 2026-03-09 15:01:18 -04:00
Achintha Isuru
8497709356 fix: Correct formatting and improve comments in various files for clarity 2026-03-02 12:38:57 -05:00
Achintha Isuru
26c4327ec5 refactor: reload billing data and update awaiting approval navigation to be awaitable. 2026-02-28 17:31:57 -05:00
Achintha Isuru
53b612851c refactor: enhance navigation robustness by introducing popSafe and safePushNamedAndRemoveUntil methods and updating their usage. 2026-02-28 17:23:53 -05:00
Achintha Isuru
c26128f1f2 feat: Enhance navigation robustness by redirecting to the appropriate home page on navigation errors or when popping the root route. 2026-02-28 17:02:44 -05:00
Achintha Isuru
76424b1b1f refactor: extract invoice approval and dispute logic into a dedicated ShiftCompletionReviewBloc. 2026-02-28 16:02:10 -05:00
Achintha Isuru
d609dd75fa Merge branch 'dev' into 493-implement-rapid-order-creation-voice-text-in-client-mobile-app 2026-02-27 15:32:11 -05:00
Achintha Isuru
28cc0e3574 feat: Enable pre-filling document upload page with existing document URLs and update navigation method usage. 2026-02-27 13:35:04 -05:00
Achintha Isuru
e0d633d65d Merge branch '493-implement-rapid-order-creation-voice-text-in-client-mobile-app' into dev 2026-02-27 13:17:41 -05:00
Achintha Isuru
9d25fd44cc Add rapid order parsing & audio recording
Add support for transcribing and parsing rapid (urgent) orders into one-time order drafts. Introduces ParseRapidOrderTextToOrderUseCase and wiring for TranscribeRapidOrderUseCase, implements parseRapidOrder and transcribeRapidOrder in the client repository, and injects these into the RapidOrderBloc and module. Adds the record package dependency and registers the record plugin for iOS/macOS targets. Updates OneTimeOrder state, bloc and views to handle rapid-order drafts and navigate to the one-time order flow after parsing. Also includes small formatting and navigator changes.
2026-02-27 13:16:11 -05:00
Achintha Isuru
55a31661a1 feat: Implement audio recording and transcription for rapid order creation across platforms. 2026-02-27 11:49:17 -05:00
Achintha Isuru
52bdf48155 feat: Add RAPID order transcription and parsing services with associated response models and API endpoints. 2026-02-27 11:35:09 -05:00
Achintha Isuru
425bf19a9b feat: Implement full certificate management with upload, upsert, delete, and new domain models for staff certificates and their statuses. 2026-02-26 23:28:59 -05:00
Achintha Isuru
1aa5132abe feat: implement document upload functionality with dedicated UI, state management, and routing. 2026-02-26 16:11:24 -05:00
Achintha Isuru
b8d07380c0 replace the "Krow" with "KROW" 2026-02-26 15:13:26 -05:00
Achintha Isuru
083744cd34 feat: Implement attire item filtering and refactor attire capture flow and repository logic 2026-02-25 22:18:25 -05:00
Achintha Isuru
c7c505f743 feat: Implement modular routing for the attire capture page with a new route path and navigator method. 2026-02-25 19:30:42 -05:00
Achintha Isuru
4515d42cd3 feat: Enhance attire verification status system with more granular states and update related UI and data handling. 2026-02-25 19:05:03 -05:00
Achintha Isuru
6eafba311b refactor: Implement custom DioClient with AuthInterceptor and strongly typed API service responses. 2026-02-25 15:10:44 -05:00
Achintha Isuru
9c9cdaca78 feat: Implement attire photo capture, update AttireItem entity, and streamline the photo upload and state management flow. 2026-02-25 13:56:35 -05:00
Achintha Isuru
0ad70a4a42 Merge branch 'dev' into 503-build-dedicated-interface-to-display-hub-details 2026-02-25 13:07:59 -05:00
Achintha Isuru
ed2b4f0563 feat: Enable users to upload attire photos via camera or gallery. 2026-02-25 12:58:30 -05:00
Achintha Isuru
19b82ff73a feat: device services implemented 2026-02-25 12:39:25 -05:00
Achintha Isuru
08920ada3d feat: Externalize Core API base URL to AppConfig and environment configuration. 2026-02-25 10:57:34 -05:00
Achintha Isuru
a21fbf6871 feat: Introduce FileVisibility enum and refactor FileUploadService to use it instead of magic strings for file access levels. 2026-02-25 10:50:42 -05:00
Achintha Isuru
ab197c154a feat: Implement core API services for verification, file upload, signed URLs, and LLM, including their response models and API endpoints. 2026-02-25 10:44:39 -05:00
Achintha Isuru
77bb469186 refactor: introduce base API service and core service for standardized API interaction and error handling. 2026-02-25 10:33:27 -05:00
Achintha Isuru
71c1610c0e feat: Implement ApiService with Dio for standardized API requests and responses using ApiResponse entity. 2026-02-25 10:05:41 -05:00