feat: 데이터베이스 및 웹 UI 대규모 리팩토링
- 삭제된 DB 테이블들과 관련 코드 정리: * 12개 사용하지 않는 테이블 삭제 (activity_logs, CuttingPlan, DailyIssueReports 등) * 관련 모델, 컨트롤러, 라우트 파일들 삭제 * index.js에서 삭제된 라우트들 제거 - 웹 UI 페이지 정리: * 21개 사용하지 않는 페이지 삭제 * issue-reports 폴더 전체 삭제 * 모든 사용자 권한을 그룹장 대시보드로 통일 - 데이터베이스 스키마 정리: * v1 스키마로 통일 (daily_work_reports 테이블) * JSON 데이터 임포트 스크립트 구현 * 외래키 관계 정리 및 데이터 일관성 확보 - 통합 Docker Compose 설정: * 모든 서비스를 단일 docker-compose.yml로 통합 * 20000번대 포트 유지 * JWT 시크릿 및 환경변수 설정 - 문서화: * DATABASE_SCHEMA.md: 현재 DB 스키마 문서화 * DELETED_TABLES.md: 삭제된 테이블 목록 * DELETED_PAGES.md: 삭제된 페이지 목록
This commit is contained in:
@@ -1,497 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Rate Limit 관리</title>
|
||||
<style>
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
||||
background-color: #f5f5f5;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.container {
|
||||
max-width: 1000px;
|
||||
margin: 0 auto;
|
||||
background: white;
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.header {
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
color: white;
|
||||
padding: 30px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.header h1 {
|
||||
font-size: 24px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.shield-icon {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
fill: white;
|
||||
}
|
||||
|
||||
.user-level {
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
padding: 8px 16px;
|
||||
border-radius: 20px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 30px;
|
||||
}
|
||||
|
||||
.status-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
||||
gap: 20px;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.status-card {
|
||||
background: #f8f9fa;
|
||||
border: 1px solid #e9ecef;
|
||||
border-radius: 8px;
|
||||
padding: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.status-card .label {
|
||||
font-size: 14px;
|
||||
color: #6c757d;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.status-card .value {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
font-family: 'Courier New', monospace;
|
||||
color: #495057;
|
||||
}
|
||||
|
||||
.buttons-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
||||
gap: 15px;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 8px;
|
||||
padding: 12px 20px;
|
||||
border: none;
|
||||
border-radius: 8px;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.btn:disabled {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.btn-blue {
|
||||
background: #007bff;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.btn-blue:hover:not(:disabled) {
|
||||
background: #0056b3;
|
||||
}
|
||||
|
||||
.btn-green {
|
||||
background: #28a745;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.btn-green:hover:not(:disabled) {
|
||||
background: #1e7e34;
|
||||
}
|
||||
|
||||
.btn-orange {
|
||||
background: #fd7e14;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.btn-orange:hover:not(:disabled) {
|
||||
background: #e55a00;
|
||||
}
|
||||
|
||||
.btn-gray {
|
||||
background: #6c757d;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.btn-gray:hover:not(:disabled) {
|
||||
background: #545b62;
|
||||
}
|
||||
|
||||
.message {
|
||||
padding: 15px;
|
||||
border-radius: 8px;
|
||||
margin-bottom: 20px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.message.success {
|
||||
background: #d4edda;
|
||||
color: #155724;
|
||||
border: 1px solid #c3e6cb;
|
||||
}
|
||||
|
||||
.message.error {
|
||||
background: #f8d7da;
|
||||
color: #721c24;
|
||||
border: 1px solid #f5c6cb;
|
||||
}
|
||||
|
||||
.message.warning {
|
||||
background: #fff3cd;
|
||||
color: #856404;
|
||||
border: 1px solid #ffeaa7;
|
||||
}
|
||||
|
||||
.help-section {
|
||||
background: #e3f2fd;
|
||||
border: 1px solid #bbdefb;
|
||||
border-radius: 8px;
|
||||
padding: 20px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.help-section h3 {
|
||||
color: #1565c0;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.help-section ul {
|
||||
color: #1976d2;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.help-section li {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.loading {
|
||||
opacity: 0.7;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.no-permission {
|
||||
background: #fff3cd;
|
||||
border: 1px solid #ffeaa7;
|
||||
border-radius: 8px;
|
||||
padding: 20px;
|
||||
margin-bottom: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.icon {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
fill: currentColor;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="header">
|
||||
<h1>
|
||||
<svg class="shield-icon" viewBox="0 0 24 24">
|
||||
<path d="M12,1L3,5V11C3,16.55 6.84,21.74 12,23C17.16,21.74 21,16.55 21,11V5L12,1M12,7C13.4,7 14.8,8.6 14.8,10V11H16V21H8V11H9.2V10C9.2,8.6 10.6,7 12,7M12,8.2C11.2,8.2 10.4,8.7 10.4,10V11H13.6V10C13.6,8.7 12.8,8.2 12,8.2Z"/>
|
||||
</svg>
|
||||
Rate Limit 관리
|
||||
</h1>
|
||||
<div class="user-level" id="userLevel">권한 레벨: -</div>
|
||||
</div>
|
||||
|
||||
<div class="content">
|
||||
<!-- 권한 없음 메시지 -->
|
||||
<div class="no-permission" id="noPermission" style="display: none;">
|
||||
<svg class="icon" viewBox="0 0 24 24" style="width: 24px; height: 24px; margin-bottom: 10px;">
|
||||
<path d="M12,2C13.1,2 14,2.9 14,4C14,5.1 13.1,6 12,6C10.9,6 10,5.1 10,4C10,2.9 10.9,2 12,2M21,9V7L15,1H5C3.89,1 3,1.89 3,3V21A2,2 0 0,0 5,23H19A2,2 0 0,0 21,21V9M19,9H14V4H5V21H19V9Z"/>
|
||||
</svg>
|
||||
<h3>접근 권한 부족</h3>
|
||||
<p>Rate Limit 관리 기능은 권한 레벨 4 이상의 사용자만 사용할 수 있습니다.</p>
|
||||
</div>
|
||||
|
||||
<!-- 현재 상태 -->
|
||||
<div id="statusSection">
|
||||
<h2 style="margin-bottom: 20px; display: flex; align-items: center; gap: 8px;">
|
||||
<svg class="icon" viewBox="0 0 24 24">
|
||||
<path d="M12,2C13.1,2 14,2.9 14,4C14,5.1 13.1,6 12,6C10.9,6 10,5.1 10,4C10,2.9 10.9,2 12,2M21,9V7L15,1H5C3.89,1 3,1.89 3,3V21A2,2 0 0,0 5,23H19A2,2 0 0,0 21,21V9M19,9H14V4H5V21H19V9Z"/>
|
||||
</svg>
|
||||
현재 상태
|
||||
</h2>
|
||||
|
||||
<div class="status-grid">
|
||||
<div class="status-card">
|
||||
<div class="label">클라이언트 IP</div>
|
||||
<div class="value" id="clientIP">로딩 중...</div>
|
||||
</div>
|
||||
<div class="status-card">
|
||||
<div class="label">API 제한</div>
|
||||
<div class="value" id="apiLimit">로딩 중...</div>
|
||||
</div>
|
||||
<div class="status-card">
|
||||
<div class="label">로그인 제한</div>
|
||||
<div class="value" id="loginLimit">로딩 중...</div>
|
||||
</div>
|
||||
<div class="status-card">
|
||||
<div class="label">시간 윈도우</div>
|
||||
<div class="value">15분</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 컨트롤 버튼들 -->
|
||||
<div id="controlSection">
|
||||
<div class="buttons-grid">
|
||||
<button class="btn btn-blue" onclick="resetRateLimit()">
|
||||
<svg class="icon" viewBox="0 0 24 24">
|
||||
<path d="M12,2C13.1,2 14,2.9 14,4C14,5.1 13.1,6 12,6C10.9,6 10,5.1 10,4C10,2.9 10.9,2 12,2M21,9V7L15,1H5C3.89,1 3,1.89 3,3V21A2,2 0 0,0 5,23H19A2,2 0 0,0 21,21V9M19,9H14V4H5V21H19V9Z"/>
|
||||
</svg>
|
||||
내 IP 제한 초기화
|
||||
</button>
|
||||
|
||||
<button class="btn btn-green" onclick="bypassRateLimit(3600000)">
|
||||
<svg class="icon" viewBox="0 0 24 24">
|
||||
<path d="M12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22C6.47,22 2,17.5 2,12A10,10 0 0,1 12,2Z"/>
|
||||
</svg>
|
||||
1시간 제한 해제
|
||||
</button>
|
||||
|
||||
<button class="btn btn-orange" onclick="bypassRateLimit(86400000)">
|
||||
<svg class="icon" viewBox="0 0 24 24">
|
||||
<path d="M12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22C6.47,22 2,17.5 2,12A10,10 0 0,1 12,2Z"/>
|
||||
</svg>
|
||||
24시간 제한 해제
|
||||
</button>
|
||||
|
||||
<button class="btn btn-gray" onclick="checkStatus()">
|
||||
<svg class="icon" viewBox="0 0 24 24">
|
||||
<path d="M17.65,6.35C16.2,4.9 14.21,4 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20C15.73,20 18.84,17.45 19.73,14H17.65C16.83,16.33 14.61,18 12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6C13.66,6 15.14,6.69 16.22,7.78L13,11H20V4L17.65,6.35Z"/>
|
||||
</svg>
|
||||
상태 새로고침
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 메시지 표시 영역 -->
|
||||
<div id="messageArea"></div>
|
||||
|
||||
<!-- 도움말 -->
|
||||
<div class="help-section">
|
||||
<h3>💡 사용 가이드</h3>
|
||||
<ul>
|
||||
<li><strong>초기화</strong>: 현재 IP의 요청 카운터를 0으로 리셋</li>
|
||||
<li><strong>제한 해제</strong>: 지정된 시간 동안 Rate Limit 완전 비활성화</li>
|
||||
<li><strong>권한 요구사항</strong>: 레벨 4-5 사용자만 접근 가능</li>
|
||||
<li><strong>자동 해제</strong>: 임시 해제는 설정된 시간 후 자동으로 복구됨</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let userLevel = 0;
|
||||
let loading = false;
|
||||
|
||||
// 토큰 가져오기
|
||||
function getToken() {
|
||||
return localStorage.getItem('token') || sessionStorage.getItem('token');
|
||||
}
|
||||
|
||||
// 로딩 상태 설정
|
||||
function setLoading(isLoading) {
|
||||
loading = isLoading;
|
||||
const container = document.querySelector('.container');
|
||||
if (isLoading) {
|
||||
container.classList.add('loading');
|
||||
} else {
|
||||
container.classList.remove('loading');
|
||||
}
|
||||
}
|
||||
|
||||
// 메시지 표시
|
||||
function showMessage(message, type = 'info') {
|
||||
const messageArea = document.getElementById('messageArea');
|
||||
const messageDiv = document.createElement('div');
|
||||
messageDiv.className = `message ${type}`;
|
||||
messageDiv.textContent = message;
|
||||
|
||||
messageArea.innerHTML = '';
|
||||
messageArea.appendChild(messageDiv);
|
||||
|
||||
// 5초 후 자동 제거
|
||||
setTimeout(() => {
|
||||
if (messageDiv.parentNode) {
|
||||
messageDiv.parentNode.removeChild(messageDiv);
|
||||
}
|
||||
}, 5000);
|
||||
}
|
||||
|
||||
// 사용자 권한 확인
|
||||
async function checkUserPermission() {
|
||||
try {
|
||||
const token = getToken();
|
||||
if (!token) {
|
||||
showMessage('로그인이 필요합니다.', 'error');
|
||||
return false;
|
||||
}
|
||||
|
||||
const response = await fetch('/api/auth/me', {
|
||||
headers: {
|
||||
'Authorization': `Bearer ${token}`,
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
});
|
||||
|
||||
if (response.ok) {
|
||||
const userData = await response.json();
|
||||
userLevel = userData.access_level || 0;
|
||||
document.getElementById('userLevel').textContent = `권한 레벨: ${userLevel}`;
|
||||
|
||||
if (userLevel < 4) {
|
||||
document.getElementById('noPermission').style.display = 'block';
|
||||
document.getElementById('statusSection').style.display = 'none';
|
||||
document.getElementById('controlSection').style.display = 'none';
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
showMessage('사용자 정보 확인 실패', 'error');
|
||||
return false;
|
||||
}
|
||||
} catch (error) {
|
||||
showMessage('네트워크 오류: ' + error.message, 'error');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// 현재 상태 조회
|
||||
async function checkStatus() {
|
||||
if (loading || userLevel < 4) return;
|
||||
|
||||
setLoading(true);
|
||||
try {
|
||||
const token = getToken();
|
||||
const response = await fetch('/api/admin/rate-limit/status', {
|
||||
headers: {
|
||||
'Authorization': `Bearer ${token}`,
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
});
|
||||
|
||||
if (response.ok) {
|
||||
const data = await response.json();
|
||||
document.getElementById('clientIP').textContent = data.clientIP;
|
||||
document.getElementById('apiLimit').textContent = `${data.rateLimitInfo.apiLimit}회/15분`;
|
||||
document.getElementById('loginLimit').textContent = `${data.rateLimitInfo.loginLimit}회/15분`;
|
||||
} else {
|
||||
const errorData = await response.json();
|
||||
showMessage('상태 조회 실패: ' + (errorData.error || response.statusText), 'error');
|
||||
}
|
||||
} catch (error) {
|
||||
showMessage('네트워크 오류: ' + error.message, 'error');
|
||||
}
|
||||
setLoading(false);
|
||||
}
|
||||
|
||||
// Rate Limit 초기화
|
||||
async function resetRateLimit(targetIP = null) {
|
||||
if (loading || userLevel < 4) return;
|
||||
|
||||
setLoading(true);
|
||||
try {
|
||||
const token = getToken();
|
||||
const response = await fetch('/api/admin/rate-limit/reset', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Authorization': `Bearer ${token}`,
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify({ targetIP })
|
||||
});
|
||||
|
||||
const data = await response.json();
|
||||
if (response.ok) {
|
||||
showMessage('✅ ' + data.message, 'success');
|
||||
checkStatus(); // 상태 새로고침
|
||||
} else {
|
||||
showMessage('❌ ' + data.error, 'error');
|
||||
}
|
||||
} catch (error) {
|
||||
showMessage('❌ 초기화 실패: ' + error.message, 'error');
|
||||
}
|
||||
setLoading(false);
|
||||
}
|
||||
|
||||
// Rate Limit 임시 비활성화
|
||||
async function bypassRateLimit(duration = 3600000) {
|
||||
if (loading || userLevel < 4) return;
|
||||
|
||||
setLoading(true);
|
||||
try {
|
||||
const token = getToken();
|
||||
const response = await fetch('/api/admin/rate-limit/bypass', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Authorization': `Bearer ${token}`,
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify({ duration })
|
||||
});
|
||||
|
||||
const data = await response.json();
|
||||
if (response.ok) {
|
||||
const hours = duration / 3600000;
|
||||
showMessage(`🔓 ${hours}시간 동안 Rate Limit가 해제되었습니다.`, 'success');
|
||||
checkStatus();
|
||||
} else {
|
||||
showMessage('❌ ' + data.error, 'error');
|
||||
}
|
||||
} catch (error) {
|
||||
showMessage('❌ Bypass 설정 실패: ' + error.message, 'error');
|
||||
}
|
||||
setLoading(false);
|
||||
}
|
||||
|
||||
// 페이지 로드 시 초기화
|
||||
async function init() {
|
||||
const hasPermission = await checkUserPermission();
|
||||
if (hasPermission) {
|
||||
await checkStatus();
|
||||
}
|
||||
}
|
||||
|
||||
// 페이지 로드 시 실행
|
||||
document.addEventListener('DOMContentLoaded', init);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,87 +0,0 @@
|
||||
<!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/main-layout.css">
|
||||
<link rel="stylesheet" href="/css/admin.css">
|
||||
<link rel="stylesheet" href="/css/attendance.css" />
|
||||
<link rel="icon" type="image/png" href="/img/favicon.png">
|
||||
<script src="/js/auth-check.js" defer></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="main-layout">
|
||||
<div id="navbar-container"></div>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<div id="sidebar-container"></div>
|
||||
|
||||
<div id="content-container">
|
||||
<div class="page-header">
|
||||
<h1>📊 출근부 조회</h1>
|
||||
<p class="subtitle">월별 출근 현황 및 잔업 시간을 확인할 수 있습니다.</p>
|
||||
</div>
|
||||
|
||||
<div id="pdfContent">
|
||||
<!-- 조회 컨트롤 -->
|
||||
<div class="control-panel card">
|
||||
<div class="control-group">
|
||||
<label for="year">연도</label>
|
||||
<select id="year" class="form-control"></select>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label for="month">월</label>
|
||||
<select id="month" class="form-control"></select>
|
||||
</div>
|
||||
<div class="control-actions">
|
||||
<button id="loadAttendance" class="btn btn-primary">
|
||||
<span class="icon">📊</span> 조회하기
|
||||
</button>
|
||||
<button id="downloadPdf" class="btn btn-secondary">
|
||||
<span class="icon">📄</span> PDF 저장
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 출근부 테이블 -->
|
||||
<div class="table-container card">
|
||||
<div id="attendanceTableContainer">
|
||||
<div class="empty-state">
|
||||
<p>조회할 연도와 월을 선택하세요.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 범례 -->
|
||||
<div class="legend card">
|
||||
<h3>범례</h3>
|
||||
<div class="legend-items">
|
||||
<span class="legend-item">
|
||||
<span class="color-box overtime-cell"></span> 잔업
|
||||
</span>
|
||||
<span class="legend-item">
|
||||
<span class="color-box leave"></span> 연차/반차
|
||||
</span>
|
||||
<span class="legend-item">
|
||||
<span class="color-box paid-leave"></span> 유급
|
||||
</span>
|
||||
<span class="legend-item">
|
||||
<span class="color-box holiday"></span> 휴무
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="module" src="/js/load-navbar.js"></script>
|
||||
<script type="module" src="/js/load-sidebar.js"></script>
|
||||
<script type="module" src="/js/attendance.js"></script>
|
||||
|
||||
<!-- PDF 생성 라이브러리 -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/1.4.1/html2canvas.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,47 +0,0 @@
|
||||
<!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/main-layout.css">
|
||||
<link rel="stylesheet" href="/css/factory.css" />
|
||||
<link rel="icon" type="image/png" href="/img/favicon.png">
|
||||
<script src="/js/auth-check.js" defer></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="main-layout">
|
||||
<div id="navbar-container"></div>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<div id="sidebar-container"></div>
|
||||
|
||||
<div id="content-container">
|
||||
<div class="container">
|
||||
<h2>공장 정보 등록</h2>
|
||||
<form id="uploadForm" enctype="multipart/form-data">
|
||||
<label>공장명</label>
|
||||
<input type="text" name="factory_name" placeholder="예: 울산 제1공장" required>
|
||||
|
||||
<label>주소</label>
|
||||
<input type="text" name="address" placeholder="예: 울산광역시 남구 산업로 123" required>
|
||||
|
||||
<label>설명</label>
|
||||
<textarea name="description" placeholder="공장에 대한 간단한 설명을 입력하세요." required></textarea>
|
||||
|
||||
<label>공장 지도 이미지</label>
|
||||
<input type="file" name="map_image" accept="image/*" required>
|
||||
<div id="file-preview" style="margin: 10px 0; text-align: center;"></div>
|
||||
|
||||
<button type="submit">등록하기</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="module" src="/js/load-navbar.js"></script>
|
||||
<script type="module" src="/js/load-sidebar.js"></script>
|
||||
<script type="module" src="/js/factory-upload.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,59 +0,0 @@
|
||||
<!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/main-layout.css">
|
||||
<link rel="stylesheet" href="/css/factory.css" />
|
||||
<script src="/js/auth-check.js" defer></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="main-layout">
|
||||
<div id="navbar-container"></div>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<div id="sidebar-container"></div>
|
||||
|
||||
<div id="content-container">
|
||||
<div class="container">
|
||||
<!-- 로딩 상태 -->
|
||||
<div id="loading" class="loading">
|
||||
공장 정보를 불러오는 중...
|
||||
</div>
|
||||
|
||||
<!-- 실제 컨텐츠 (초기에는 숨김) -->
|
||||
<div id="content" style="display: none;">
|
||||
<h2 id="factoryName">공장 이름</h2>
|
||||
|
||||
<div class="info-section">
|
||||
<div class="info-label">📍 주소</div>
|
||||
<p id="factoryAddress" style="margin: 0;">주소</p>
|
||||
</div>
|
||||
|
||||
<img id="factoryImage" alt="공장 지도" style="max-width: 100%; margin: 20px 0;">
|
||||
|
||||
<div class="info-section">
|
||||
<div class="info-label">📝 설명</div>
|
||||
<p id="factoryDescription" style="margin: 0;">설명</p>
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 30px; text-align: center;">
|
||||
<button onclick="history.back()" style="padding: 10px 20px;">뒤로가기</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 에러 메시지 (필요시 표시) -->
|
||||
<div id="error" class="error-state" style="display: none;">
|
||||
공장 정보를 불러올 수 없습니다.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="module" src="/js/load-navbar.js"></script>
|
||||
<script type="module" src="/js/load-sidebar.js"></script>
|
||||
<script type="module" src="/js/factory-view.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -7,7 +7,7 @@
|
||||
<link rel="stylesheet" href="/css/main-layout.css">
|
||||
<link rel="stylesheet" href="/css/management-dashboard.css">
|
||||
<link rel="icon" type="image/png" href="/img/favicon.png">
|
||||
<script src="/js/auth-check.js" defer></script>
|
||||
<script type="module" src="/js/auth-check.js" defer></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="main-layout-with-navbar">
|
||||
|
||||
Reference in New Issue
Block a user