diff --git a/index.html b/index.html index b59003e..47892e2 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ Noxus HUB - + @@ -2271,6 +2271,6 @@ - + diff --git a/script.js b/script.js index 20b952c..6989048 100644 --- a/script.js +++ b/script.js @@ -1652,7 +1652,7 @@ async function showTicketDetail(id, companyId = '') { - +
@@ -1769,11 +1769,10 @@ async function showTicketDetail(id, companyId = '') { } catch (e) { alert(e.message); } }); - // Delete handler - document.getElementById('btn-ticket-delete').addEventListener('click', async () => { - if (!confirm('Poistetaanko tiketti "' + ticket.subject + '"?')) return; + // Close handler — merkkaa tiketti suljetuksi + document.getElementById('btn-ticket-close').addEventListener('click', async () => { try { - await apiCall('ticket_delete' + ticketCompanyParam(), 'POST', { id: currentTicketId }); + await apiCall('ticket_status' + ticketCompanyParam(), 'POST', { id: currentTicketId, status: 'suljettu' }); showTicketListView(); loadTickets(); } catch (e) { alert(e.message); }