style: nella pagina di riepilogo del ticket unificata copia di tn ed oggetto con click sull'oggetto. feat: aggiunto pulsante assegna ed aggiungi in scheda.

This commit is contained in:
Gabriele Cimaschi committed 2026-09-14 10:50:07 +02:00
1 parent a15ab7e89d
commit 44c89aa92f
2 files changed
+35 -2

No files matched your search

+15
View File
@@ -126,6 +126,21 @@ const App = {
}
},
async assignAndOpenTab(id, tn, title) {
const activeAgentId = parseInt(localStorage.getItem('activeAgentId') || '1', 10);
try {
await this.api(`/api/tickets/${id}`, {
method: 'PATCH',
body: JSON.stringify({ user_id: activeAgentId }),
});
Toast.success('Ticket assegnato all\'agente attivo e aperto in scheda!');
} catch (err) {
console.error('Error assigning ticket:', err);
Toast.error('Errore durante l\'assegnazione del ticket: ' + err.message);
}
this.openTab(id, tn, title);
},
addTabWithoutRedirect(id, tn, title) {
const exists = this.tabs.find(t => String(t.id) === String(id));
if (!exists) {