Files
temetro/frontend/lib/staff.ts
T
Khalid Abdi a4f692d59d frontend: mirror pharmacy/lab roles with area-based route gating and nav
Mirror the backend role changes (drop viewer, add pharmacy + lab and the lab
statement). Replace the binary requiresClinical gating with access areas
(clinical / pharmacy / lab) probed from Better Auth permissions —
prescription:delete marks full clinicians, prescription:write the pharmacy
area, lab:write the lab area — so pharmacy doesn't inherit the AI chat or
notes. Pharmacy and lab land on their new dashboards and get their own nav
items; reception behavior is unchanged. Includes the i18n keys for the new
pages and the messages polish that lands in the following commits.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 21:03:27 +03:00

15 lines
452 B
TypeScript

import { apiFetch } from "@/lib/api-client";
// A clinician who can be assigned as a patient's primary provider. Returned by
// the backend's GET /api/staff/providers (clinical roles only — excludes
// reception/pharmacy/lab). Readable by any clinic member.
export type Provider = {
userId: string;
name: string;
role: string;
};
export function listProviders(): Promise<Provider[]> {
return apiFetch<Provider[]>("/api/staff/providers");
}