fix: 로그인 리다이렉트 통합 및 캐시 버스팅 정리
- config.js loginPage를 /index.html에서 /login(SSO)으로 변경 - navigation.js, load-navbar.js에 redirect 파라미터 추가 - 8개 JS 파일의 하드코딩된 '/login' → window.getLoginUrl() 전환 - 로그아웃 시 clearSSOAuth() 호출 추가 (SSO 쿠키 삭제) - api-base.js v=2→v=3 (SW 캐시 해제 코드 통합) - TBM 모듈 버전 쿼리스트링 통일 (tbm.html, tbm-mobile.html) - dashboard.html SW 캐시 해제 인라인 코드 제거 (api-base.js에서 처리) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -73,6 +73,7 @@
|
||||
// ==================== 네비게이션 ====================
|
||||
|
||||
window.nextStep = function() {
|
||||
console.log('[TBM Create] nextStep called, current step:', W.step, 'workTypeId:', W.workTypeId);
|
||||
if (!validateStep(W.step)) return;
|
||||
if (W.step < W.totalSteps) {
|
||||
W.step++;
|
||||
@@ -84,6 +85,7 @@
|
||||
};
|
||||
|
||||
window.prevStep = function() {
|
||||
console.log('[TBM Create] prevStep called, current step:', W.step);
|
||||
if (W.step > 1) {
|
||||
W.step--;
|
||||
renderStep(W.step);
|
||||
@@ -117,30 +119,45 @@
|
||||
});
|
||||
}
|
||||
|
||||
// 네비게이션 버튼: 단일 핸들러 (DOM 교체 없이 상태 기반 분기)
|
||||
var _navAction = { prev: null, next: null };
|
||||
|
||||
function updateNav() {
|
||||
var prevBtn = document.getElementById('prevBtn');
|
||||
var nextBtn = document.getElementById('nextBtn');
|
||||
|
||||
if (W.step === 1) {
|
||||
prevBtn.style.visibility = 'hidden';
|
||||
prevBtn.onclick = null;
|
||||
_navAction.prev = null;
|
||||
} else {
|
||||
prevBtn.style.visibility = 'visible';
|
||||
prevBtn.onclick = window.prevStep;
|
||||
_navAction.prev = window.prevStep;
|
||||
}
|
||||
|
||||
if (W.step === W.totalSteps) {
|
||||
nextBtn.className = 'nav-btn nav-btn-save';
|
||||
nextBtn.innerHTML = '저장';
|
||||
nextBtn.onclick = saveWizard;
|
||||
nextBtn.textContent = '저장';
|
||||
_navAction.next = saveWizard;
|
||||
} else {
|
||||
nextBtn.className = 'nav-btn nav-btn-next';
|
||||
nextBtn.innerHTML = '다음 →';
|
||||
nextBtn.onclick = window.nextStep;
|
||||
_navAction.next = window.nextStep;
|
||||
}
|
||||
nextBtn.disabled = false;
|
||||
}
|
||||
|
||||
// 한번만 등록하는 이벤트 리스너
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
document.getElementById('prevBtn').addEventListener('click', function(e) {
|
||||
e.preventDefault();
|
||||
if (_navAction.prev) _navAction.prev();
|
||||
});
|
||||
document.getElementById('nextBtn').addEventListener('click', function(e) {
|
||||
e.preventDefault();
|
||||
if (_navAction.next) _navAction.next();
|
||||
});
|
||||
});
|
||||
|
||||
// ==================== 유효성 검사 ====================
|
||||
|
||||
function validateStep(step) {
|
||||
@@ -365,6 +382,7 @@
|
||||
};
|
||||
|
||||
window.selectWorkType = function(id, name) {
|
||||
console.log('[TBM Create] selectWorkType:', id, name);
|
||||
W.workTypeId = id;
|
||||
W.workTypeName = name;
|
||||
// Update pill buttons
|
||||
|
||||
Reference in New Issue
Block a user