diff --git a/frontend/public/app.js b/frontend/public/app.js index f4f238e..597543f 100755 --- a/frontend/public/app.js +++ b/frontend/public/app.js @@ -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() { diff --git a/frontend/public/index.html b/frontend/public/index.html index fb5115a..e8f42b6 100644 --- a/frontend/public/index.html +++ b/frontend/public/index.html @@ -75,7 +75,7 @@
- +