From b9e3b868bdbbbdadcb9f03333cef9680422746d5 Mon Sep 17 00:00:00 2001 From: Hyungi Ahn Date: Tue, 31 Mar 2026 12:50:48 +0900 Subject: [PATCH] =?UTF-8?q?fix(tkfb):=20getCurrentUser()=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80=20+=20monthly-comparison=20=EC=B4=88=EA=B8=B0?= =?UTF-8?q?=ED=99=94=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - tkfb-core.js: getCurrentUser() 글로벌 함수 추가 - monthly-comparison.js: window.currentUser → getCurrentUser() 전환 - 데이터 미로드 문제 해결 Co-Authored-By: Claude Opus 4.6 (1M context) --- system1-factory/web/js/monthly-comparison.js | 2 +- system1-factory/web/pages/attendance/monthly-comparison.html | 4 ++-- system1-factory/web/pages/dashboard-new.html | 2 +- system1-factory/web/static/js/tkfb-core.js | 1 + 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/system1-factory/web/js/monthly-comparison.js b/system1-factory/web/js/monthly-comparison.js index 81e0757..ff6c2e9 100644 --- a/system1-factory/web/js/monthly-comparison.js +++ b/system1-factory/web/js/monthly-comparison.js @@ -91,7 +91,7 @@ document.addEventListener('DOMContentLoaded', () => { const urlMode = params.get('mode'); setTimeout(() => { - const user = window.currentUser; + const user = typeof getCurrentUser === 'function' ? getCurrentUser() : window.currentUser; if (!user) return; // 비관리자 → 작업자 전용 확인 페이지로 리다이렉트 diff --git a/system1-factory/web/pages/attendance/monthly-comparison.html b/system1-factory/web/pages/attendance/monthly-comparison.html index 01dc20c..7e8b52f 100644 --- a/system1-factory/web/pages/attendance/monthly-comparison.html +++ b/system1-factory/web/pages/attendance/monthly-comparison.html @@ -157,9 +157,9 @@
- + - + diff --git a/system1-factory/web/pages/dashboard-new.html b/system1-factory/web/pages/dashboard-new.html index 27a79a5..5519c6c 100644 --- a/system1-factory/web/pages/dashboard-new.html +++ b/system1-factory/web/pages/dashboard-new.html @@ -45,7 +45,7 @@ - + diff --git a/system1-factory/web/static/js/tkfb-core.js b/system1-factory/web/static/js/tkfb-core.js index 9ebc4de..0ae737f 100644 --- a/system1-factory/web/static/js/tkfb-core.js +++ b/system1-factory/web/static/js/tkfb-core.js @@ -242,6 +242,7 @@ function toggleMobileMenu() { /* ===== State ===== */ let currentUser = null; +function getCurrentUser() { return currentUser; } /* ===== Init ===== */ async function initAuth() {