feat(patients): phase B5 — wire service creation into the detail page

Reuse the existing NewSessionPage (service section/item + insurance coverage +
payment flow → POST /patient/{recordUuid}/session) from the new patient detail:
add a patients-scoped route /admin/patients/:recordUuid/session/new and a
"سرویس جدید" action on the services tab. The multi-step visual restyle and the
standalone invoice-issuance screen remain a follow-up (the underlying
session/billing endpoints already exist).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
hamed
2026-07-13 15:40:52 +03:30
co-authored by Claude Opus 4.8
parent 30ebbbd309
commit 3036c0bf45
3 changed files with 15 additions and 2 deletions
@@ -76,6 +76,13 @@ describe('PatientDetailPage (پرونده تب‌دار)', () => {
expect(await screen.findByPlaceholderText('مثلاً: معاینه اولیه')).toBeInTheDocument();
});
it('links "سرویس جدید" on the services tab to the new-session route', async () => {
renderDetail();
await screen.findByText('ساغر صابری'); // services is the default tab
const link = await screen.findByRole('link', { name: /سرویس جدید/ });
expect(link).toHaveAttribute('href', '/admin/patients/r1/session/new');
});
it('renders the messages tab with a send box', async () => {
renderDetail();
await screen.findByText('ساغر صابری');