feat(tkuser): 탭 카테고리 그룹핑 + 설비 관리 탭 추가 + tkfb admin 페이지 통합
- tkuser 탭을 5개 카테고리로 그룹핑 (인력/현장/업무/거래/시스템) - 설비 관리 탭 신규 추가 (CRUD, 필터, 상세 보기) - tkfb 사이드바 admin 메뉴 6개를 tkuser 외부 링크로 교체 - tkfb admin HTML 6개를 tkuser 리다이렉트로 변경 - gateway 알림 벨 링크를 tkuser로 변경 - _tkuserBase 헬퍼로 개발/운영 환경 자동 분기 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -8,6 +8,9 @@ if ('serviceWorker' in navigator) {
|
||||
|
||||
/* ===== Config ===== */
|
||||
const API_BASE = '/api';
|
||||
const _tkuserBase = location.hostname.includes('technicalkorea.net')
|
||||
? 'https://tkuser.technicalkorea.net'
|
||||
: `http://${location.hostname}:30380`;
|
||||
|
||||
/* ===== Token ===== */
|
||||
function _cookieGet(n) { const m = document.cookie.match(new RegExp('(?:^|; )' + n + '=([^;]*)')); return m ? decodeURIComponent(m[1]) : null; }
|
||||
@@ -134,13 +137,13 @@ const NAV_MENU = [
|
||||
{ href: '/pages/attendance/annual-overview.html', icon: 'fa-chart-pie', label: '연간 휴가 현황', key: 'attendance.annual_overview', admin: true },
|
||||
]},
|
||||
{ cat: '시스템 관리', admin: true, items: [
|
||||
{ href: 'https://tkuser.technicalkorea.net', icon: 'fa-users-cog', label: '사용자 관리', key: 'admin.user_management', external: true },
|
||||
{ href: '/pages/admin/projects.html', icon: 'fa-project-diagram', label: '프로젝트 관리', key: 'admin.projects' },
|
||||
{ href: '/pages/admin/tasks.html', icon: 'fa-tasks', label: '작업 관리', key: 'admin.tasks' },
|
||||
{ href: '/pages/admin/workplaces.html', icon: 'fa-building', label: '작업장 관리', key: 'admin.workplaces' },
|
||||
{ href: '/pages/admin/equipments.html', icon: 'fa-cogs', label: '설비 관리', key: 'admin.equipments' },
|
||||
{ href: '/pages/admin/departments.html', icon: 'fa-sitemap', label: '부서 관리', key: 'admin.departments' },
|
||||
{ href: '/pages/admin/notifications.html', icon: 'fa-bell', label: '알림 관리', key: 'admin.notifications' },
|
||||
{ href: `${_tkuserBase}/?tab=users`, icon: 'fa-users-cog', label: '사용자 관리', key: 'admin.user_management', external: true },
|
||||
{ href: `${_tkuserBase}/?tab=projects`, icon: 'fa-project-diagram', label: '프로젝트 관리', key: 'admin.projects', external: true },
|
||||
{ href: `${_tkuserBase}/?tab=tasks`, icon: 'fa-tasks', label: '작업 관리', key: 'admin.tasks', external: true },
|
||||
{ href: `${_tkuserBase}/?tab=workplaces`, icon: 'fa-building', label: '작업장 관리', key: 'admin.workplaces', external: true },
|
||||
{ href: `${_tkuserBase}/?tab=equipments`, icon: 'fa-cogs', label: '설비 관리', key: 'admin.equipments', external: true },
|
||||
{ href: `${_tkuserBase}/?tab=departments`, icon: 'fa-sitemap', label: '부서 관리', key: 'admin.departments', external: true },
|
||||
{ href: `${_tkuserBase}/?tab=notificationRecipients`, icon: 'fa-bell', label: '알림 관리', key: 'admin.notifications', external: true },
|
||||
{ href: '/pages/admin/attendance-report.html', icon: 'fa-clipboard-check', label: '출퇴근-보고서 대조', key: 'admin.attendance_report' },
|
||||
]},
|
||||
];
|
||||
|
||||
@@ -73,7 +73,7 @@ function renderNotificationList(notifications) {
|
||||
const icons = { repair: 'fa-wrench text-amber-500', safety: 'fa-shield-alt text-red-500', system: 'fa-bell text-blue-500', equipment: 'fa-cog text-gray-500', maintenance: 'fa-tools text-green-500' };
|
||||
el.innerHTML = notifications.slice(0, 5).map(n => {
|
||||
const iconClass = icons[n.type] || 'fa-bell text-gray-400';
|
||||
return `<div class="flex items-start gap-3 p-3 bg-gray-50 rounded-lg cursor-pointer hover:bg-gray-100" onclick="location.href='/pages/admin/notifications.html'">
|
||||
return `<div class="flex items-start gap-3 p-3 bg-gray-50 rounded-lg cursor-pointer hover:bg-gray-100" onclick="location.href='${_tkuserBase}/?tab=notificationRecipients'">
|
||||
<i class="fas ${iconClass} mt-0.5"></i>
|
||||
<div class="flex-1 min-w-0">
|
||||
<div class="text-sm font-medium text-gray-800 truncate">${escapeHtml(n.title)}</div>
|
||||
|
||||
Reference in New Issue
Block a user