feat(clinic-services): two-page section→services flow matching Figma
Restructure clinic-services from two-pane to Figma two-view flow: sections card grid (name, edit, activate/deactivate, 'بخش جدید' modal) → click a section → its services card grid with breadcrumb back. Service card matches Figma: overflow menu, active badge, base price, average time badge, staff chip. Add duration_minutes to ServiceItem (migration + create/update + form field). Update clinic-services.md. (Version20260713050014 syncs pre-existing entity/schema drift.) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -90,6 +90,9 @@
|
||||
"name": "رادیوگرافی مستقیم",
|
||||
"price_rials": 500000,
|
||||
"active": true,
|
||||
"insurance_covered": false,
|
||||
"insurance_price_rials": null,
|
||||
"duration_minutes": 50,
|
||||
"created_at": 1718000000,
|
||||
"updated_at": 1718000000
|
||||
}
|
||||
@@ -113,7 +116,8 @@
|
||||
"price_rials": 500000,
|
||||
"staff_uuid": "...",
|
||||
"insurance_covered": true,
|
||||
"insurance_price_rials": 200000
|
||||
"insurance_price_rials": 200000,
|
||||
"duration_minutes": 50
|
||||
}
|
||||
```
|
||||
|
||||
@@ -121,10 +125,11 @@
|
||||
|------|-----|--------|
|
||||
| section_uuid | UUID | ✅ |
|
||||
| name | string | ✅ |
|
||||
| price_rials | integer | ❌ (پیشفرض 0) |
|
||||
| staff_uuid | UUID | ❌ |
|
||||
| price_rials | integer | ❌ (پیشفرض 0) — «قیمت پایه» |
|
||||
| staff_uuid | UUID | ❌ — پرسنل مسئول |
|
||||
| insurance_covered | boolean | ❌ (پیشفرض false) — آیا خدمت شامل بیمه میشود |
|
||||
| insurance_price_rials | integer\|null | ❌ — سهم/قیمت بیمار با بیمه |
|
||||
| duration_minutes | integer\|null | ❌ — «زمان متوسط» انجام خدمت به دقیقه (`""`/`null` = بدون مقدار) |
|
||||
|
||||
**Response 201:** ServiceItem object (شامل `insurance_covered` و `insurance_price_rials`)
|
||||
|
||||
@@ -143,10 +148,13 @@
|
||||
"staff_uuid": null,
|
||||
"active": false,
|
||||
"insurance_covered": true,
|
||||
"insurance_price_rials": 250000
|
||||
"insurance_price_rials": 250000,
|
||||
"duration_minutes": 30
|
||||
}
|
||||
```
|
||||
|
||||
> فیلد `duration_minutes` (زمان متوسط، دقیقه) در پاسخِ `toArray` و در ساخت/ویرایش پشتیبانی میشود؛ `""`/`null` آن را پاک میکند.
|
||||
|
||||
> `staff_uuid` باید به پرسنل متعلق به همان tenant (`entity_type`/`entity_id` کاربر) اشاره کند؛ ربطدادن پرسنل tenant دیگر → `422 ERR_VALIDATION_001` (`field: staff_uuid`). همین قید روی `POST /service-item` نیز اعمال میشود.
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user