Fix: Profile copy rename not reflected in left column until modal reopen

This commit is contained in:
StyxX65 committed 2026-04-21 20:33:16 +02:00
1 parent 08d811b329
commit f7f1194d63
2 files changed
+13 -1

No files matched your search

+5 -1
View File
@@ -645,6 +645,7 @@ async function _pmgmtSaveFullEdit() {
const d = await r.json();
if (d.error) { alert(d.error); return; }
await loadProfiles();
_renderProfileMgmt();
window._pmgmtNewDraft = null;
log(t('m365_profile_saved','Profile saved') + ': ' + name);
// Show inline saved feedback without closing the modal
@@ -658,7 +659,10 @@ async function _pmgmtSaveFullEdit() {
}
// Re-open the editor for the saved profile so it reflects the saved state
const saved = S._profiles.find(function(p) { return p.name === name; });
if (saved) { window._pmgmtEditId = saved.id; }
if (saved) {
window._pmgmtEditId = saved.id;
document.querySelectorAll('.pmgmt-row').forEach(r => r.classList.toggle('active', r.dataset.id === saved.id));
}
} catch(e) { alert('Save failed: ' + e.message); }
}