feat(tkpurchase/tkuser): 사이드바에 협력업체 관리 외부 링크 추가 + tkuser ?tab= 라우팅

tkpurchase 사이드바에 tkuser 협력업체 관리 페이지로 이동하는 링크 추가.
tkuser에 URL ?tab= 파라미터 기반 탭 자동 전환 지원 (화이트리스트 + replaceState).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Hyungi Ahn
2026-03-16 07:37:44 +09:00
parent 54bb26dbd6
commit 5398581b87
12 changed files with 36 additions and 13 deletions

View File

@@ -186,7 +186,23 @@ async function init() {
// 알림 벨 로드
_loadNotificationBell();
setTimeout(() => document.querySelectorAll('.fade-in').forEach(el => el.classList.add('visible')), 50);
setTimeout(() => {
document.querySelectorAll('.fade-in').forEach(el => el.classList.add('visible'));
// URL ?tab= 파라미터로 탭 자동 전환 (화이트리스트 + URL 정리)
const ALLOWED_TABS = ['users','projects','workplaces','workers','departments',
'permissions','issueTypes','tasks','vacations','partners','vendors',
'consumables','notificationRecipients'];
const urlTab = new URLSearchParams(location.search).get('tab');
if (urlTab && ALLOWED_TABS.includes(urlTab)) {
const tabBtn = document.querySelector(`.tab-btn[onclick*="switchTab('${urlTab}')"]`);
if (tabBtn && tabBtn.style.display !== 'none') {
tabBtn.click();
const url = new URL(location);
url.searchParams.delete('tab');
history.replaceState(null, '', url);
}
}
}, 50);
}
/* ===== 알림 벨 ===== */