fix(tkfb): getCurrentUser() 추가 + monthly-comparison 초기화 수정

- tkfb-core.js: getCurrentUser() 글로벌 함수 추가
- monthly-comparison.js: window.currentUser → getCurrentUser() 전환
- 데이터 미로드 문제 해결

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Hyungi Ahn
2026-03-31 12:50:48 +09:00
parent df688879a4
commit b9e3b868bd
4 changed files with 5 additions and 4 deletions

View File

@@ -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;
// 비관리자 → 작업자 전용 확인 페이지로 리다이렉트

View File

@@ -157,9 +157,9 @@
<!-- Toast -->
<div id="toastContainer" class="toast-container"></div>
<script src="/static/js/tkfb-core.js?v=2026033001"></script>
<script src="/static/js/tkfb-core.js?v=2026033106"></script>
<script src="/js/api-base.js?v=2026031701"></script>
<script src="/js/monthly-comparison.js?v=2026033103"></script>
<script src="/js/monthly-comparison.js?v=2026033106"></script>
<script>initAuth();</script>
</body>
</html>

View File

@@ -45,7 +45,7 @@
</div>
</div>
<script src="/static/js/tkfb-core.js?v=2026033105"></script>
<script src="/static/js/tkfb-core.js?v=2026033106"></script>
<script src="/js/production-dashboard.js?v=2026033105"></script>
</body>
</html>

View File

@@ -242,6 +242,7 @@ function toggleMobileMenu() {
/* ===== State ===== */
let currentUser = null;
function getCurrentUser() { return currentUser; }
/* ===== Init ===== */
async function initAuth() {