[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;">
|
||||
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)) {
|
||||
const sel = prev && prev[key] ? prev[key].value : '';
|
||||
@@ -634,7 +634,7 @@
|
||||
try {
|
||||
const result = await api.getAsset(id);
|
||||
if (!result.success || !result.data) {
|
||||
showNotification('Asset non trovato.', 'error');
|
||||
showNotification('Bene non trovato.', 'error');
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -719,17 +719,17 @@
|
||||
`
|
||||
});
|
||||
} catch (e) {
|
||||
showNotification('Errore nel caricamento dell\'asset.', 'error');
|
||||
showNotification('Errore nel caricamento del bene.', 'error');
|
||||
}
|
||||
}
|
||||
|
||||
// ── Create Asset Modal ──────────────────────────────────
|
||||
function showCreateAssetModal() {
|
||||
showAssetModal('Nuovo Asset', {}, async function(data) {
|
||||
showAssetModal('Nuovo bene', {}, async function(data) {
|
||||
try {
|
||||
const result = await api.createAsset(data);
|
||||
if (result.success) {
|
||||
showNotification('Asset registrato con successo!', 'success');
|
||||
showNotification('Bene registrato con successo!', 'success');
|
||||
closeModal();
|
||||
loadAssets();
|
||||
} else {
|
||||
@@ -746,15 +746,15 @@
|
||||
try {
|
||||
const result = await api.getAsset(id);
|
||||
if (!result.success || !result.data) {
|
||||
showNotification('Asset non trovato.', 'error');
|
||||
showNotification('Bene non trovato.', 'error');
|
||||
return;
|
||||
}
|
||||
|
||||
showAssetModal('Modifica Asset', result.data, async function(data) {
|
||||
showAssetModal('Modifica bene', result.data, async function(data) {
|
||||
try {
|
||||
const res = await api.updateAsset(id, data);
|
||||
if (res.success) {
|
||||
showNotification('Asset aggiornato con successo!', 'success');
|
||||
showNotification('Bene aggiornato con successo!', 'success');
|
||||
closeModal();
|
||||
loadAssets();
|
||||
} else {
|
||||
@@ -910,7 +910,7 @@ function openImportModal(){
|
||||
Core ERP,software,critical,financial,false,8,true
|
||||
Web Portal,service,high,personal,true,3,true"></textarea></div>
|
||||
<div id="imp-preview" style="font-size:.8rem;color:var(--gray-600);"></div>`;
|
||||
showModal('Importa Asset', body, {
|
||||
showModal('Importa beni', body, {
|
||||
size:'lg',
|
||||
footer:`<button class="btn btn-secondary" onclick="closeModal()">Annulla</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;">
|
||||
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)) {
|
||||
const sel = prev && prev[key] ? prev[key].value : '';
|
||||
@@ -634,7 +634,7 @@
|
||||
try {
|
||||
const result = await api.getAsset(id);
|
||||
if (!result.success || !result.data) {
|
||||
showNotification('Asset non trovato.', 'error');
|
||||
showNotification('Bene non trovato.', 'error');
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -719,17 +719,17 @@
|
||||
`
|
||||
});
|
||||
} catch (e) {
|
||||
showNotification('Errore nel caricamento dell\'asset.', 'error');
|
||||
showNotification('Errore nel caricamento del bene.', 'error');
|
||||
}
|
||||
}
|
||||
|
||||
// ── Create Asset Modal ──────────────────────────────────
|
||||
function showCreateAssetModal() {
|
||||
showAssetModal('Nuovo Asset', {}, async function(data) {
|
||||
showAssetModal('Nuovo bene', {}, async function(data) {
|
||||
try {
|
||||
const result = await api.createAsset(data);
|
||||
if (result.success) {
|
||||
showNotification('Asset registrato con successo!', 'success');
|
||||
showNotification('Bene registrato con successo!', 'success');
|
||||
closeModal();
|
||||
loadAssets();
|
||||
} else {
|
||||
@@ -746,15 +746,15 @@
|
||||
try {
|
||||
const result = await api.getAsset(id);
|
||||
if (!result.success || !result.data) {
|
||||
showNotification('Asset non trovato.', 'error');
|
||||
showNotification('Bene non trovato.', 'error');
|
||||
return;
|
||||
}
|
||||
|
||||
showAssetModal('Modifica Asset', result.data, async function(data) {
|
||||
showAssetModal('Modifica bene', result.data, async function(data) {
|
||||
try {
|
||||
const res = await api.updateAsset(id, data);
|
||||
if (res.success) {
|
||||
showNotification('Asset aggiornato con successo!', 'success');
|
||||
showNotification('Bene aggiornato con successo!', 'success');
|
||||
closeModal();
|
||||
loadAssets();
|
||||
} else {
|
||||
@@ -910,7 +910,7 @@ function openImportModal(){
|
||||
Core ERP,software,critical,financial,false,8,true
|
||||
Web Portal,service,high,personal,true,3,true"></textarea></div>
|
||||
<div id="imp-preview" style="font-size:.8rem;color:var(--gray-600);"></div>`;
|
||||
showModal('Importa Asset', body, {
|
||||
showModal('Importa beni', body, {
|
||||
size:'lg',
|
||||
footer:`<button class="btn btn-secondary" onclick="closeModal()">Annulla</button>
|
||||
<button class="btn btn-primary" onclick="doImport()">Importa</button>`
|
||||
|
||||
Reference in New Issue
Block a user