teqo-backup/src/components/campaign/leadership/SupportStatusBadge.tsx
Francisco Ignácio Fontoura Solla 4806c417c8 Engineering Pass 3: consolidate patterns and lock them with guards.
Fold duplicated campanha access, loaders, list/filter/form shells, and scripts into shared modules; reorganize utilities by domain; stabilize e2e; and document prevention-first audit workflow so the same smells cannot creep back in.
2026-07-29 06:11:29 -03:00

24 lines
902 B
TypeScript

import { Badge } from '@/components/ui/Badge'
import type { SupportStatus } from '@/lib/schemas/leadership'
import { supportStatusLabels } from '@/utilities/leadership/leadershipLabels'
export type { SupportStatus } from '@/lib/schemas/leadership'
// Labels live in `leadershipLabels.ts` (shared with the ficha forms and the
// list quick-edit control) — this table only adds the badge-specific variant.
const statusPresentation = {
engajado: { variant: 'support-engaged' },
a_abordar: { variant: 'support-to-approach' },
em_disputa: { variant: 'support-disputed' },
negativo: { variant: 'support-negative' },
} as const
export const SupportStatusBadge = ({ status }: { status: SupportStatus }) => {
const presentation = statusPresentation[status]
return (
<Badge variant={presentation.variant} data-support-status={status}>
{supportStatusLabels[status]}
</Badge>
)
}