diff --git a/apps/web/src/BoothScreen.tsx b/apps/web/src/BoothScreen.tsx index 60c1630..d81c8af 100644 --- a/apps/web/src/BoothScreen.tsx +++ b/apps/web/src/BoothScreen.tsx @@ -112,6 +112,9 @@ function eventBadges(p: LedgerEvent["payload"]): string[] { if (p.permitRefused) keys.push("booth.badgeSubRefused"); if (p.ticketPrinted === false) keys.push("booth.badgeNoTicket"); if (p.subscriptionSale) keys.push("booth.badgeSubSale"); + // Subscriber entered/exited outside their plan's allowed window → owes a deferred + // transient charge, collected (gated) at exit. Flag it so the operator KNOWS now. + if (typeof p.windowOwedMinor === "number" && p.windowOwedMinor > 0) keys.push("booth.badgeWindowCharge"); if (p.source === "manual" && !p.subscriptionSale) keys.push("booth.badgeManualOpen"); return keys; } diff --git a/apps/web/src/lib/i18n/en.ts b/apps/web/src/lib/i18n/en.ts index 74e8590..488a08c 100644 --- a/apps/web/src/lib/i18n/en.ts +++ b/apps/web/src/lib/i18n/en.ts @@ -157,6 +157,7 @@ export const en: Catalog = { badgeManualOpen: "manual open", badgeSubRefused: "subscription refused", badgeSubSale: "subscription sale", + badgeWindowCharge: "out-of-window — owes fee", badgeNoTicket: "ticket not printed", feedSourceBooth: "booth", feedSourceReader: "reader", diff --git a/apps/web/src/lib/i18n/sq.ts b/apps/web/src/lib/i18n/sq.ts index 31f30e3..2e90d6a 100644 --- a/apps/web/src/lib/i18n/sq.ts +++ b/apps/web/src/lib/i18n/sq.ts @@ -161,6 +161,7 @@ export const sq = { badgeManualOpen: "hapje manuale", badgeSubRefused: "abonimi u refuzua", badgeSubSale: "shitje abonimi", + badgeWindowCharge: "jashtë orarit — detyrim", badgeNoTicket: "bileta nuk u printua", feedSourceBooth: "kabinë", feedSourceReader: "lexues", diff --git a/packages/shared/src/index.ts b/packages/shared/src/index.ts index 8e122e8..84529da 100644 --- a/packages/shared/src/index.ts +++ b/packages/shared/src/index.ts @@ -287,6 +287,15 @@ export interface LedgerPayload { /** cash_in / cash_out voucher: a human-facing voucher number printed on the slip * (Mandat Nr.). Sequential per type; signed for reproducibility. */ readonly voucherNo?: string; + /** subscription tariff-bridge: an early-entry / late-exit transient charge OWED for + * parking outside the plan's allowed window, stamped on the vehicle_entry and collected + * (gated) at exit. The priced gap + tariff version travel alongside for reproducibility. + * See wiki/entities/subscription.md ("tariff bridge"). */ + readonly windowOwedMinor?: number; + readonly windowCurrency?: string; + readonly windowTariffVersionId?: string; + readonly windowGapStart?: string; + readonly windowGapEnd?: string; /** Free-form for forward-compat without a schema change. */ readonly [k: string]: unknown; }