mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-17 15:42:24 +00:00
style(glp1): prettier formatting across W4d surfaces
This commit is contained in:
1 parent
a68dbdc22c
commit
d74aa2066b
15 files changed
+1035
-73
No files matched your search
@@ -330,7 +330,12 @@ export async function buildGlp1SnapshotBlock(
|
||||
const dows = sched ? parseDaysOfWeek(sched.daysOfWeek) : [];
|
||||
const schedule: ScheduleEntry | null = sched
|
||||
? {
|
||||
cadence: dows.length === 1 ? "weekly" : dows.length === 0 ? "daily" : "custom",
|
||||
cadence:
|
||||
dows.length === 1
|
||||
? "weekly"
|
||||
: dows.length === 0
|
||||
? "daily"
|
||||
: "custom",
|
||||
daysOfWeek: dows,
|
||||
windowStart: sched.windowStart,
|
||||
windowEnd: sched.windowEnd,
|
||||
|
||||
Binary file not shown.
@@ -473,7 +473,11 @@ export function buildDoctorReportPdfDocument(
|
||||
|
||||
doc.setFontSize(9);
|
||||
doc.setFont("helvetica", "normal");
|
||||
if (data.glp1.weightDeltaKg !== null && data.glp1.weightStartKg !== null && data.glp1.weightEndKg !== null) {
|
||||
if (
|
||||
data.glp1.weightDeltaKg !== null &&
|
||||
data.glp1.weightStartKg !== null &&
|
||||
data.glp1.weightEndKg !== null
|
||||
) {
|
||||
doc.text(
|
||||
t("doctorReport.glp1WeightSummary", {
|
||||
start: num(data.glp1.weightStartKg, 1),
|
||||
@@ -572,7 +576,9 @@ export function buildDoctorReportPdfDocument(
|
||||
const seRows = data.glp1.sideEffects.map((s) => [s.tag, String(s.count)]);
|
||||
autoTable(doc, {
|
||||
startY: y,
|
||||
head: [[t("doctorReport.colGlp1SideEffect"), t("doctorReport.colCount")]],
|
||||
head: [
|
||||
[t("doctorReport.colGlp1SideEffect"), t("doctorReport.colCount")],
|
||||
],
|
||||
body: seRows,
|
||||
theme: "grid",
|
||||
styles: {
|
||||
|
||||
@@ -53,7 +53,9 @@ describe("injection-sites", () => {
|
||||
|
||||
describe("describeInjectionSite()", () => {
|
||||
it("returns the right i18n key per site", () => {
|
||||
expect(describeInjectionSite("ABDOMEN_LEFT")).toBe("medications.siteAbdomenLeft");
|
||||
expect(describeInjectionSite("ABDOMEN_LEFT")).toBe(
|
||||
"medications.siteAbdomenLeft",
|
||||
);
|
||||
expect(describeInjectionSite("UPPER_ARM_RIGHT")).toBe(
|
||||
"medications.siteUpperArmRight",
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user