[FIX] A3: stringhe JS residue Asset -> bene/beni nelle pagine Inventario (titoli modale + notifiche)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
d009341d5a
commit
9fed095204
@@ -565,7 +565,7 @@
|
|||||||
|
|
||||||
let body = `<p style="font-size:0.85rem;color:var(--gray-600);margin-bottom:1rem;">
|
let body = `<p style="font-size:0.85rem;color:var(--gray-600);margin-bottom:1rem;">
|
||||||
Metodologia di scoring rilevanza NIS2 (requisito <strong>GV.OC-04</strong>). Soglia rilevanza: <strong>≥${grid.threshold} punti</strong>.
|
Metodologia di scoring rilevanza NIS2 (requisito <strong>GV.OC-04</strong>). Soglia rilevanza: <strong>≥${grid.threshold} punti</strong>.
|
||||||
Il punteggio aggiorna automaticamente anche la criticita dell'asset.</p>`;
|
Il punteggio aggiorna automaticamente anche la criticita del bene.</p>`;
|
||||||
|
|
||||||
for (const [key, def] of Object.entries(grid.grid)) {
|
for (const [key, def] of Object.entries(grid.grid)) {
|
||||||
const sel = prev && prev[key] ? prev[key].value : '';
|
const sel = prev && prev[key] ? prev[key].value : '';
|
||||||
@@ -634,7 +634,7 @@
|
|||||||
try {
|
try {
|
||||||
const result = await api.getAsset(id);
|
const result = await api.getAsset(id);
|
||||||
if (!result.success || !result.data) {
|
if (!result.success || !result.data) {
|
||||||
showNotification('Asset non trovato.', 'error');
|
showNotification('Bene non trovato.', 'error');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -719,17 +719,17 @@
|
|||||||
`
|
`
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
showNotification('Errore nel caricamento dell\'asset.', 'error');
|
showNotification('Errore nel caricamento del bene.', 'error');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ── Create Asset Modal ──────────────────────────────────
|
// ── Create Asset Modal ──────────────────────────────────
|
||||||
function showCreateAssetModal() {
|
function showCreateAssetModal() {
|
||||||
showAssetModal('Nuovo Asset', {}, async function(data) {
|
showAssetModal('Nuovo bene', {}, async function(data) {
|
||||||
try {
|
try {
|
||||||
const result = await api.createAsset(data);
|
const result = await api.createAsset(data);
|
||||||
if (result.success) {
|
if (result.success) {
|
||||||
showNotification('Asset registrato con successo!', 'success');
|
showNotification('Bene registrato con successo!', 'success');
|
||||||
closeModal();
|
closeModal();
|
||||||
loadAssets();
|
loadAssets();
|
||||||
} else {
|
} else {
|
||||||
@@ -746,15 +746,15 @@
|
|||||||
try {
|
try {
|
||||||
const result = await api.getAsset(id);
|
const result = await api.getAsset(id);
|
||||||
if (!result.success || !result.data) {
|
if (!result.success || !result.data) {
|
||||||
showNotification('Asset non trovato.', 'error');
|
showNotification('Bene non trovato.', 'error');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
showAssetModal('Modifica Asset', result.data, async function(data) {
|
showAssetModal('Modifica bene', result.data, async function(data) {
|
||||||
try {
|
try {
|
||||||
const res = await api.updateAsset(id, data);
|
const res = await api.updateAsset(id, data);
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
showNotification('Asset aggiornato con successo!', 'success');
|
showNotification('Bene aggiornato con successo!', 'success');
|
||||||
closeModal();
|
closeModal();
|
||||||
loadAssets();
|
loadAssets();
|
||||||
} else {
|
} else {
|
||||||
@@ -910,7 +910,7 @@ function openImportModal(){
|
|||||||
Core ERP,software,critical,financial,false,8,true
|
Core ERP,software,critical,financial,false,8,true
|
||||||
Web Portal,service,high,personal,true,3,true"></textarea></div>
|
Web Portal,service,high,personal,true,3,true"></textarea></div>
|
||||||
<div id="imp-preview" style="font-size:.8rem;color:var(--gray-600);"></div>`;
|
<div id="imp-preview" style="font-size:.8rem;color:var(--gray-600);"></div>`;
|
||||||
showModal('Importa Asset', body, {
|
showModal('Importa beni', body, {
|
||||||
size:'lg',
|
size:'lg',
|
||||||
footer:`<button class="btn btn-secondary" onclick="closeModal()">Annulla</button>
|
footer:`<button class="btn btn-secondary" onclick="closeModal()">Annulla</button>
|
||||||
<button class="btn btn-primary" onclick="doImport()">Importa</button>`
|
<button class="btn btn-primary" onclick="doImport()">Importa</button>`
|
||||||
|
|||||||
+9
-9
@@ -565,7 +565,7 @@
|
|||||||
|
|
||||||
let body = `<p style="font-size:0.85rem;color:var(--gray-600);margin-bottom:1rem;">
|
let body = `<p style="font-size:0.85rem;color:var(--gray-600);margin-bottom:1rem;">
|
||||||
Metodologia di scoring rilevanza NIS2 (requisito <strong>GV.OC-04</strong>). Soglia rilevanza: <strong>≥${grid.threshold} punti</strong>.
|
Metodologia di scoring rilevanza NIS2 (requisito <strong>GV.OC-04</strong>). Soglia rilevanza: <strong>≥${grid.threshold} punti</strong>.
|
||||||
Il punteggio aggiorna automaticamente anche la criticita dell'asset.</p>`;
|
Il punteggio aggiorna automaticamente anche la criticita del bene.</p>`;
|
||||||
|
|
||||||
for (const [key, def] of Object.entries(grid.grid)) {
|
for (const [key, def] of Object.entries(grid.grid)) {
|
||||||
const sel = prev && prev[key] ? prev[key].value : '';
|
const sel = prev && prev[key] ? prev[key].value : '';
|
||||||
@@ -634,7 +634,7 @@
|
|||||||
try {
|
try {
|
||||||
const result = await api.getAsset(id);
|
const result = await api.getAsset(id);
|
||||||
if (!result.success || !result.data) {
|
if (!result.success || !result.data) {
|
||||||
showNotification('Asset non trovato.', 'error');
|
showNotification('Bene non trovato.', 'error');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -719,17 +719,17 @@
|
|||||||
`
|
`
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
showNotification('Errore nel caricamento dell\'asset.', 'error');
|
showNotification('Errore nel caricamento del bene.', 'error');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ── Create Asset Modal ──────────────────────────────────
|
// ── Create Asset Modal ──────────────────────────────────
|
||||||
function showCreateAssetModal() {
|
function showCreateAssetModal() {
|
||||||
showAssetModal('Nuovo Asset', {}, async function(data) {
|
showAssetModal('Nuovo bene', {}, async function(data) {
|
||||||
try {
|
try {
|
||||||
const result = await api.createAsset(data);
|
const result = await api.createAsset(data);
|
||||||
if (result.success) {
|
if (result.success) {
|
||||||
showNotification('Asset registrato con successo!', 'success');
|
showNotification('Bene registrato con successo!', 'success');
|
||||||
closeModal();
|
closeModal();
|
||||||
loadAssets();
|
loadAssets();
|
||||||
} else {
|
} else {
|
||||||
@@ -746,15 +746,15 @@
|
|||||||
try {
|
try {
|
||||||
const result = await api.getAsset(id);
|
const result = await api.getAsset(id);
|
||||||
if (!result.success || !result.data) {
|
if (!result.success || !result.data) {
|
||||||
showNotification('Asset non trovato.', 'error');
|
showNotification('Bene non trovato.', 'error');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
showAssetModal('Modifica Asset', result.data, async function(data) {
|
showAssetModal('Modifica bene', result.data, async function(data) {
|
||||||
try {
|
try {
|
||||||
const res = await api.updateAsset(id, data);
|
const res = await api.updateAsset(id, data);
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
showNotification('Asset aggiornato con successo!', 'success');
|
showNotification('Bene aggiornato con successo!', 'success');
|
||||||
closeModal();
|
closeModal();
|
||||||
loadAssets();
|
loadAssets();
|
||||||
} else {
|
} else {
|
||||||
@@ -910,7 +910,7 @@ function openImportModal(){
|
|||||||
Core ERP,software,critical,financial,false,8,true
|
Core ERP,software,critical,financial,false,8,true
|
||||||
Web Portal,service,high,personal,true,3,true"></textarea></div>
|
Web Portal,service,high,personal,true,3,true"></textarea></div>
|
||||||
<div id="imp-preview" style="font-size:.8rem;color:var(--gray-600);"></div>`;
|
<div id="imp-preview" style="font-size:.8rem;color:var(--gray-600);"></div>`;
|
||||||
showModal('Importa Asset', body, {
|
showModal('Importa beni', body, {
|
||||||
size:'lg',
|
size:'lg',
|
||||||
footer:`<button class="btn btn-secondary" onclick="closeModal()">Annulla</button>
|
footer:`<button class="btn btn-secondary" onclick="closeModal()">Annulla</button>
|
||||||
<button class="btn btn-primary" onclick="doImport()">Importa</button>`
|
<button class="btn btn-primary" onclick="doImport()">Importa</button>`
|
||||||
|
|||||||
Reference in New Issue
Block a user