Phase 1: tkuser 협력업체 CRUD 이관 (읽기전용 → 전체 CRUD) Phase 2: tkpurchase 개편 — 일용공 신청/확정, 작업일정, 업무현황, 계정관리, 협력업체 포털 Phase 3: tksafety 신규 시스템 — 방문관리 + 안전교육 신고 Phase 4: SSO 인증 보강 (partner_company_id JWT, 만료일 체크), 권한 테이블 기반 접근 제어 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
195 lines
11 KiB
HTML
195 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>안전교육 - 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?v=20260312">
|
|
</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">
|
|
<div class="flex items-center justify-between mb-4">
|
|
<h2 class="text-base font-semibold text-gray-800"><i class="fas fa-graduation-cap text-orange-500 mr-2"></i>안전교육 관리</h2>
|
|
<button onclick="openAddEducation()" class="px-4 py-2 bg-orange-600 text-white rounded-lg hover:bg-orange-700 text-sm font-medium">
|
|
<i class="fas fa-plus mr-1"></i>교육 등록
|
|
</button>
|
|
</div>
|
|
<div class="flex flex-wrap items-end gap-3">
|
|
<div>
|
|
<label class="block text-xs font-medium text-gray-600 mb-1">시작일</label>
|
|
<input type="date" id="eduDateFrom" class="input-field px-3 py-2 rounded-lg text-sm">
|
|
</div>
|
|
<div>
|
|
<label class="block text-xs font-medium text-gray-600 mb-1">종료일</label>
|
|
<input type="date" id="eduDateTo" class="input-field px-3 py-2 rounded-lg text-sm">
|
|
</div>
|
|
<div>
|
|
<label class="block text-xs font-medium text-gray-600 mb-1">구분</label>
|
|
<select id="eduTargetType" class="input-field px-3 py-2 rounded-lg text-sm">
|
|
<option value="">전체</option>
|
|
<option value="day_labor">일용공</option>
|
|
<option value="partner_schedule">협력업체</option>
|
|
<option value="manual">수동등록</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 교육 목록 -->
|
|
<div class="bg-white rounded-xl shadow-sm p-5">
|
|
<div class="overflow-x-auto">
|
|
<table class="visit-table">
|
|
<thead>
|
|
<tr>
|
|
<th>교육일</th>
|
|
<th>구분</th>
|
|
<th>교육자</th>
|
|
<th class="text-center">참석인원</th>
|
|
<th>상태</th>
|
|
<th class="hide-mobile">비고</th>
|
|
<th class="text-right">관리</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="educationTableBody">
|
|
<tr><td colspan="7" class="text-center text-gray-400 py-8">로딩 중...</td></tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 교육 등록 모달 -->
|
|
<div id="addEducationModal" class="hidden modal-overlay" onclick="if(event.target===this)closeAddEducation()">
|
|
<div class="modal-content p-6">
|
|
<div class="flex justify-between items-center mb-4">
|
|
<h3 class="text-lg font-semibold">안전교육 등록</h3>
|
|
<button onclick="closeAddEducation()" class="text-gray-400 hover:text-gray-600"><i class="fas fa-times"></i></button>
|
|
</div>
|
|
<form id="addEducationForm">
|
|
<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>
|
|
<select id="newTargetType" class="input-field w-full px-3 py-2 rounded-lg text-sm" required>
|
|
<option value="day_labor">일용공</option>
|
|
<option value="partner_schedule">협력업체</option>
|
|
<option value="manual">수동등록</option>
|
|
</select>
|
|
</div>
|
|
<div>
|
|
<label class="block text-xs font-medium text-gray-600 mb-1">교육일 <span class="text-red-400">*</span></label>
|
|
<input type="date" id="newEducationDate" 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="text" id="newEducator" class="input-field w-full px-3 py-2 rounded-lg text-sm" placeholder="교육 담당자">
|
|
</div>
|
|
<div>
|
|
<label class="block text-xs font-medium text-gray-600 mb-1">상태</label>
|
|
<select id="newEduStatus" class="input-field w-full px-3 py-2 rounded-lg text-sm">
|
|
<option value="planned">예정</option>
|
|
<option value="completed">완료</option>
|
|
<option value="cancelled">취소</option>
|
|
</select>
|
|
</div>
|
|
<div class="col-span-2">
|
|
<label class="block text-xs font-medium text-gray-600 mb-1">참석자 (한 줄에 한 명, 이름, 업체 형식)</label>
|
|
<textarea id="newAttendees" class="input-field w-full px-3 py-2 rounded-lg text-sm" rows="4" placeholder="홍길동, ABC건설 김철수, XYZ설비"></textarea>
|
|
</div>
|
|
<div class="col-span-2">
|
|
<label class="block text-xs font-medium text-gray-600 mb-1">비고</label>
|
|
<input type="text" id="newEduNotes" class="input-field w-full px-3 py-2 rounded-lg text-sm" placeholder="메모">
|
|
</div>
|
|
</div>
|
|
<div class="flex justify-end mt-4 gap-2">
|
|
<button type="button" onclick="closeAddEducation()" 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">등록</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 교육 수정 모달 -->
|
|
<div id="editEducationModal" class="hidden modal-overlay" onclick="if(event.target===this)closeEditEducation()">
|
|
<div class="modal-content p-6">
|
|
<div class="flex justify-between items-center mb-4">
|
|
<h3 class="text-lg font-semibold">안전교육 수정</h3>
|
|
<button onclick="closeEditEducation()" class="text-gray-400 hover:text-gray-600"><i class="fas fa-times"></i></button>
|
|
</div>
|
|
<form id="editEducationForm">
|
|
<div class="grid grid-cols-2 gap-3">
|
|
<div>
|
|
<label class="block text-xs font-medium text-gray-600 mb-1">구분</label>
|
|
<select id="editTargetType" class="input-field w-full px-3 py-2 rounded-lg text-sm">
|
|
<option value="day_labor">일용공</option>
|
|
<option value="partner_schedule">협력업체</option>
|
|
<option value="manual">수동등록</option>
|
|
</select>
|
|
</div>
|
|
<div>
|
|
<label class="block text-xs font-medium text-gray-600 mb-1">교육일</label>
|
|
<input type="date" id="editEducationDate" class="input-field w-full px-3 py-2 rounded-lg text-sm">
|
|
</div>
|
|
<div>
|
|
<label class="block text-xs font-medium text-gray-600 mb-1">교육자</label>
|
|
<input type="text" id="editEducator" class="input-field w-full px-3 py-2 rounded-lg text-sm">
|
|
</div>
|
|
<div>
|
|
<label class="block text-xs font-medium text-gray-600 mb-1">상태</label>
|
|
<select id="editEduStatus" class="input-field w-full px-3 py-2 rounded-lg text-sm">
|
|
<option value="planned">예정</option>
|
|
<option value="completed">완료</option>
|
|
<option value="cancelled">취소</option>
|
|
</select>
|
|
</div>
|
|
<div class="col-span-2">
|
|
<label class="block text-xs font-medium text-gray-600 mb-1">참석자 (한 줄에 한 명, 이름, 업체 형식)</label>
|
|
<textarea id="editAttendees" class="input-field w-full px-3 py-2 rounded-lg text-sm" rows="4"></textarea>
|
|
</div>
|
|
<div class="col-span-2">
|
|
<label class="block text-xs font-medium text-gray-600 mb-1">비고</label>
|
|
<input type="text" id="editEduNotes" class="input-field w-full px-3 py-2 rounded-lg text-sm">
|
|
</div>
|
|
</div>
|
|
<div class="flex justify-end mt-4 gap-2">
|
|
<button type="button" onclick="closeEditEducation()" 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">저장</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<script src="/static/js/tksafety-core.js?v=20260312"></script>
|
|
<script src="/static/js/tksafety-education.js?v=20260312"></script>
|
|
<script>initEducationPage();</script>
|
|
</body>
|
|
</html>
|