- 일일순회점검 시스템 신규 구현 - DB 테이블: patrol_checklist_items, daily_patrol_sessions, patrol_check_records, workplace_items, item_types - API: /api/patrol/* 엔드포인트 - 프론트엔드: 지도 기반 작업장 점검 UI - 설비 관리 기능 개선 - 구매 관련 필드 추가 (구매일, 가격, 공급업체 등) - 설비 코드 자동 생성 (TKP-XXX 형식) - 작업장 관리 개선 - 레이아웃 이미지 업로드 기능 - 마커 위치 저장 기능 - 부서 관리 기능 추가 - 사이드바 네비게이션 카테고리 재구성 - 이미지 401 오류 수정 (정적 파일 경로 처리) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
246 lines
11 KiB
HTML
246 lines
11 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/design-system.css">
|
||
<link rel="stylesheet" href="/css/common.css?v=1">
|
||
<link rel="stylesheet" href="/css/admin-settings.css?v=1">
|
||
<link rel="icon" type="image/png" href="/img/favicon.png">
|
||
</head>
|
||
<body>
|
||
<div class="work-report-container">
|
||
<!-- 네비게이션 바 -->
|
||
<div id="navbar-container"></div>
|
||
|
||
<!-- 메인 콘텐츠 -->
|
||
<main class="work-report-main">
|
||
<div class="dashboard-main">
|
||
<div class="page-header">
|
||
<div class="page-title-section">
|
||
<h1 class="page-title">관리자 설정</h1>
|
||
<p class="page-description">시스템 사용자 계정 및 권한을 관리합니다</p>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 사용자 관리 섹션 -->
|
||
<div class="settings-section">
|
||
<div class="section-header">
|
||
<h2 class="section-title">사용자 계정 관리</h2>
|
||
<button class="btn btn-primary" id="addUserBtn">새 사용자 추가</button>
|
||
</div>
|
||
|
||
<div class="users-container">
|
||
<div class="users-header">
|
||
<div class="search-box">
|
||
<input type="text" id="userSearch" placeholder="사용자 검색..." class="search-input">
|
||
<span class="search-icon"></span>
|
||
</div>
|
||
<div class="filter-buttons">
|
||
<button class="filter-btn active" data-filter="all">전체</button>
|
||
<button class="filter-btn" data-filter="admin">관리자</button>
|
||
<button class="filter-btn" data-filter="leader">그룹장</button>
|
||
<button class="filter-btn" data-filter="user">작업자</button>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="users-table-container">
|
||
<table class="users-table">
|
||
<thead>
|
||
<tr>
|
||
<th>사용자명</th>
|
||
<th>아이디</th>
|
||
<th>역할</th>
|
||
<th>상태</th>
|
||
<th>최종 로그인</th>
|
||
<th>관리</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody id="usersTableBody">
|
||
<!-- 사용자 목록이 여기에 동적으로 생성됩니다 -->
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
|
||
<div class="empty-state" id="emptyState" style="display: none;">
|
||
<h3>등록된 사용자가 없습니다</h3>
|
||
<p>새 사용자를 추가해보세요.</p>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</main>
|
||
</div>
|
||
|
||
<!-- 사용자 추가/수정 모달 -->
|
||
<div id="userModal" class="modal-overlay" style="display: none;">
|
||
<div class="modal-container">
|
||
<div class="modal-header">
|
||
<h2 id="modalTitle">새 사용자 추가</h2>
|
||
<button class="modal-close-btn" onclick="closeUserModal()">×</button>
|
||
</div>
|
||
|
||
<div class="modal-body">
|
||
<form id="userForm">
|
||
<div class="form-group">
|
||
<label class="form-label">사용자명 *</label>
|
||
<input type="text" id="userName" class="form-control" required>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
<label class="form-label">아이디 *</label>
|
||
<input type="text" id="userId" class="form-control" required>
|
||
<small class="form-help">영문, 숫자, 한글, 특수문자(._-) 사용 가능 (3-20자)</small>
|
||
</div>
|
||
|
||
<div class="form-group" id="passwordGroup">
|
||
<label class="form-label">비밀번호 *</label>
|
||
<input type="password" id="userPassword" class="form-control" required>
|
||
<small class="form-help">최소 6자 이상</small>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
<label class="form-label">역할 *</label>
|
||
<select id="userRole" class="form-control" required>
|
||
<option value="">역할 선택</option>
|
||
<option value="admin">관리자</option>
|
||
<option value="user">사용자</option>
|
||
</select>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
<label class="form-label">이메일</label>
|
||
<input type="email" id="userEmail" class="form-control">
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
<label class="form-label">전화번호</label>
|
||
<input type="tel" id="userPhone" class="form-control">
|
||
</div>
|
||
|
||
<!-- 작업자 연결 (수정 시에만 표시) -->
|
||
<div class="form-group" id="workerLinkGroup" style="display: none;">
|
||
<label class="form-label">작업자 연결</label>
|
||
<div class="worker-link-container">
|
||
<div class="linked-worker-info" id="linkedWorkerInfo">
|
||
<span class="no-worker">연결된 작업자 없음</span>
|
||
</div>
|
||
<button type="button" class="btn btn-secondary btn-sm" onclick="openWorkerSelectModal()">
|
||
작업자 선택
|
||
</button>
|
||
</div>
|
||
<small class="form-help">계정과 작업자를 연결하면 출퇴근, 작업보고서 등의 기록이 연동됩니다</small>
|
||
</div>
|
||
</form>
|
||
</div>
|
||
|
||
<div class="modal-footer">
|
||
<button type="button" class="btn btn-secondary" onclick="closeUserModal()">취소</button>
|
||
<button type="button" class="btn btn-primary" id="saveUserBtn">저장</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 사용자 삭제 확인 모달 -->
|
||
<div id="deleteModal" class="modal-overlay" style="display: none;">
|
||
<div class="modal-container small">
|
||
<div class="modal-header">
|
||
<h2>사용자 삭제</h2>
|
||
<button class="modal-close-btn" onclick="closeDeleteModal()">×</button>
|
||
</div>
|
||
|
||
<div class="modal-body">
|
||
<div class="delete-warning">
|
||
<div class="warning-icon"></div>
|
||
<p>정말로 이 사용자를 삭제하시겠습니까?</p>
|
||
<p class="warning-text">삭제된 사용자는 복구할 수 없습니다.</p>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="modal-footer">
|
||
<button type="button" class="btn btn-secondary" onclick="closeDeleteModal()">취소</button>
|
||
<button type="button" class="btn btn-danger" id="confirmDeleteBtn">삭제</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 페이지 권한 관리 모달 -->
|
||
<div id="pageAccessModal" class="modal-overlay" style="display: none;">
|
||
<div class="modal-container">
|
||
<div class="modal-header">
|
||
<h2 id="pageAccessModalTitle">페이지 권한 관리</h2>
|
||
<button class="modal-close-btn" onclick="closePageAccessModal()">×</button>
|
||
</div>
|
||
|
||
<div class="modal-body">
|
||
<div class="page-access-user-info">
|
||
<div class="user-avatar-small" id="pageAccessUserAvatar">U</div>
|
||
<div>
|
||
<h3 id="pageAccessUserName">사용자</h3>
|
||
<p id="pageAccessUserRole">역할</p>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
<label class="form-label">접근 가능한 페이지</label>
|
||
<small class="form-help">체크된 페이지에만 접근할 수 있습니다</small>
|
||
<div id="pageAccessModalList" class="page-access-list">
|
||
<!-- 페이지 체크박스 목록 -->
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="modal-footer">
|
||
<button type="button" class="btn btn-secondary" onclick="closePageAccessModal()">취소</button>
|
||
<button type="button" class="btn btn-primary" id="savePageAccessBtn">저장</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 작업자 선택 모달 -->
|
||
<div id="workerSelectModal" class="modal-overlay" style="display: none;">
|
||
<div class="modal-container">
|
||
<div class="modal-header">
|
||
<h2>작업자 선택</h2>
|
||
<button class="modal-close-btn" onclick="closeWorkerSelectModal()">×</button>
|
||
</div>
|
||
|
||
<div class="modal-body">
|
||
<div class="worker-select-layout">
|
||
<!-- 부서 목록 -->
|
||
<div class="department-list-panel">
|
||
<h3 class="panel-title">부서</h3>
|
||
<div class="department-list" id="departmentList">
|
||
<!-- 부서 목록이 동적으로 생성됩니다 -->
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 작업자 목록 -->
|
||
<div class="worker-list-panel">
|
||
<h3 class="panel-title">작업자</h3>
|
||
<div class="worker-list" id="workerListForSelect">
|
||
<div class="empty-message">부서를 선택하세요</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="modal-footer">
|
||
<button type="button" class="btn btn-secondary" onclick="closeWorkerSelectModal()">취소</button>
|
||
<button type="button" class="btn btn-danger" onclick="unlinkWorker()">연결 해제</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 토스트 알림 -->
|
||
<div class="toast-container" id="toastContainer"></div>
|
||
|
||
<!-- JavaScript -->
|
||
<script src="/js/api-base.js"></script>
|
||
<script src="/js/app-init.js?v=2" defer></script>
|
||
<script src="https://instant.page/5.2.0" type="module"></script>
|
||
<script src="/js/admin-settings.js?v=8"></script>
|
||
</body>
|
||
</html>
|