feat: 작업 관리 페이지에 공정 관리 기능 추가
## 추가 기능 - 공정 추가/수정/삭제 기능 구현 - 공정 관리 모달 UI 추가 - 공정 탭에 편집 버튼 추가 (✏️) ## UI 변경 - 상단에 "공정 추가" 버튼 추가 - 공정 모달: 공정명, 카테고리, 설명 입력 필드 - 각 공정 탭에 편집 아이콘 표시 ## JavaScript 함수 - openWorkTypeModal(): 공정 추가 모달 열기 - editWorkType(workTypeId): 공정 수정 모달 열기 - saveWorkType(): 공정 저장 (POST/PUT) - deleteWorkType(): 공정 삭제 (연결된 작업 확인) - closeWorkTypeModal(): 모달 닫기 ## 검증 로직 - 연결된 작업이 있는 공정은 삭제 불가 - 필수 필드(공정명) 검증 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -77,6 +77,10 @@
|
||||
</div>
|
||||
|
||||
<div class="page-actions">
|
||||
<button class="btn btn-primary" onclick="openWorkTypeModal()">
|
||||
<span class="btn-icon">🔧</span>
|
||||
공정 추가
|
||||
</button>
|
||||
<button class="btn btn-primary" onclick="openTaskModal()">
|
||||
<span class="btn-icon">➕</span>
|
||||
작업 추가
|
||||
@@ -176,6 +180,48 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 공정 추가/수정 모달 -->
|
||||
<div id="workTypeModal" class="modal-overlay" style="display: none;">
|
||||
<div class="modal-container">
|
||||
<div class="modal-header">
|
||||
<h2 id="workTypeModalTitle">공정 추가</h2>
|
||||
<button class="modal-close-btn" onclick="closeWorkTypeModal()">×</button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<form id="workTypeForm" onsubmit="event.preventDefault(); saveWorkType();">
|
||||
<input type="hidden" id="workTypeId">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="form-label">공정명 *</label>
|
||||
<input type="text" id="workTypeName" class="form-control" placeholder="예: Base(구조물), Vessel(용기)" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="form-label">카테고리</label>
|
||||
<input type="text" id="workTypeCategory" class="form-control" placeholder="예: 제작, 조립">
|
||||
<small class="form-help">공정을 그룹화할 카테고리 (선택사항)</small>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="form-label">설명</label>
|
||||
<textarea id="workTypeDescription" class="form-control" rows="3" placeholder="공정에 대한 설명"></textarea>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" onclick="closeWorkTypeModal()">취소</button>
|
||||
<button type="button" class="btn btn-danger" id="deleteWorkTypeBtn" onclick="deleteWorkType()" style="display: none;">
|
||||
🗑️ 삭제
|
||||
</button>
|
||||
<button type="button" class="btn btn-primary" onclick="saveWorkType()">
|
||||
💾 저장
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="module" src="/js/load-navbar.js?v=5"></script>
|
||||
|
||||
Reference in New Issue
Block a user