teqo/src/components/campaign/PlazaListOverview.tsx
Francisco Ignácio Fontoura Solla b333609726 Deliver A9 plaza expectedVotes and register A9+ follow-up.
Add staff-only expectedVotes with migration, edit flow, and expectedVotes ?? pledge fallback across map, overview, and dashboard; document delivery and the A9+ loader dedup fill-in on the roadmap.
2026-07-21 11:02:11 -03:00

40 lines
1.4 KiB
TypeScript

import { CampaignMetricStrip } from '@/components/campaign/CampaignMetricStrip'
import { campaignPrioritySurfaceClassName } from '@/components/campaign/CampaignPageShell'
import type { PlazaListOverviewData } from '@/utilities/plazaPageData'
const voteFormatter = new Intl.NumberFormat('pt-BR')
export const PlazaListOverview = ({ view }: { view: PlazaListOverviewData }) => (
<section
aria-label="Visão geral das Praças filtradas"
className={`rounded-xl ${campaignPrioritySurfaceClassName}`}
>
<CampaignMetricStrip
metrics={[
{
label: 'Votos estimados no conjunto',
value: view.staffVoteTotal > 0 ? voteFormatter.format(view.staffVoteTotal) : '—',
emphasize: true,
},
{
label: 'Declarações de votos',
value: view.pledgeCount
? `${voteFormatter.format(view.pledgeCount)}${
view.missingEstimateCount
? ` · ${voteFormatter.format(view.missingEstimateCount)} sem estimativa`
: ''
}`
: 'Nenhuma',
},
{
label: 'Cobertura de assessoria',
value: `${view.withAdvisorCount} de ${view.plazaCount} Praças`,
progress:
view.plazaCount > 0
? Math.round((view.withAdvisorCount / view.plazaCount) * 100)
: undefined,
},
]}
/>
</section>
)