Rename the operational unit "Praça"/"Núcleo" to "Município" (code identifier `municipality`) and land the 2026-07-23 course changes: - New `candidate` role with unrestricted visibility (`isCampaignStaff` now includes it) alongside coordinator/advisor; leader is locked down to the supporter contact tool only. - Demandas become staff-only; dobradinhas modeled via a `stateDeputy` entity. - Camaçari consolidated to a single município (ZE 170/171 aggregated); Salvador keeps its 19 zone municípios. - Map moves to the staff dashboard; `/campanha/municipios` is list/overview. - Vote pledges keep the declared vs estimated (scenario) asymmetry; leaders never see estimates. Destructive migration for the campaign vertical (drops nucleus/plaza-era tables, wipes campaign rows, seeds 435 municípios). Public-site data untouched. Includes the post-delivery /simplify cleanups: shared reloadStaffActor / reloadCoordinatorActor helpers, req.context cache for getFreshCampaignUser, parallelized dashboard loads, candidate dashboard-copy fix, and dead leader-dashboard / roleKind code removal.
39 lines
1.3 KiB
TypeScript
39 lines
1.3 KiB
TypeScript
import {
|
|
municipalityZoneNeighborhoodEntryForSlug,
|
|
municipalityZoneNeighborhoodSourceLabel,
|
|
} from '@/lib/municipalityZoneNeighborhoods'
|
|
|
|
export const MunicipalityZoneNeighborhoodsCard = ({ municipalitySlug }: { municipalitySlug: string }) => {
|
|
const entry = municipalityZoneNeighborhoodEntryForSlug(municipalitySlug)
|
|
if (!entry?.neighborhoods.length) return null
|
|
|
|
const { neighborhoods, source } = entry
|
|
|
|
return (
|
|
<section
|
|
aria-labelledby="municipality-zone-neighborhoods-title"
|
|
className="flex flex-col gap-4 rounded-xl border p-4"
|
|
>
|
|
<div className="flex flex-col gap-1">
|
|
<h2 id="municipality-zone-neighborhoods-title" className="text-base font-medium">
|
|
Bairros desta Praça
|
|
</h2>
|
|
<p className="text-sm text-muted-foreground">
|
|
{neighborhoods.length}{' '}
|
|
{neighborhoods.length === 1 ? 'bairro' : 'bairros'} ·{' '}
|
|
{municipalityZoneNeighborhoodSourceLabel(source)}
|
|
</p>
|
|
</div>
|
|
<ul className="grid gap-1.5 sm:grid-cols-2">
|
|
{neighborhoods.map((neighborhood) => (
|
|
<li
|
|
key={neighborhood}
|
|
className="rounded-md border px-3 py-2 text-sm text-foreground"
|
|
>
|
|
{neighborhood}
|
|
</li>
|
|
))}
|
|
</ul>
|
|
</section>
|
|
)
|
|
}
|