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');
|
const urlMode = params.get('mode');
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
const user = window.currentUser;
|
const user = typeof getCurrentUser === 'function' ? getCurrentUser() : window.currentUser;
|
||||||
if (!user) return;
|
if (!user) return;
|
||||||
|
|
||||||
// 비관리자 → 작업자 전용 확인 페이지로 리다이렉트
|
// 비관리자 → 작업자 전용 확인 페이지로 리다이렉트
|
||||||
|
|||||||
@@ -157,9 +157,9 @@
|
|||||||
<!-- Toast -->
|
<!-- Toast -->
|
||||||
<div id="toastContainer" class="toast-container"></div>
|
<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/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>
|
<script>initAuth();</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</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>
|
<script src="/js/production-dashboard.js?v=2026033105"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -242,6 +242,7 @@ function toggleMobileMenu() {
|
|||||||
|
|
||||||
/* ===== State ===== */
|
/* ===== State ===== */
|
||||||
let currentUser = null;
|
let currentUser = null;
|
||||||
|
function getCurrentUser() { return currentUser; }
|
||||||
|
|
||||||
/* ===== Init ===== */
|
/* ===== Init ===== */
|
||||||
async function initAuth() {
|
async function initAuth() {
|
||||||
|
|||||||
Reference in New Issue
Block a user