조직 현황 탭 복귀 동작 보강

This commit is contained in:
hyunho
2026-03-25 12:54:31 +09:00
parent 613c323b86
commit fc5c2a627d
2 changed files with 8 additions and 1 deletions

View File

@@ -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() {