[FIX] supply-chain: selettore modale errato (#app-modal -> #modal-overlay)
Bug live introdotto in v1.10.0: le viste Categorie e Template usavano
querySelector('#app-modal .modal-body') ma showModal (common.js) crea l'overlay
con id='modal-overlay'. Il selettore restituiva null -> le modali non si
popolavano (lista template/categorie vuota dopo il loading). Corretto a
'#modal-overlay .modal-body' (5 occorrenze). Trovato durante il test multi-agente.
Inline JS validato. version 1.10.2.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
b7f361b87c
commit
4d9153b36f
@ -1406,13 +1406,13 @@
|
|||||||
const list = (res.success && res.data) ? res.data : [];
|
const list = (res.success && res.data) ? res.data : [];
|
||||||
renderTemplatesModal(list);
|
renderTemplatesModal(list);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
const b = document.querySelector('#app-modal .modal-body');
|
const b = document.querySelector('#modal-overlay .modal-body');
|
||||||
if (b) b.innerHTML = '<p style="color:var(--danger);">Errore di connessione.</p>';
|
if (b) b.innerHTML = '<p style="color:var(--danger);">Errore di connessione.</p>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function renderTemplatesModal(templates) {
|
function renderTemplatesModal(templates) {
|
||||||
const b = document.querySelector('#app-modal .modal-body');
|
const b = document.querySelector('#modal-overlay .modal-body');
|
||||||
if (!b) return;
|
if (!b) return;
|
||||||
if (!templates.length) {
|
if (!templates.length) {
|
||||||
b.innerHTML = '<p style="color:var(--gray-500);">Nessun template questionario per questa organizzazione.</p>';
|
b.innerHTML = '<p style="color:var(--gray-500);">Nessun template questionario per questa organizzazione.</p>';
|
||||||
@ -1432,7 +1432,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function viewTemplate(id) {
|
async function viewTemplate(id) {
|
||||||
const b = document.querySelector('#app-modal .modal-body');
|
const b = document.querySelector('#modal-overlay .modal-body');
|
||||||
if (b) b.innerHTML = '<div class="loading-overlay"><div class="spinner"></div><span>Caricamento domande...</span></div>';
|
if (b) b.innerHTML = '<div class="loading-overlay"><div class="spinner"></div><span>Caricamento domande...</span></div>';
|
||||||
try {
|
try {
|
||||||
const res = await api.getQuestionnaireTemplate(id);
|
const res = await api.getQuestionnaireTemplate(id);
|
||||||
@ -1444,7 +1444,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function renderTemplateDetail(tpl) {
|
function renderTemplateDetail(tpl) {
|
||||||
const b = document.querySelector('#app-modal .modal-body');
|
const b = document.querySelector('#modal-overlay .modal-body');
|
||||||
if (!b) return;
|
if (!b) return;
|
||||||
const qs = tpl.questions || [];
|
const qs = tpl.questions || [];
|
||||||
const qHtml = qs.length ? qs.map((q, i) => `
|
const qHtml = qs.length ? qs.map((q, i) => `
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
{"version":"1.10.1","build":"2026-05-31-v1.10.1","date":"2026-05-31","changelog":"Supply chain UI: chiavi i18n IT/EN (sp.*) per pulsanti modulo fornitori; import CSV mostra il dettaglio delle righe scartate (errors[]) e tiene aperta la modale in caso di errori. Completamento Fase 1 modulo questionari fornitori."}
|
{"version":"1.10.2","build":"2026-05-31-v1.10.2","date":"2026-05-31","changelog":"Fix selettore modale (modal-overlay) per le viste Categorie e Template fornitori, che non si popolavano. Completamento UI Fase 1 modulo questionari fornitori."}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user