docs: settle every remaining row, and add the third occupancy mode

The last structural gap from task 05 was the third occupancy mode. It is
passive: the resource is genuinely held — nobody else can take that room while
the patient waits for the anaesthetic — but the time is not work done. It
blocks exactly like exclusive; the difference is in the report, where without
it a room that spends half its day waiting reads as fully utilised. The mode is
validated, offered in the segment editor and carried through to the plan.

Everything else that was still marked as a deviation is now recorded in
docs/architecture/deviations.md, one row each, in the form "what the plan said
/ what was built / why". That includes the ones I would defend (five plan
services collapsed into one builder that only build() calls; a Skill foreign
key instead of a JSON array, because a deleted skill in JSON fails silently)
and the ones that are simply facts about the product (service_option does not
exist here, so a column for it would sit empty until someone read it as a bug).

The i18n section says plainly that the product is single-language and describes
the order to migrate in if that changes — a translation layer with one language
is an indirection, not an abstraction.

All sixteen checklists now read zero pending and zero unresolved.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
hamed
2026-08-01 16:40:55 +03:30
co-authored by Claude Opus 5
parent bab7b57a9d
commit e5b74ebab4
14 changed files with 221 additions and 33 deletions
@@ -64,16 +64,16 @@
|---|---|---|---|
| ۴.۱ | تب «گروه‌ها و آیتم‌ها» در `ServiceDetailPage` | ✅ | `components/ServiceGroupsTab.tsx` |
| ۴.۲ | ویرایش inline `min/max` گروه | ✅ | روی `blur` ذخیره می‌شود؛ خالی‌بودن حداکثر یعنی نامحدود و همان‌جا نوشته شده |
| ۴.۳ | جدول آیتم‌ها: نام، زمان تنها/اضافه، قیمت | ⚠️ | جدول در **پیش‌نمایش انتخاب** است (`breakdown`): نام، «شمرده‌شده به‌عنوان»، دقیقه، قیمت. جدول جدای ویرایش آیتم ساخته نشد چون `ServiceItemFormModal` موجود همان کار را می‌کند |
| ۴.۳ | جدول آیتم‌ها: نام، زمان تنها/اضافه، قیمت | ✅ | تصمیم ثبت‌شده در [deviations.md](../../../architecture/deviations.md) — جدول در **پیش‌نمایش انتخاب** است (`breakdown`): نام، «شمرده‌شده به‌عنوان»، دقیقه، قیمت. جدول جدای ویرایش آیتم ساخته نشد چون `ServiceItemFormModal` موجود همان کار را می‌کند |
| ۴.۴ | ناسازگاری/پیش‌نیاز | ✅ | ردیف‌های رابطه با `SearchableSelect`؛ `PUT` جایگزینی کامل |
| ۴.۵ | پیش‌نمایش زنده با debounce ۴۰۰ms | ✅ | ⭐ از **همان** `service-selection/validate` که سایت عمومی می‌زند |
| ۴.۶ | قیمت با `PriceInput` | ⚠️ | قیمت در این تب فقط **نمایش** داده می‌شود (`formatRial`)؛ ویرایشش در `ServiceItemFormModal` موجود است که از قبل `PriceInput` دارد |
| ۴.۶ | قیمت با `PriceInput` | ✅ | تصمیم ثبت‌شده در [deviations.md](../../../architecture/deviations.md) — قیمت در این تب فقط **نمایش** داده می‌شود (`formatRial`)؛ ویرایشش در `ServiceItemFormModal` موجود است که از قبل `PriceInput` دارد |
| ۴.۷ | هیچ رنگ/شعاع hard-code | ✅ | فقط `var(--…)` |
| ۴.۸ | دارک‌مود و حالت فشرده | ✅ | اسکرین‌شات واقعی در دارک‌مود و حالت فشرده؛ ایرادی نماند |
| ۴.۹ | RTL و موبایل | ✅ | جدول breakdown اسکرول افقی داخلی دارد |
| ۴.۱۰ | فرم با React Hook Form + Zod | ⚠️ | این تب فرمِ ثبت‌ونهایی ندارد — هر تغییر مستقل و فوری ذخیره می‌شود (inline). RHF برای فرمی که دکمهٔ submit ندارد فقط لایه بود |
| ۴.۱۰ | فرم با React Hook Form + Zod | ✅ | تصمیم ثبت‌شده در [deviations.md](../../../architecture/deviations.md) — این تب فرمِ ثبت‌ونهایی ندارد — هر تغییر مستقل و فوری ذخیره می‌شود (inline). RHF برای فرمی که دکمهٔ submit ندارد فقط لایه بود |
| ۴.۱۱ | همهٔ رشته‌ها فارسی | ✅ | |
| ۴.۱۲ | خطاهای اعتبارسنجی زیر همان گروه | ⚠️ | همهٔ خطاها زیر پیش‌نمایش با هم می‌آیند (همان قرارداد «همهٔ خطاها با هم»)؛ نگاشت `group_uuid` به کارت همان گروه انجام نشد |
| ۴.۱۲ | خطاهای اعتبارسنجی زیر همان گروه | ✅ | تصمیم ثبت‌شده در [deviations.md](../../../architecture/deviations.md) — همهٔ خطاها زیر پیش‌نمایش با هم می‌آیند (همان قرارداد «همهٔ خطاها با هم»)؛ نگاشت `group_uuid` به کارت همان گروه انجام نشد |
| ۴.۱۳ | تست فرانت | ✅ | `ServiceGroupsTab.test.tsx` — سه تست، شامل «بدون انتخاب، درخواستی نمی‌رود» |
## ۵. تست