From 3fc63d0b3ebf4dcd14d229545bd63e5b1902266a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9C=A0=EB=B3=91=EC=B2=A0?= Date: Thu, 29 Jan 2026 22:56:01 +0900 Subject: [PATCH] =?UTF-8?q?feat(WEB):=20=EA=B3=B5=EC=A0=95=EA=B4=80?= =?UTF-8?q?=EB=A6=AC/=EC=9E=91=EC=97=85=EC=A7=80=EC=8B=9C/=EC=9E=91?= =?UTF-8?q?=EC=97=85=EC=9E=90=ED=99=94=EB=A9=B4=20=EA=B8=B0=EB=8A=A5=20?= =?UTF-8?q?=EA=B0=95=ED=99=94=20=EB=B0=8F=20=ED=85=9C=ED=94=8C=EB=A6=BF=20?= =?UTF-8?q?=EA=B0=9C=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 공정관리: ProcessDetail/ProcessForm/ProcessList 개선, StepDetail/StepForm 신규 추가 - 작업지시: WorkOrderDetail/Edit/List UI 개선, 작업지시서 문서 추가 - 작업자화면: WorkerScreen 대폭 개선, MaterialInputModal/WorkLogModal 수정, WorkItemCard 신규 - 영업주문: 주문 상세 페이지 개선 - 입고관리: 상세/actions 수정 - 템플릿: IntegratedDetailTemplate/IntegratedListTemplateV2/UniversalListPage 기능 확장 - UI: confirm-dialog 개선 Co-Authored-By: Claude Opus 4.5 --- .../[DESIGN-2026-01-29] worker-screen-spec.md | 288 +++++++ ...-2026-01-29] typecheck-errors-checklist.md | 147 ++++ .../[id]/steps/[stepId]/page.tsx | 22 + .../order-management-sales/[id]/page.tsx | 62 +- .../sales/order-management-sales/page.tsx | 2 +- .../ReceivingManagement/ReceivingDetail.tsx | 26 +- .../material/ReceivingManagement/actions.ts | 7 +- .../material/ReceivingManagement/types.ts | 1 + .../material/StockStatus/StockAuditModal.tsx | 15 +- src/components/orders/OrderRegistration.tsx | 2 +- .../orders/OrderSalesDetailEdit.tsx | 2 +- src/components/orders/actions.ts | 2 + .../orders/documents/SalesOrderDocument.tsx | 38 +- .../process-management/ProcessDetail.tsx | 478 ++++++----- .../process-management/ProcessForm.tsx | 761 ++++++++++-------- .../process-management/ProcessListClient.tsx | 154 +--- .../process-management/StepDetail.tsx | 139 ++++ .../process-management/StepDetailClient.tsx | 114 +++ .../process-management/StepForm.tsx | 332 ++++++++ src/components/process-management/actions.ts | 151 +++- src/components/process-management/index.ts | 5 +- .../WorkOrders/AssigneeSelectModal.tsx | 12 +- .../production/WorkOrders/WorkOrderDetail.tsx | 319 +++----- .../production/WorkOrders/WorkOrderEdit.tsx | 148 ++-- .../production/WorkOrders/WorkOrderList.tsx | 298 +++++-- .../production/WorkOrders/actions.ts | 8 + .../documents/BendingInspectionContent.tsx | 481 +++++++++++ .../documents/BendingWorkLogContent.tsx | 212 +++++ .../documents/InspectionReportModal.tsx | 156 ++++ .../documents/ScreenInspectionContent.tsx | 383 +++++++++ .../documents/ScreenWorkLogContent.tsx | 219 +++++ .../documents/SlatInspectionContent.tsx | 342 ++++++++ .../documents/SlatWorkLogContent.tsx | 197 +++++ .../production/WorkOrders/documents/index.ts | 12 + src/components/production/WorkOrders/types.ts | 25 +- .../WorkerScreen/MaterialInputModal.tsx | 264 +++--- .../production/WorkerScreen/WorkItemCard.tsx | 313 +++++++ .../production/WorkerScreen/WorkLogModal.tsx | 83 +- .../production/WorkerScreen/actions.ts | 11 +- .../production/WorkerScreen/index.tsx | 693 ++++++++++++---- .../production/WorkerScreen/types.ts | 136 +++- .../IntegratedDetailTemplate/FieldInput.tsx | 2 +- .../FieldRenderer.tsx | 2 +- .../IntegratedDetailTemplate/index.tsx | 5 +- .../IntegratedDetailTemplate/types.ts | 5 +- .../templates/IntegratedListTemplateV2.tsx | 29 +- .../templates/UniversalListPage/index.tsx | 7 +- .../templates/UniversalListPage/types.ts | 7 +- src/components/ui/confirm-dialog.tsx | 5 +- src/types/process.ts | 56 ++ 50 files changed, 5801 insertions(+), 1377 deletions(-) create mode 100644 claudedocs/[DESIGN-2026-01-29] worker-screen-spec.md create mode 100644 claudedocs/[FIX-2026-01-29] typecheck-errors-checklist.md create mode 100644 src/app/[locale]/(protected)/master-data/process-management/[id]/steps/[stepId]/page.tsx create mode 100644 src/components/process-management/StepDetail.tsx create mode 100644 src/components/process-management/StepDetailClient.tsx create mode 100644 src/components/process-management/StepForm.tsx create mode 100644 src/components/production/WorkOrders/documents/BendingInspectionContent.tsx create mode 100644 src/components/production/WorkOrders/documents/BendingWorkLogContent.tsx create mode 100644 src/components/production/WorkOrders/documents/InspectionReportModal.tsx create mode 100644 src/components/production/WorkOrders/documents/ScreenInspectionContent.tsx create mode 100644 src/components/production/WorkOrders/documents/ScreenWorkLogContent.tsx create mode 100644 src/components/production/WorkOrders/documents/SlatInspectionContent.tsx create mode 100644 src/components/production/WorkOrders/documents/SlatWorkLogContent.tsx create mode 100644 src/components/production/WorkOrders/documents/index.ts create mode 100644 src/components/production/WorkerScreen/WorkItemCard.tsx diff --git a/claudedocs/[DESIGN-2026-01-29] worker-screen-spec.md b/claudedocs/[DESIGN-2026-01-29] worker-screen-spec.md new file mode 100644 index 00000000..b6d9b28d --- /dev/null +++ b/claudedocs/[DESIGN-2026-01-29] worker-screen-spec.md @@ -0,0 +1,288 @@ +# 작업자 화면 기획서 정리 + +> 기획서 버전: D1.3 / Page 25~29 +> 화면명: 작업자 화면 (생산관리 > 작업자 화면) + +--- + +## 1. 화면 구조 개요 + +### 공정별 탭 구분 +| 탭 | 설명 | 디폴트 | +|----|------|--------| +| 스크린 공정 | 원단절단 기반 공정 | **기본 선택** | +| 슬랫 공정 | 코일/포밍 기반 공정 | | +| 절곡 공정 | 가이드레일/절곡 기반 공정 | | + +### 공통 레이아웃 (3개 공정 모두 동일) +``` +┌─────────────────────────────────────────┐ +│ 작업자 화면 │ +│ 작업을 관리합니다 │ +│ │ +│ [스크린 공정] [슬랫 공정] [절곡 공정] │ ← 탭 +│ │ +│ ┌─────┐ ┌─────┐ ┌─────┐ ┌─────┐ │ +│ │할일 │ │작업중│ │완료 │ │긴급 │ │ ← 상태 카드 +│ │ 10 │ │ 10 │ │ 10 │ │ 10 │ │ +│ └─────┘ └─────┘ └─────┘ └─────┘ │ +│ │ +│ ┌─ 수주 정보 ──────────────────────────┐ │ +│ │ (기획서 기준 정보) │ │ +│ └─────────────────────────────────────┘ │ +│ │ +│ ┌─ 작업 정보 ──────────────────────────┐ │ +│ │ 생산 담당자 셀렉트 | 생산일자 │ │ +│ └─────────────────────────────────────┘ │ +│ │ +│ ┌─ 작업 목록 ──────────────────────────┐ │ +│ │ (공정별 다름 - 아래 상세) │ │ +│ └─────────────────────────────────────┘ │ +│ │ +│ [작업일지 보기] [중간검사하기] │ ← 하단 버튼 +└─────────────────────────────────────────┘ +``` + +--- + +## 2. 상태 카드 영역 + +| 카드 | 값 | 설명 | +|------|-----|------| +| 할일 | 숫자 | 대기 중인 작업 수 | +| 작업중 | 숫자 | 진행 중인 작업 수 | +| 완료 | 숫자 | 완료된 작업 수 | +| 긴급 | 숫자 | 긴급 작업 수 | + +--- + +## 3. 수주 정보 섹션 + +| 행 | 컬럼1 | 컬럼2 | 컬럼3 | 컬럼4 | +|----|-------|-------|-------|-------| +| 1행 | 수주일 | 로트번호 | 현장명 | 수주처 | +| 2행 | 수주 담당자 | 담당자 연락처 | 출고예정일 | | + +- 모두 **읽기 전용** 필드 + +--- + +## 4. 작업 정보 섹션 + +| 필드 | 타입 | 설명 | +|------|------|------| +| 생산 담당자 | 셀렉트 | 담당부서 회원 사람 목록 / 디폴트: 선택 | +| 생산일자 | 날짜 | 작업 수행 날짜 | + +--- + +## 5. 작업 목록 - 스크린 공정 + +### 작업 아이템 카드 구조 +``` +┌─────────────────────────────────────────┐ +│ 1 KWWS03 (와이어) 1층 / FSS-01│ ← 번호, 품목코드(품목명), 층/부호 +│ │ +│ 제작 사이즈 8,260 X 8,350 mm 2개 │ ← 규격 + 수량 +│ │ +│ ┌─ 절단정보 ──────────────────────────┐ │ +│ │ 폭 1,210mm X 8 장 │ │ ← 절단 정보 +│ └─────────────────────────────────────┘ │ +│ │ +│ ┌──────────┐ ┌──────────┐ ┌────────┐ │ +│ │자재투입 완료│ │절단 완료│ │미싱 완료│ │ ← 공정 단계 pills +│ └──────────┘ └──────────┘ └────────┘ │ +│ ┌──────┐ │ +│ │포장완료│ │ +│ └──────┘ │ +│ │ +│ ▼ 자재 투입 목록 (접기/펼치기) │ ← 토글 영역 +│ ┌─────────────────────────────────────┐ │ +│ │ 로트번호 │ 품목명 │ 수량 │ 단위 │ 관리 │ │ ← 테이블 +│ │ 123123 │ 품목명 │ 500 │ m │ ✏🗑 │ │ +│ └─────────────────────────────────────┘ │ +└─────────────────────────────────────────┘ +``` + +### 스크린 공정 단계 +| 순서 | 단계명 | 동작 | +|------|--------|------| +| 1 | 자재투입 | 클릭 → 자재 투입 팝업 표시. 자재 목록에서 수량 입력 시 완료 처리 | +| 2 | 절단 | 클릭 → 완료/미완료 토글 (디폴트: 미완료) | +| 3 | 미싱 | 클릭 → 완료/미완료 토글 (디폴트: 미완료) | +| 4 | 포장완료 | 클릭 → 완료/미완료 토글 (디폴트: 미완료) | + +### 스크린 공정 스티커 표시 +- 완료된 단계: 검정 배경 + 녹색 "완료" 텍스트 +- 미완료 단계: 검정 배경만 (완료 텍스트 없음) + +### 진척률 프로그래스 바 +- 표시 방식: 현재 완료된 단계 수 / 전체 단계 수 +- 위치: 작업 아이템 상단 (파란색 바) + +### 자재 투입 목록 영역 +| 항목 | 설명 | +|------|------| +| 기본 상태 | **닫힘** | +| 클릭 동작 | 목록 열기/닫기 토글 | +| 테이블 컬럼 | 로트번호, 품목명, 수량, 단위, 관리(수정/삭제) | + +--- + +## 6. 작업 목록 - 슬랫 공정 + +### 작업 아이템 카드 구조 +``` +┌─────────────────────────────────────────┐ +│ 1 KQTS01 (슬랫코일) 1층 / FSS-01│ +│ │ +│ 제작 사이즈 8,260 X 8,350 mm 2개 │ +│ │ +│ ┌────────────┐ ┌───────────┐ ┌────────┐│ +│ │길이 3,910mm │ │슬랫 매수 40장│ │조인트바 4개││ ← 슬랫 전용 필드 +│ └────────────┘ └───────────┘ └────────┘│ +│ │ +│ ┌──────────┐ ┌───────────┐ ┌──────┐ │ +│ │자재투입 완료│ │포밍/절단 완료│ │포장완료│ │ ← 슬랫 공정 단계 +│ └──────────┘ └───────────┘ └──────┘ │ +│ │ +│ ▼ 자재 투입 목록 │ +└─────────────────────────────────────────┘ +``` + +### 슬랫 전용 필드 (스크린과 차이) +| 필드 | 설명 | +|------|------| +| 길이 | 슬랫 길이 (mm) | +| 슬랫 매수 | 슬랫 장 수 | +| 조인트바 | 조인트바 개수 | + +### 슬랫 공정 단계 +| 순서 | 단계명 | 동작 | +|------|--------|------| +| 1 | 자재투입 | 클릭 → 자재 투입 팝업 | +| 2 | 포밍/절단 | 클릭 → 완료/미완료 토글 | +| 3 | 포장완료 | 클릭 → 완료/미완료 토글 | + +--- + +## 7. 작업 목록 - 절곡 공정 + +### 작업 아이템 카드 구조 +``` +┌─────────────────────────────────────────┐ +│ 1 KWWS03 (가이드레일) 1층 / FSS-01│ +│ │ +│ ┌──────────┐ ┌─ 공통사항 ─────────────┐ │ +│ │ │ │ 종류 벽면형 120X70 │ │ +│ │ 도면 │ │ 유형 벽면형 │ │ ← 도면 + 공통사항 +│ │ (IMG) │ │ 길이별 수량 4,000mm X 6개│ │ +│ │ │ │ 길이별 수량 3,000mm X 6개│ │ +│ └──────────┘ └────────────────────────┘ │ +│ │ +│ 세부부품 (2개) │ +│ ┌─────────────────────────────────────┐ │ +│ │ 엘바 EGI 1.6T │ │ +│ │ 바아시 정보 16 I 75 │ │ ← 세부부품 카드 +│ ├─────────────────────────────────────┤ │ +│ │ 하장바 EGI 1.6T │ │ +│ │ 바아시 정보 16|75|16|75|16(A각)|... │ │ +│ └─────────────────────────────────────┘ │ +│ │ +│ ┌──────┐ ┌────────┐ ┌────────┐ ┌──────────┐│ +│ │자재투입│ │절단 완료│ │절곡 완료│ │포장완료 완료││← 절곡 공정 단계 +│ └──────┘ └────────┘ └────────┘ └──────────┘│ +└─────────────────────────────────────────┘ +``` + +### 절곡 전용 필드 (스크린/슬랫과 차이) +| 영역 | 필드 | 설명 | +|------|------|------| +| 도면 | IMG | 도면 이미지 표시 영역 | +| 공통사항 | 종류 | 벽면형, 천정형 등 | +| 공통사항 | 유형 | 벽면형 등 | +| 공통사항 | 길이별 수량 | 복수 행 (길이 X 수량) | +| 세부부품 | 부품명 | 엘바, 하장바 등 | +| 세부부품 | 재질 | EGI 1.6T 등 | +| 세부부품 | 바아시 정보 | 바아시 치수 정보 | + +### 절곡 공정 단계 +| 순서 | 단계명 | 동작 | +|------|--------|------| +| 1 | 자재투입 | 클릭 → 자재 투입 팝업 | +| 2 | 절단 | 클릭 → 완료/미완료 토글 | +| 3 | 절곡 | 클릭 → 완료/미완료 토글 | +| 4 | 포장완료 | 클릭 → 완료/미완료 토글 | + +--- + +## 8. 자재 투입 모달 + +### 모달 구조 +``` +┌─────── 자재 투입 ────────── X ──┐ +│ │ +│ 로트번호 │ 품목명 │ 수량 │ 단위 │ 투입 수량 │ +│─────────┼──────┼─────┼─────┼─────────│ +│ 123123 │ 품목명│ 500 │ m │ [ ] │ ← 투입 수량 입력 +│ 123123 │ 품목명│ 500 │ m │ [ ] │ +│ ... │ │ │ │ │ +│ │ +│ [취소] [투입] │ +└─────────────────────────────────┘ +``` + +### 모달 상세 +| 항목 | 설명 | +|------|------| +| 제목 | 자재 투입 | +| 닫기 | X 버튼 (우측 상단) | +| 테이블 컬럼 | 로트번호, 품목명, 수량, 단위, **투입 수량** | +| 투입 수량 | **숫자만 입력 가능** | +| 하단 버튼 | 취소 / 투입 | +| 데이터 | 해당 작업의 자재 목록 표시 | + +--- + +## 9. 하단 버튼 + +| 버튼 | 동작 | +|------|------| +| 작업일지 보기 | 작업일지 모달 표시 | +| 중간검사하기 | 문서 상세 중간시험성적서 팝업 표시 | + +--- + +## 10. 공정별 차이 요약 + +| 항목 | 스크린 공정 | 슬랫 공정 | 절곡 공정 | +|------|-----------|----------|----------| +| 품목 헤더 | 코드(품목명) + 층/부호 | 코드(품목명) + 층/부호 | 코드(품목명) + 층/부호 | +| 기본 정보 | 제작 사이즈 + 절단정보 | 제작 사이즈 + 길이/매수/조인트바 | 도면 + 공통사항 + 세부부품 | +| 공정 단계 | 자재투입→절단→미싱→포장완료 | 자재투입→포밍/절단→포장완료 | 자재투입→절단→절곡→포장완료 | +| 자재투입 목록 | 있음 (토글) | 있음 (토글) | 없음 (기획서 미표시) | +| 하단 버튼 | 작업일지 보기 + 중간검사하기 | 작업일지 보기 + 중간검사하기 | 작업일지 보기 + 중간검사하기 | + +--- + +## 11. Description 영역 정리 (구현 참고용, UI 미표시) + +### Page 25 Description +1. **작업자 탭**: 종류 - 스크린 공정, 슬랫 공정, 절곡 공정 / 디폴트: 스크린 공정 +2. **생산 담당자 셀렉트 박스**: 종류 - 담당부서 회원 사람 목록 / 디폴트: 선택 + +### Page 26 Description +1. **진척률 프로그래스 바 표시**: 현재 완료된 단계 수 / 전체 단계 수 +2. **자재투입 단계 버튼**: 항목 - 단계명, 완료 스티커 / 클릭 - 자재 투입 팝업 표시 / 자재 목록에서 수량 입력 시 완료 처리 +3. **단계 버튼**: 항목 - 단계명, 완료 스티커 / 클릭 - 완료/미완료 토글 / 디폴트: 미완료 상태 +4. **자재 투입 목록 영역**: 클릭 - 목록 열기/닫기 토글 / 디폴트: 닫힘 상태 +5. **중간검사하기 버튼**: 클릭 - 문서 상세 중간시험성적서 팝업 표시 + +### Page 27 (슬랫) Description +1. **슬랫 공정 단계 버튼 영역** + +### Page 28 (절곡) Description +1. **절곡 공정 단계 버튼 영역** + +### Page 29 (자재 투입 팝업) Description +1. **투입 수량 인풋박스**: 숫자만 입력 가능 diff --git a/claudedocs/[FIX-2026-01-29] typecheck-errors-checklist.md b/claudedocs/[FIX-2026-01-29] typecheck-errors-checklist.md new file mode 100644 index 00000000..d2f95511 --- /dev/null +++ b/claudedocs/[FIX-2026-01-29] typecheck-errors-checklist.md @@ -0,0 +1,147 @@ +# TypeScript 타입에러 전체 수정 체크리스트 + +- **날짜**: 2026-01-29 +- **총 에러**: 408개 / 155파일 +- **목표**: 전체 `tsc --noEmit` 에러 0 + +--- + +## Phase 1: 공통 템플릿 (연쇄 에러 감소 기대) + +- [x] `components/templates/UniversalListPage` (6 errors) ✅ +- [x] `components/templates/IntegratedDetailTemplate` (5 errors) ✅ +- [x] `components/templates` (기타 2 errors) ✅ +> Phase 1 완료: 408 → 364 (44개 감소, 연쇄 해소 포함) + +## Phase 2: 페이지 (app/[locale]) — 80 errors + +- [ ] `app/[locale]` 페이지 타입 에러 수정 (80 errors) + +## Phase 3: 재고/자재 — 36 errors + +- [ ] `components/material/StockStatus` (31 errors) +- [ ] `components/material/ReceivingManagement` (5 errors) + +## Phase 4: 생산 — 30 errors + +- [ ] `components/production/WorkOrders` (18 errors) +- [ ] `components/production/WorkerScreen` (6 errors) +- [ ] `components/production/WorkResults` (6 errors) + +## Phase 5: 주문/출고 — 36 errors + +- [ ] `components/outbound/ShipmentManagement` (18 errors) +- [ ] `components/orders` (18 errors) +- [ ] `components/orders/documents` (4 errors) + +## Phase 6: 견적/단가 — 18 errors + +- [ ] `components/quotes` (16 errors) +- [ ] `components/pricing` (2 errors) + +## Phase 7: 건설 — 50 errors + +- [ ] `components/business/construction/item-management` (8 errors) +- [ ] `components/business/construction/order-management` (7 errors) +- [ ] `components/business/construction/structure-review` (5 errors) +- [ ] `components/business/construction/site-management` (5 errors) +- [ ] `components/business/construction/estimates` (4 errors) +- [ ] `components/business/construction/estimates/sections` (3 errors) +- [ ] `components/business/construction/pricing-management` (3 errors) +- [ ] `components/business/construction/handover-report` (3 errors) +- [ ] `components/business/construction/worker-status` (2 errors) +- [ ] `components/business/construction/management` (2 errors) +- [ ] `components/business/construction/contract` (2 errors) +- [ ] `components/business/construction/utility-management` (1 error) +- [ ] `components/business/construction/site-briefings` (1 error) +- [ ] `components/business/construction/progress-billing` (1 error) +- [ ] `components/business/construction/order-management/dialogs` (1 error) +- [ ] `components/business/construction/category-management` (1 error) +- [ ] `components/business/construction/bidding` (1 error) + +## Phase 8: HR — 24 errors + +- [ ] `components/hr/CardManagement/_legacy` (13 errors) +- [ ] `components/hr/CardManagement` (3 errors) +- [ ] `components/hr/VacationManagement` (2 errors) +- [ ] `components/hr/EmployeeManagement` (2 errors) +- [ ] `components/hr/SalaryManagement` (1 error) +- [ ] `components/attendance` (2 errors) + +## Phase 9: 설정 — 26 errors + +- [ ] `components/settings/PermissionManagement` (10 errors) +- [ ] `components/settings/AccountManagement/_legacy` (6 errors) +- [ ] `components/settings/PopupManagement` (4 errors) +- [ ] `components/settings/SubscriptionManagement` (3 errors) +- [ ] `components/settings/AccountManagement` (2 errors) +- [ ] `components/settings/NotificationSettings` (2 errors) +- [ ] `components/settings/CompanyInfoManagement` (2 errors) +- [ ] `components/settings/TitleManagement` (1 error) +- [ ] `components/settings/RankManagement` (1 error) + +## Phase 10: 게시판 — 15 errors + +- [ ] `components/board/BoardManagement` (9 errors) +- [ ] `components/board/BoardList` (3 errors) +- [ ] `components/board/CommentSection` (1 error) +- [ ] `components/board/BoardForm` (1 error) +- [ ] `components/board/BoardDetail` (1 error) + +## Phase 11: 회계 — 17 errors + +- [ ] `components/accounting/VendorManagement` (4 errors) +- [ ] `components/accounting/BadDebtCollection` (4 errors) +- [ ] `components/accounting/CardTransactionInquiry` (3 errors) +- [ ] `components/accounting/WithdrawalManagement` (2 errors) +- [ ] `components/accounting/DepositManagement` (2 errors) +- [ ] `components/accounting/BillManagement` (2 errors) +- [ ] `components/accounting/VendorLedger` (1 error) +- [ ] `components/accounting/SalesManagement` (1 error) +- [ ] `components/accounting/PurchaseManagement` (1 error) +- [ ] `components/accounting/ExpectedExpenseManagement` (1 error) + +## Phase 12: 기타 모듈 — ~30 errors + +- [ ] `components/business/CEODashboard` (3 errors) +- [ ] `components/business` (기타 2 errors) +- [ ] `components/clients` (4 errors) +- [ ] `components/customer-center/InquiryManagement` (5 errors) +- [ ] `components/customer-center/NoticeManagement` (1 error) +- [ ] `components/customer-center/EventManagement` (1 error) +- [ ] `components/vehicle-management` (8 errors) +- [ ] `components/items` (5 errors) +- [ ] `components/approval` (3 errors) +- [ ] `components/dev/generators` (5 errors) +- [ ] `components/quality/InspectionManagement` (1 error) +- [ ] `components/process-management` (1 error) +- [ ] `components/ui` (1 error) + +## Phase 13: 유틸/훅/API — 8 errors + +- [ ] `hooks` (3 errors) +- [ ] `contexts` (2 errors) +- [ ] `lib/api/dashboard` (2 errors) +- [ ] `lib/api` (1 error) +- [ ] `lib/utils` (1 error) +- [ ] `app/api/pdf/generate` (1 error) + +--- + +## 진행 현황 + +| Phase | 대상 | 에러 수 | 상태 | +|-------|------|---------|------| +| 1 | 공통 템플릿 | 13 | ⏳ | +| 2 | 페이지 | 80 | ⏳ | +| 3 | 재고/자재 | 36 | ⏳ | +| 4 | 생산 | 30 | ⏳ | +| 5 | 주문/출고 | 36 | ⏳ | +| 6 | 견적/단가 | 18 | ⏳ | +| 7 | 건설 | 50 | ⏳ | +| 8 | HR | 24 | ⏳ | +| 9 | 설정 | 26 | ⏳ | +| 10 | 게시판 | 15 | ⏳ | +| 11 | 회계 | 17 | ⏳ | +| 12 | 기타 모듈 | ~30 | ⏳ | +| 13 | 유틸/훅/API | 8 | ⏳ | diff --git a/src/app/[locale]/(protected)/master-data/process-management/[id]/steps/[stepId]/page.tsx b/src/app/[locale]/(protected)/master-data/process-management/[id]/steps/[stepId]/page.tsx new file mode 100644 index 00000000..53c22c18 --- /dev/null +++ b/src/app/[locale]/(protected)/master-data/process-management/[id]/steps/[stepId]/page.tsx @@ -0,0 +1,22 @@ +'use client'; + +/** + * 공정 단계 상세/수정/등록 페이지 + * + * - /[id]/steps/[stepId] → 상세 보기 + * - /[id]/steps/[stepId]?mode=edit → 수정 + * - /[id]/steps/new → 등록 + */ + +import { use } from 'react'; +import { StepDetailClient } from '@/components/process-management/StepDetailClient'; + +export default function StepDetailPage({ + params, +}: { + params: Promise<{ id: string; stepId: string }>; +}) { + const { id, stepId } = use(params); + + return ; +} diff --git a/src/app/[locale]/(protected)/sales/order-management-sales/[id]/page.tsx b/src/app/[locale]/(protected)/sales/order-management-sales/[id]/page.tsx index 1f3558da..c9ebc22b 100644 --- a/src/app/[locale]/(protected)/sales/order-management-sales/[id]/page.tsx +++ b/src/app/[locale]/(protected)/sales/order-management-sales/[id]/page.tsx @@ -73,6 +73,7 @@ import { } from "@/components/orders"; import { sendSalesOrderNotification } from "@/lib/actions/fcm"; import { OrderSalesDetailEdit } from "@/components/orders/OrderSalesDetailEdit"; +import { getDepartmentTree, type DepartmentRecord } from "@/components/hr/DepartmentManagement/actions"; /** * 수량 포맷 함수 @@ -156,6 +157,8 @@ export default function OrderDetailPage() { const [isProductionDialogOpen, setIsProductionDialogOpen] = useState(false); const [isCreatingProduction, setIsCreatingProduction] = useState(false); const [productionPriority, setProductionPriority] = useState<"normal" | "high" | "urgent">("normal"); + const [productionDepartmentId, setProductionDepartmentId] = useState(""); + const [departments, setDepartments] = useState([]); const [productionMemo, setProductionMemo] = useState(""); // 생산지시 완료 알림 모달 상태 const [isProductionSuccessDialogOpen, setIsProductionSuccessDialogOpen] = useState(false); @@ -203,11 +206,45 @@ export default function OrderDetailPage() { router.push(`/sales/order-management-sales/${orderId}?mode=edit`); }; - const handleProductionOrder = () => { + // 부서 트리를 평탄화 + const flattenDepartments = (depts: DepartmentRecord[]): DepartmentRecord[] => { + const result: DepartmentRecord[] = []; + const traverse = (list: DepartmentRecord[]) => { + for (const dept of list) { + result.push(dept); + if (dept.children?.length) traverse(dept.children); + } + }; + traverse(depts); + return result; + }; + + const handleProductionOrder = async () => { // 생산지시 생성 모달 열기 setProductionPriority("normal"); setProductionMemo(""); + setProductionDepartmentId(""); setIsProductionDialogOpen(true); + + // 부서 목록 로드 + if (departments.length === 0) { + const result = await getDepartmentTree(); + if (result.success && result.data) { + const flatList = flattenDepartments(result.data); + setDepartments(flatList); + // 디폴트: 생산부서 + const defaultDept = flatList.find(d => d.name.includes("생산")); + if (defaultDept) { + setProductionDepartmentId(String(defaultDept.id)); + } + } + } else { + // 이미 로드된 경우 디폴트 설정 + const defaultDept = departments.find(d => d.name.includes("생산")); + if (defaultDept) { + setProductionDepartmentId(String(defaultDept.id)); + } + } }; // 생산지시 확정 처리 @@ -217,6 +254,7 @@ export default function OrderDetailPage() { try { const result = await createProductionOrder(order.id, { priority: productionPriority, + departmentId: productionDepartmentId ? Number(productionDepartmentId) : undefined, memo: productionMemo || undefined, }); if (result.success && result.data) { @@ -470,7 +508,7 @@ export default function OrderDetailPage() {
- + @@ -1255,6 +1293,26 @@ export default function OrderDetailPage() {
+ {/* 부서 */} +
+ + +
+ {/* 비고 */}
diff --git a/src/app/[locale]/(protected)/sales/order-management-sales/page.tsx b/src/app/[locale]/(protected)/sales/order-management-sales/page.tsx index bd80be06..84ac6cfa 100644 --- a/src/app/[locale]/(protected)/sales/order-management-sales/page.tsx +++ b/src/app/[locale]/(protected)/sales/order-management-sales/page.tsx @@ -478,7 +478,7 @@ function OrderListContent() { { key: "lotNumber", label: "로트번호", className: "px-2" }, { key: "siteName", label: "현장명", className: "px-2" }, { key: "expectedShipDate", label: "출고예정일", className: "px-2" }, - { key: "orderDate", label: "접수일", className: "px-2" }, + { key: "orderDate", label: "수주일", className: "px-2" }, { key: "client", label: "수주처", className: "px-2" }, { key: "productName", label: "제품명", className: "px-2" }, { key: "receiver", label: "수신자", className: "px-2" }, diff --git a/src/components/material/ReceivingManagement/ReceivingDetail.tsx b/src/components/material/ReceivingManagement/ReceivingDetail.tsx index f681583b..6740dafe 100644 --- a/src/components/material/ReceivingManagement/ReceivingDetail.tsx +++ b/src/components/material/ReceivingManagement/ReceivingDetail.tsx @@ -24,7 +24,7 @@ import { Button } from '@/components/ui/button'; import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; -import { SupplierSearchModal } from './SupplierSearchModal'; +// import { SupplierSearchModal } from './SupplierSearchModal'; import { Select, SelectContent, @@ -62,6 +62,7 @@ const INITIAL_FORM_DATA: Partial = { specification: '', unit: 'EA', supplier: '', + manufacturer: '', receivingQty: undefined, receivingDate: '', createdBy: '', @@ -167,6 +168,7 @@ export function ReceivingDetail({ id, mode = 'view' }: Props) { specification: result.data.specification || '', unit: result.data.unit || 'EA', supplier: result.data.supplier, + manufacturer: result.data.manufacturer || '', receivingQty: result.data.receivingQty, receivingDate: result.data.receivingDate || '', createdBy: result.data.createdBy || '', @@ -274,13 +276,14 @@ export function ReceivingDetail({ id, mode = 'view' }: Props) { 기본 정보 -
+
{renderReadOnlyField('로트번호', detail.lotNo)} {renderReadOnlyField('품목코드', detail.itemCode)} {renderReadOnlyField('품목명', detail.itemName)} {renderReadOnlyField('규격', detail.specification)} {renderReadOnlyField('단위', detail.unit)} {renderReadOnlyField('발주처', detail.supplier)} + {renderReadOnlyField('제조사', detail.manufacturer)} {renderReadOnlyField('입고수량', detail.receivingQty)} {renderReadOnlyField('입고일', detail.receivingDate)} {renderReadOnlyField('작성자', detail.createdBy)} @@ -334,7 +337,7 @@ export function ReceivingDetail({ id, mode = 'view' }: Props) { 기본 정보 -
+
{/* 로트번호 - 읽기전용 */} {renderReadOnlyField('로트번호', formData.lotNo, true)} @@ -397,6 +400,20 @@ export function ReceivingDetail({ id, mode = 'view' }: Props) {
+ {/* 제조사 - 수정가능 */} +
+ + handleInputChange('manufacturer', e.target.value)} + className="mt-1.5" + placeholder="제조사 입력" + /> +
+ {/* 입고수량 - 수정가능 */}