# 템플릿 마이그레이션 현황

> 작성일: 2025-01-20
> 목적: IntegratedListTemplate / IntegratedDetailTemplate 적용 현황 파악

---

## 📊 전체 통계

| 구분 | 수량 |
|------|------|
| 전체 Protected 페이지 | 203개 |
| IntegratedListTemplate 사용 | 48개 |
| IntegratedDetailTemplate 사용 | 57개 |

---

## ✅ 마이그레이션 완료

### 리스트 페이지 (IntegratedListTemplateV2)
대부분의 리스트 페이지가 IntegratedListTemplateV2로 마이그레이션 완료.
- 필터, 테이블, 페이지네이션, 헤더 버튼 공통화 적용

### 상세/수정/등록 페이지 (IntegratedDetailTemplate)

#### App 페이지 (17개)
```
src/app/[locale]/(protected)/settings/popup-management/new/page.tsx
src/app/[locale]/(protected)/settings/popup-management/[id]/page.tsx
src/app/[locale]/(protected)/settings/accounts/new/page.tsx
src/app/[locale]/(protected)/settings/accounts/[id]/page.tsx
src/app/[locale]/(protected)/sales/client-management-sales-admin/new/page.tsx
src/app/[locale]/(protected)/sales/client-management-sales-admin/[id]/page.tsx
src/app/[locale]/(protected)/sales/quote-management/test/[id]/page.tsx
src/app/[locale]/(protected)/sales/order-management-sales/[id]/edit/page.tsx
src/app/[locale]/(protected)/sales/order-management-sales/[id]/page.tsx
src/app/[locale]/(protected)/board/board-management/new/page.tsx
src/app/[locale]/(protected)/board/board-management/[id]/page.tsx
src/app/[locale]/(protected)/master-data/process-management/new/page.tsx
src/app/[locale]/(protected)/master-data/process-management/[id]/page.tsx
src/app/[locale]/(protected)/hr/card-management/new/page.tsx
src/app/[locale]/(protected)/hr/card-management/[id]/edit/page.tsx
src/app/[locale]/(protected)/hr/card-management/[id]/page.tsx
src/app/[locale]/(protected)/construction/order/base-info/labor/[id]/page.tsx
```

#### 컴포넌트 (주요 40개)
```
# 회계
src/components/accounting/BillManagement/BillDetail.tsx
src/components/accounting/SalesManagement/SalesDetail.tsx
src/components/accounting/PurchaseManagement/PurchaseDetail.tsx
src/components/accounting/VendorLedger/VendorLedgerDetail.tsx
src/components/accounting/VendorManagement/VendorDetail.tsx
src/components/accounting/BadDebtCollection/BadDebtDetail.tsx
src/components/accounting/WithdrawalManagement/WithdrawalDetailClientV2.tsx
src/components/accounting/DepositManagement/DepositDetailClientV2.tsx

# 영업/고객
src/components/clients/ClientDetailClientV2.tsx
src/components/quotes/QuoteRegistrationV2.tsx
src/components/orders/OrderSalesDetailView.tsx
src/components/orders/OrderSalesDetailEdit.tsx

# 설정
src/components/settings/PopupManagement/PopupDetailClientV2.tsx
src/components/settings/PermissionManagement/PermissionDetail.tsx

# 건설/프로젝트
src/components/business/construction/contract/ContractDetailForm.tsx
src/components/business/construction/site-briefings/SiteBriefingForm.tsx
src/components/business/construction/order-management/OrderDetailForm.tsx
src/components/business/construction/handover-report/HandoverReportDetailForm.tsx
src/components/business/construction/item-management/ItemDetailClient.tsx
src/components/business/construction/estimates/EstimateDetailForm.tsx
src/components/business/construction/management/ConstructionDetailClient.tsx
src/components/business/construction/site-management/SiteDetailForm.tsx
src/components/business/construction/partners/PartnerForm.tsx
src/components/business/construction/structure-review/StructureReviewDetailForm.tsx
src/components/business/construction/issue-management/IssueDetailForm.tsx
src/components/business/construction/bidding/BiddingDetailForm.tsx
src/components/business/construction/pricing-management/PricingDetailClientV2.tsx
src/components/business/construction/labor-management/LaborDetailClientV2.tsx
src/components/business/construction/progress-billing/ProgressBillingDetailForm.tsx

# 고객센터
src/components/customer-center/NoticeManagement/NoticeDetail.tsx
src/components/customer-center/InquiryManagement/InquiryDetail.tsx
src/components/customer-center/EventManagement/EventDetail.tsx

# HR
src/components/hr/EmployeeManagement/EmployeeDetail.tsx

# 생산/물류
src/components/production/WorkOrders/WorkOrderDetail.tsx
src/components/outbound/ShipmentManagement/ShipmentDetail.tsx
src/components/material/ReceivingManagement/ReceivingDetail.tsx
src/components/material/StockStatus/StockStatusDetail.tsx

# 품질
src/components/quality/InspectionManagement/InspectionDetail.tsx
```

---

## ❌ 마이그레이션 미완료

### App 페이지 (PageLayout 직접 사용)

| 경로 | 유형 | 비고 |
|------|------|------|
| `sales/order-management-sales/production-orders/[id]/page.tsx` | 상세 | 생산지시 상세 |
| `sales/order-management-sales/[id]/production-order/page.tsx` | 상세 | 생산지시 |
| `boards/[boardCode]/create/page.tsx` | 등록 | 게시판 글쓰기 |
| `boards/[boardCode]/[postId]/edit/page.tsx` | 수정 | 게시판 글수정 |
| `boards/[boardCode]/[postId]/page.tsx` | 상세 | 게시판 글상세 |
| `test/popup/page.tsx` | 테스트 | 테스트 페이지 |
| `dev/editable-table/page.tsx` | 개발 | 개발용 페이지 |

### 컴포넌트 (PageLayout 직접 사용)

#### 회계
```
src/components/accounting/DailyReport/index.tsx          # 일일보고서 (특수 레이아웃)
src/components/accounting/ReceivablesStatus/index.tsx    # 미수금현황 (특수 레이아웃)
src/components/accounting/WithdrawalManagement/WithdrawalDetail.tsx  # V2로 대체됨
src/components/accounting/DepositManagement/DepositDetail.tsx        # V2로 대체됨
```

#### 설정
```
src/components/settings/CompanyInfoManagement/index.tsx      # 회사정보 (설정 페이지)
src/components/settings/RankManagement/index.tsx             # 직급관리 (설정 페이지)
src/components/settings/LeavePolicyManagement/index.tsx      # 휴가정책 (설정 페이지)
src/components/settings/AccountInfoManagement/index.tsx      # 계정정보 (설정 페이지)
src/components/settings/NotificationSettings/index.tsx       # 알림설정 (설정 페이지)
src/components/settings/TitleManagement/index.tsx            # 직책관리 (설정 페이지)
src/components/settings/WorkScheduleManagement/index.tsx     # 근무일정 (설정 페이지)
src/components/settings/AttendanceSettingsManagement/index.tsx # 근태설정 (설정 페이지)
src/components/settings/PopupManagement/PopupForm.tsx        # V2로 대체됨
src/components/settings/PopupManagement/PopupDetail.tsx      # V2로 대체됨
src/components/settings/AccountManagement/AccountDetail.tsx  # V2로 대체됨
src/components/settings/PermissionManagement/PermissionDetailClient.tsx # 레거시
src/components/settings/SubscriptionManagement/SubscriptionManagement.tsx # 구독관리
src/components/settings/SubscriptionManagement/SubscriptionClient.tsx
```

#### 건설/프로젝트
```
src/components/business/construction/management/ProjectListClient.tsx  # 리스트 (별도)
src/components/business/construction/management/ProjectDetailClient.tsx # 레거시
src/components/business/construction/category-management/index.tsx     # 카테고리 (특수)
src/components/business/construction/pricing-management/PricingDetailClient.tsx # V2로 대체됨
src/components/business/construction/labor-management/LaborDetailClient.tsx     # V2로 대체됨
```

#### 게시판
```
src/components/board/BoardManagement/BoardForm.tsx    # V2로 대체됨
src/components/board/BoardManagement/BoardDetail.tsx  # V2로 대체됨
src/components/board/BoardDetail/index.tsx            # 동적 게시판 상세
src/components/board/BoardForm/index.tsx              # 동적 게시판 폼
```

#### HR
```
src/components/hr/DepartmentManagement/index.tsx      # 부서관리 (트리 구조)
src/components/hr/EmployeeManagement/EmployeeForm.tsx # 직원등록 폼
src/components/hr/EmployeeManagement/CSVUploadPage.tsx # CSV 업로드 (특수)
```

#### 생산
```
src/components/production/ProductionDashboard/index.tsx  # 대시보드 (제외)
src/components/production/WorkerScreen/index.tsx         # 작업자화면 (특수 UI)
src/components/production/WorkOrders/WorkOrderCreate.tsx # 작업지시 등록
src/components/production/WorkOrders/WorkOrderEdit.tsx   # 작업지시 수정
```

#### 고객센터
```
src/components/customer-center/InquiryManagement/InquiryForm.tsx # 문의등록
src/components/customer-center/FAQManagement/FAQList.tsx         # FAQ 리스트
```

#### 기타
```
src/components/clients/ClientDetail.tsx          # V2로 대체됨
src/components/process-management/ProcessForm.tsx    # 공정등록
src/components/process-management/ProcessDetail.tsx  # V2로 대체됨
src/components/outbound/ShipmentManagement/ShipmentEdit.tsx   # 출고수정
src/components/outbound/ShipmentManagement/ShipmentCreate.tsx # 출고등록
src/components/items/ItemMasterDataManagement.tsx    # 품목마스터 (특수)
src/components/material/ReceivingManagement/InspectionCreate.tsx # 검수등록
src/components/quality/InspectionManagement/InspectionCreate.tsx # 품질검사등록
```

---

## 🚫 마이그레이션 제외 대상

### 대시보드/특수 페이지
```
src/app/[locale]/(protected)/dashboard/page.tsx               # CEO 대시보드
src/app/[locale]/(protected)/production/dashboard/page.tsx    # 생산 대시보드
src/app/[locale]/(protected)/reports/comprehensive-analysis/page.tsx # 종합분석
src/components/business/CEODashboard/CEODashboard.tsx        # CEO 대시보드
```

### 레거시 파일 (_legacy 폴더)
```
src/components/settings/AccountManagement/_legacy/AccountDetail.tsx
src/components/hr/CardManagement/_legacy/CardDetail.tsx
src/components/hr/CardManagement/_legacy/CardForm.tsx
```

### 테스트/개발용
```
src/app/[locale]/(protected)/test/popup/page.tsx
src/app/[locale]/(protected)/dev/editable-table/page.tsx
```

---

## 📋 마이그레이션 우선순위 권장

### 높음 (실사용 페이지)
1. `boards/[boardCode]/*` - 동적 게시판 페이지들
2. `production/WorkOrders/WorkOrderCreate.tsx` - 작업지시 등록
3. `production/WorkOrders/WorkOrderEdit.tsx` - 작업지시 수정
4. `outbound/ShipmentManagement/ShipmentCreate.tsx` - 출고 등록
5. `outbound/ShipmentManagement/ShipmentEdit.tsx` - 출고 수정

### 중간 (설정 페이지 - 템플릿 적용 검토 필요)
- `settings/` 하위 관리 페이지들 (트리/특수 레이아웃 많음)

### 낮음 (V2 대체 완료)
- V2 파일이 있는 레거시 컴포넌트들 (삭제 검토)

### 제외
- 대시보드, 특수 UI, 테스트/개발 페이지

---

## 🔧 템플릿 수정 시 일괄 적용 범위

템플릿 파일 수정 시 아래 파일들에 자동 적용:

| 템플릿 | 영향 파일 수 |
|--------|-------------|
| `IntegratedListTemplateV2` | 48개 |
| `IntegratedDetailTemplate` | 57개 |
| **합계** | **105개** |

수정 가능 요소:
- 타이틀 위치/스타일
- 버튼 배치/디자인
- 입력필드 공통 스타일
- 레이아웃 구조
- 반응형 처리
