mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-15 23:12:04 +00:00
Give the caregiver a front door and a receipt
Sharing lived in a settings panel and a menu three levels deep. That is where a grant is managed and not where it is used: somebody who opens this app every morning to check on a parent does not go through settings to do it, and the design standards draw the same line, settings being account utilities rather than feature destinations. So the dashboard carries one compact card listing the records shared with this account, each row a one-tap switch through the existing flow. It is a doorway and not a preview. No numbers, no last reading. A slice of somebody else's record on the delegate's own dashboard would sit outside the one frame the design leans on, the banner naming the record you are inside. An account nobody has shared with sees nothing at all. The other half is the receipt: a reading, a lab result or a dose recorded under a switch now says which record it landed in, because "Saved" alone is the confirmation somebody acting for another person does not need. The undo on the dose toast goes at the same time, since a delegate cannot remove what they recorded and an undo they can see is one the server refuses. Also here: the lines the owner's activity view owes each admitted verb, as a translated mapping with a fallback, so a later release filing a verb it has never heard of still renders a sentence rather than a blank row.
This commit is contained in:
1 parent
ab53d42874
commit
d5a9360c52
14 files changed
+604
-10
No files matched your search
+19
-7
@@ -1,5 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import { LookingAfterCard } from "@/components/dashboard/looking-after-card";
|
||||
import { useRecordCapabilities } from "@/hooks/use-record-capabilities";
|
||||
import React, { Suspense, useCallback, useMemo, useState } from "react";
|
||||
import { useQuery, useQueryClient } from "@tanstack/react-query";
|
||||
import { useAuth } from "@/hooks/use-auth";
|
||||
@@ -241,6 +243,7 @@ export default function DashboardPageClient({
|
||||
value: number | null | undefined,
|
||||
): number | null =>
|
||||
value == null ? null : unitDisplay.toDisplayDelta(type, value);
|
||||
const { canAdd } = useRecordCapabilities();
|
||||
const [quickEntryDialog, setQuickEntryDialog] =
|
||||
useState<QuickEntryDialog>(null);
|
||||
|
||||
@@ -901,6 +904,13 @@ export default function DashboardPageClient({
|
||||
<PullToRefreshIndicator {...pull} />
|
||||
<DashboardHeader onQuickEntry={setQuickEntryDialog} />
|
||||
|
||||
{/* v1.36.x — the caregiver's front door, directly under the greeting
|
||||
and above this account's own day. Somebody who opens the app to
|
||||
check on a parent should not have to go through settings to get
|
||||
there. Renders nothing for an account nobody has shared with, and
|
||||
nothing while a switch is already on. */}
|
||||
<LookingAfterCard />
|
||||
|
||||
{/* S2 — the Today hero, promoted above the tile strip (MARC sign-off
|
||||
decision 1). Renders the S1 daily digest: the day's read, the
|
||||
honest score/freshness face, and the worth-a-look rail. Shimmer
|
||||
@@ -1976,13 +1986,15 @@ export default function DashboardPageClient({
|
||||
title={t("dashboard.emptyTitle")}
|
||||
description={t("dashboard.emptyDescription")}
|
||||
action={
|
||||
<Button
|
||||
size="sm"
|
||||
onClick={() => setQuickEntryDialog("measurement")}
|
||||
>
|
||||
<Plus className="h-4 w-4" />
|
||||
{t("dashboard.emptyAddMeasurement")}
|
||||
</Button>
|
||||
canAdd ? (
|
||||
<Button
|
||||
size="sm"
|
||||
onClick={() => setQuickEntryDialog("measurement")}
|
||||
>
|
||||
<Plus className="h-4 w-4" />
|
||||
{t("dashboard.emptyAddMeasurement")}
|
||||
</Button>
|
||||
) : undefined
|
||||
}
|
||||
/>
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user