From 617b6f5c6fcda020b361aa3d49720205d0e036aa Mon Sep 17 00:00:00 2001 From: Hyungi Ahn Date: Wed, 1 Apr 2026 06:51:26 +0900 Subject: [PATCH] =?UTF-8?q?fix(monthly-confirm):=20=EB=AC=B4=ED=95=9C=20?= =?UTF-8?q?=EB=A1=9C=EB=94=A9=20=EC=88=98=EC=A0=95=20=E2=80=94=20window.cu?= =?UTF-8?q?rrentUser=20=E2=86=92=20getCurrentUser()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit tkfb-core.js의 currentUser는 let 모듈 스코프라 window에 안 붙음. getCurrentUser() 함수 사용으로 전환. Co-Authored-By: Claude Opus 4.6 (1M context) --- system1-factory/web/js/my-monthly-confirm.js | 7 +++++-- .../web/pages/attendance/my-monthly-confirm.html | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/system1-factory/web/js/my-monthly-confirm.js b/system1-factory/web/js/my-monthly-confirm.js index a71e15a..b1d683b 100644 --- a/system1-factory/web/js/my-monthly-confirm.js +++ b/system1-factory/web/js/my-monthly-confirm.js @@ -24,7 +24,9 @@ document.addEventListener('DOMContentLoaded', function() { if (params.get('month')) currentMonth = parseInt(params.get('month')); setTimeout(function() { - if (!window.currentUser) return; + var user = typeof getCurrentUser === 'function' ? getCurrentUser() : window.currentUser; + if (!user) return; + window._mmcUser = user; updateMonthLabel(); loadData(); }, 500); @@ -49,7 +51,8 @@ async function loadData() { tableWrap.innerHTML = '
'; try { - var userId = window.currentUser.user_id || window.currentUser.id; + var user = window._mmcUser || (typeof getCurrentUser === 'function' ? getCurrentUser() : null) || {}; + var userId = user.user_id || user.id; var [recordsRes, balanceRes] = await Promise.all([ window.apiCall('/monthly-comparison/my-records?year=' + currentYear + '&month=' + currentMonth), window.apiCall('/attendance/vacation-balance/' + userId).catch(function() { return { success: true, data: [] }; }) diff --git a/system1-factory/web/pages/attendance/my-monthly-confirm.html b/system1-factory/web/pages/attendance/my-monthly-confirm.html index a2914f9..7b2914a 100644 --- a/system1-factory/web/pages/attendance/my-monthly-confirm.html +++ b/system1-factory/web/pages/attendance/my-monthly-confirm.html @@ -103,7 +103,7 @@ - +