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:
@@ -114,7 +114,7 @@ export default function ContractDetailForm({
|
||||
const result = await createContract(formData);
|
||||
if (result.success && result.data) {
|
||||
toast.success(isChangeContract ? '변경 계약서가 생성되었습니다.' : '계약이 생성되었습니다.');
|
||||
router.push(`/ko/construction/project/contract/${result.data.id}`);
|
||||
router.push(`/ko/construction/project/contract/${result.data.id}?mode=view`);
|
||||
router.refresh();
|
||||
return { success: true };
|
||||
}
|
||||
@@ -124,7 +124,7 @@ export default function ContractDetailForm({
|
||||
const result = await updateContract(contractId, formData);
|
||||
if (result.success) {
|
||||
toast.success('수정이 완료되었습니다.');
|
||||
router.push(`/ko/construction/project/contract/${contractId}`);
|
||||
router.push(`/ko/construction/project/contract/${contractId}?mode=view`);
|
||||
router.refresh();
|
||||
return { success: true };
|
||||
}
|
||||
@@ -212,11 +212,12 @@ export default function ContractDetailForm({
|
||||
}, []);
|
||||
|
||||
// 모드별 config 타이틀 동적 설정
|
||||
// Note: IntegratedDetailTemplate이 모드에 따라 '등록'/'상세' 자동 추가
|
||||
const dynamicConfig = useMemo(() => {
|
||||
if (isCreateMode) {
|
||||
return {
|
||||
...contractConfig,
|
||||
title: isChangeContract ? '변경 계약서 생성' : '계약 등록',
|
||||
title: isChangeContract ? '변경 계약서' : '계약',
|
||||
actions: {
|
||||
...contractConfig.actions,
|
||||
showDelete: false, // create 모드에서는 삭제 버튼 없음
|
||||
@@ -512,7 +513,7 @@ export default function ContractDetailForm({
|
||||
<>
|
||||
<IntegratedDetailTemplate
|
||||
config={dynamicConfig}
|
||||
mode={mode === 'create' ? 'new' : mode}
|
||||
mode={mode}
|
||||
initialData={{}}
|
||||
itemId={contractId}
|
||||
isLoading={false}
|
||||
|
||||
@@ -122,14 +122,14 @@ export default function ContractListClient({ initialData = [], initialStats }: C
|
||||
// ===== 핸들러 =====
|
||||
const handleRowClick = useCallback(
|
||||
(item: Contract) => {
|
||||
router.push(`/ko/construction/project/contract/${item.id}`);
|
||||
router.push(`/ko/construction/project/contract/${item.id}?mode=view`);
|
||||
},
|
||||
[router]
|
||||
);
|
||||
|
||||
const handleEdit = useCallback(
|
||||
(item: Contract) => {
|
||||
router.push(`/ko/construction/project/contract/${item.id}/edit`);
|
||||
router.push(`/ko/construction/project/contract/${item.id}?mode=edit`);
|
||||
},
|
||||
[router]
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user