mirror of
https://github.com/fsolla/teqo.git
synced 2026-11-16 03:03:06 +00:00
`municipality.engagementLevel` (staff-only, no default) records what the campaign decided to invest in a município, next to the E8/E10 metrics that describe what it knows. Moving it is a reallocation decision, so only unrestricted staff may, every move carries a rationale plus the signals that would reverse it, and the write files an `allocationDecision` in the same transaction under an advisory lock taken before the current level is read — otherwise the snapshot's `from` is a guess. The enum gains `movimento`: a level move is neither `aceita` nor `descarta`. No backfill. Null is "Sem nível", and filtering by it is the triage queue. That is also why the list sorts `nivel` in memory rather than in the query: Postgres puts NULLs first on DESC, so a native sort would open "N4 primeiro" on a page of municípios nobody has decided about yet. The filter stays native. The hysteresis rules from research §6.8 are pure and client-safe, so the Popover explains a block before submitting and the server re-runs them anyway; a blocked move answers 409 with typed violations and the override is recorded with exactly the rules it contradicted. |
||
|---|---|---|
| .. | ||
| projects | ||
| access-control-advanced.md | ||
| access-control.md | ||
| adapters.md | ||
| campanha-action-feedback.mdc | ||
| campanha-edit-where-you-see.mdc | ||
| codebase-map.mdc | ||
| collections.md | ||
| components.md | ||
| endpoints.md | ||
| engineering-standards.mdc | ||
| field-type-guards.md | ||
| fields.md | ||
| hooks.md | ||
| payload-overview.md | ||
| plugin-development.md | ||
| queries.md | ||
| security-critical.mdc | ||