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:
@@ -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);
|
||||
}
|
||||
|
||||
/* ===== 알림 벨 ===== */
|
||||
|
||||
Reference in New Issue
Block a user