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>
This commit is contained in:
Hyungi Ahn
2026-03-13 10:46:22 +09:00
parent 8373fe9e75
commit 9fda89a374
133 changed files with 5255 additions and 26181 deletions

View File

@@ -0,0 +1,144 @@
<!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/tkfb.css">
</head>
<body class="bg-gray-50">
<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">
<button id="mobileMenuBtn" class="lg:hidden text-orange-200 hover:text-white">
<i class="fas fa-bars text-xl"></i>
</button>
<i class="fas fa-industry text-xl text-orange-200"></i>
<h1 class="text-lg font-semibold">TK 공장관리</h1>
</div>
<div class="flex items-center gap-4">
<span id="headerUserName" class="text-sm hidden sm:block">-</span>
<div id="headerUserAvatar" class="w-8 h-8 bg-orange-600 rounded-full flex items-center justify-center text-sm font-bold">-</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>
<!-- Mobile overlay -->
<div id="mobileOverlay" class="hidden fixed inset-0 bg-black/50 z-30 lg:hidden"></div>
<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-52 flex-shrink-0 pt-2 fixed lg:static z-40 bg-white lg:bg-transparent p-4 lg:p-0 rounded-lg lg:rounded-none shadow-lg lg:shadow-none top-14 left-0 bottom-0 overflow-y-auto"></nav>
<div class="flex-1 min-w-0">
<!-- 날짜/시간 헤더 -->
<div class="flex items-center justify-between mb-5">
<div>
<h2 class="text-xl font-bold text-gray-800">대시보드</h2>
<p class="text-sm text-gray-500 mt-0.5" id="dateTimeDisplay">-</p>
</div>
<button onclick="loadDashboard()" class="text-sm text-gray-500 hover:text-orange-600 border border-gray-200 px-3 py-1.5 rounded-lg hover:bg-orange-50">
<i class="fas fa-sync-alt mr-1"></i>새로고침
</button>
</div>
<!-- 요약 카드 -->
<div class="grid grid-cols-2 lg:grid-cols-4 gap-3 mb-5">
<div class="stat-card">
<div class="stat-value text-orange-600" id="statTbm">-</div>
<div class="stat-label">금일 TBM</div>
</div>
<div class="stat-card">
<div class="stat-value text-blue-600" id="statWorkers">-</div>
<div class="stat-label">출근 인원</div>
</div>
<div class="stat-card">
<div class="stat-value text-red-600" id="statRepairs">-</div>
<div class="stat-label">수리 요청</div>
</div>
<div class="stat-card">
<div class="stat-value text-purple-600" id="statNotifications">-</div>
<div class="stat-label">미확인 알림</div>
</div>
</div>
<div class="grid grid-cols-1 lg:grid-cols-2 gap-5">
<!-- 금일 TBM 현황 -->
<div class="bg-white rounded-xl shadow-sm p-5">
<h3 class="text-base font-semibold text-gray-800 mb-4">
<i class="fas fa-clipboard-list text-orange-500 mr-2"></i>금일 TBM
</h3>
<div id="tbmList" class="space-y-2">
<p class="text-gray-400 text-sm text-center py-4">로딩 중...</p>
</div>
</div>
<!-- 최근 알림 -->
<div class="bg-white rounded-xl shadow-sm p-5">
<h3 class="text-base font-semibold text-gray-800 mb-4">
<i class="fas fa-bell text-orange-500 mr-2"></i>최근 알림
</h3>
<div id="notificationList" class="space-y-2">
<p class="text-gray-400 text-sm text-center py-4">로딩 중...</p>
</div>
</div>
<!-- 미완료 수리 요청 -->
<div class="bg-white rounded-xl shadow-sm p-5">
<h3 class="text-base font-semibold text-gray-800 mb-4">
<i class="fas fa-tools text-orange-500 mr-2"></i>수리 요청 현황
</h3>
<div id="repairList" class="space-y-2">
<p class="text-gray-400 text-sm text-center py-4">로딩 중...</p>
</div>
</div>
<!-- 빠른 이동 -->
<div class="bg-white rounded-xl shadow-sm p-5">
<h3 class="text-base font-semibold text-gray-800 mb-4">
<i class="fas fa-rocket text-orange-500 mr-2"></i>빠른 이동
</h3>
<div class="grid grid-cols-2 gap-3">
<a href="/pages/work/tbm.html" class="flex items-center gap-3 p-3 rounded-lg border border-gray-100 hover:border-orange-200 hover:bg-orange-50 transition-colors">
<i class="fas fa-clipboard-list text-orange-500 w-5 text-center"></i>
<span class="text-sm text-gray-700">TBM 관리</span>
</a>
<a href="/pages/work/report-create.html" class="flex items-center gap-3 p-3 rounded-lg border border-gray-100 hover:border-orange-200 hover:bg-orange-50 transition-colors">
<i class="fas fa-file-alt text-orange-500 w-5 text-center"></i>
<span class="text-sm text-gray-700">작업보고서</span>
</a>
<a href="/pages/attendance/checkin.html" class="flex items-center gap-3 p-3 rounded-lg border border-gray-100 hover:border-orange-200 hover:bg-orange-50 transition-colors">
<i class="fas fa-user-check text-orange-500 w-5 text-center"></i>
<span class="text-sm text-gray-700">출근 체크</span>
</a>
<a href="/pages/admin/repair-management.html" class="flex items-center gap-3 p-3 rounded-lg border border-gray-100 hover:border-orange-200 hover:bg-orange-50 transition-colors">
<i class="fas fa-tools text-orange-500 w-5 text-center"></i>
<span class="text-sm text-gray-700">시설설비 관리</span>
</a>
<a href="/pages/attendance/vacation-request.html" class="flex items-center gap-3 p-3 rounded-lg border border-gray-100 hover:border-orange-200 hover:bg-orange-50 transition-colors">
<i class="fas fa-paper-plane text-orange-500 w-5 text-center"></i>
<span class="text-sm text-gray-700">휴가 신청</span>
</a>
<a href="/pages/dashboard.html" class="flex items-center gap-3 p-3 rounded-lg border border-gray-100 hover:border-orange-200 hover:bg-orange-50 transition-colors">
<i class="fas fa-map text-orange-500 w-5 text-center"></i>
<span class="text-sm text-gray-700">작업장 현황</span>
</a>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="/static/js/tkfb-core.js"></script>
<script src="/static/js/tkfb-dashboard.js"></script>
</body>
</html>