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:
@@ -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;
|
||||
|
||||
// 비관리자 → 작업자 전용 확인 페이지로 리다이렉트
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -242,6 +242,7 @@ function toggleMobileMenu() {
|
||||
|
||||
/* ===== State ===== */
|
||||
let currentUser = null;
|
||||
function getCurrentUser() { return currentUser; }
|
||||
|
||||
/* ===== Init ===== */
|
||||
async function initAuth() {
|
||||
|
||||
Reference in New Issue
Block a user