Show shared-number badge in the treatment table and lead detail
This commit is contained in:
@@ -620,6 +620,8 @@ tbody tr:hover .acao-col { background: color-mix(in srgb, var(--accent) 6%, var(
|
||||
.badge.prioridade-2 { background: color-mix(in srgb, var(--warning) 20%, transparent); color: var(--ink); }
|
||||
.badge.prioridade-3 { background: var(--grid); color: var(--ink-2); }
|
||||
.badge.prioridade-4 { background: var(--grid); color: var(--muted); }
|
||||
.badge.numero-compartilhado { background: color-mix(in srgb, var(--critical) 14%, transparent); color: var(--critical); }
|
||||
.badge.numero-compartilhado-liberado { background: var(--grid); color: var(--ink-2); }
|
||||
.produto-cell { font-size: 12.5px; }
|
||||
.estrelas { color: var(--warning); letter-spacing: 1px; white-space: nowrap; }
|
||||
.empresa-cell { max-width: 280px; overflow: hidden; text-overflow: ellipsis; }
|
||||
|
||||
@@ -438,9 +438,19 @@ const Tratamento = (() => {
|
||||
if (checkedAt) detalhes.push(`Consultado em ${checkedAt}`);
|
||||
return h('div', { class: 'whatsapp-verification' },
|
||||
h('span', { class: `badge whatsapp-${status}` }, WHATSAPP_STATUS_LABELS[status] || status),
|
||||
numeroCompartilhadoBadge(lead),
|
||||
detalhes.length ? h('div', { class: 'sub' }, detalhes.join(' · ')) : null);
|
||||
}
|
||||
|
||||
function numeroCompartilhadoBadge(lead) {
|
||||
if (!lead.numero_compartilhado) return null;
|
||||
const classe = lead.numero_compartilhado_liberado ? 'numero-compartilhado-liberado' : 'numero-compartilhado';
|
||||
const texto = lead.numero_compartilhado_liberado
|
||||
? `Compartilhado (liberado, ${lead.numero_compartilhado_total} leads)`
|
||||
: `Número compartilhado (${lead.numero_compartilhado_total} leads)`;
|
||||
return h('span', { class: `badge ${classe}` }, texto);
|
||||
}
|
||||
|
||||
function produtoCell(produto, afinidade) {
|
||||
if (!produto) return '—';
|
||||
const label = AFINIDADE_TABELA_LABELS[afinidade];
|
||||
@@ -526,6 +536,9 @@ const Tratamento = (() => {
|
||||
linha('Status WhatsApp', WHATSAPP_STATUS_LABELS[lead.whatsapp_status] || lead.whatsapp_status || 'Não consultado'),
|
||||
linha('Número WhatsApp confirmado', lead.whatsapp_numero_resolvido),
|
||||
linha('WhatsApp consultado em', whatsappCheckedAt(lead.whatsapp_checked_at)),
|
||||
linha('Número compartilhado com outro lead', lead.numero_compartilhado
|
||||
? `${lead.numero_compartilhado_total} leads${lead.numero_compartilhado_liberado ? ' (liberado)' : ''}`
|
||||
: 'Não'),
|
||||
linha('Cidade/UF', `${lead.cidade}/${lead.uf}`),
|
||||
linha('Endereço', lead.endereco),
|
||||
linha('Nicho', lead.segmento_label || lead.segmento),
|
||||
|
||||
Reference in New Issue
Block a user