Files
Krow-workspace/.claude/agent-memory/mobile-builder/project_v2_profile_migration.md
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

1.8 KiB

name, description, type
name description type
V2 Profile Migration Status Staff profile sub-packages migrated from Data Connect to V2 REST API - entity mappings and patterns project

Phase 2 Profile Migration (completed 2026-03-16)

All staff profile read features migrated from Firebase Data Connect to V2 REST API.

Why: Data Connect is being deprecated in favor of V2 REST API for all mobile backend access.

How to apply: When working on any profile feature, use ApiService.get(V2ApiEndpoints.staffXxx) not Data Connect connectors.

Entity Mappings (old -> V2)

  • Staff (old with name/avatar/totalShifts) -> Staff (V2 with fullName/metadata) + StaffPersonalInfo for profile form
  • EmergencyContact (old with name/phone/relationship enum) -> EmergencyContact (V2 with fullName/phone/relationshipType string)
  • AttireItem (removed) -> AttireChecklist (V2)
  • StaffDocument (removed) -> ProfileDocument (V2)
  • StaffCertificate (old with ComplianceType enum) -> StaffCertificate (V2 with certificateType string)
  • TaxForm (old with I9TaxForm/W4TaxForm subclasses) -> TaxForm (V2 with formType string + fields map)
  • StaffBankAccount (removed) -> BankAccount (V2)
  • TimeCard (removed) -> TimeCardEntry (V2 with minutesWorked/totalPayCents)
  • PrivacySettings (new V2 entity)

Profile Main Page

  • Old: 7+ individual completion use cases from data_connect connectors
  • New: Single ProfileRepositoryImpl.getProfileSections() call returning ProfileSectionStatus
  • Stats fields (totalShifts, onTimeRate, etc.) no longer on V2 Staff entity -- hardcoded to 0 pending dashboard API

DI Pattern

  • All repos inject BaseApiService from CoreModule (registered as i.get<BaseApiService>())
  • Modules import CoreModule() instead of DataConnectModule()