Positioning, sizing and sorting of the gadgets improved.

This commit is contained in:
2026-07-11 22:32:37 +03:30
parent ed8ff61205
commit 83f6003a2b
35 changed files with 1615 additions and 678 deletions

View File

@@ -160,6 +160,9 @@ export function AppointmentScheduleGrid({
});
return;
}
if (!canBook) {
return;
}
onAppointmentClick?.(apt);
}
@@ -373,6 +376,10 @@ export function AppointmentScheduleGrid({
treatmentCatalog={treatmentCatalog}
anchorRect={overlapPopover.anchorRect}
onSelect={(apt) => {
if (!canBook) {
setOverlapPopover(null);
return;
}
const provider = providers.find((p) => p.userId === apt.providerUserId);
if (
provider &&

View File

@@ -18,7 +18,7 @@ import type { OrgTypeName } from '@/components/shared/permissions';
import { useAuth } from '@/lib/hooks/useAuth';
import { usePendingConnectionsCount } from '@/lib/hooks/usePendingConnectionsCount';
import {
canAccessAppointmentsSection,
canViewAppointmentsTab,
canViewCases,
canViewTasks,
canViewTab,
@@ -73,7 +73,7 @@ function Sidebar() {
return false;
}
if (item.path === '/appointments') {
return canAccessAppointmentsSection(currentOrganization);
return canViewAppointmentsTab(currentOrganization);
}
if (item.path === '/cases') {
return canViewCases(currentOrganization);