mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-18 16:12:11 +00:00
style: apply prettier across the tree
One-shot prettier pass so the new format:check gate starts from a clean baseline. Formatting only — no behaviour change. Generator-owned and vendored artifacts stay untouched via .prettierignore.
This commit is contained in:
1 parent
b3fea2ef59
commit
1f4ba5939d
1000 files changed
+12130
-8385
No files matched your search
@@ -49,10 +49,7 @@ describe("<NotificationsSection> — split title ids (F-1 H-1)", () => {
|
||||
it("renders the section heading and the row label with distinct ids", () => {
|
||||
const client = makeClient();
|
||||
const html = render(
|
||||
<NotificationsSection
|
||||
medicationId="med-1"
|
||||
notificationsEnabled={true}
|
||||
/>,
|
||||
<NotificationsSection medicationId="med-1" notificationsEnabled={true} />,
|
||||
client,
|
||||
);
|
||||
|
||||
|
||||
@@ -197,10 +197,7 @@ export function ApiTokensRow({
|
||||
}, [mintedToken]);
|
||||
|
||||
return (
|
||||
<div
|
||||
className="space-y-2"
|
||||
data-slot="medication-detail-api-tokens-row"
|
||||
>
|
||||
<div className="space-y-2" data-slot="medication-detail-api-tokens-row">
|
||||
<p className="text-muted-foreground text-xs">
|
||||
{t("medications.detail.api.caption", { name: medicationName })}
|
||||
</p>
|
||||
@@ -301,7 +298,10 @@ export function ApiTokensRow({
|
||||
)}
|
||||
</Button>
|
||||
{examplesOpen && (
|
||||
<div className="mt-2 space-y-1.5" data-slot="api-tokens-examples-body">
|
||||
<div
|
||||
className="mt-2 space-y-1.5"
|
||||
data-slot="api-tokens-examples-body"
|
||||
>
|
||||
<div className="flex items-center justify-end gap-2">
|
||||
<Label className="sr-only">
|
||||
{t("medications.requestExample")}
|
||||
|
||||
@@ -415,4 +415,3 @@ export function DangerZoneBody({
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -130,7 +130,10 @@ interface InventoryResponse {
|
||||
meta?: { total: number };
|
||||
}
|
||||
|
||||
const STATE_BADGE: Record<InventoryState, "secondary" | "outline" | "destructive"> = {
|
||||
const STATE_BADGE: Record<
|
||||
InventoryState,
|
||||
"secondary" | "outline" | "destructive"
|
||||
> = {
|
||||
ACTIVE: "secondary",
|
||||
IN_USE: "secondary",
|
||||
EXPIRED: "destructive",
|
||||
@@ -181,7 +184,9 @@ export function InventorySection({
|
||||
const { data, isLoading } = useQuery<InventoryResponse>({
|
||||
queryKey: queryKeys.medicationInventory(medicationId),
|
||||
queryFn: async () => {
|
||||
return apiGet<InventoryResponse>(`/api/medications/${medicationId}/inventory`);
|
||||
return apiGet<InventoryResponse>(
|
||||
`/api/medications/${medicationId}/inventory`,
|
||||
);
|
||||
},
|
||||
staleTime: 30_000,
|
||||
// v1.16.12 (#316) — fresh on every mount so reopening the supply tab
|
||||
@@ -501,8 +506,7 @@ export function AddInventoryDialog({
|
||||
|
||||
const parsed = Number(quantity);
|
||||
const effectiveMode = unitsPerDose > 1 ? quantityMode : "units";
|
||||
const units =
|
||||
effectiveMode === "doses" ? parsed * unitsPerDose : parsed;
|
||||
const units = effectiveMode === "doses" ? parsed * unitsPerDose : parsed;
|
||||
const quantityValid =
|
||||
Number.isInteger(parsed) && parsed >= 1 && units >= 1 && units <= 1000;
|
||||
|
||||
@@ -607,7 +611,11 @@ export function AddInventoryDialog({
|
||||
type="number"
|
||||
inputMode="numeric"
|
||||
min={1}
|
||||
max={effectiveMode === "doses" ? Math.floor(1000 / unitsPerDose) : 1000}
|
||||
max={
|
||||
effectiveMode === "doses"
|
||||
? Math.floor(1000 / unitsPerDose)
|
||||
: 1000
|
||||
}
|
||||
step={1}
|
||||
required
|
||||
autoComplete="off"
|
||||
@@ -767,8 +775,7 @@ function AdjustInventoryDialog({
|
||||
>
|
||||
{t("medications.detail.bestand.adjustHelper", {
|
||||
total:
|
||||
item.unitsTotal ??
|
||||
t("medications.detail.bestand.unknown"),
|
||||
item.unitsTotal ?? t("medications.detail.bestand.unknown"),
|
||||
})}
|
||||
</p>
|
||||
</div>
|
||||
@@ -824,7 +831,9 @@ function PackagingDialog({
|
||||
|
||||
const parsedPerDose = Number(perDoseValue);
|
||||
const perDoseValid =
|
||||
Number.isInteger(parsedPerDose) && parsedPerDose >= 1 && parsedPerDose <= 100;
|
||||
Number.isInteger(parsedPerDose) &&
|
||||
parsedPerDose >= 1 &&
|
||||
parsedPerDose <= 100;
|
||||
const parsedPack = packValue.trim() === "" ? null : Number(packValue);
|
||||
const packValid =
|
||||
parsedPack === null ||
|
||||
@@ -933,7 +942,10 @@ function PackagingDialog({
|
||||
>
|
||||
{t("common.cancel")}
|
||||
</Button>
|
||||
<Button type="submit" disabled={!perDoseValid || !packValid || busy}>
|
||||
<Button
|
||||
type="submit"
|
||||
disabled={!perDoseValid || !packValid || busy}
|
||||
>
|
||||
{busy && (
|
||||
<Loader2
|
||||
aria-hidden="true"
|
||||
|
||||
@@ -347,4 +347,3 @@ export function PhasesRow({
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user