docs(wiki): catch-up sweep — five pages lagging the log
rongta-printer still named the cashino driver id (→ escpos + migration 0023 note); tariff-time-tiers listed the composer price preview as deferred (→ delivered by the lab fee breakdown); tariff.md lab section gained the breakdown + composer increment-guard paragraph; i18n.md now records the "25 Qer 14:30" date standard + never-toLocaleString-for- dates rule; fleet-deployment-komodo gained the park-lab stack + tier table (the park-lab addition had also slipped the log — both fixed). Claude-Session: https://claude.ai/code/session_01Xcm6ikLgGoCxxHrxtjkk5V
This commit is contained in:
@@ -71,6 +71,18 @@ Two patterns added on top of the catalog approach:
|
||||
> this box must avoid relying on `Intl` for Albanian or it leaks English. (Printed slips already
|
||||
> solved this with the `SQ_MONTHS` table in [[rongta-printer]].)
|
||||
|
||||
## UI-wide date standard — "25 Qer 14:30" (2026-07-06)
|
||||
|
||||
Dates were a mix of catalog-formatted "25 Qershor 20:01" and browser-locale "7/6/2026, 9:34 AM"
|
||||
(raw `toLocaleString` in ~20 call sites) — operator called it out. The standard now: **short
|
||||
month from the catalog** (`common.monthsShort`: Jan/Shk/…/Qer/Korr/…/Dhj), **24h clock**, year
|
||||
only when ≠ current. Helpers in `lib/format.ts`: `formatDate` ("25 Qer"), `formatDateTime`
|
||||
("25 Qer 14:30", optional seconds — the event-detail modal keeps them), `formatClock` ("HH:mm");
|
||||
`formatRelativeDateTime` keeps Sot/Dje and uses the same short months beyond that. Rule for new
|
||||
code: **never call `toLocale*String` for a DATE** — catalog months exist because the appliance
|
||||
browser's ICU may lack Albanian data; number formatting (thousand separators on money) still uses
|
||||
the locale. Swept everywhere 2026-07-06.
|
||||
|
||||
## Open / deferred
|
||||
|
||||
- **SetupWizard chrome is now translated (2026-06-19)**; the remaining gap is the **backend
|
||||
|
||||
@@ -174,5 +174,6 @@ in `packages/shared/src/index.ts` (+ `tariff.test.ts`, 36 cases incl. the golden
|
||||
holiday calendar (one date list, referenced by cards) is a future nicety, not built.
|
||||
- Per-relay/lane **category capture** at a transient gate (the "bus lane") — seam noted in
|
||||
`entry-flow.ts`; today every transient takes the site default category.
|
||||
- A composer **price preview** ("at 14:30 Tue a 2h stay costs …") — high-value for operator trust,
|
||||
deferred.
|
||||
- ~~A composer **price preview**~~ — largely DELIVERED 2026-07-06 by the Tariff Lab's fee
|
||||
BREAKDOWN (see [[tariff]] §Tariff Lab): simulate any stay against a draft/version and read the
|
||||
line items. A live preview inside the composer form itself remains a possible nicety.
|
||||
|
||||
+13
-1
@@ -201,7 +201,19 @@ The admin authors the rate card at runtime — no hand-seeding:
|
||||
- Ships **blank** — until a version is published, `GET /api/tariff` returns `active: null` and the
|
||||
pay station returns `409 no active tariff`. Verified end to end (publish → pay station prices).
|
||||
|
||||
### Tariff Lab (simulator, as-built 2026-06-20; drafts redesign 2026-07-05)
|
||||
### Tariff Lab (simulator, as-built 2026-06-20; drafts redesign 2026-07-05; fee breakdown 2026-07-06)
|
||||
|
||||
> **Fee breakdown ("how is this sum produced").** The lab's Outcome panel lists the fee's LINE
|
||||
> ITEMS: banded same-price increment runs (time window · N × unit · tier-card name), window-package
|
||||
> occurrences, stepped day totals (top-tier repeat flagged), daily-cap clamps as NEGATIVE
|
||||
> adjustments, entry grace, plus a rounding note (raw min → billed min at the increment). Produced
|
||||
> by `explainFee` in `@parking/shared` — the SAME computeFee walk with a trace collector, so
|
||||
> Σ items ≡ the amount by construction (golden V1 regression unchanged). `/api/tariff/simulate`
|
||||
> returns it as `breakdown` (null when settled). Also the composer grew INCREMENT-UNIT guards
|
||||
> (2026-07-06): price labels state the real unit live ("Çmimi / orë" at 60, "Çmimi / N min"
|
||||
> otherwise), an amber warning fires when increment ≠ 60, and each ladder/flat price shows its
|
||||
> "= X / orë" equivalence — closing the 60→10 ×6-prices trap; example defaults are
|
||||
> currency-scaled (ALL: 200/100, not the euro-scale 2.00/1.00).
|
||||
|
||||
The tariff engine is a **pure function of time**, but you could previously only *exercise* it by
|
||||
waiting (the only clock the booth reads is the real wall-clock). The **Tariff Lab** closes that gap:
|
||||
|
||||
Reference in New Issue
Block a user