fix: corretta pulizia delle code quando si passa con il tab. feat: aggiunto shortcut per tornare alla pagina ticket.

This commit is contained in:
Gabriele Cimaschi committed 2026-09-14 11:57:02 +02:00
1 parent c33a7a4666
commit 1bc3d8bf8a
4 files changed
+29 -5

No files matched your search

+6
View File
@@ -66,6 +66,7 @@ const App = {
quick_edit_save: { ctrl: true, alt: false, shift: false, key: 'Enter', enabled: true },
pdf_save_edited: { ctrl: true, alt: false, shift: false, key: 'Enter', enabled: true },
ricerca_spudorata_open: { ctrl: true, alt: false, shift: true, key: 'f', enabled: true },
ticket_list_open: { ctrl: true, alt: false, shift: true, key: 'Backspace', enabled: true },
};
return defaults[id] || { ctrl: true, alt: false, shift: false, key: 'Enter', enabled: true };
},
@@ -295,6 +296,11 @@ const App = {
searchInput.select();
}
}
} else if (this.isShortcutTriggered(e, 'ticket_list_open')) {
if (window.location.hash !== '#/tickets' && window.location.hash !== '') {
e.preventDefault();
window.location.hash = '#/tickets';
}
}
});
+7
View File
@@ -72,6 +72,13 @@ const ShortcutsView = {
context: 'Globale',
defaultCombo: { ctrl: true, alt: false, shift: true, key: 'f', enabled: true }
},
{
id: 'ticket_list_open',
name: 'Torna a Elenco Ticket',
description: 'Naviga direttamente alla pagina principale dell\'elenco ticket',
context: 'Globale',
defaultCombo: { ctrl: true, alt: false, shift: true, key: 'Backspace', enabled: true }
},
{
id: 'create_ticket_submit',
name: 'Invia Nuovo Ticket',
+13 -3
View File
@@ -3577,7 +3577,12 @@ const TicketDetailView = {
queueSearchInput.addEventListener('input', () => {
clearTimeout(queueDebounce);
const q = queueSearchInput.value.trim();
if (queueIdInput) queueIdInput.value = '';
const origQueueName = (this.originalValues['queue_name'] || '').trim();
if (q !== origQueueName) {
if (queueIdInput) queueIdInput.value = '';
} else {
if (queueIdInput) queueIdInput.value = String(this.originalValues['queue_id'] || '');
}
checkChanges();
queueDebounce = setTimeout(async () => {
@@ -3699,8 +3704,13 @@ const TicketDetailView = {
saveBtn.addEventListener('click', async () => {
const queueSearch = queueSearchInput ? queueSearchInput.value.trim() : '';
if (queueSearchInput && !queueIdInput.value) {
Toast.warning('Seleziona una coda valida dall\'elenco.');
return;
const origName = (this.originalValues['queue_name'] || '').trim();
if (queueSearch === origName && this.originalValues['queue_id']) {
queueIdInput.value = String(this.originalValues['queue_id']);
} else {
Toast.warning('Seleziona una coda valida dall\'elenco.');
return;
}
}
const customerSearch = customerSearchInput ? customerSearchInput.value.trim() : '';