diff --git a/src/app/labs/page.tsx b/src/app/labs/page.tsx index 737a20f75..78adf9925 100644 --- a/src/app/labs/page.tsx +++ b/src/app/labs/page.tsx @@ -30,12 +30,18 @@ import { PullToRefreshIndicator } from "@/components/ui/pull-to-refresh-indicato import { ResponsiveSheet } from "@/components/ui/responsive-sheet"; import { useAuth } from "@/hooks/use-auth"; import { useMounted } from "@/hooks/use-mounted"; +import { useRecordCapabilities } from "@/hooks/use-record-capabilities"; import { usePullToRefresh } from "@/hooks/use-pull-to-refresh"; import { useTranslations } from "@/lib/i18n/context"; import { queryKeys } from "@/lib/query-keys"; export default function LabsPage() { const { user, isAuthenticated, isLoading } = useAuth(); + // v1.36.x — entering a lab result by hand is an admitted delegated write. + // Scanning a report is not: it files a document and commits through the OCR + // route, and neither is delegated. So a WRITE delegate keeps the manual add + // and loses the choice menu around it. + const { canAdd, canManage } = useRecordCapabilities(); const mounted = useMounted(); const router = useRouter(); const queryClient = useQueryClient(); @@ -94,27 +100,29 @@ export default function LabsPage() { point, left of the primary Add and linking to the Labs settings page (view, sort order, biomarker CRUD + reorder). Mirrors the medication page header's wrench glyph + slot + 44px tap floor. */} - + +