- 페이지 폴더 재구성: safety/, attendance/ 폴더 신규 생성 - work/ → safety/: 이슈 신고, 출입 신청 관련 페이지 이동 - common/ → attendance/: 근태/휴가 관련 페이지 이동 - admin/ 정리: safety-* 파일들을 safety/로 이동 - 사이드바 네비게이션 메뉴 구현 - 카테고리별 메뉴: 작업관리, 안전관리, 근태관리, 시스템관리 - 접기/펼치기 기능 및 상태 저장 - 관리자 전용 메뉴 자동 표시/숨김 - 날씨 API 연동 (기상청 단기예보) - TBM 및 navbar에 현재 날씨 표시 - weatherService.js 추가 - 안전 체크리스트 확장 - 기본/날씨별/작업별 체크 유형 추가 - checklist-manage.html 페이지 추가 - 이슈 신고 시스템 구현 - workIssueController, workIssueModel, workIssueRoutes 추가 - DB 마이그레이션 파일 추가 (실행 대기) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
287 lines
8.0 KiB
HTML
287 lines
8.0 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="ko">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>👤 사용자 관리 | (주)테크니컬코리아</title>
|
|
<link rel="stylesheet" href="/css/main-layout.css">
|
|
<link rel="stylesheet" href="/css/admin.css">
|
|
<script src="/js/auth-check.js" defer></script>
|
|
</head>
|
|
<body>
|
|
<div class="main-layout">
|
|
<div id="navbar-container"></div>
|
|
|
|
<div class="content-wrapper">
|
|
<div id="sidebar-container"></div>
|
|
|
|
<div id="content-container">
|
|
<div class="page-header">
|
|
<h1>👤 사용자 관리</h1>
|
|
<p class="subtitle">시스템 사용자를 등록하고 관리합니다.</p>
|
|
</div>
|
|
|
|
<!-- 내 비밀번호 변경 -->
|
|
<div class="card">
|
|
<h3>🔐 내 비밀번호 변경</h3>
|
|
<form id="myPasswordForm" class="form-horizontal">
|
|
<div class="form-row">
|
|
<input type="password" id="currentPassword" placeholder="현재 비밀번호" required />
|
|
<input type="password" id="newPassword" placeholder="새 비밀번호" required />
|
|
<input type="password" id="confirmPassword" placeholder="새 비밀번호 확인" required />
|
|
<button type="submit" class="btn btn-warning">내 비밀번호 변경</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
<!-- 등록 폼 -->
|
|
<div class="card">
|
|
<h3>새 사용자 등록</h3>
|
|
<form id="userForm" class="form-horizontal">
|
|
<div class="form-row">
|
|
<input type="text" id="username" placeholder="아이디" required />
|
|
<input type="password" id="password" placeholder="비밀번호" required />
|
|
<input type="text" id="name" placeholder="이름" required />
|
|
</div>
|
|
<div class="form-row">
|
|
<select id="access_level" required>
|
|
<option value="">권한 선택</option>
|
|
<option value="worker">작업자</option>
|
|
<option value="group_leader">그룹장</option>
|
|
<option value="support_team">지원팀</option>
|
|
<option value="admin">관리자</option>
|
|
<option value="system">시스템</option>
|
|
</select>
|
|
<select id="worker_id">
|
|
<option value="">작업자 연결 (선택)</option>
|
|
</select>
|
|
<button type="submit" class="btn btn-primary">등록</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
<!-- 사용자 비밀번호 변경 (시스템 권한자만) -->
|
|
<div class="card" id="systemPasswordChangeCard" style="display: none;">
|
|
<h3>🔑 사용자 비밀번호 변경 (시스템 권한자 전용)</h3>
|
|
<form id="userPasswordForm" class="form-horizontal">
|
|
<div class="form-row">
|
|
<select id="targetUserId" required>
|
|
<option value="">사용자 선택</option>
|
|
</select>
|
|
<input type="password" id="targetNewPassword" placeholder="새 비밀번호" required />
|
|
<button type="submit" class="btn btn-danger">비밀번호 변경</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
<!-- 사용자 목록 -->
|
|
<div class="card">
|
|
<h3>등록된 사용자</h3>
|
|
<div class="table-responsive">
|
|
<table class="data-table">
|
|
<thead>
|
|
<tr>
|
|
<th>ID</th>
|
|
<th>아이디</th>
|
|
<th>이름</th>
|
|
<th>권한</th>
|
|
<th>연결 작업자</th>
|
|
<th>작업</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="userTableBody">
|
|
<tr><td colspan="6" class="text-center">불러오는 중...</td></tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 페이지 권한 관리 모달 -->
|
|
<div id="pageAccessModal" class="modal" style="display: none;">
|
|
<div class="modal-content large">
|
|
<div class="modal-header">
|
|
<h2>🔐 페이지 접근 권한 관리</h2>
|
|
<span class="close">×</span>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div class="user-info-section">
|
|
<h3 id="modalUserInfo">사용자 정보</h3>
|
|
<p id="modalUserRole" class="text-muted"></p>
|
|
</div>
|
|
|
|
<div class="page-access-grid">
|
|
<div class="category-section" id="dashboardPages">
|
|
<h4>📊 대시보드</h4>
|
|
<div class="page-list" id="dashboardPageList"></div>
|
|
</div>
|
|
|
|
<div class="category-section" id="managementPages">
|
|
<h4>⚙️ 관리</h4>
|
|
<div class="page-list" id="managementPageList"></div>
|
|
</div>
|
|
|
|
<div class="category-section" id="commonPages">
|
|
<h4>📝 공통</h4>
|
|
<div class="page-list" id="commonPageList"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-secondary" onclick="closePageAccessModal()">취소</button>
|
|
<button type="button" class="btn btn-primary" onclick="savePageAccessChanges()">저장</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<style>
|
|
/* 모달 스타일 */
|
|
.modal {
|
|
display: none;
|
|
position: fixed;
|
|
z-index: 1000;
|
|
left: 0;
|
|
top: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
overflow: auto;
|
|
background-color: rgba(0,0,0,0.5);
|
|
}
|
|
|
|
.modal-content {
|
|
background-color: #fefefe;
|
|
margin: 5% auto;
|
|
padding: 0;
|
|
border: 1px solid #888;
|
|
width: 90%;
|
|
max-width: 800px;
|
|
border-radius: 8px;
|
|
box-shadow: 0 4px 20px rgba(0,0,0,0.2);
|
|
}
|
|
|
|
.modal-content.large {
|
|
max-width: 1000px;
|
|
}
|
|
|
|
.modal-header {
|
|
padding: 20px;
|
|
background-color: #4CAF50;
|
|
color: white;
|
|
border-radius: 8px 8px 0 0;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
}
|
|
|
|
.modal-header h2 {
|
|
margin: 0;
|
|
font-size: 1.5rem;
|
|
}
|
|
|
|
.modal-body {
|
|
padding: 30px;
|
|
max-height: 600px;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.modal-footer {
|
|
padding: 15px 20px;
|
|
background-color: #f1f1f1;
|
|
border-radius: 0 0 8px 8px;
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
gap: 10px;
|
|
}
|
|
|
|
.close {
|
|
color: white;
|
|
font-size: 28px;
|
|
font-weight: bold;
|
|
cursor: pointer;
|
|
transition: color 0.3s;
|
|
}
|
|
|
|
.close:hover,
|
|
.close:focus {
|
|
color: #ddd;
|
|
}
|
|
|
|
.user-info-section {
|
|
margin-bottom: 30px;
|
|
padding: 15px;
|
|
background-color: #f8f9fa;
|
|
border-radius: 5px;
|
|
}
|
|
|
|
.user-info-section h3 {
|
|
margin: 0 0 5px 0;
|
|
color: #333;
|
|
}
|
|
|
|
.page-access-grid {
|
|
display: grid;
|
|
gap: 20px;
|
|
}
|
|
|
|
.category-section h4 {
|
|
margin: 0 0 15px 0;
|
|
color: #4CAF50;
|
|
font-size: 1.1rem;
|
|
padding-bottom: 10px;
|
|
border-bottom: 2px solid #4CAF50;
|
|
}
|
|
|
|
.page-list {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 10px;
|
|
}
|
|
|
|
.page-item {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 12px;
|
|
background-color: #fff;
|
|
border: 1px solid #ddd;
|
|
border-radius: 5px;
|
|
transition: all 0.3s;
|
|
}
|
|
|
|
.page-item:hover {
|
|
background-color: #f8f9fa;
|
|
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
|
|
}
|
|
|
|
.page-item input[type="checkbox"] {
|
|
margin-right: 15px;
|
|
width: 20px;
|
|
height: 20px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.page-item label {
|
|
flex: 1;
|
|
cursor: pointer;
|
|
font-size: 1rem;
|
|
margin: 0;
|
|
}
|
|
|
|
.page-item .page-path {
|
|
font-size: 0.85rem;
|
|
color: #666;
|
|
margin-left: 10px;
|
|
}
|
|
|
|
.text-muted {
|
|
color: #6c757d;
|
|
font-size: 0.9rem;
|
|
}
|
|
</style>
|
|
|
|
<script type="module" src="/js/load-navbar.js"></script>
|
|
<script type="module" src="/js/load-sidebar.js"></script>
|
|
<script type="module" src="/js/manage-user.js"></script>
|
|
</body>
|
|
</html> |