feat(treatment): skip reasons and reopening for session areas
Skipping an area recorded only that it was skipped. Why it was skipped is clinical history — the next session needs to read it — so `skip` now takes an optional note, the same way completing an area already did, and the panel asks for it inline instead of firing on the first click. An operator finds out mid-laser that they closed the wrong area, and until now had to carry that mistake to the end of the session. `reopen` puts a settled area — completed or skipped — back to in_progress and clears finished_at, keeping the recorded parameters and note so they can be seen and overwritten. It stops at the same boundary everything else in this domain stops at: once the session is finished the record is history, and reopening it is 409. Also drops /admin/my-services. The staff role has one job — today's sessions — and the dashboard already lists the services they may perform, so the page was a second place to read the same list. Route, page, sidebar entry and the two links to it are gone; the services stat card is no longer a link because it no longer has a destination. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
+17
-1
@@ -321,7 +321,8 @@ single-session again. Idempotent: deleting a service that has no protocol still
|
||||
| POST | `/dashboard/staff/treatment-session/{uuid}/finish` | اتمام جلسه |
|
||||
| POST | `/dashboard/staff/session-area/{uuid}/start` | شروع یک ناحیه |
|
||||
| POST | `/dashboard/staff/session-area/{uuid}/complete` | ثبت خواندههای دستگاه |
|
||||
| POST | `/dashboard/staff/session-area/{uuid}/skip` | صرفنظر از ناحیه |
|
||||
| POST | `/dashboard/staff/session-area/{uuid}/skip` | صرفنظر از ناحیه — `note` اختیاری |
|
||||
| POST | `/dashboard/staff/session-area/{uuid}/reopen` | باز کردن دوبارهٔ ناحیهٔ بستهشده |
|
||||
|
||||
### «جلسات امروز من» یک صف است
|
||||
|
||||
@@ -350,6 +351,21 @@ single-session again. Idempotent: deleting a service that has no protocol still
|
||||
|
||||
نتیجه همیشه به محیطِ خودِ پرسنل محدود است.
|
||||
|
||||
### صرفنظر و برگرداندن ناحیه
|
||||
|
||||
`skip` یک `note` اختیاری میگیرد. «چرا این ناحیه انجام نشد» بخشی از سابقهٔ درمان است؛
|
||||
بدونش جلسهٔ بعد فقط یک خلأ بیتوضیح میبیند.
|
||||
|
||||
`reopen` ناحیهٔ بستهشده — چه `completed` چه `skipped` — را برمیگرداند، برای اشتباهی که
|
||||
حین کار معلوم میشود. وضعیت به `in_progress` برمیگردد (یا `pending` اگر هرگز شروع نشده
|
||||
بود) و `finished_at` پاک میشود. `parameters` و `note` میمانند تا اپراتور ببیند چه ثبت
|
||||
شده بود و رویش بنویسد.
|
||||
|
||||
| کد | HTTP | شرط |
|
||||
|---|---|---|
|
||||
| ERR_VALIDATION_001 | 422 | ناحیه باز است و چیزی برای برگرداندن ندارد |
|
||||
| ERR_CONFLICT_001 | 409 | جلسه بسته شده؛ رکورد دیگر سابقه است نه فرم |
|
||||
|
||||
### شروع جلسه
|
||||
|
||||
رکوردِ هر ناحیهٔ پرونده یک بار ساخته میشود، پس فراخوانی دوباره ناحیهٔ تکراری نمیسازد.
|
||||
|
||||
Reference in New Issue
Block a user