mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 20:42:43 +00:00
style: format the auto-take changes
This commit is contained in:
1 parent
7417d8f423
commit
2a626be92d
5 files changed
+16
-14
No files matched your search
@@ -92,10 +92,10 @@ export function MedicationStateBadges({
|
||||
!autoMarkTaken &&
|
||||
!recordOnly &&
|
||||
!courseEnded && (
|
||||
<Badge variant="secondary" className="text-xs">
|
||||
{t("medications.withoutNotification")}
|
||||
</Badge>
|
||||
)}
|
||||
<Badge variant="secondary" className="text-xs">
|
||||
{t("medications.withoutNotification")}
|
||||
</Badge>
|
||||
)}
|
||||
{!active && (
|
||||
<Badge variant="secondary" className="text-xs">
|
||||
{pausedAt
|
||||
|
||||
@@ -435,7 +435,8 @@ export function IntakeHistoryListV2({
|
||||
{event.autoRecorded
|
||||
? t("medications.intakeRecordedAutomatically")
|
||||
: t("medications.intakeSourceVia", {
|
||||
origin: sourceLabels[event.source] ?? event.source,
|
||||
origin:
|
||||
sourceLabels[event.source] ?? event.source,
|
||||
})}
|
||||
</Badge>
|
||||
</TableCell>
|
||||
@@ -541,7 +542,9 @@ export function IntakeHistoryListV2({
|
||||
{event.autoRecorded
|
||||
? t("medications.intakeRecordedAutomatically")
|
||||
: t("medications.intakeSourceVia", {
|
||||
origin: sourceLabels[event.source] ?? event.source,
|
||||
origin:
|
||||
sourceLabels[event.source] ??
|
||||
event.source,
|
||||
})}
|
||||
</Badge>
|
||||
</div>
|
||||
|
||||
@@ -486,10 +486,7 @@ interface FakeRow {
|
||||
syncVersion: number;
|
||||
}
|
||||
|
||||
function fakeClient(
|
||||
meds: ReturnType<typeof medication>[],
|
||||
rows: FakeRow[],
|
||||
) {
|
||||
function fakeClient(meds: ReturnType<typeof medication>[], rows: FakeRow[]) {
|
||||
let seq = 0;
|
||||
const inRange = (d: Date | null, r?: { gte?: Date; lte?: Date }) =>
|
||||
!!d &&
|
||||
@@ -550,7 +547,10 @@ function fakeClient(
|
||||
),
|
||||
create: vi.fn(
|
||||
async (args: {
|
||||
data: Omit<FakeRow, "id" | "deletedAt" | "syncVersion" | "autoMissed">;
|
||||
data: Omit<
|
||||
FakeRow,
|
||||
"id" | "deletedAt" | "syncVersion" | "autoMissed"
|
||||
>;
|
||||
}) => {
|
||||
const row: FakeRow = {
|
||||
id: `new-${++seq}`,
|
||||
|
||||
@@ -201,8 +201,7 @@ export function isInPauseEra(
|
||||
const t = at.getTime();
|
||||
return eras.some(
|
||||
(era) =>
|
||||
t >= era.pausedAt.getTime() &&
|
||||
t < (era.resumedAt ?? now).getTime(),
|
||||
t >= era.pausedAt.getTime() && t < (era.resumedAt ?? now).getTime(),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -576,7 +576,7 @@ export const medicationIntakeEventResource = z
|
||||
autoRecorded: z
|
||||
.boolean()
|
||||
.describe(
|
||||
"v1.42.2 — true when the server recorded this dose because the medication has `autoMarkTaken` on, not the person. It counts as taken everywhere (adherence, history, Coach) and consumed inventory like a manual take. Any take or skip the person records on the row clears it. Clients label such a dose \"recorded automatically\".",
|
||||
'v1.42.2 — true when the server recorded this dose because the medication has `autoMarkTaken` on, not the person. It counts as taken everywhere (adherence, history, Coach) and consumed inventory like a manual take. Any take or skip the person records on the row clears it. Clients label such a dose "recorded automatically".',
|
||||
),
|
||||
attributionSource: z
|
||||
.enum(["AUTO", "USER_PIN"])
|
||||
|
||||
Reference in new issue
Block a user