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",
|
||||
|
||||
+126
-7
@@ -5,6 +5,7 @@
|
||||
"patients": "بیماران",
|
||||
"wallet": "کیفپول",
|
||||
"profile": "پروفایل",
|
||||
"bank": "حساب بانکی",
|
||||
"dashboard": "داشبورد",
|
||||
"verification": "احراز هویت",
|
||||
"visits": "ویزیتها",
|
||||
@@ -25,6 +26,11 @@
|
||||
"retry": "تلاش مجدد",
|
||||
"add": "افزودن",
|
||||
"cancel": "انصراف",
|
||||
"save": "ذخیره",
|
||||
"saving": "در حال ذخیره…",
|
||||
"back": "بازگشت",
|
||||
"close": "بستن",
|
||||
"optional": "اختیاری",
|
||||
"currency_toman": "تومان",
|
||||
"brand": "بلینیار",
|
||||
"brand_tagline": "مراقبت مطمئن در خانه"
|
||||
@@ -35,16 +41,129 @@
|
||||
"admin_console": "کنسول مدیریت",
|
||||
"placeholder_body": "این بخش در فازهای بعدی تکمیل میشود."
|
||||
},
|
||||
"patients": {
|
||||
"title": "بیماران",
|
||||
"subtitle": "یک صفحهٔ مرجع که به الگوی services/{domain} و React Query متصل است (دادههای آزمایشی).",
|
||||
"add": "افزودن بیمار",
|
||||
"empty": "هنوز بیماری ثبت نشده است. اولین بیمار را اضافه کنید.",
|
||||
"name_label": "نام کامل",
|
||||
"home": {
|
||||
"greeting": "به بلینیار خوش آمدید",
|
||||
"subtitle": "مراقبت از عزیزانتان را مدیریت کنید.",
|
||||
"nudge_patient_title": "تکمیل پروندهٔ بیمار",
|
||||
"nudge_patient_body": "وضعیتها، داروها و روتین را اضافه کنید تا پرستار آماده حاضر شود.",
|
||||
"nudge_patient_cta": "مشاهدهٔ بیماران",
|
||||
"nudge_profile_title": "تکمیل پروفایل",
|
||||
"nudge_profile_body": "برای رزرو سریعتر، تماس اضطراری را اضافه کنید.",
|
||||
"nudge_profile_cta": "رفتن به پروفایل"
|
||||
},
|
||||
"onboarding": {
|
||||
"step_relation": "برای چه کسی",
|
||||
"step_patient": "بیمار",
|
||||
"relation_title": "برای چه کسی مراقبت میخواهید؟",
|
||||
"relation_subtitle": "این کمک میکند مراقبت مناسب را پیشنهاد دهیم. بعداً میتوانید افراد دیگری هم اضافه کنید.",
|
||||
"relation_parent": "پدر/مادر",
|
||||
"relation_spouse": "همسر",
|
||||
"relation_child": "فرزند",
|
||||
"relation_self": "خودم",
|
||||
"patient_title": "ثبت بیمار",
|
||||
"patient_subtitle": "فردی که مراقبت میشود — لزوماً صاحب حساب نیست.",
|
||||
"name_label": "نام و نام خانوادگی",
|
||||
"name_required": "نام بیمار را وارد کنید",
|
||||
"age_label": "سن",
|
||||
"age_invalid": "سن معتبر وارد کنید",
|
||||
"gender_label": "جنسیت",
|
||||
"gender_male": "مرد",
|
||||
"gender_female": "زن",
|
||||
"added": "بیمار اضافه شد"
|
||||
"gender_required": "انتخاب جنسیت بیمار الزامی است",
|
||||
"conditions_label": "وضعیتها",
|
||||
"conditions_hint": "اختیاری — موارد مرتبط را انتخاب کنید.",
|
||||
"condition_elderly": "سالمند",
|
||||
"condition_post_surgery": "پس از جراحی",
|
||||
"condition_diabetes": "دیابت",
|
||||
"condition_mobility": "کمتحرک",
|
||||
"condition_dementia": "آلزایمر/دمانس",
|
||||
"continue": "ادامه",
|
||||
"save_continue": "ذخیره و ادامه",
|
||||
"saved": "بیمار ثبت شد"
|
||||
},
|
||||
"patients": {
|
||||
"title": "بیماران",
|
||||
"subtitle": "کسانی که برایشان مراقبت میگیرید.",
|
||||
"add": "افزودن بیمار",
|
||||
"add_title": "افزودن بیمار",
|
||||
"edit_title": "ویرایش بیمار",
|
||||
"edit": "ویرایش",
|
||||
"archive": "آرشیو",
|
||||
"empty_title": "هنوز بیماری ثبت نشده",
|
||||
"empty_body": "برای شروع، اولین بیمار را اضافه کنید.",
|
||||
"archive_title": "آرشیو بیمار؟",
|
||||
"archive_body": "این بیمار از فهرست شما حذف میشود اما سوابق رزروهای گذشته حفظ میماند.",
|
||||
"archive_confirm": "آرشیو",
|
||||
"archived": "بیمار آرشیو شد",
|
||||
"age_years": "{age} سال",
|
||||
"conditions_none": "وضعیت خاصی ثبت نشده",
|
||||
"unavailable": "این بیمار در دسترس شما نیست."
|
||||
},
|
||||
"profile": {
|
||||
"title": "پروفایل",
|
||||
"subtitle": "اطلاعات شما و تماس اضطراری.",
|
||||
"first_name": "نام",
|
||||
"last_name": "نام خانوادگی",
|
||||
"language": "زبان ترجیحی",
|
||||
"language_fa": "فارسی",
|
||||
"language_en": "انگلیسی",
|
||||
"emergency_section": "تماس اضطراری",
|
||||
"emergency_hint": "شمارهای که در مواقع ضروری با آن تماس میگیریم.",
|
||||
"emergency_name": "نام تماس اضطراری",
|
||||
"emergency_phone": "شماره تماس اضطراری",
|
||||
"emergency_phone_invalid": "شماره موبایل معتبر وارد کنید",
|
||||
"save": "ذخیره",
|
||||
"saved": "پروفایل ذخیره شد",
|
||||
"completion_done": "پروفایل شما کامل است.",
|
||||
"completion_todo": "برای رزرو سریعتر، پروفایل خود را کامل کنید."
|
||||
},
|
||||
"nurseProfile": {
|
||||
"title": "پروفایل پرستار",
|
||||
"subtitle": "چیزی که خانوادهها هنگام یافتن شما میبینند.",
|
||||
"photo": "عکس پروفایل",
|
||||
"photo_hint": "یک عکس واضح از چهرهتان.",
|
||||
"upload": "بارگذاری عکس",
|
||||
"uploading": "در حال بارگذاری…",
|
||||
"bio": "درباره من",
|
||||
"bio_hint": "یک معرفی کوتاه — تجربه، تخصص، رویکرد.",
|
||||
"years": "سابقه کار (سال)",
|
||||
"years_invalid": "عددی بین ۰ تا ۸۰ وارد کنید",
|
||||
"save": "ذخیره پروفایل",
|
||||
"saved": "پروفایل ذخیره شد",
|
||||
"unverified_title": "پروفایل شما هنوز فعال نیست",
|
||||
"unverified_body": "برای نمایش به خانوادهها و دریافت رزرو، احراز هویت را تکمیل کنید.",
|
||||
"unverified_cta": "تکمیل احراز هویت",
|
||||
"deferred_services": "خدمات و قیمتها و روزهای کاری را در مرحله بعد اضافه میکنید."
|
||||
},
|
||||
"bank": {
|
||||
"title": "حساب بانکی",
|
||||
"subtitle": "مقصد واریز درآمد شما.",
|
||||
"iban_label": "شماره شبا",
|
||||
"iban_hint": "با IR شروع میشود و ۲۴ رقم دارد.",
|
||||
"iban_invalid": "شماره شبا معتبر وارد کنید (IR و ۲۴ رقم)",
|
||||
"holder_label": "نام صاحب حساب",
|
||||
"holder_hint": "باید دقیقاً به نام خودتان باشد.",
|
||||
"holder_required": "نام صاحب حساب را وارد کنید",
|
||||
"submit": "ثبت حساب",
|
||||
"submitting": "در حال ثبت…",
|
||||
"added": "حساب ثبت شد — استعلام مالکیت آغاز شد",
|
||||
"add_error": "ثبت این حساب ممکن نشد. شبا را بررسی کرده و دوباره تلاش کنید.",
|
||||
"status_pending_chip": "در حال استعلام",
|
||||
"status_pending_title": "در حال استعلام مالکیت حساب",
|
||||
"status_pending_body": "استعلام شبا در حال انجام است؛ ممکن است چند لحظه طول بکشد.",
|
||||
"status_verified_chip": "تاییدشد",
|
||||
"status_verified_title": "حساب تایید شد",
|
||||
"status_verified_body": "این حساب برای واریز درآمد شما آماده است.",
|
||||
"status_mismatch_chip": "مغایرت مالکیت",
|
||||
"status_mismatch_title": "حساب باید به نام خودتان باشد",
|
||||
"status_mismatch_body": "نام صاحب این حساب با هویت شما مطابقت ندارد. لطفاً شبای حسابی به نام خودتان وارد کنید.",
|
||||
"reenter": "ثبت حساب دیگر",
|
||||
"make_primary": "انتخاب بهعنوان حساب اصلی",
|
||||
"primary_set": "حساب اصلی بهروزرسانی شد",
|
||||
"iban_masked_label": "شبا",
|
||||
"primary": "حساب اصلی",
|
||||
"empty_title": "هنوز حسابی ثبت نشده",
|
||||
"empty_body": "برای دریافت درآمد، یک حساب بانکی به نام خودتان اضافه کنید."
|
||||
},
|
||||
"auth": {
|
||||
"customer_title": "ورود به بلینیار",
|
||||
|
||||
Reference in New Issue
Block a user