Fix: Profile copy rename not reflected in left column until modal reopen
This commit is contained in:
parent
08d811b329
commit
f7f1194d63
@ -7,6 +7,14 @@ Version numbers follow [Semantic Versioning](https://semver.org/spec/v2.0.0.html
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## [1.6.23] — 2026-04-21
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- **Profile copy rename not reflected in left column until modal reopen** — saving a renamed profile via the full editor (`_pmgmtSaveFullEdit`) called `loadProfiles()` to refresh `S._profiles` but never called `_renderProfileMgmt()`, so the left-column list was not repainted. The new name only appeared after closing and reopening the modal. Fixed by calling `_renderProfileMgmt()` immediately after `loadProfiles()` and re-applying the `.active` highlight to the correct row.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## [1.6.22] — 2026-04-21
|
## [1.6.22] — 2026-04-21
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
@ -645,6 +645,7 @@ async function _pmgmtSaveFullEdit() {
|
|||||||
const d = await r.json();
|
const d = await r.json();
|
||||||
if (d.error) { alert(d.error); return; }
|
if (d.error) { alert(d.error); return; }
|
||||||
await loadProfiles();
|
await loadProfiles();
|
||||||
|
_renderProfileMgmt();
|
||||||
window._pmgmtNewDraft = null;
|
window._pmgmtNewDraft = null;
|
||||||
log(t('m365_profile_saved','Profile saved') + ': ' + name);
|
log(t('m365_profile_saved','Profile saved') + ': ' + name);
|
||||||
// Show inline saved feedback without closing the modal
|
// 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
|
// 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; });
|
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); }
|
} catch(e) { alert('Save failed: ' + e.message); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user