- DB 마이그레이션: request_type, visitor_name, department_id, check_in/out_time 컬럼 + status ENUM 확장 - 4소스 UNION 대시보드: 방문(외부/내부) + TBM + 협력업체 통합 조회 - 체크인/체크아웃 API + 내부 출입 신고(승인 불필요) 지원 - 통합 출입 현황판 페이지 신규 (entry-dashboard.html) - 출입 신청/관리 페이지에 유형 필터 + 체크인/아웃 버튼 추가 - safety_entry_dashboard 권한 추가 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
141 lines
7.5 KiB
HTML
141 lines
7.5 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="ko">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>안전교육 실시 - TK 안전관리</title>
|
|
<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/tksafety.css">
|
|
</head>
|
|
<body>
|
|
<!-- Header -->
|
|
<header class="bg-blue-700 text-white sticky top-0 z-50">
|
|
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
|
<div class="flex justify-between items-center h-14">
|
|
<div class="flex items-center gap-3">
|
|
<i class="fas fa-shield-alt text-xl text-blue-200"></i>
|
|
<h1 class="text-lg font-semibold">TK 안전관리</h1>
|
|
</div>
|
|
<div class="flex items-center gap-4">
|
|
<div id="headerUserName" class="text-sm font-medium hidden sm:block">-</div>
|
|
<div id="headerUserAvatar" class="w-8 h-8 bg-blue-600 rounded-full flex items-center justify-center text-sm font-semibold">-</div>
|
|
<button onclick="doLogout()" class="text-blue-200 hover:text-white" title="로그아웃"><i class="fas fa-sign-out-alt"></i></button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</header>
|
|
|
|
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4 fade-in">
|
|
<div class="flex gap-6">
|
|
<!-- Sidebar Nav -->
|
|
<nav id="sideNav" class="hidden lg:flex flex-col gap-1 w-48 flex-shrink-0 pt-2"></nav>
|
|
|
|
<!-- Main -->
|
|
<div class="flex-1 min-w-0">
|
|
<!-- 안전교육 대기 목록 -->
|
|
<div class="bg-white rounded-xl shadow-sm p-5 mb-5">
|
|
<h2 class="text-base font-semibold text-gray-800 mb-4"><i class="fas fa-chalkboard-teacher text-blue-500 mr-2"></i>안전교육 대기 (승인된 신청)</h2>
|
|
<div class="overflow-x-auto">
|
|
<table class="visit-table">
|
|
<thead>
|
|
<tr>
|
|
<th>업체</th>
|
|
<th class="text-center">인원</th>
|
|
<th>작업장</th>
|
|
<th>방문일</th>
|
|
<th class="hide-mobile">방문시간</th>
|
|
<th>목적</th>
|
|
<th class="text-right">관리</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="pendingTrainingBody">
|
|
<tr><td colspan="7" class="text-center text-gray-400 py-8">로딩 중...</td></tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 교육 완료 이력 -->
|
|
<div class="bg-white rounded-xl shadow-sm p-5">
|
|
<h2 class="text-base font-semibold text-gray-800 mb-4"><i class="fas fa-history text-blue-500 mr-2"></i>교육 완료 이력</h2>
|
|
<div class="overflow-x-auto">
|
|
<table class="visit-table">
|
|
<thead>
|
|
<tr>
|
|
<th>교육일</th>
|
|
<th>업체</th>
|
|
<th class="text-center">인원</th>
|
|
<th>교육시간</th>
|
|
<th class="hide-mobile">교육내용</th>
|
|
<th>교육자</th>
|
|
<th class="text-right">관리</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="completedTrainingBody">
|
|
<tr><td colspan="7" class="text-center text-gray-400 py-8">로딩 중...</td></tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 교육 실시 모달 -->
|
|
<div id="trainingModal" class="hidden modal-overlay" onclick="if(event.target===this)closeTrainingModal()">
|
|
<div class="modal-content p-6" style="max-width: 32rem;">
|
|
<div class="flex justify-between items-center mb-4">
|
|
<h3 class="text-lg font-semibold">안전교육 실시</h3>
|
|
<button onclick="closeTrainingModal()" class="text-gray-400 hover:text-gray-600"><i class="fas fa-times"></i></button>
|
|
</div>
|
|
<div id="trainingRequestInfo" class="bg-gray-50 rounded-lg p-3 mb-4 text-sm"></div>
|
|
<form id="trainingForm">
|
|
<div class="grid grid-cols-2 gap-3">
|
|
<div>
|
|
<label class="block text-xs font-medium text-gray-600 mb-1">교육일 <span class="text-red-400">*</span></label>
|
|
<input type="date" id="trainingDate" class="input-field w-full px-3 py-2 rounded-lg text-sm" required>
|
|
</div>
|
|
<div>
|
|
<label class="block text-xs font-medium text-gray-600 mb-1">시작시간 <span class="text-red-400">*</span></label>
|
|
<input type="time" id="trainingStartTime" class="input-field w-full px-3 py-2 rounded-lg text-sm" required>
|
|
</div>
|
|
<div>
|
|
<label class="block text-xs font-medium text-gray-600 mb-1">종료시간</label>
|
|
<input type="time" id="trainingEndTime" class="input-field w-full px-3 py-2 rounded-lg text-sm">
|
|
</div>
|
|
<div class="col-span-2">
|
|
<label class="block text-xs font-medium text-gray-600 mb-1">교육 내용</label>
|
|
<textarea id="trainingTopics" class="input-field w-full px-3 py-2 rounded-lg text-sm" rows="3" placeholder="교육 내용을 입력하세요"></textarea>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 서명 패드 -->
|
|
<div class="mt-4">
|
|
<label class="block text-xs font-medium text-gray-600 mb-1">교육자 서명</label>
|
|
<div class="border rounded-lg overflow-hidden bg-white" style="touch-action: none;">
|
|
<canvas id="signatureCanvas" width="460" height="150" class="w-full cursor-crosshair"></canvas>
|
|
</div>
|
|
<div class="flex justify-end mt-1">
|
|
<button type="button" onclick="clearSignature()" class="text-xs text-gray-500 hover:text-gray-700">
|
|
<i class="fas fa-eraser mr-1"></i>서명 지우기
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="flex justify-end mt-4 gap-2">
|
|
<button type="button" onclick="closeTrainingModal()" class="px-4 py-2 border rounded-lg text-sm hover:bg-gray-50">취소</button>
|
|
<button type="submit" class="px-4 py-2 bg-blue-600 text-white rounded-lg text-sm hover:bg-blue-700">
|
|
<i class="fas fa-check mr-1"></i>교육 완료
|
|
</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<script src="/static/js/tksafety-core.js?v=2"></script>
|
|
<script src="/static/js/tksafety-training.js"></script>
|
|
<script>initTrainingPage();</script>
|
|
</body>
|
|
</html>
|