Files
tk-factory-services/tksafety/web/training.html
Hyungi Ahn 9fda89a374 feat: 안전 코드 tksafety 이관 + 사용자 관리 정리 + UI Tailwind 전환
Phase 1: tksafety에 출입신청/체크리스트 API·웹 추가, tkfb 안전 코드 삭제
Phase 2: 사용자 관리 페이지 삭제, API 축소, 알림 수신자 tkuser 이관
Phase 3: tkuser 권한 페이지 정의 업데이트
Phase 4: 전체 34개 페이지 Tailwind CSS + tkfb-core.js 전환,
         미사용 CSS 20개·인프라 JS 10개·템플릿·컴포넌트 삭제

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 10:46:22 +09:00

141 lines
7.6 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-orange-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-orange-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-orange-600 rounded-full flex items-center justify-center text-sm font-semibold">-</div>
<button onclick="doLogout()" class="text-orange-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-orange-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-orange-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-orange-600 text-white rounded-lg text-sm hover:bg-orange-700">
<i class="fas fa-check mr-1"></i>교육 완료
</button>
</div>
</form>
</div>
</div>
<script src="/static/js/tksafety-core.js"></script>
<script src="/static/js/tksafety-training.js"></script>
<script>initTrainingPage();</script>
</body>
</html>