fix(pdf): give formatMoney a locale, lower the strict entry of the export

lint:strict: a place's price passed the export's locale, which can be
undefined, to formatMoney; it falls back to en like the export's other
money figures. The rewritten TripPDF.tsx holds 1 strict error instead of 38,
and its entry is lowered to that.
This commit is contained in:
Maurice
2026-11-22 22:28:09 +01:00
parent 8c9cf4a80c
commit 28f750f7c4
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -43,7 +43,7 @@
"src/components/Map/ReservationOverlay.test.tsx": 1,
"src/components/Map/transitGeometry.ts": 1,
"src/components/Map/useMarkerThumbs.ts": 1,
"src/components/PDF/TripPDF.tsx": 38,
"src/components/PDF/TripPDF.tsx": 1,
"src/components/Planner/DayPlanSidebar.constants.ts": 1,
"src/components/Planner/DayPlanSidebar.tsx": 52,
"src/components/Planner/DayPlanSidebarNoteModal.test.tsx": 1,
+1 -1
View File
@@ -261,7 +261,7 @@ function placeFacts(place: Assignment['place'] & Partial<Place>, ctx: PdfDayCont
const price = Number(place.price);
if (Number.isFinite(price) && price > 0) {
facts.push(
`<span class="chip chip-green">${glyph('price', 9)}${escHtml(formatMoney(price, place.currency || ctx.tripCurrency, ctx.locale))}</span>`
`<span class="chip chip-green">${glyph('price', 9)}${escHtml(formatMoney(price, place.currency || ctx.tripCurrency, ctx.locale || 'en'))}</span>`
);
}
if (typeof place.rating_avg === 'number' && place.rating_avg > 0) {