Excluded: .git, node_modules, secrets/, compose.env, assemblyscript tgz Source: /opt/alga-psa on psa.joliet.tech
2.2 KiB
Recurring Service-Period UI States
F252 defines the first shared UI-affordance contract for future persisted service periods so dashboard and operational views do not invent lifecycle labels independently.
State Affordance Contract
The shared presentation helper now lives in:
packages/types/src/interfaces/recurringTiming.interfaces.tsasIRecurringServicePeriodDisplayStateshared/billingClients/recurringServicePeriodDisplayState.tsasgetRecurringServicePeriodDisplayState(...)
The helper returns:
lifecycleStatelabeltonedetail- optional
reasonLabel
That gives later dashboard rows, badges, and drilldowns one stable display contract even before a concrete screen lands.
Required Distinctions
The v1 UI state contract explicitly differentiates:
generated->Generatededited->Editedskipped->Skippedlocked->Lockedbilled->Billedsuperseded->Superseded
archived is also defined for completeness, but ordinary future-ledger views are not expected to show it by default.
Tone And Detail Guidance
The first tone mapping is intentionally simple:
generatedusesneutraleditedusesaccentskippedandlockedusewarningbilledusessuccesssupersededandarchivedusemuted
The detail copy explains what the state means operationally:
- generated rows still follow current cadence rules
- edited rows are active overrides
- skipped rows are intentionally excluded from due selection
- locked rows are frozen for ordinary edits
- billed rows point at billed history and can mention invoice linkage
- superseded rows remain audit history after a newer revision replaces them
reasonLabel is additive and comes from provenance. For example:
defer->Deferred to a later invoice windowskip->Skipped by billing staffboundary_adjustment->Boundary adjusted
Deliberate Boundary
This checkpoint still does not define:
- role-based visibility or action permissions for those states
- audit-log policy for when state badges must expose actor identity
- concrete dashboard layouts or filtering UX for upcoming periods
- history-heavy archive views that surface
archivedrows by default
Those remain sequenced behind F253-F259.