mirror of
https://github.com/Hestia-Homes/assessment-model.git
synced 2026-07-27 22:45:03 +00:00
The switch was the wrong control. project_workstream_contractor stores both
flags per (workstream, organisation) pair, so one switch stood for n booleans:
it could report a per-workstream split but never author one, and clicking it
destroyed the split to stay decidable. The schema's central capability was
unreachable from the only screen that configures it.
Add/edit dialog is now a grid: one row per workstream the *project* covers —
not only the ones this contractor holds — with a tick to assign and a tick per
permission. Unassigned rows stay visible and greyed, so the shape of the
project and its uncovered workstreams are part of the decision. Un-ticking a
workstream clears its permissions, so re-ticking never silently restores a
grant. Column headers carry an all/none shortcut.
The main table no longer shows permissions at all: contractor, workstreams,
Actions. Clicking a row (or its disclosure button, which carries
aria-expanded/aria-controls for keyboards and screen readers) opens a sub-row
listing each assignment with its own two permissions, read-only. Several may
be open at once. Actions stay per contractor — Edit and Remove act on the
whole set.
Wire shape follows: POST/PATCH take assignments[{projectWorkstreamId,
updateStagesPermission, uploadDocumentsPermission}]. A workstream named twice
is a 400 — two answers to one question. ContractorGroup drops its
per-contractor summary and permissionState is gone; nothing needs the flags
reduced to one answer, and reducing them is how a contractor allowed on one
workstream comes to look allowed everywhere. Updates are grouped by flag pair,
so twenty workstreams still cost at most four UPDATEs.
ADR-0022 records this; ADR-0021's decision 1 is marked superseded, its other
two (removal never cascades; Continue leads to the import) stand.
|
||
|---|---|---|
| .. | ||
| 0001-data-backfills-outside-drizzle.md | ||
| 0002-effective-performance-is-canonical-current.md | ||
| 0003-app-authored-scenarios.md | ||
| 0007-postcode-search-creates-properties.md | ||
| 0008-modelling-runs-filters-to-distributor.md | ||
| 0009-portfolio-organisation-is-per-user.md | ||
| 0010-compliance-window-is-a-report-view-parameter.md | ||
| 0011-app-owned-task-marker-in-task-source.md | ||
| 0012-portfolio-list-resolves-descriptors-via-override-precedence.md | ||
| 0013-tags-are-app-owned-property-groupings.md | ||
| 0014-epc-cards-count-certificates-not-predictions.md | ||
| 0015-scenario-overlay-is-one-read-model.md | ||
| 0016-sap-epc-threshold-ladder-single-owner.md | ||
| 0017-likely-downgrade-is-band-movement-only.md | ||
| 0018-ara-projects-supersedes-hubspot-live-projects.md | ||
| 0019-uk-date-format-in-form-inputs.md | ||
| 0019-work-order-import-is-setup-gated-and-carries-contractor-per-row.md | ||
| 0020-import-session-and-mapping-are-client-held.md | ||
| 0021-contractor-permissions-are-per-assignment-shown-per-contractor.md | ||
| 0022-contractor-permissions-are-edited-and-shown-per-workstream.md | ||