style: format the repo with prettier (green format:check)
`npm run format:check` (a CI gate) had drifted red across 44 files — pre-existing files plus recently-added ones committed without formatting. Ran `prettier --write .`; no logic changes. Also regenerates documentation.json (compodoc reflects the reformatted component sources). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -23,7 +23,7 @@ was neither isolated nor validated:
|
||||
- User-facing UI copy is already **`$localize`** (`src/locale/*.xlf`) — git-tracked, and a
|
||||
second locale is a translation file, not a code change. That is already the compile-time
|
||||
model for text.
|
||||
- The profession↔diploma map lived as a *private* `Dictionary` inside `DiplomaRules`, mixed
|
||||
- The profession↔diploma map lived as a _private_ `Dictionary` inside `DiplomaRules`, mixed
|
||||
in with the rules that consume it, with **no cross-reference check**: a diploma whose
|
||||
program wasn't in the map silently rendered `"Onbekend"`.
|
||||
|
||||
@@ -38,11 +38,11 @@ production database, never runtime-editable.
|
||||
concern. A table lives **either** as plain typed C# data (records / dictionaries) **or** as
|
||||
a typed JSON data-file deserialized into a record (`professions.json` → `ProfessionMapping`,
|
||||
loaded via `StamdataFile`). Both are checked-in config-as-code, gated the same way; the
|
||||
data-file trades the compiler's *value* check (gate #1 sees only the shape, not a wrong
|
||||
data-file trades the compiler's _value_ check (gate #1 sees only the shape, not a wrong
|
||||
`beroep`) for hand-editing ergonomics and the low-code editor below — the value gate becomes
|
||||
`StamdataValidationTests`. Separate the **data** (what the business tunes) from the **rules**
|
||||
(dev-owned logic that consumes it): the profession *table* is `Stamdata.Professions`; the
|
||||
*rule* "an English diploma needs a B2 question" stays in `DiplomaRules`. Tables may carry
|
||||
(dev-owned logic that consumes it): the profession _table_ is `Stamdata.Professions`; the
|
||||
_rule_ "an English diploma needs a B2 question" stays in `DiplomaRules`. Tables may carry
|
||||
**valid-time** (`geldigVan`/`geldigTot`, half-open `[van, tot)`); `StamdataCatalog` +
|
||||
`StamdataTable.Of<T>` describe every table generically (columns reflected from the record)
|
||||
so one endpoint pair and one grid editor serve all of them.
|
||||
@@ -59,17 +59,17 @@ production database, never runtime-editable.
|
||||
|
||||
### Where each kind of business-controllable thing lives
|
||||
|
||||
| Kind | Home | Gate |
|
||||
| --- | --- | --- |
|
||||
| Kind | Home | Gate |
|
||||
| ------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
|
||||
| Reference tables + tunable numbers (professions↔diplomas, thresholds, policy questions, document categories) | `Stamdata/` typed C# **or** typed JSON data-file (`professions.json`), optionally valid-timed | compiler (shape; + values when C#) + `StamdataValidationTests` (values, references, validity windows) |
|
||||
| User-facing UI copy | `$localize` → `src/locale/*.xlf` | build (`i18nMissingTranslation: error`) |
|
||||
| Letter / brief passage content | config-as-code in the backend (seed content), **not** the DB | compiler + endpoint tests |
|
||||
| User-facing UI copy | `$localize` → `src/locale/*.xlf` | build (`i18nMissingTranslation: error`) |
|
||||
| Letter / brief passage content | config-as-code in the backend (seed content), **not** the DB | compiler + endpoint tests |
|
||||
|
||||
### The deliberate exception: org-templates
|
||||
|
||||
Per-organization letterhead (return address, footer, signature, margins) **is**
|
||||
runtime-editable in SQLite, via the org-template admin editor (WP-23/26). That is
|
||||
intentional and does not contradict this ADR: it is *operational configuration* owned by an
|
||||
intentional and does not contradict this ADR: it is _operational configuration_ owned by an
|
||||
admin persona, versioned with publish/rollback inside the app, and specific to one
|
||||
sub-organization's identity — not the shared business rules a wrong value would break for
|
||||
everyone. Stamdata (the rules and reference tables the whole register runs on) stays code.
|
||||
|
||||
Reference in New Issue
Block a user