mirror of
https://github.com/temetro/temetro.git
synced 2026-07-31 22:22:32 +00:00
a4f692d59d
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>
15 lines
452 B
TypeScript
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");
|
|
}
|