Commit Graph

91 Commits

Author SHA1 Message Date
Achintha Isuru
d12b45a37d Expose parseDouble; fix shift mapping and UI
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.
2026-03-17 12:14:14 -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
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
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
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
38007d32bc refactor: Enhance StaffPayment model and PaymentHistoryItem widget with shift details 2026-03-04 13:37:42 -05:00
Achintha Isuru
6d9cb64487 refactor: Move constructor to the top of the Benefit class for improved readability 2026-03-03 21:26:48 -05:00
Achintha Isuru
f39f8860ea Persist verificationId for staff certificates
Add support for verificationId throughout the certificate flow: schema, GraphQL mutations/queries, domain, repositories, service implementation, and UI.

- Backend: add verificationId to Certificate schema and include it in upsert/create mutations; add auth insecureReason notes to related connector operations.
- Data layer: add verificationId parameter to StaffConnectorRepository API and propagation in implementation (SDK call remains commented with FIXME until dataconnect SDK is regenerated).
- Domain: add verificationId field to StaffCertificate (constructor, copyWith, props).
- Certificates flow: create verification via verificationService, pass returned verificationId to upsertStaffCertificate so the verification record is persisted with the certificate.
- UI: update certificate upload page to show existing file path, disable editing of name/issuer/number, rearrange fields, move remove button, change file icon and text style.
- Misc: minor lambda formatting cleanup in benefits mapping.

Note: the generated dataconnect SDK must be refreshed to enable the new .verificationId(...) call (there is a commented FIXME in the connector implementation).
2026-02-27 15:27:15 -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
5ab5182c1b feat: Implement comprehensive staff document management with verification status tracking and complete document listing. 2026-02-26 22:23:27 -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
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
e2f3de3a54 feat: introduce BaseDeviceService to standardize interactions with native device features. 2026-02-25 12:29:47 -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
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
eeb8c28a61 hub & manager issues 2026-02-25 19:58:28 +05:30
239fdb99a8 Fix remaining stash issues by reverting to origin/dev 2026-02-25 13:46:19 +05:30
4e7838bf93 Fix stash conflict 2026-02-25 13:35:58 +05:30
4d4a9b6a66 Merge dev 2026-02-25 13:35:18 +05:30
17c2c2afbb Merge dev 2026-02-25 13:34:52 +05:30
714702015c UI fields for cost center 2026-02-25 13:03:04 +05:30
Achintha Isuru
fd0208efa0 feat: Introduce AttireVerificationStatus enum and add verificationId to staff attire items. 2026-02-24 17:31:41 -05:00
Achintha Isuru
616f23fec9 feat: Implement staff attire management including fetching options, user attire status, and upserting attire details. 2026-02-24 17:16:52 -05:00
Achintha Isuru
b29351a3aa refactor: Replace attire option 'icon' field with 'description' across the schema and data models, and update the UI to display the new description. 2026-02-24 15:13:06 -05:00
7e26b54c50 feat: complete client billing UI and staff benefits display (#524, #527)
- Client App: Built dedicated ShiftCompletionReviewPage  and InvoiceReadyPage
- Client App: Wired up invoice summary mapping and parsing logic from Data Connect
- Staff App: Added dynamic BenefitsOverviewPage tracking worker limits matching client mockup
- Staff App: Display progress ring values wired to real VendorBenefitPlan & BenefitsData balances
2026-02-24 16:17:19 +05:30
Achintha Isuru
9e38fb7d5f feat: Add event name to order items and refactor navigation and shift data access to use direct object properties. 2026-02-22 21:07:57 -05:00
Achintha Isuru
6e81d403c3 feat: Add support for displaying recurring shift details including start/end dates and recurring days. 2026-02-22 15:15:41 -05:00
Achintha Isuru
214e0d1237 feat: Implement order details retrieval for pre-filling new order forms for reordering. 2026-02-22 02:18:33 -05:00
Achintha Isuru
c5e48ffbc6 refactor: Update reorder suggestions to fetch and display completed orders with aggregated totals instead of individual shift roles. 2026-02-21 22:44:26 -05:00
Achintha Isuru
6de6661394 feat: add OrderType enum and integrate orderType in OrderItem and ViewOrdersCubit 2026-02-21 20:53:27 -05:00
Achintha Isuru
6e50369e17 refactor: remove OrderType entity and update order types to use UiOrderType 2026-02-21 20:29:59 -05:00
1d09e20ac8 fix: resolve duplicate fields in Shift and unreachable code in ShiftsRepositoryImpl from bad merge 2026-02-20 21:15:57 +05:30
f7284b5cfb Merge branch 'dev' into feature/session-persistence-424 2026-02-20 20:56:18 +05:30
Achintha Isuru
bfc2453363 Merge pull request #444 from Oloodi/staff_recurring_permanent_order
Staff recurring permanent order
2026-02-20 10:18:03 -05:00
474be43448 fix: add ignore_for_file to data connect Repos and modify CI to avoid analyzing deleted files 2026-02-20 19:51:44 +05:30
8849bf2273 feat: architecture overhaul, launchpad-style reports, and uber-style locations
- Strengthened Buffer Layer architecture to decouple Data Connect from Domain
- Rewired Coverage, Performance, and Forecast reports to match Launchpad logic
- Implemented Uber-style Preferred Locations search using Google Places API
- Added session recovery logic to prevent crashes on app restart
- Synchronized backend schemas & SDK for ShiftStatus enums
- Fixed various build/compilation errors and localization duplicates
2026-02-20 17:20:06 +05:30
9e9eb0f374 finalcommitform4 2026-02-19 16:09:54 +05:30
da8f9a4436 chore: restore stashed work - new order usecases and domain entities 2026-02-19 13:56:35 +05:30
José Salazar
8b6061cb30 correction of change view for recurring and permant - show permanet and recurring in find shift 2026-02-18 19:23:15 -05:00
José Salazar
bb8c5733ba Merge pull request #434 from Oloodi/recreate_validation
recurring + permanent order
2026-02-18 14:38:35 -05:00
José Salazar
75e534620d permanent order v1 2026-02-17 18:59:31 -05:00
José Salazar
85c8a09d9e first version of recurring order 2026-02-17 16:24:59 -05:00
Achintha Isuru
9e1af17328 feat: Refactor bank account handling in billing and staff modules
- Introduced new bank account entities: BusinessBankAccount and StaffBankAccount.
- Updated bank account adapter to handle new entities.
- Removed legacy BankAccount entity and its adapter.
- Implemented use case for fetching bank accounts in billing repository.
- Updated BillingBloc and BillingState to include bank accounts.
- Refactored PaymentMethodCard to display bank account information.
- Adjusted actions widget layout for better UI consistency.
- Updated staff bank account repository and use cases to utilize new entity structure.
- Ensured all references to bank accounts in the codebase are updated to the new structure.
2026-02-17 12:05:24 -05:00
Achintha Isuru
9b6cad3bde feat(breaks): Implement break functionality with Break entity and adapter 2026-02-16 13:26:04 -05:00
José Salazar
761d718ffe deleting files with accepeted status of application 2026-02-10 12:11:25 -05:00
5e7bf0d5c0 refactor: centralize data connect error handling and resolve build issues across applications
This commit addresses several critical issues across the mobile monorepo:

1. Centralized Error Handling: Integrated DataErrorHandler mixin into all repository implementations, ensuring consistent mapping of Data Connect exceptions to domain AppExceptions.
2. Build Stabilization: Fixed numerous type mismatches, parameter signature errors in widgets (e.g., google_places_flutter itemBuilder), and naming conflicts (StaffSession, FirebaseAuth).
3. Code Quality: Applied 'dart fix' across all modified packages and manually cleared debug print statements and UI clutter.
4. Mono-repo alignment: Standardized Data Connect usage and aliasing ('dc.') for better maintainability.

Signed-off-by: Suriya <suriya@tenext.in>
2026-02-06 13:28:57 +05:30
José Salazar
8cc20a09ff Merge branch '312-feature-integrate-google-maps-places-autocomplete-for-hub-address-validation' into fix_staff_app_bugs 2026-02-02 22:33:10 +09:00