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:
hamed
2026-08-07 14:28:30 +03:30
co-authored by Claude Opus 5
parent a6180bc7e7
commit a182b05e1f
12 changed files with 236 additions and 116 deletions
@@ -559,11 +559,6 @@ function buildSections(
icon: ClipboardDocumentListIcon,
label: "جلسات امروز من",
},
{
to: "/admin/my-services",
icon: WrenchScrewdriverIcon,
label: "سرویس‌های من",
},
],
},
];
@@ -30,13 +30,16 @@ describe("Sidebar — نقش پرسنل", () => {
},
} as any);
it("shows only داشبورد and سرویس‌های من", () => {
it("shows only داشبورد and جلسات امروز من", () => {
asStaff();
renderWithProviders(<Sidebar />, { route: "/admin/dashboard" });
expect(screen.getByText("داشبورد").closest("a")).toHaveAttribute("href", "/admin/dashboard");
expect(screen.getByText("سرویس‌های من").closest("a")).toHaveAttribute("href", "/admin/my-services");
expect(screen.getByText("جلسات امروز من").closest("a")).toHaveAttribute("href", "/admin/my-sessions");
expect(screen.getByText("پرسنل")).toBeInTheDocument(); // برچسب نقش در فوتر
// صفحهٔ «سرویس‌های من» حذف شد؛ فهرست سرویس‌ها روی خودِ داشبورد است.
expect(screen.queryByText("سرویس‌های من")).not.toBeInTheDocument();
});
it("hides management entries", () => {