feat(frontend): Call Center > Filas/Pausas/Disposições, Telefonia > Troncos, Discador > Lista de Bloqueio
Cinco telas novas no app do tenant, todas contra endpoints de backend que já existiam (Queues/PauseReasons/Dispositions/Trunks/Suppression) — mesmo padrão de listagem+form inline+remoção com confirmação de 2 cliques usado em Ramais. StatusBadge ganhou o mapa de TrunkStatus. Corrigido bug real: PauseReasonsController.list() não filtrava enabled:true, então um motivo removido nunca sumia da lista. Testado ponta a ponta contra a API real do tenant Acme. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BFaBaBSQGhyXGEgtTYZGV8
This commit is contained in:
74
apps/frontend/src/lib/callcenter-types.ts
Normal file
74
apps/frontend/src/lib/callcenter-types.ts
Normal file
@@ -0,0 +1,74 @@
|
||||
export interface Queue {
|
||||
id: string;
|
||||
name: string;
|
||||
description: string | null;
|
||||
strategy: string;
|
||||
maxWaitTime: number;
|
||||
maxWaitTimeWithNoAgent: number;
|
||||
discardAbandonedAfter: number;
|
||||
recordingEnabled: boolean;
|
||||
enabled: boolean;
|
||||
createdAt: string;
|
||||
}
|
||||
|
||||
export const QUEUE_STRATEGIES = [
|
||||
"LONGEST_IDLE_AGENT",
|
||||
"ROUND_ROBIN",
|
||||
"TOP_DOWN",
|
||||
"AGENT_WITH_LEAST_TALK_TIME",
|
||||
"AGENT_WITH_FEWEST_CALLS",
|
||||
"SEQUENTIALLY_BY_AGENT_ORDER",
|
||||
"RING_ALL",
|
||||
"RING_PROGRESSIVELY",
|
||||
] as const;
|
||||
|
||||
export const QUEUE_STRATEGY_LABELS: Record<string, string> = {
|
||||
LONGEST_IDLE_AGENT: "Agente ocioso há mais tempo",
|
||||
ROUND_ROBIN: "Round robin",
|
||||
TOP_DOWN: "Ordem fixa (top-down)",
|
||||
AGENT_WITH_LEAST_TALK_TIME: "Menor tempo em chamada",
|
||||
AGENT_WITH_FEWEST_CALLS: "Menos chamadas atendidas",
|
||||
SEQUENTIALLY_BY_AGENT_ORDER: "Sequencial por ordem do agente",
|
||||
RING_ALL: "Toca todos ao mesmo tempo",
|
||||
RING_PROGRESSIVELY: "Toca progressivamente",
|
||||
};
|
||||
|
||||
export interface Trunk {
|
||||
id: string;
|
||||
name: string;
|
||||
description: string | null;
|
||||
host: string;
|
||||
register: boolean;
|
||||
username: string | null;
|
||||
transport: string;
|
||||
dtmfMode: string;
|
||||
status: string;
|
||||
enabled: boolean;
|
||||
createdAt: string;
|
||||
}
|
||||
|
||||
export interface PauseReason {
|
||||
id: string;
|
||||
name: string;
|
||||
code: string;
|
||||
description: string | null;
|
||||
maxDuration: number | null;
|
||||
paid: boolean;
|
||||
enabled: boolean;
|
||||
createdAt: string;
|
||||
}
|
||||
|
||||
export interface Disposition {
|
||||
id: string;
|
||||
name: string;
|
||||
code: string;
|
||||
enabled: boolean;
|
||||
createdAt: string;
|
||||
}
|
||||
|
||||
export interface SuppressionEntry {
|
||||
id: string;
|
||||
phoneNormalized: string;
|
||||
reason: string | null;
|
||||
createdAt: string;
|
||||
}
|
||||
Reference in New Issue
Block a user