166 Commits

Author SHA1 Message Date
39263a4af5 chore: fix 273+ analysis issues and repair corrupted core files 2026-03-20 21:05:23 +05:30
e671827dc4 Merge dev into feature branch 2026-03-19 13:16:04 +05:30
Achintha Isuru
843eec5692 feat: Refactor context reading in emergency contact and FAQs widgets
- Updated the context reading method in `EmergencyContactAddButton` and `EmergencyContactFormItem` to use `ReadContext`.
- Modified the `FaqsWidget` to utilize `ReadContext` for fetching FAQs.
- Adjusted the `PrivacySectionWidget` to read from `PrivacySecurityBloc` using `ReadContext`.

feat: Implement Firebase Auth isolation pattern

- Introduced `FirebaseAuthService` and `FirebaseAuthServiceImpl` to abstract Firebase Auth operations.
- Ensured features do not directly import `firebase_auth`, adhering to architecture rules.

feat: Create repository interfaces for billing and coverage

- Added `BillingRepositoryInterface` for billing-related operations.
- Created `CoverageRepositoryInterface` for coverage data access.

feat: Add use cases for order management

- Implemented use cases for fetching hubs, managers, and roles related to orders.
- Created `GetHubsUseCase`, `GetManagersByHubUseCase`, and `GetRolesByVendorUseCase`.

feat: Develop report use cases for client reports

- Added use cases for fetching various reports including coverage, daily operations, forecast, no-show, performance, and spend reports.
- Implemented `GetCoverageReportUseCase`, `GetDailyOpsReportUseCase`, `GetForecastReportUseCase`, `GetNoShowReportUseCase`, `GetPerformanceReportUseCase`, and `GetSpendReportUseCase`.

feat: Establish profile repository and use cases

- Created `ProfileRepositoryInterface` for staff profile data access.
- Implemented use cases for retrieving staff profile and section statuses: `GetStaffProfileUseCase` and `GetProfileSectionsUseCase`.
- Added `SignOutUseCase` for signing out the current user.
2026-03-19 01:10:27 -04:00
67df7957c6 Merge branch 'dev' of https://github.com/Oloodi/krow-workforce into feature/session-persistence-new 2026-03-19 10:27:42 +05:30
Achintha Isuru
18b74473dc feat(time_card): refactor TimeCardPage to use StatelessWidget and optimize Bloc initialization
feat(time_card): change GetTimeCardsUseCase to lazy singleton in StaffTimeCardModule
feat(clock_in): update use cases to lazy singleton in StaffClockInModule
2026-03-18 16:01:41 -04:00
Achintha Isuru
e7b5cb33a4 feat(upload): enhance PDF upload banners with title and description 2026-03-18 15:06:06 -04:00
Achintha Isuru
0c8a5bb15b Support reusing existing certificate file URI
Allow uploading or updating certificates without forcing a re-upload of an already-stored file. Repository API now accepts an optional filePath or existingFileUri and branches: a new local file is uploaded and a signed URL generated, while an existingFileUri performs a metadata-only update. Verification creation now uses the resolved fileUri; API payload uses the signed URL when available and normalizes expiry to UTC. Domain usecase and params were updated (with an assert ensuring one of filePath or existingFileUri is provided). Presentation page pre-populates the file field for edits, relaxes form validation to accept existing remote URIs, and distinguishes local vs remote paths when invoking the upload use case.
2026-03-18 14:59:04 -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
3e5b6af8dc Refactor widgets, add bloc dep
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.
2026-03-18 10:33:19 -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
e471fd12f2 Merge branch 'dev' into 592-migrate-frontend-applications-to-v2-backend-and-database 2026-03-18 10:06:54 -04:00
zouantchaw
1d850811c4 chore(legacy): relocate v1 dataconnect source 2026-03-18 15:04:18 +01:00
aef4491f97 Merge 592-migrate-frontend-applications-to-v2-backend-and-database into feature/session-persistence-new 2026-03-18 12:51:23 +05:30
Achintha Isuru
cfe8c0bc6c feat: update certificate card to display issuer name if available 2026-03-17 14:55:10 -04:00
Achintha Isuru
e2d833dc58 feat: update UiNoticeBanner layout; align children to start and adjust description color 2026-03-17 14:37:56 -04:00
Achintha Isuru
de388c9a77 feat: update profile setup and bank account management; enhance API integration and data handling 2026-03-17 14:32:26 -04:00
Achintha Isuru
d6ddb7829e fix: change saveContacts method to use POST instead of PUT for emergency contacts 2026-03-17 14:00:41 -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
e83b8fff1c refactor: update color definitions and improve UI component structure; handle null safety in repository data fetching 2026-03-17 13:20:04 -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
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
e3d8d30b1b Merge branch 'dev' into feature/session-persistence-new 2026-03-11 10:56:48 +05:30
Achintha Isuru
2071585158 feat: remove unused import and clean up emergency contact info banner widget 2026-03-10 23:54:38 -04:00
Achintha Isuru
e60413f45c feat: add shimmer loading skeletons for emergency contact section 2026-03-10 17:02:16 -04:00
Achintha Isuru
bd98a112a0 feat: add shimmer skeletons for various sections in the staff profile and onboarding features
- Implemented ProfilePageSkeleton for loading state in staff profile.
- Added ReliabilityScoreSkeleton and ReliabilityStatsSkeleton for reliability metrics.
- Created CertificatesSkeleton and related components for loading certificates.
- Developed DocumentsSkeleton and associated document card skeletons.
- Introduced TaxFormsSkeleton for loading tax forms.
- Added BankAccountSkeleton and its components for bank account loading state.
- Created TimeCardSkeleton for displaying time card loading state.
- Implemented AttireSkeleton for loading attire items.
- Added PersonalInfoSkeleton for loading personal information.
- Developed FaqsSkeleton for loading FAQ sections.
- Created PrivacySecuritySkeleton for loading privacy settings.
2026-03-10 15:20:24 -04:00
Achintha Isuru
7a5c130289 refactor: change singleton registrations to lazySingleton for improved performance 2026-03-09 15:01:18 -04:00
Achintha Isuru
c936d5f2ab feat: add attire section components for improved UI organization 2026-03-07 02:51:07 -05:00
Achintha Isuru
c9a46a1a71 feat: implement attire section toggles for required and non-essential items in AttirePage 2026-03-07 02:47:55 -05:00
e7e11771b3 Merge branch 'dev' of https://github.com/Oloodi/krow-workforce into feature/session-persistence-new 2026-03-03 11:07:15 +05:30
Achintha Isuru
8497709356 fix: Correct formatting and improve comments in various files for clarity 2026-03-02 12:38:57 -05:00
Achintha Isuru
2ea5a25858 feat: Update styling for legal and privacy section widgets with improved background color and border properties 2026-03-02 12:09:51 -05:00
Achintha Isuru
a206459cbd feat: Enhance tax forms page with progress overview and refactor components for better structure 2026-03-02 12:05:09 -05:00
Achintha Isuru
ca6c10552d feat: Implement attestation checkbox in attire capture page and refactor related components 2026-03-02 10:33:22 -05:00
c0a69707e6 maestro cases 2026-03-02 19:18:35 +05:30
Achintha Isuru
8e95589551 feat: Enhance certificate upload process with file change verification and signed URL generation 2026-03-01 21:17:45 -05:00
Achintha Isuru
49ecede35f feat: Remove redundant PDF file validation before certificate upload 2026-03-01 21:11:05 -05:00
Achintha Isuru
5b4b8b7138 feat: Update file selector and PDF types banner to use super.key for improved widget initialization 2026-03-01 21:05:48 -05:00
Achintha Isuru
973b8b8ac3 feat: Add file path management for certificate uploads in the mobile app 2026-03-01 21:03:01 -05:00
Achintha Isuru
b0abd68c2e feat: Implement certificate upload form with metadata fields, expiry date selection, and file upload functionality 2026-03-01 20:35:22 -05:00
Achintha Isuru
5795f7c45d feat: Update certificate upload process to use signed URLs and enable fields for new certificates 2026-03-01 20:28:13 -05:00
Achintha Isuru
e0e7bd51ce feat: Refactor document upload flow to support selected file path management 2026-03-01 20:09:23 -05:00
Achintha Isuru
632e0cca3d feat: Refactor document upload components to improve file selection and validation 2026-03-01 19:44:43 -05:00
Achintha Isuru
315e8f9598 feat: Implement rapid order creation with voice and text input in client mobile app 2026-03-01 12:33:42 -05:00
Achintha Isuru
b5001edf06 feat: Enhance locale management by retrieving saved language code and updating language selection UI 2026-03-01 12:11:41 -05:00
Achintha Isuru
1e1dc39e20 feat: Implement preferred locations feature with search and display components 2026-03-01 12:02:43 -05:00
Achintha Isuru
2c61baaaa9 feat: Add UiEmptyState widget and integrate it into BankAccountPage and WorkerHomePage for improved empty state handling 2026-03-01 03:22:48 -05:00
Achintha Isuru
015f1fbc1b feat: Refactor onboarding experience and personal info pages
- Updated ExperiencePage to include subtitles in ExperienceSectionTitle.
- Modified ExperienceSectionTitle widget to accept an optional subtitle parameter.
- Refactored PersonalInfoPage to improve imports and structure.
- Removed unused PersonalInfoContent and PersonalInfoForm widgets.
- Introduced new widgets: EditableField, FieldLabel, ReadOnlyField, TappableRow, and LanguageSelector for better modularity.
- Added AccountCard and SecurityNotice widgets for bank account section.
- Enhanced SaveButton to utilize UiButton for consistency.
2026-03-01 03:06:28 -05:00
Achintha Isuru
ea6b3fcc76 feat: Refactor emergency contact screen and info banner for improved UI consistency 2026-03-01 02:16:26 -05:00
Achintha Isuru
ce095924bc feat: Implement notice and file types banners for attire upload and enhance incomplete profile messaging 2026-02-28 22:42:04 -05:00