style(medications): prettier sweep on the W3 intake-history fix

Run prettier --write on the four files the v1.4.37 W3 commits
touched (the schema, the route, the V2 component, and the two test
files). Drive-by also collapses two pre-existing whitespace drifts
in the InventoryItem type aliases and the glp1PostBodySchema refine
call so the file matches the formatter contract end-to-end. No
behavioural change.
This commit is contained in:
Marc-André Bombeck committed 2026-05-17 14:15:41 +02:00
1 parent 04aa2fc8b9
commit f33c70b3a2
6 files changed
+74 -55

No files matched your search

@@ -96,10 +96,7 @@ describe("<IntakeHistoryListV2> — empty state", () => {
it("renders the empty-state title and CTA in English", () => {
const client = makeClient();
seedIntake(client, "med-1", []);
const html = render(
<IntakeHistoryListV2 medicationId="med-1" />,
client,
);
const html = render(<IntakeHistoryListV2 medicationId="med-1" />, client);
expect(html).toContain("No intakes recorded yet");
expect(html).toContain("Open daily intake");
expect(html).toContain('href="/medications"');
@@ -141,10 +138,7 @@ describe("<IntakeHistoryListV2> — populated rows", () => {
createdAt: "2026-05-14T20:00:00.000Z",
},
]);
const html = render(
<IntakeHistoryListV2 medicationId="med-1" />,
client,
);
const html = render(<IntakeHistoryListV2 medicationId="med-1" />, client);
expect(html).toContain("Taken");
expect(html).toContain("Skipped");
expect(html).toContain("Website");
@@ -238,10 +232,7 @@ describe("<IntakeHistoryListV2> — populated rows", () => {
it("renders the section title across both locales", () => {
const client = makeClient();
seedIntake(client, "med-1", []);
const enHtml = render(
<IntakeHistoryListV2 medicationId="med-1" />,
client,
);
const enHtml = render(<IntakeHistoryListV2 medicationId="med-1" />, client);
expect(enHtml).toContain("Intake history");
const deClient = makeClient();
@@ -269,10 +260,7 @@ describe("<IntakeHistoryListV2> — sort indicators", () => {
createdAt: "2026-05-15T08:02:00.000Z",
},
]);
const html = render(
<IntakeHistoryListV2 medicationId="med-1" />,
client,
);
const html = render(<IntakeHistoryListV2 medicationId="med-1" />, client);
// Default sort = takenAt desc, so the "taken" header carries the
// arrow-down icon and the "scheduled" header carries the neutral
// dual-arrow icon.
@@ -322,10 +310,7 @@ describe("<IntakeHistoryListV2> — sort indicators", () => {
],
50,
);
const html = render(
<IntakeHistoryListV2 medicationId="med-2" />,
client,
);
const html = render(<IntakeHistoryListV2 medicationId="med-2" />, client);
expect(html).toContain("Previous");
expect(html).toContain("Next");
// a11y: pagination buttons clear the 44 px mobile touch floor and
@@ -352,10 +337,7 @@ describe("<IntakeHistoryListV2> — sort indicators", () => {
],
1,
);
const html = render(
<IntakeHistoryListV2 medicationId="med-3" />,
client,
);
const html = render(<IntakeHistoryListV2 medicationId="med-3" />, client);
expect(html).not.toContain(">Previous<");
expect(html).not.toContain(">Next<");
});
@@ -17,12 +17,7 @@ import { useAuth } from "@/hooks/use-auth";
import { useTranslations, useFormatters } from "@/lib/i18n/context";
import { Button } from "@/components/ui/button";
import { Badge } from "@/components/ui/badge";
import {
Card,
CardContent,
CardHeader,
CardTitle,
} from "@/components/ui/card";
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
import { EmptyState } from "@/components/ui/empty-state";
import {
Table,
@@ -233,8 +228,12 @@ export function IntakeHistoryListV2({
{sortIndicator("scheduledFor")}
</button>
</TableHead>
<TableHead>{t("medications.intakeHistoryColStatus")}</TableHead>
<TableHead>{t("medications.intakeHistoryColSource")}</TableHead>
<TableHead>
{t("medications.intakeHistoryColStatus")}
</TableHead>
<TableHead>
{t("medications.intakeHistoryColSource")}
</TableHead>
</TableRow>
</TableHeader>
<TableBody>
@@ -264,10 +263,7 @@ export function IntakeHistoryListV2({
variant="secondary"
className="gap-1 bg-green-500/20 text-xs text-green-400"
>
<Check
aria-hidden="true"
className="h-3 w-3"
/>
<Check aria-hidden="true" className="h-3 w-3" />
{t("medications.intakeHistoryStatusTaken")}
</Badge>
) : isSkipped ? (