mirror of
https://github.com/fsolla/teqo.git
synced 2026-11-13 15:13:07 +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. |
||
|---|---|---|
| .. | ||
| fixtures | ||
| admin.e2e.spec.ts | ||
| campaign-pwa.e2e.spec.ts | ||
| campaignActivity.e2e.spec.ts | ||
| campaignAuth.e2e.spec.ts | ||
| campaignConcepts.e2e.spec.ts | ||
| campaignLeaderships.e2e.spec.ts | ||
| campaignMunicipalities.e2e.spec.ts | ||
| campaignNearestMunicipality.e2e.spec.ts | ||
| campaignTerritories.e2e.spec.ts | ||
| campaignZoneMap.e2e.spec.ts | ||
| frontend.e2e.spec.ts | ||
| setup.e2e.spec.ts | ||