Some functionality added to dashboard gadgets.

This commit is contained in:
2026-07-12 00:28:43 +03:30
parent 83f6003a2b
commit d79aab907c
21 changed files with 557 additions and 412 deletions

View File

@@ -146,6 +146,14 @@ export function canEditTreatment(org: Organization | null): boolean {
return hasPermission(org, 'TAB_TREATMENT_EDIT');
}
/** Staff treatment editors only — personal schedule Today gadgets (not owners). */
export function canViewMyAppointmentsWeekChart(org: Organization | null): boolean {
if (!org) return false;
if (org.type !== 'CLINIC') return false;
if (org.isOwner) return false;
return hasPermission(org, 'TAB_TREATMENT_EDIT');
}
/** View treatment workspace (read-only or edit) */
export function canViewTreatment(org: Organization | null): boolean {
if (!org) return false;