974 Commits

Author SHA1 Message Date
39263a4af5 chore: fix 273+ analysis issues and repair corrupted core files 2026-03-20 21:05:23 +05:30
d3159bc2ae Merge branch 'origin/dev' into feature/session-persistence-new 2026-03-20 12:44:25 +05:30
Achintha Isuru
b10ef57d37 feat: Add hourly rate field to order position arguments and update related blocs 2026-03-19 23:59:00 -04:00
Achintha Isuru
1e4c8982a5 feat: Add additional fields to OrderItem and update cost calculation in ViewOrderCard 2026-03-19 23:55:57 -04:00
Achintha Isuru
4cd83a9281 feat: Implement UTC conversion for order date and time serialization in order use cases 2026-03-19 23:34:29 -04:00
Achintha Isuru
207831eb3e feat: Adjust layout in ShiftCardBody to improve icon and title alignment 2026-03-19 21:15:52 -04:00
Achintha Isuru
0ff2949c1e feat: Refactor ShiftCard components to include client name and improve layout consistency 2026-03-19 21:13:35 -04:00
Achintha Isuru
591b5d7b88 feat: Enhance CancelledShift and PendingAssignment models with additional fields for client and pay details 2026-03-19 16:44:54 -04:00
Achintha Isuru
a544b051cc feat: Update shift card styles and remove cancellation reason display 2026-03-19 16:40:07 -04:00
Achintha Isuru
bd2d5610b3 feat: Add cancellation reason handling and display in shift details 2026-03-19 16:36:35 -04:00
Achintha Isuru
ac9a0b9c9d feat: Implement cross-platform NFC clocking interface with calendar and shift sections 2026-03-19 16:28:29 -04:00
Achintha Isuru
eff8bcce57 feat: Remove shift confirmation and decline dialogs from MyShiftsTab 2026-03-19 16:25:45 -04:00
Achintha Isuru
18a459a453 feat: Implement GetMyShiftsData use case and integrate it into ShiftsBloc for improved shift data handling 2026-03-19 16:11:16 -04:00
Achintha Isuru
3d80e6b7ac feat: Implement accept shift functionality with localization support for success messages 2026-03-19 15:55:27 -04:00
Achintha Isuru
fea679b84c feat: Enhance order details page with date range and clock-in/out labels, and improve OrderScheduleSection layout 2026-03-19 15:40:26 -04:00
Achintha Isuru
e1b9ad532b feat: Update client name text style in OrderDetailsHeader and ShiftDetailsHeader for consistency 2026-03-19 15:17:26 -04:00
Achintha Isuru
faf27b03f2 feat: Update OrderDetailsHeader and ShiftDetailsHeader layout for improved UI consistency 2026-03-19 15:14:13 -04:00
Achintha Isuru
2a99587d2f feat: Implement Google Maps integration for shift details and enhance UI components 2026-03-19 15:11:15 -04:00
Achintha Isuru
8121a718bb feat: Refactor OrderDetailsBottomBar to use UiButton for improved styling and consistency 2026-03-19 14:22:57 -04:00
Achintha Isuru
9c71acb96a feat: Implement order details page and navigation for available orders 2026-03-19 14:08:34 -04:00
Achintha Isuru
742c8c75c5 feat: Update AvailableOrderCard to display pay details for long-term orders 2026-03-19 13:49:22 -04:00
Achintha Isuru
24ff8816d2 feat: Update AvailableOrderCard to include client name, address, and estimated total pay 2026-03-19 13:46:22 -04:00
Achintha Isuru
833cb99f6b feat: Enhance AvailableOrderCard layout and time formatting 2026-03-19 13:43:39 -04:00
Achintha Isuru
96056d0170 feat: Implement available orders feature in staff marketplace
- Added `AvailableOrder` and `AvailableOrderSchedule` entities to represent available orders and their schedules.
- Introduced `GetAvailableOrdersUseCase` and `BookOrderUseCase` for fetching and booking orders.
- Created `AvailableOrdersBloc` to manage the state of available orders and handle booking actions.
- Developed UI components including `AvailableOrderCard` to display order details and booking options.
- Added necessary events and states for the BLoC architecture to support loading and booking orders.
- Integrated new enums and utility functions for handling order types and scheduling.
2026-03-19 13:23:28 -04:00
Achintha Isuru
5792aa6e98 feat: add UTC parsing utilities and update date handling across entities
- Introduced `utc_parser.dart` with functions to convert UTC timestamps to local time.
- Updated date parsing in various entities to use the new utility functions for consistency.
- Refactored date handling in `BenefitHistory`, `Business`, `AttendanceStatus`, `AssignedWorker`, `TimeRange`, `Invoice`, `PaymentChartPoint`, `StaffPayment`, `TimeCardEntry`, `OrderItem`, `OrderPreview`, `RecentOrder`, `StaffRating`, `CoverageDayPoint`, `ForecastWeek`, `NoShowIncident`, `SpendDataPoint`, `AssignedShift`, `CancelledShift`, `CompletedShift`, `OpenShift`, `PendingAssignment`, `Shift`, `ShiftDetail`, `TodayShift`, `BusinessMembership`, and `Staff`.
- Updated `ReorderWidget` and `OrderEditSheet` to handle date formatting correctly.
2026-03-19 13:00:17 -04:00
Achintha Isuru
eacf34999b Merge branch 'dev' into 595-sred-research-implement-cross-platform-nfc-clocking-interface-fe 2026-03-19 12:38:30 -04:00
zouantchaw
1d5c0e3b80 feat(api): add staff order booking contract and shift timeline alias 2026-03-19 16:07:25 +01:00
Achintha Isuru
493891eea0 Add staff reliability stats & shift location
Introduce staff reliability statistics and location fields across domain, data, and UI. Changes include:

- New API endpoint StaffEndpoints.profileStats ('/staff/profile/stats').
- New domain entity StaffReliabilityStats with JSON (de)serialization and export.
- Profile repository: getReliabilityStats implementation and interface addition.
- New GetReliabilityStatsUseCase and DI registration in StaffProfileModule.
- ProfileCubit/state: load and store reliabilityStats; UI wired to display ReliabilityStatsCard and ReliabilityScoreBar using state values.
- Coverage/shift updates: Added AssignedWorker.hasReview to track if a worker was reviewed; added locationName/locationAddress to ShiftWithWorkers and show location in ShiftHeader; hide rate button if worker.hasReview.
- Clock-in handling: treat backend ALREADY_CLOCKED_IN (409) as idempotent by re-fetching attendance and emitting success when appropriate.

These changes wire backend stats through repository/usecase/cubit to the profile UI and add shift location and review-awareness to client views.
2026-03-19 10:53:37 -04:00
230942e776 dev merge 2026-03-19 15:25:37 +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
499dceda37 fix(coverage_shift_list): update cancel button visibility logic based on shift start time 2026-03-19 00:31:33 -04:00
Achintha Isuru
c8f944e1ac style(shift_header): improve layout and styling of shift header components 2026-03-19 00:27:42 -04:00
Achintha Isuru
af1ff53749 fix(worker_row): correct condition for displaying cancel button 2026-03-19 00:19:18 -04:00
Achintha Isuru
8bb336d1b5 Refactor coverage-related widgets and improve UI consistency
- Updated CancelLateWorkerSheet to enhance layout and information display.
- Modified CoverageCalendarSelector to adjust color opacity for better visibility.
- Simplified CoveragePageSkeleton by removing unused quick stats row.
- Removed CoverageQuickStats widget as it was redundant.
- Enhanced CoverageShiftList to manage expanded state and improve worker display.
- Deleted CoverageStatCard as its functionality is no longer needed.
- Revamped CoverageStatsHeader to provide a clearer overview of coverage statistics.
- Improved LateWorkersAlert for better visual feedback on late workers.
- Redesigned ShiftHeader for a more interactive and informative shift card.
- Updated WorkerRow to streamline status display and action buttons.
2026-03-19 00:12:35 -04:00
Achintha Isuru
b317c53e7e feat(review): implement worker review functionality with rating, feedback, and issue flags 2026-03-18 19:01:51 -04:00
Achintha Isuru
2d452f65e6 feat(geofence): enhance geofence handling with improved messaging and justification for clock-out 2026-03-18 18:30:15 -04:00
Achintha Isuru
f488577e6b feat(geofence): add OutsideWorkAreaBanner for non-blocking warning when clocked in outside geofence 2026-03-18 18:02:17 -04:00
Achintha Isuru
baf426935e feat(shift): enhance Shift entity with client and role names, update JSON deserialization 2026-03-18 17:56:48 -04:00
Achintha Isuru
f5699865f9 feat(benefit_history): enhance layout of benefit history row with improved structure and styling 2026-03-18 17:45:42 -04:00
Achintha Isuru
597866fc99 feat(benefit_history): add spacing to benefit history preview layout 2026-03-18 17:38:48 -04:00
Achintha Isuru
8d39ebbced feat(benefit_history): refactor benefit history page with new components and improved loading states 2026-03-18 17:37:38 -04:00
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
1552f60e5b feat(clock_in): add messages for already clocked in/out states and handle API call failures 2026-03-18 16:37:59 -04:00
Achintha Isuru
d13cabb30d Round accuracyMeters before serialization
Round accuracyMeters to an integer when building payloads to ensure consistent, integer accuracy values sent to the backend. Updates made in background_geofence_service.dart (location.accuracy.round()) and in ClockInArguments/ClockOutArguments (round accuracyMeters when present) so nullable values are rounded before serialization.
2026-03-18 16:31:12 -04:00
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
f70bdc4fca feat(shifts): add client name support in OpenShift and RecommendedShiftCard 2026-03-18 15:58:58 -04:00
Achintha Isuru
3f42014cb9 feat(shifts): refactor shift card implementation for today's and tomorrow's shifts 2026-03-18 15:56:20 -04:00
Achintha Isuru
47508f54e4 feat(shifts): enhance TodayShift and shift card components with client details and pay calculations 2026-03-18 15:39:05 -04:00