feat(WEB): 전체 페이지 ?mode= URL 네비게이션 패턴 적용
- 등록(?mode=new), 상세(?mode=view), 수정(?mode=edit) URL 패턴 일괄 적용
- 중복 패턴 제거: /edit?mode=edit → ?mode=edit (16개 파일)
- 제목 일관성: {기능} 등록/상세/수정 패턴 적용
- 검수 체크리스트 문서 추가 (79개 페이지)
- UniversalListPage, IntegratedDetailTemplate 공통 컴포넌트 개선
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -131,7 +131,7 @@ export function ShipmentDetail({ id }: ShipmentDetailProps) {
|
||||
|
||||
// 수정 페이지로 이동
|
||||
const handleEdit = useCallback(() => {
|
||||
router.push(`/ko/outbound/shipments/${id}/edit`);
|
||||
router.push(`/ko/outbound/shipments/${id}?mode=edit`);
|
||||
}, [id, router]);
|
||||
|
||||
// 삭제 처리
|
||||
|
||||
@@ -165,7 +165,7 @@ export function ShipmentEdit({ id }: ShipmentEditProps) {
|
||||
|
||||
// 취소
|
||||
const handleCancel = useCallback(() => {
|
||||
router.push(`/ko/outbound/shipments/${id}`);
|
||||
router.push(`/ko/outbound/shipments/${id}?mode=view`);
|
||||
}, [router, id]);
|
||||
|
||||
// validation 체크
|
||||
@@ -202,7 +202,7 @@ export function ShipmentEdit({ id }: ShipmentEditProps) {
|
||||
const result = await updateShipment(id, formData);
|
||||
|
||||
if (result.success) {
|
||||
router.push(`/ko/outbound/shipments/${id}`);
|
||||
router.push(`/ko/outbound/shipments/${id}?mode=view`);
|
||||
} else {
|
||||
setValidationErrors([result.error || '출하 수정에 실패했습니다.']);
|
||||
}
|
||||
@@ -216,9 +216,10 @@ export function ShipmentEdit({ id }: ShipmentEditProps) {
|
||||
}, [id, formData, router]);
|
||||
|
||||
// 동적 config (로트번호 + 상태 표시)
|
||||
// Note: IntegratedDetailTemplate이 edit 모드에서 '수정' 접미사 자동 추가
|
||||
const dynamicConfig = {
|
||||
...shipmentEditConfig,
|
||||
title: detail ? `출고 수정 (${detail.lotNo})` : '출고 수정',
|
||||
title: detail?.lotNo ? `출하 (${detail.lotNo})` : '출하',
|
||||
};
|
||||
|
||||
// 폼 컨텐츠 렌더링
|
||||
|
||||
@@ -81,14 +81,14 @@ export function ShipmentList() {
|
||||
// ===== 행 클릭 핸들러 =====
|
||||
const handleRowClick = useCallback(
|
||||
(item: ShipmentItem) => {
|
||||
router.push(`/ko/outbound/shipments/${item.id}`);
|
||||
router.push(`/ko/outbound/shipments/${item.id}?mode=view`);
|
||||
},
|
||||
[router]
|
||||
);
|
||||
|
||||
// ===== 등록 핸들러 =====
|
||||
const handleCreate = useCallback(() => {
|
||||
router.push('/ko/outbound/shipments/new');
|
||||
router.push('/ko/outbound/shipments?mode=new');
|
||||
}, [router]);
|
||||
|
||||
// ===== 통계 카드 =====
|
||||
|
||||
@@ -41,7 +41,7 @@ export const shipmentConfig: DetailConfig = {
|
||||
* IntegratedDetailTemplate 마이그레이션 (2025-01-20)
|
||||
*/
|
||||
export const shipmentCreateConfig: DetailConfig = {
|
||||
title: '출하 등록',
|
||||
title: '출하',
|
||||
description: '새로운 출하를 등록합니다',
|
||||
icon: Truck,
|
||||
basePath: '/outbound/shipments',
|
||||
@@ -60,6 +60,6 @@ export const shipmentCreateConfig: DetailConfig = {
|
||||
*/
|
||||
export const shipmentEditConfig: DetailConfig = {
|
||||
...shipmentCreateConfig,
|
||||
title: '출고 수정',
|
||||
description: '출고 정보를 수정합니다',
|
||||
title: '출하',
|
||||
description: '출하 정보를 수정합니다',
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user