ponytail: remove resolucaoSetup, compressVideo, sendEvolutionMessage, sendEvolution; add migration #24
- delete: src/resolucaoSetup.js (migration paralela, consolidado em #24) - shrink: chatController.sendEvolutionMessage (140 -> 6 linhas, delega ao evolutionService) - shrink: triageController.sendEvolution (55 -> 10 linhas, delega ao evolutionService) - delete: compressVideo em chatController (codigo morto, chamado so pelo old sendEvolutionMessage) - add: migration #24 consolida DDL que estava espalhada em runtime - fix: configController.remove garantirEstrutura calls (arquivo removido) - net: -270 linhas, -1 arquivo
This commit is contained in:
@@ -1904,7 +1904,7 @@ window.finalizarConversa = async function() {
|
||||
var res = await fetch('/api/' + alias + '/conversations/' + conversaAtiva + '/finalize', {
|
||||
method: 'POST',
|
||||
headers: { 'Authorization': 'Bearer ' + token, 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ motivoId: motivoId, resolucao: resolucao })
|
||||
body: JSON.stringify({ motivoId: motivoId, resolucao: resolucao, skipCsat: document.getElementById('chkAgendar') && document.getElementById('chkAgendar').checked })
|
||||
});
|
||||
var data = await res.json();
|
||||
if (data.success) {
|
||||
@@ -1925,7 +1925,13 @@ window.finalizarConversa = async function() {
|
||||
document.querySelector('.btn-finalizar').disabled = true;
|
||||
document.querySelector('.btn-finalizar').style.opacity = '0.6';
|
||||
carregarConversas();
|
||||
abrirConversa(conversaAtiva);
|
||||
// Fecha a conversa da tela (volta ao estado vazio)
|
||||
conversaAtiva = null;
|
||||
document.getElementById('chatHeader').style.display = 'none';
|
||||
document.getElementById('chatInput').style.display = 'none';
|
||||
document.getElementById('messagesArea').innerHTML = '<div class="empty-state"><div class="icon">💬</div><p>Selecione uma conversa</p></div>';
|
||||
document.getElementById('clienteInfoContainer').innerHTML = '';
|
||||
document.getElementById('clienteFoto').innerHTML = '?';
|
||||
} else {
|
||||
alert(data.error || 'Não foi possível finalizar a conversa.');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user