mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-11 05:42:19 +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
@@ -132,7 +132,9 @@ export function BiomarkerForm({
|
||||
onSuccess?.(saved);
|
||||
} catch (err) {
|
||||
const message =
|
||||
err instanceof ApiError ? err.message : t("labs.biomarker.form.saveError");
|
||||
err instanceof ApiError
|
||||
? err.message
|
||||
: t("labs.biomarker.form.saveError");
|
||||
setError(message);
|
||||
} finally {
|
||||
setSubmitting(false);
|
||||
|
||||
@@ -167,7 +167,10 @@ export function BiomarkerManager() {
|
||||
}
|
||||
description={t("labs.biomarker.defineDescription")}
|
||||
footer={
|
||||
<div ref={setFormFooterEl} className="flex w-full justify-end gap-2" />
|
||||
<div
|
||||
ref={setFormFooterEl}
|
||||
className="flex w-full justify-end gap-2"
|
||||
/>
|
||||
}
|
||||
>
|
||||
<BiomarkerForm
|
||||
|
||||
@@ -69,8 +69,7 @@ export function LabBiomarkerChart({
|
||||
|
||||
const points = useMemo<ChartPoint[]>(() => {
|
||||
const sorted = [...readings].sort(
|
||||
(a, b) =>
|
||||
new Date(a.takenAt).getTime() - new Date(b.takenAt).getTime(),
|
||||
(a, b) => new Date(a.takenAt).getTime() - new Date(b.takenAt).getTime(),
|
||||
);
|
||||
const days = RANGE_DAYS.find((r) => r.key === range)?.days ?? 0;
|
||||
const filtered =
|
||||
|
||||
@@ -228,7 +228,10 @@ export function LabBiomarkerDetail({ biomarkerId }: { biomarkerId: string }) {
|
||||
title={t("labs.biomarker.editTitle")}
|
||||
description={t("labs.biomarker.defineDescription")}
|
||||
footer={
|
||||
<div ref={setEditFooterEl} className="flex w-full justify-end gap-2" />
|
||||
<div
|
||||
ref={setEditFooterEl}
|
||||
className="flex w-full justify-end gap-2"
|
||||
/>
|
||||
}
|
||||
>
|
||||
{marker ? (
|
||||
|
||||
@@ -194,9 +194,7 @@ export function LabForm({
|
||||
disabled={!!lockedBiomarkerId || catalogLoading}
|
||||
>
|
||||
<SelectTrigger id="lab-biomarker" className="w-full">
|
||||
<SelectValue
|
||||
placeholder={t("labs.form.biomarkerPlaceholder")}
|
||||
/>
|
||||
<SelectValue placeholder={t("labs.form.biomarkerPlaceholder")} />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
{markers.map((m) => (
|
||||
|
||||
@@ -12,7 +12,13 @@ import { Input } from "@/components/ui/input";
|
||||
import { Label } from "@/components/ui/label";
|
||||
import { ResponsiveSheet } from "@/components/ui/responsive-sheet";
|
||||
import { Textarea } from "@/components/ui/textarea";
|
||||
import { ApiError, apiDelete, apiGet, apiPost, apiPut } from "@/lib/api/api-fetch";
|
||||
import {
|
||||
ApiError,
|
||||
apiDelete,
|
||||
apiGet,
|
||||
apiPost,
|
||||
apiPut,
|
||||
} from "@/lib/api/api-fetch";
|
||||
import { formatDateShort } from "@/lib/format";
|
||||
import { formatLabValue } from "@/lib/labs/format-value";
|
||||
import { resolveNoteForUpdate } from "@/lib/labs/note-update";
|
||||
@@ -110,9 +116,7 @@ export function LabHistoryList({ readings }: { readings: LabResultDto[] }) {
|
||||
closeEdit();
|
||||
},
|
||||
onError: (err) => {
|
||||
setEditError(
|
||||
err instanceof ApiError ? err.message : t("labs.editError"),
|
||||
);
|
||||
setEditError(err instanceof ApiError ? err.message : t("labs.editError"));
|
||||
},
|
||||
});
|
||||
|
||||
@@ -242,9 +246,7 @@ export function LabHistoryList({ readings }: { readings: LabResultDto[] }) {
|
||||
/>
|
||||
</div>
|
||||
<div className="space-y-1.5">
|
||||
<Label htmlFor="lab-edit-takenAt">
|
||||
{t("labs.form.takenAt")}
|
||||
</Label>
|
||||
<Label htmlFor="lab-edit-takenAt">{t("labs.form.takenAt")}</Label>
|
||||
<DateTimeInput
|
||||
id="lab-edit-takenAt"
|
||||
value={editTakenAt}
|
||||
|
||||
@@ -6,12 +6,7 @@ import { useQuery } from "@tanstack/react-query";
|
||||
import { ChevronRight, FlaskConical } from "lucide-react";
|
||||
|
||||
import { Button } from "@/components/ui/button";
|
||||
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 { Skeleton } from "@/components/ui/skeleton";
|
||||
import { apiGet } from "@/lib/api/api-fetch";
|
||||
@@ -57,8 +52,7 @@ function groupReadings(results: LabResultDto[]): MarkerGroup[] {
|
||||
const groups: MarkerGroup[] = [];
|
||||
for (const [key, readings] of byKey.entries()) {
|
||||
const ordered = [...readings].sort(
|
||||
(a, b) =>
|
||||
new Date(a.takenAt).getTime() - new Date(b.takenAt).getTime(),
|
||||
(a, b) => new Date(a.takenAt).getTime() - new Date(b.takenAt).getTime(),
|
||||
);
|
||||
const latest = ordered[ordered.length - 1];
|
||||
groups.push({
|
||||
@@ -184,8 +178,7 @@ export function LabList({ onAddFirst }: { onAddFirst?: () => void } = {}) {
|
||||
</div>
|
||||
<div className="text-muted-foreground flex flex-wrap items-center gap-x-2 text-xs">
|
||||
<span className="text-foreground font-semibold tabular-nums">
|
||||
{formatLabValue(group.latest.value)}{" "}
|
||||
{group.latest.unit}
|
||||
{formatLabValue(group.latest.value)} {group.latest.unit}
|
||||
</span>
|
||||
<span>{formatDate(group.latest.takenAt)}</span>
|
||||
</div>
|
||||
|
||||
@@ -81,9 +81,7 @@ export function LabsSettings() {
|
||||
<option value="recentAsc">{t("labs.sort.recentAsc")}</option>
|
||||
<option value="manual">{t("labs.sort.manual")}</option>
|
||||
</NativeSelect>
|
||||
<p className="text-muted-foreground text-xs">
|
||||
{t("labs.sort.hint")}
|
||||
</p>
|
||||
<p className="text-muted-foreground text-xs">{t("labs.sort.hint")}</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
Reference in new issue
Block a user