frontend phase 2: onboarding & profiles — customer/patient, nurse profile & bank
Turns a logged-in user into a usable account, consuming the b3 identity-profiles
contract behind the services/{domain} seam.
Services (mock default true; real HTTP clients wired for a one-line flip):
- services/patients: rewritten to b3 PatientDto + client-augmented relation/conditions;
full CRUD, optimistic soft-archive, cache-splice on create, age<->birthDate helper.
- services/profiles: customer + nurse profile get/upsert + avatar (404->null mapping).
- services/nurse: payout bank accounts + IBAN(Sheba) util + pending-only polling.
Screens: A3->A4 onboarding wizard, E1 patients list/CRUD, A5 home (first-login gate +
nudge), customer profile (no national-ID), nurse profile bootstrap (unverified
placeholder), nurse bank settings (pending/verified/mismatch + make-primary).
Shared composites (each tested): GenderToggle, ConditionChips, RelationSelect,
PatientForm, PatientCard, BankStatusPanel; reuses f0 StepperHeader/StatusChip/PhoneField.
Adds onboarding/home/profile/nurseProfile/bank i18n namespaces (both locales, in sync),
the --bal-primary-soft token, and nurse sidebar Profile + Bank entries.
Contract gaps filed: REQ-005 (patient relation/conditions), REQ-006 (avatar route),
REQ-007 (customer name/language). Gate: check + 112 tests + build all green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
+125
-6
@@ -5,6 +5,7 @@
|
||||
"patients": "Patients",
|
||||
"wallet": "Wallet",
|
||||
"profile": "Profile",
|
||||
"bank": "Bank account",
|
||||
"dashboard": "Dashboard",
|
||||
"verification": "Verification",
|
||||
"visits": "Visits",
|
||||
@@ -25,6 +26,11 @@
|
||||
"retry": "Retry",
|
||||
"add": "Add",
|
||||
"cancel": "Cancel",
|
||||
"save": "Save",
|
||||
"saving": "Saving…",
|
||||
"back": "Back",
|
||||
"close": "Close",
|
||||
"optional": "Optional",
|
||||
"currency_toman": "Toman",
|
||||
"brand": "Balinyaar",
|
||||
"brand_tagline": "Home care you can trust"
|
||||
@@ -35,16 +41,129 @@
|
||||
"admin_console": "Admin console",
|
||||
"placeholder_body": "This area will be built in a later phase."
|
||||
},
|
||||
"patients": {
|
||||
"title": "Patients",
|
||||
"subtitle": "A reference screen wired to the services/{domain} + React Query pattern (mocked data).",
|
||||
"add": "Add patient",
|
||||
"empty": "No patients yet. Add your first patient.",
|
||||
"home": {
|
||||
"greeting": "Welcome to Balinyaar",
|
||||
"subtitle": "Manage care for the people you love.",
|
||||
"nudge_patient_title": "Complete the patient record",
|
||||
"nudge_patient_body": "Add conditions, medications and routine so nurses arrive prepared.",
|
||||
"nudge_patient_cta": "Open patients",
|
||||
"nudge_profile_title": "Complete your profile",
|
||||
"nudge_profile_body": "Add an emergency contact to speed up bookings.",
|
||||
"nudge_profile_cta": "Go to profile"
|
||||
},
|
||||
"onboarding": {
|
||||
"step_relation": "Who for",
|
||||
"step_patient": "Patient",
|
||||
"relation_title": "Who are you arranging care for?",
|
||||
"relation_subtitle": "This helps us tailor the right care. You can add more people later.",
|
||||
"relation_parent": "Parent",
|
||||
"relation_spouse": "Spouse",
|
||||
"relation_child": "Child",
|
||||
"relation_self": "Myself",
|
||||
"patient_title": "Register the patient",
|
||||
"patient_subtitle": "The person receiving care — not necessarily the account holder.",
|
||||
"name_label": "Full name",
|
||||
"name_required": "Enter the patient's name",
|
||||
"age_label": "Age",
|
||||
"age_invalid": "Enter a valid age",
|
||||
"gender_label": "Gender",
|
||||
"gender_male": "Male",
|
||||
"gender_female": "Female",
|
||||
"added": "Patient added"
|
||||
"gender_required": "Patient gender is required",
|
||||
"conditions_label": "Conditions",
|
||||
"conditions_hint": "Optional — select any that apply.",
|
||||
"condition_elderly": "Elderly",
|
||||
"condition_post_surgery": "Post-surgery",
|
||||
"condition_diabetes": "Diabetes",
|
||||
"condition_mobility": "Limited mobility",
|
||||
"condition_dementia": "Dementia",
|
||||
"continue": "Continue",
|
||||
"save_continue": "Save and continue",
|
||||
"saved": "Patient saved"
|
||||
},
|
||||
"patients": {
|
||||
"title": "Patients",
|
||||
"subtitle": "The people you arrange care for.",
|
||||
"add": "Add patient",
|
||||
"add_title": "Add patient",
|
||||
"edit_title": "Edit patient",
|
||||
"edit": "Edit",
|
||||
"archive": "Archive",
|
||||
"empty_title": "No patients yet",
|
||||
"empty_body": "Add your first patient to get started.",
|
||||
"archive_title": "Archive patient?",
|
||||
"archive_body": "This patient is removed from your list, but past booking records are kept.",
|
||||
"archive_confirm": "Archive",
|
||||
"archived": "Patient archived",
|
||||
"age_years": "{age} yrs",
|
||||
"conditions_none": "No recorded conditions",
|
||||
"unavailable": "This patient isn't available to you."
|
||||
},
|
||||
"profile": {
|
||||
"title": "Profile",
|
||||
"subtitle": "Your details and emergency contact.",
|
||||
"first_name": "First name",
|
||||
"last_name": "Last name",
|
||||
"language": "Preferred language",
|
||||
"language_fa": "Persian",
|
||||
"language_en": "English",
|
||||
"emergency_section": "Emergency contact",
|
||||
"emergency_hint": "Who we call in an emergency.",
|
||||
"emergency_name": "Emergency contact name",
|
||||
"emergency_phone": "Emergency contact phone",
|
||||
"emergency_phone_invalid": "Enter a valid mobile number",
|
||||
"save": "Save",
|
||||
"saved": "Profile saved",
|
||||
"completion_done": "Your profile is complete.",
|
||||
"completion_todo": "Complete your profile to speed up bookings."
|
||||
},
|
||||
"nurseProfile": {
|
||||
"title": "Nurse profile",
|
||||
"subtitle": "What families see when they find you.",
|
||||
"photo": "Profile photo",
|
||||
"photo_hint": "A clear photo of your face.",
|
||||
"upload": "Upload photo",
|
||||
"uploading": "Uploading…",
|
||||
"bio": "About me",
|
||||
"bio_hint": "A short intro — experience, focus, approach.",
|
||||
"years": "Years of experience",
|
||||
"years_invalid": "Enter a number between 0 and 80",
|
||||
"save": "Save profile",
|
||||
"saved": "Profile saved",
|
||||
"unverified_title": "Your profile isn't active yet",
|
||||
"unverified_body": "Complete identity verification to appear to families and receive bookings.",
|
||||
"unverified_cta": "Complete verification",
|
||||
"deferred_services": "You'll add your services & prices and available days in a later step."
|
||||
},
|
||||
"bank": {
|
||||
"title": "Bank account",
|
||||
"subtitle": "Where your earnings are paid out.",
|
||||
"iban_label": "IBAN (Sheba)",
|
||||
"iban_hint": "Starts with IR followed by 24 digits.",
|
||||
"iban_invalid": "Enter a valid IBAN (IR + 24 digits)",
|
||||
"holder_label": "Account holder name",
|
||||
"holder_hint": "Must be exactly your own name.",
|
||||
"holder_required": "Enter the account holder name",
|
||||
"submit": "Submit account",
|
||||
"submitting": "Submitting…",
|
||||
"added": "Account submitted — ownership inquiry started",
|
||||
"add_error": "This account couldn't be added. Check the IBAN and try again.",
|
||||
"status_pending_chip": "Checking",
|
||||
"status_pending_title": "Verifying account ownership",
|
||||
"status_pending_body": "The Sheba ownership inquiry is running; this can take a moment.",
|
||||
"status_verified_chip": "Verified",
|
||||
"status_verified_title": "Account verified",
|
||||
"status_verified_body": "This account is ready to receive your payouts.",
|
||||
"status_mismatch_chip": "Ownership mismatch",
|
||||
"status_mismatch_title": "The account must be in your own name",
|
||||
"status_mismatch_body": "This account's holder doesn't match your identity. Please enter the IBAN of an account in your own name.",
|
||||
"reenter": "Enter another account",
|
||||
"make_primary": "Make primary",
|
||||
"primary_set": "Primary account updated",
|
||||
"iban_masked_label": "IBAN",
|
||||
"primary": "Primary",
|
||||
"empty_title": "No bank account yet",
|
||||
"empty_body": "Add a bank account in your own name to receive payouts."
|
||||
},
|
||||
"auth": {
|
||||
"customer_title": "Sign in to Balinyaar",
|
||||
|
||||
Reference in New Issue
Block a user