feat: 권한 탭 분리 + 부서 인원 표시 + 다수 시스템 개선
- tkuser: 권한 관리를 별도 탭으로 분리, 부서 클릭 시 소속 인원 목록 표시 - system1: 모바일 UI 개선, nginx 권한 보정, 신고 카테고리 타입 마이그레이션 - system2: 신고 상세/보고서 개선, 내 보고서 페이지 추가 - system3: 이슈 뷰/수신함/관리함 개선 - gateway: 포털 라우팅 수정 - user-management API: 부서별 권한 벌크 설정 추가 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
<link rel="preload" href="https://cdn.tailwindcss.com" as="script">
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
||||
<link rel="stylesheet" href="/static/css/tkuser.css?v=20260213">
|
||||
<link rel="stylesheet" href="/static/css/tkuser.css?v=20260223">
|
||||
</head>
|
||||
<body>
|
||||
<!-- Header -->
|
||||
@@ -46,6 +46,9 @@
|
||||
<button class="tab-btn px-4 py-2 rounded-lg text-sm font-medium whitespace-nowrap" onclick="switchTab('departments')">
|
||||
<i class="fas fa-sitemap mr-2"></i>부서
|
||||
</button>
|
||||
<button class="tab-btn px-4 py-2 rounded-lg text-sm font-medium whitespace-nowrap" onclick="switchTab('permissions')">
|
||||
<i class="fas fa-shield-alt mr-2"></i>권한
|
||||
</button>
|
||||
<button class="tab-btn px-4 py-2 rounded-lg text-sm font-medium whitespace-nowrap" onclick="switchTab('issueTypes')">
|
||||
<i class="fas fa-exclamation-triangle mr-2"></i>이슈 유형
|
||||
</button>
|
||||
@@ -86,13 +89,8 @@
|
||||
<div class="grid grid-cols-2 gap-3">
|
||||
<div>
|
||||
<label class="block text-xs font-medium text-gray-600 mb-1">부서</label>
|
||||
<select id="newDepartment" class="input-field w-full px-3 py-1.5 rounded-lg text-sm">
|
||||
<select id="newDepartmentId" class="input-field w-full px-3 py-1.5 rounded-lg text-sm">
|
||||
<option value="">선택</option>
|
||||
<option value="production">생산</option>
|
||||
<option value="quality">품질</option>
|
||||
<option value="purchasing">구매</option>
|
||||
<option value="design">설계</option>
|
||||
<option value="sales">영업</option>
|
||||
</select>
|
||||
</div>
|
||||
<div>
|
||||
@@ -118,66 +116,9 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 페이지 권한 관리 -->
|
||||
<div class="mt-6 bg-white rounded-xl shadow-sm p-5">
|
||||
<div class="flex items-center justify-between mb-5">
|
||||
<h2 class="text-base font-semibold text-gray-800"><i class="fas fa-shield-alt text-slate-400 mr-2"></i>페이지 접근 권한</h2>
|
||||
<select id="permissionUserSelect" class="input-field px-3 py-1.5 rounded-lg text-sm min-w-[200px]">
|
||||
<option value="">사용자 선택</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div id="permissionPanel" class="hidden">
|
||||
<!-- System 1 - 공장관리 -->
|
||||
<div class="system-section system1 rounded-lg mb-5 bg-white">
|
||||
<div class="flex items-center justify-between px-4 py-3 bg-blue-50 rounded-t-lg border border-blue-100">
|
||||
<div class="flex items-center gap-2">
|
||||
<i class="fas fa-industry text-blue-500"></i>
|
||||
<span class="font-semibold text-sm text-blue-900">공장관리</span>
|
||||
<span class="text-xs text-blue-500 bg-blue-100 px-2 py-0.5 rounded-full">System 1</span>
|
||||
</div>
|
||||
<div class="flex gap-2">
|
||||
<button onclick="toggleSystemAll('s1', true)" class="text-xs text-blue-600 hover:underline">전체 허용</button>
|
||||
<span class="text-gray-300">|</span>
|
||||
<button onclick="toggleSystemAll('s1', false)" class="text-xs text-blue-600 hover:underline">전체 해제</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="s1-perms" class="p-4 border border-t-0 border-blue-100 rounded-b-lg space-y-4"></div>
|
||||
</div>
|
||||
|
||||
<!-- System 3 - 부적합관리 -->
|
||||
<div class="system-section system3 rounded-lg mb-5 bg-white">
|
||||
<div class="flex items-center justify-between px-4 py-3 bg-purple-50 rounded-t-lg border border-purple-100">
|
||||
<div class="flex items-center gap-2">
|
||||
<i class="fas fa-shield-halved text-purple-500"></i>
|
||||
<span class="font-semibold text-sm text-purple-900">부적합관리</span>
|
||||
<span class="text-xs text-purple-500 bg-purple-100 px-2 py-0.5 rounded-full">System 3</span>
|
||||
</div>
|
||||
<div class="flex gap-2">
|
||||
<button onclick="toggleSystemAll('s3', true)" class="text-xs text-purple-600 hover:underline">전체 허용</button>
|
||||
<span class="text-gray-300">|</span>
|
||||
<button onclick="toggleSystemAll('s3', false)" class="text-xs text-purple-600 hover:underline">전체 해제</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="s3-perms" class="p-4 border border-t-0 border-purple-100 rounded-b-lg space-y-4"></div>
|
||||
</div>
|
||||
|
||||
<!-- 저장 버튼 -->
|
||||
<div class="flex items-center gap-3 pt-2">
|
||||
<button id="savePermissionsBtn" class="px-6 py-2.5 bg-slate-700 text-white rounded-lg hover:bg-slate-800 text-sm font-medium">
|
||||
<i class="fas fa-save mr-2"></i>권한 저장
|
||||
</button>
|
||||
<span id="permissionSaveStatus" class="text-sm"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="permissionEmpty" class="text-center text-gray-400 py-8 text-sm">
|
||||
<i class="fas fa-hand-pointer text-2xl mb-2"></i>
|
||||
<p>사용자를 선택하면 권한을 설정할 수 있습니다</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- 비밀번호 변경 (일반 사용자) -->
|
||||
<div id="passwordChangeSection" class="hidden">
|
||||
<div class="bg-white rounded-xl shadow-sm p-6 max-w-md mx-auto">
|
||||
@@ -203,6 +144,128 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ============ 권한 탭 ============ -->
|
||||
<div id="tab-permissions" class="hidden">
|
||||
<!-- 부서별 기본 권한 설정 -->
|
||||
<div class="bg-white rounded-xl shadow-sm p-5">
|
||||
<div class="flex items-center justify-between mb-5">
|
||||
<h2 class="text-base font-semibold text-gray-800"><i class="fas fa-building text-slate-400 mr-2"></i>부서별 기본 권한</h2>
|
||||
<select id="deptPermSelect" class="input-field px-3 py-1.5 rounded-lg text-sm min-w-[200px]">
|
||||
<option value="">부서 선택</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div id="deptPermPanel" class="hidden">
|
||||
<!-- System 1 -->
|
||||
<div class="system-section system1 rounded-lg mb-5 bg-white">
|
||||
<div class="flex items-center justify-between px-4 py-3 bg-blue-50 rounded-t-lg border border-blue-100">
|
||||
<div class="flex items-center gap-2">
|
||||
<i class="fas fa-industry text-blue-500"></i>
|
||||
<span class="font-semibold text-sm text-blue-900">공장관리</span>
|
||||
<span class="text-xs text-blue-500 bg-blue-100 px-2 py-0.5 rounded-full">System 1</span>
|
||||
</div>
|
||||
<div class="flex gap-2">
|
||||
<button onclick="toggleDeptSystemAll('s1', true)" class="text-xs text-blue-600 hover:underline">전체 허용</button>
|
||||
<span class="text-gray-300">|</span>
|
||||
<button onclick="toggleDeptSystemAll('s1', false)" class="text-xs text-blue-600 hover:underline">전체 해제</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="dept-s1-perms" class="p-4 border border-t-0 border-blue-100 rounded-b-lg space-y-4"></div>
|
||||
</div>
|
||||
<!-- System 3 -->
|
||||
<div class="system-section system3 rounded-lg mb-5 bg-white">
|
||||
<div class="flex items-center justify-between px-4 py-3 bg-purple-50 rounded-t-lg border border-purple-100">
|
||||
<div class="flex items-center gap-2">
|
||||
<i class="fas fa-shield-halved text-purple-500"></i>
|
||||
<span class="font-semibold text-sm text-purple-900">부적합관리</span>
|
||||
<span class="text-xs text-purple-500 bg-purple-100 px-2 py-0.5 rounded-full">System 3</span>
|
||||
</div>
|
||||
<div class="flex gap-2">
|
||||
<button onclick="toggleDeptSystemAll('s3', true)" class="text-xs text-purple-600 hover:underline">전체 허용</button>
|
||||
<span class="text-gray-300">|</span>
|
||||
<button onclick="toggleDeptSystemAll('s3', false)" class="text-xs text-purple-600 hover:underline">전체 해제</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="dept-s3-perms" class="p-4 border border-t-0 border-purple-100 rounded-b-lg space-y-4"></div>
|
||||
</div>
|
||||
<!-- 저장 -->
|
||||
<div class="flex items-center gap-3 pt-2">
|
||||
<button id="saveDeptPermBtn" class="px-6 py-2.5 bg-slate-700 text-white rounded-lg hover:bg-slate-800 text-sm font-medium">
|
||||
<i class="fas fa-save mr-2"></i>부서 권한 저장
|
||||
</button>
|
||||
<span id="deptPermSaveStatus" class="text-sm"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="deptPermEmpty" class="text-center text-gray-400 py-8 text-sm">
|
||||
<i class="fas fa-building text-2xl mb-2"></i>
|
||||
<p>부서를 선택하면 기본 권한을 설정할 수 있습니다</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 페이지 권한 관리 (개인) -->
|
||||
<div class="mt-6 bg-white rounded-xl shadow-sm p-5">
|
||||
<div class="flex items-center justify-between mb-5">
|
||||
<h2 class="text-base font-semibold text-gray-800"><i class="fas fa-shield-alt text-slate-400 mr-2"></i>개인 페이지 권한</h2>
|
||||
<select id="permissionUserSelect" class="input-field px-3 py-1.5 rounded-lg text-sm min-w-[200px]">
|
||||
<option value="">사용자 선택</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div id="permissionPanel" class="hidden">
|
||||
<!-- System 1 - 공장관리 -->
|
||||
<div class="system-section system1 rounded-lg mb-5 bg-white">
|
||||
<div class="flex items-center justify-between px-4 py-3 bg-blue-50 rounded-t-lg border border-blue-100">
|
||||
<div class="flex items-center gap-2">
|
||||
<i class="fas fa-industry text-blue-500"></i>
|
||||
<span class="font-semibold text-sm text-blue-900">공장관리</span>
|
||||
<span class="text-xs text-blue-500 bg-blue-100 px-2 py-0.5 rounded-full">System 1</span>
|
||||
</div>
|
||||
<div class="flex gap-2">
|
||||
<button onclick="toggleSystemAll('s1', true)" class="text-xs text-blue-600 hover:underline">전체 허용</button>
|
||||
<span class="text-gray-300">|</span>
|
||||
<button onclick="toggleSystemAll('s1', false)" class="text-xs text-blue-600 hover:underline">전체 해제</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="s1-perms" class="p-4 border border-t-0 border-blue-100 rounded-b-lg space-y-4"></div>
|
||||
</div>
|
||||
|
||||
<!-- System 3 - 부적합관리 -->
|
||||
<div class="system-section system3 rounded-lg mb-5 bg-white">
|
||||
<div class="flex items-center justify-between px-4 py-3 bg-purple-50 rounded-t-lg border border-purple-100">
|
||||
<div class="flex items-center gap-2">
|
||||
<i class="fas fa-shield-halved text-purple-500"></i>
|
||||
<span class="font-semibold text-sm text-purple-900">부적합관리</span>
|
||||
<span class="text-xs text-purple-500 bg-purple-100 px-2 py-0.5 rounded-full">System 3</span>
|
||||
</div>
|
||||
<div class="flex gap-2">
|
||||
<button onclick="toggleSystemAll('s3', true)" class="text-xs text-purple-600 hover:underline">전체 허용</button>
|
||||
<span class="text-gray-300">|</span>
|
||||
<button onclick="toggleSystemAll('s3', false)" class="text-xs text-purple-600 hover:underline">전체 해제</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="s3-perms" class="p-4 border border-t-0 border-purple-100 rounded-b-lg space-y-4"></div>
|
||||
</div>
|
||||
|
||||
<!-- 저장 버튼 -->
|
||||
<div class="flex items-center gap-3 pt-2">
|
||||
<button id="savePermissionsBtn" class="px-6 py-2.5 bg-slate-700 text-white rounded-lg hover:bg-slate-800 text-sm font-medium">
|
||||
<i class="fas fa-save mr-2"></i>권한 저장
|
||||
</button>
|
||||
<button id="resetToDefaultBtn" class="px-4 py-2.5 border border-gray-300 text-gray-600 rounded-lg hover:bg-gray-50 text-sm font-medium">
|
||||
<i class="fas fa-undo mr-2"></i>부서 기본으로 초기화
|
||||
</button>
|
||||
<span id="permissionSaveStatus" class="text-sm"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="permissionEmpty" class="text-center text-gray-400 py-8 text-sm">
|
||||
<i class="fas fa-hand-pointer text-2xl mb-2"></i>
|
||||
<p>사용자를 선택하면 권한을 설정할 수 있습니다</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ============ 준비 중 탭 (placeholder) ============ -->
|
||||
<div id="tab-projects" class="hidden">
|
||||
<div class="grid lg:grid-cols-5 gap-6">
|
||||
@@ -286,6 +349,10 @@
|
||||
<div id="departmentList" class="space-y-2 max-h-[520px] overflow-y-auto">
|
||||
<div class="text-gray-400 text-center py-8"><i class="fas fa-spinner fa-spin text-2xl"></i><p class="mt-2 text-sm">로딩 중...</p></div>
|
||||
</div>
|
||||
<div id="deptMembersPanel" class="hidden mt-4 border-t pt-4">
|
||||
<h3 class="text-sm font-semibold text-gray-700 mb-3"><i class="fas fa-users text-slate-400 mr-1.5"></i>소속 인원</h3>
|
||||
<div id="deptMembersList" class="space-y-2"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -723,13 +790,8 @@
|
||||
<div class="grid grid-cols-2 gap-3">
|
||||
<div>
|
||||
<label class="block text-xs font-medium text-gray-600 mb-1">부서</label>
|
||||
<select id="editDepartment" class="input-field w-full px-3 py-1.5 rounded-lg text-sm">
|
||||
<select id="editDepartmentId" class="input-field w-full px-3 py-1.5 rounded-lg text-sm">
|
||||
<option value="">선택</option>
|
||||
<option value="production">생산</option>
|
||||
<option value="quality">품질</option>
|
||||
<option value="purchasing">구매</option>
|
||||
<option value="design">설계</option>
|
||||
<option value="sales">영업</option>
|
||||
</select>
|
||||
</div>
|
||||
<div>
|
||||
@@ -1208,18 +1270,18 @@
|
||||
</div>
|
||||
|
||||
<!-- JS: Core (config, token, api, toast, helpers, init) -->
|
||||
<script src="/static/js/tkuser-core.js?v=20260213"></script>
|
||||
<script src="/static/js/tkuser-core.js?v=20260223"></script>
|
||||
<!-- JS: Tabs -->
|
||||
<script src="/static/js/tkuser-tabs.js?v=20260213"></script>
|
||||
<script src="/static/js/tkuser-tabs.js?v=20260223"></script>
|
||||
<!-- JS: Individual modules -->
|
||||
<script src="/static/js/tkuser-users.js?v=20260213"></script>
|
||||
<script src="/static/js/tkuser-projects.js?v=20260213"></script>
|
||||
<script src="/static/js/tkuser-departments.js?v=20260213"></script>
|
||||
<script src="/static/js/tkuser-issue-types.js?v=20260213"></script>
|
||||
<script src="/static/js/tkuser-workplaces.js?v=20260213"></script>
|
||||
<script src="/static/js/tkuser-tasks.js?v=20260213"></script>
|
||||
<script src="/static/js/tkuser-vacations.js?v=20260213"></script>
|
||||
<script src="/static/js/tkuser-layout-map.js?v=20260213"></script>
|
||||
<script src="/static/js/tkuser-users.js?v=20260223"></script>
|
||||
<script src="/static/js/tkuser-projects.js?v=20260223"></script>
|
||||
<script src="/static/js/tkuser-departments.js?v=20260223"></script>
|
||||
<script src="/static/js/tkuser-issue-types.js?v=20260223"></script>
|
||||
<script src="/static/js/tkuser-workplaces.js?v=20260223"></script>
|
||||
<script src="/static/js/tkuser-tasks.js?v=20260223"></script>
|
||||
<script src="/static/js/tkuser-vacations.js?v=20260223"></script>
|
||||
<script src="/static/js/tkuser-layout-map.js?v=20260223"></script>
|
||||
<!-- Boot -->
|
||||
<script>init();</script>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user