조직 현황 탭 복귀 동작 보강
This commit is contained in:
@@ -9,6 +9,7 @@ const userBadge = document.getElementById("user-badge");
|
||||
const currentViewTitle = document.getElementById("current-view-title");
|
||||
const navButtons = Array.from(document.querySelectorAll(".header-center [data-view]"));
|
||||
const stages = Array.from(document.querySelectorAll(".main-stage[data-stage]"));
|
||||
const organizationFrame = document.getElementById("organization-frame");
|
||||
|
||||
const viewLabels = {
|
||||
ledger: "사업관리대장",
|
||||
@@ -36,6 +37,7 @@ function clearSession() {
|
||||
}
|
||||
|
||||
function setActiveView(view) {
|
||||
const previousView = currentView;
|
||||
currentView = view in viewLabels ? view : "organization";
|
||||
if (currentViewTitle) {
|
||||
currentViewTitle.textContent = viewLabels[currentView];
|
||||
@@ -48,6 +50,11 @@ function setActiveView(view) {
|
||||
stages.forEach((stage) => {
|
||||
stage.hidden = stage.dataset.stage !== currentView;
|
||||
});
|
||||
|
||||
if (currentView === "organization" && previousView !== "organization" && organizationFrame) {
|
||||
const frameSrc = organizationFrame.dataset.src || organizationFrame.src;
|
||||
organizationFrame.src = frameSrc;
|
||||
}
|
||||
}
|
||||
|
||||
function renderAuth() {
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
</section>
|
||||
<section class="main-stage" data-stage="organization">
|
||||
<div class="stage-frame">
|
||||
<iframe src="/legacy/organization?v=20260325-2" title="조직도 메인 화면"></iframe>
|
||||
<iframe id="organization-frame" src="/legacy/organization?v=20260325-2" data-src="/legacy/organization?v=20260325-2" title="조직도 메인 화면"></iframe>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
Reference in New Issue
Block a user