Commit Graph

45 Commits

Author SHA1 Message Date
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
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
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
Achintha Isuru
e8b768b978 feat: Refactor sign-out method to use unified service call across repositories 2026-03-02 16:04:20 -05:00
Achintha Isuru
d8d3c3c79b refactor: Remove 'Edit Profile' and 'Hubs' buttons from settings actions and migrate client hubs page to use UiAppBar. 2026-02-26 11:57:12 -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
Achintha Isuru
70ff4e13b9 feat: Add a script for bulk GitHub issue creation and simplify the client settings profile header UI. 2026-02-24 11:28:31 -05:00
13f8003bda refactor of usecases 2026-02-23 17:18:50 +05:30
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
Achintha Isuru
889bf90e71 feat: Implement reorder functionality in ClientCreateOrderRepository and update related interfaces and use cases 2026-02-19 16:14:43 -05:00
9e9eb0f374 finalcommitform4 2026-02-19 16:09:54 +05:30
c4610003b4 feat: complete client reports and hub management UI, comment out export buttons 2026-02-19 13:00:48 +05:30
Achintha Isuru
c90b2c296b feat: Update navigation flow in ClientSettingsPage to redirect to Get Started page 2026-02-17 16:14:45 -05:00
Achintha Isuru
ddf270074b feat: Refactor session management and improve user session data retrieval 2026-02-17 16:05:45 -05:00
Achintha Isuru
39bb17d981 feat: Refactor repositories and modules to remove FirebaseAuth dependency and utilize DataConnectService 2026-02-16 17:49:34 -05:00
ad6db7d851 chore: refactor UI consistency using design system tokens and remove LucideIcons 2026-02-12 18:37:31 +05:30
c1112ac01c feat: Centralized Error Handling & Crash Fixes 2026-02-11 18:52:23 +05:30
7570ffa3b9 Fix: Resolve critical linting issues and bugs (concurrency, syntax, dead code) 2026-02-10 19:12:01 +05:30
Achintha Isuru
3b11c49d90 Refactor navigation and remove unused navigator extensions across staff features
- Removed background color from CreateOrderView, OneTimeOrderView, and RapidOrderView.
- Updated navigation paths in OneTimeOrderView and other staff authentication pages to use new constants.
- Deleted unused navigator extensions for staff authentication, home, profile, and shifts.
- Refactored navigation in StaffMainModule to use new path constants.
- Cleaned up imports and adjusted navigation calls in various staff-related pages and widgets.
2026-02-04 18:22:39 -05:00
Achintha Isuru
fa6fa90bb8 feat: implement child route management for client and staff modules; enhance routing structure for better navigation 2026-02-04 17:13:55 -05:00
Achintha Isuru
c05261ddd7 feat: address missing features and bugs identified during Milestone 3 demo; improve localization, error handling, and navigation 2026-02-04 16:45:16 -05:00
Achintha Isuru
2083b5dbff refactor: replace Navigator with Modular for dialog dismissal in client hubs and settings actions 2026-02-03 22:59:00 -05:00
Achintha Isuru
109ed5375d Refactor UI components: update button size to large and adjust profile header margin 2026-02-01 20:28:29 -05:00
bwnyasse
caac050ac9 feat(core_localization): add error translation utility and new error messages
feat(client_auth): implement error handling with localized messages
feat(client_hubs): implement error handling with localized messages
feat(client_billing): navigate to home after billing
feat(client_coverage): navigate to home after coverage
feat(client_create_order): navigate to home after create order
feat(client_settings): navigate to home after settings
feat(client_view_orders): show hub name in order card
fix(client_auth): handle existing firebase accounts during sign-up

This commit introduces a new utility function, `translateErrorKey`,
to translate error message keys to localized strings. It also adds
new error messages to the localization files for both English and
Spanish.

The commit also implements error handling with localized messages in
the client authentication and hubs features. This makes it easier for
users to understand what went wrong and how to fix it.

Additionally, the commit updates the navigation flow for the billing,
coverage, create order, and settings features to navigate to the home
page after the user completes the action.

Finally, the commit fixes a bug where the hub name was not being
displayed in the order card.
2026-01-31 18:56:48 -05:00
Achintha Isuru
3b472351ba fix: correct context reference in sign-out button action 2026-01-29 00:03:56 -05:00
Achintha Isuru
960aa9f003 chore: update pubspec files to include workspace resolution and remove unnecessary pubspec.lock 2026-01-28 23:17:17 -05:00
Achintha Isuru
f57f41c508 Add explicit types and improve type safety across codebase
This commit adds explicit type annotations to variables, function parameters, and return types throughout the codebase, particularly in widget trees, Bloc logic, and repository implementations. The changes improve code readability, maintainability, and type safety, and align with Dart best practices. No business logic was changed.
2026-01-24 10:00:36 -05:00
Achintha Isuru
857b541ec5 feat(settings): refactor SettingsRepositoryImpl and update client settings page UI 2026-01-23 17:28:56 -05:00
José Salazar
a70468ceb4 session creation and show business information 2026-01-22 18:17:24 -05:00
Achintha Isuru
772a1ba53f chore: Add documentation and improve UI styles in settings
Added doc comments to widget build methods and constructors for better code clarity. Updated text styles in SettingsProfileHeader to use textPrimary and headline1m for improved UI consistency.
2026-01-22 14:57:37 -05:00
Achintha Isuru
4022b6d1f3 chore: Replace TextButton with UiButton.secondary in settings actions
Updated the log out and cancel actions in SettingsActions to use UiButton.secondary instead of TextButton for consistency with the UI component library.
2026-01-22 14:42:04 -05:00
Achintha Isuru
3d18395a09 Adjust top margin in SettingsProfileHeader
Updated the top margin from UiConstants.space14 to UiConstants.space16 in the SettingsProfileHeader widget for improved layout consistency.
2026-01-22 14:04:18 -05:00
Achintha Isuru
a7540954cb chore: Refactor navigation and button actions in settings page
Replaced Navigator calls with Modular navigation for consistency. Updated button order and styling in the logout dialog, and added comments for clarity. The Hubs button now uses Modular navigation to push the Hubs page.
2026-01-22 13:49:00 -05:00
Achintha Isuru
5da56eb769 feat: Add sign out confirmation dialog and success snackbar
Introduces a confirmation dialog before signing out in the client settings page and displays a snackbar upon successful sign out. Also updates a slivers list to use explicit type annotation for consistency.
2026-01-22 13:43:04 -05:00
Achintha Isuru
c3f0282109 Refactor settings to use FirebaseAuth for sign out
Replaces the previous mock-based authentication in client settings with FirebaseAuth for sign out functionality. Updates dependencies and imports accordingly, and adds firebase_auth to the settings package and firebase_core to the client app. Also includes minor Dart type improvements and dependency reordering.
2026-01-22 12:50:42 -05:00
Achintha Isuru
1b8a6466b0 chore: Refactor imports and update architecture package structure
Reorganized and clarified dependency sections in multiple pubspec.yaml files, grouping architecture and feature packages. Updated import statements in AuthRepositoryImpl for direct usage of types. Added missing dependencies to client authentication. Removed obsolete documentation and summary files from design_system and client home packages.
2026-01-22 12:28:10 -05:00
Achintha Isuru
5bc5530540 chore: Redesign settings profile header UI
Updated the SettingsProfileHeader widget to use a lighter background, reduced the expanded height, and adjusted layout to a horizontal row with updated avatar and text styles. Added new spacing constants to UiConstants for improved layout control.
2026-01-22 11:59:17 -05:00
Achintha Isuru
f882a0a7d0 chore: Update client navigation routes and exports
Standardized navigation route paths for client home, hubs, and settings to use '/client-home', '/client-hubs', and '/client-settings'. Added missing module imports and exports in main.dart and krow_data_connect.dart, including business_repository_mock.
2026-01-22 11:29:54 -05:00
Achintha Isuru
cf59935ec8 Move apps to mobile directory structure
Relocated all app directories (client, design_system_viewer, staff) and their contents under the new 'apps/mobile' path. This change improves project organization and prepares for future platform-specific structuring.
2026-01-22 10:17:19 -05:00