mirror of
https://github.com/fsolla/teqo.git
synced 2026-11-23 16:13:04 +00:00
Lista + detalhe em /campanha/comunicacao/acervo/cortes: busca por título/descrição,\norigem da fala, player do MP4, edição de título/descrição e kill switch de\npublicar/despublicar no mesmo /corte/<id>. Gate speechCatalog fail-closed para\nadvisor/leader. Sem collection/migration nova.
28 lines
736 B
TypeScript
28 lines
736 B
TypeScript
import { Badge } from '@/components/ui/Badge'
|
|
import { speechCutStatusLabels, type SpeechCutStatus } from '@/lib/speechCut'
|
|
|
|
type StatusBadgeVariant = 'default' | 'destructive' | 'outline'
|
|
|
|
const variantFor = (status: SpeechCutStatus): StatusBadgeVariant => {
|
|
switch (status) {
|
|
case 'published':
|
|
return 'default'
|
|
case 'failed':
|
|
return 'destructive'
|
|
default:
|
|
return 'outline'
|
|
}
|
|
}
|
|
|
|
/** C168 — the one status chip of the cut library (list and detail). */
|
|
export const SpeechCutStatusBadge = ({
|
|
status,
|
|
className = 'font-normal',
|
|
}: {
|
|
status: SpeechCutStatus
|
|
className?: string
|
|
}) => (
|
|
<Badge variant={variantFor(status)} className={className}>
|
|
{speechCutStatusLabels[status]}
|
|
</Badge>
|
|
)
|