refactor(admin): rebuild the staff sessions page around the operator's question
The page an operator opens to see the day's work did not say who any of it was for. TreatmentSession::toArray() carries no patient, so the list showed a service name, a time, and a repeated 40-char button — the same three lines for every row, with the finished work leading. The endpoint now sends patient_name and resource_name. They are added in the controller next to case_uuid/service_name rather than in toArray(), so patient identity does not leak into every other consumer of that method. The list is now a queue: unfinished work first, settled work (done, cancelled, no-show) below it, each group counted. Every row leads with its time, names the patient, and carries the service, device, session number and area progress on one meta line. The whole row is the link, so the repeated button is gone. Also fixes three things the redesign checklist calls out: Latin digits in the session and area counts (formatNumber), a date repeated on every row of a page whose title is "today", and a missing error state — a failed request rendered as "no sessions today", which reads as an empty day rather than a broken one. Adds the test file the page never had. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -285,6 +285,20 @@ single-session again. Idempotent: deleting a service that has no protocol still
|
||||
|
||||
### «جلسات امروز من» یک صف است
|
||||
|
||||
هر ردیف علاوه بر فیلدهای معمولِ جلسه، اینها را هم دارد:
|
||||
|
||||
| فیلد | توضیح |
|
||||
|---|---|
|
||||
| `case_uuid` | پروندهٔ درمانِ همین جلسه |
|
||||
| `service_name` | نام سرویس |
|
||||
| `patient_name` | نام بیمار، از نوبتِ متصل — `null` اگر جلسه نوبت ندارد |
|
||||
| `resource_name` | دستگاهِ نوبت — `null` اگر نوبت روی منبع نبوده |
|
||||
|
||||
`patient_name` و `resource_name` فقط در همین اندپوینت اضافه میشوند، نه در
|
||||
`TreatmentSession::toArray()`؛ صفِ اپراتور بدون نام بیمار بیمعنی است ولی هویت بیمار
|
||||
نباید در هر مصرفکنندهٔ دیگرِ آن متد هم بنشیند.
|
||||
|
||||
|
||||
جلسهٔ امروز از سه راه به یک اپراتور میرسد:
|
||||
|
||||
- جلسهای که خودش برداشته — `TreatmentSession.performedBy` هنگام «شروع جلسه» ست میشود.
|
||||
|
||||
Reference in New Issue
Block a user