From 7020112e8a7cbbc59d10fcf25b0a9bef4141001e Mon Sep 17 00:00:00 2001 From: Gabriele Cimaschi Date: Mon, 13 Jul 2026 19:34:44 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20corretto=20issue=2020=20e=2028.=20torna?= =?UTF-8?q?=20alla=20lista=20rimanda=20alla=20lista=20e=20non=20pi=C3=B9?= =?UTF-8?q?=20alla=20pagina=20precedente=20e=20i=20link=20non=20aprono=20p?= =?UTF-8?q?i=C3=B9=20una=20nuova=20scheda?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/js/app.js | 5 +++++ public/js/views/ticketDetail.js | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/public/js/app.js b/public/js/app.js index 2046006..bc24de2 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -15,6 +15,7 @@ const App = { motivationalPhrases: [], drafts: {}, tabs: [], + lastListView: '#/tickets', loadTabs() { try { @@ -232,6 +233,10 @@ const App = { const hash = fullHash.split('?')[0]; const titleEl = document.getElementById('page-title'); + if (hash === '#/tickets' || hash === '#/tickets/my') { + this.lastListView = hash; + } + // Save draft for previous ticket before routing if (typeof TicketDetailView !== 'undefined' && TicketDetailView.ticketId) { TicketDetailView.saveDraft(); diff --git a/public/js/views/ticketDetail.js b/public/js/views/ticketDetail.js index 9e3c5f2..f1f7dbf 100644 --- a/public/js/views/ticketDetail.js +++ b/public/js/views/ticketDetail.js @@ -60,7 +60,7 @@ const TicketDetailView = { await App.ensureLookups(); const data = await App.api(`/api/tickets/${id}`); const { ticket, articles, attachments } = data; - App.addTabWithoutRedirect(ticket.id, ticket.tn, ticket.title); + // No automatic tab creation here anymore let groupsData = { asMaster: [], asMember: [] }; try { @@ -107,7 +107,7 @@ const TicketDetailView = { const emailBtnText = hasEmailDraft ? 'Continua mail' : 'Invia Email'; container.innerHTML = ` - + Torna alla lista