refactor(WEB): 품목관리 경로 통합 - /items 삭제 및 /production/screen-production으로 일원화
- /items 폴더 삭제 (중복 경로 제거) - /production/screen-production에 신버전 DynamicItemForm 기반 페이지 적용 - 구버전 ItemForm 연결 제거로 등록/수정 오류 해결 - 컴포넌트 내부 경로 참조 /items → /production/screen-production 변경 - ItemListClient, ItemForm, ItemDetailClient, ItemDetailEdit, DynamicItemForm Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
This commit is contained in:
@@ -419,7 +419,7 @@ export default function DynamicItemForm({
|
||||
}
|
||||
}
|
||||
|
||||
router.push('/items');
|
||||
router.push('/production/screen-production');
|
||||
router.refresh();
|
||||
});
|
||||
} catch (error) {
|
||||
@@ -603,7 +603,7 @@ export default function DynamicItemForm({
|
||||
const itemType = duplicateCheckResult.duplicateItemType || selectedItemType || 'PT';
|
||||
const itemId = duplicateCheckResult.duplicateId;
|
||||
// code는 없으므로 id를 path에 사용 (edit 페이지에서 id 쿼리 파라미터로 조회)
|
||||
router.push(`/items/${itemId}/edit?type=${itemType}&id=${itemId}`);
|
||||
router.push(`/production/screen-production/${itemId}/edit?type=${itemType}&id=${itemId}`);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -122,7 +122,7 @@ export default function ItemDetailClient({ item }: ItemDetailClientProps) {
|
||||
</Button>
|
||||
<Button
|
||||
type="button"
|
||||
onClick={() => router.push(`/items/${encodeURIComponent(item.itemCode)}/edit?type=${item.itemType}&id=${item.id}`)}
|
||||
onClick={() => router.push(`/production/screen-production/${encodeURIComponent(item.itemCode)}/edit?type=${item.itemType}&id=${item.id}`)}
|
||||
>
|
||||
<Edit className="w-4 h-4 mr-2" />
|
||||
수정
|
||||
|
||||
@@ -377,7 +377,7 @@ export function ItemDetailEdit({ itemCode, itemType: urlItemType, itemId: urlIte
|
||||
<div className="flex flex-col items-center justify-center py-12 gap-4">
|
||||
<p className="text-destructive">{error}</p>
|
||||
<button
|
||||
onClick={() => router.push('/items')}
|
||||
onClick={() => router.push('/production/screen-production')}
|
||||
className="text-primary hover:underline"
|
||||
>
|
||||
품목 목록으로 돌아가기
|
||||
@@ -392,7 +392,7 @@ export function ItemDetailEdit({ itemCode, itemType: urlItemType, itemId: urlIte
|
||||
<div className="flex flex-col items-center justify-center py-12 gap-4">
|
||||
<p className="text-muted-foreground">품목 정보를 불러올 수 없습니다.</p>
|
||||
<button
|
||||
onClick={() => router.push('/items')}
|
||||
onClick={() => router.push('/production/screen-production')}
|
||||
className="text-primary hover:underline"
|
||||
>
|
||||
품목 목록으로 돌아가기
|
||||
|
||||
@@ -174,7 +174,7 @@ export default function ItemForm({ mode, initialData, onSubmit }: ItemFormProps)
|
||||
certificationFileName: certificationFile?.name,
|
||||
};
|
||||
await onSubmit(finalData);
|
||||
router.push('/items');
|
||||
router.push('/production/screen-production');
|
||||
router.refresh();
|
||||
} catch {
|
||||
alert('품목 저장에 실패했습니다.');
|
||||
|
||||
@@ -152,12 +152,12 @@ export default function ItemListClient() {
|
||||
|
||||
const handleView = (itemCode: string, itemType: string, itemId: string) => {
|
||||
// itemType을 query param으로 전달 (Materials 조회를 위해)
|
||||
router.push(`/items/${encodeURIComponent(itemCode)}?type=${itemType}&id=${itemId}`);
|
||||
router.push(`/production/screen-production/${encodeURIComponent(itemCode)}?type=${itemType}&id=${itemId}`);
|
||||
};
|
||||
|
||||
const handleEdit = (itemCode: string, itemType: string, itemId: string) => {
|
||||
// itemType을 query param으로 전달 (Materials 조회를 위해)
|
||||
router.push(`/items/${encodeURIComponent(itemCode)}/edit?type=${itemType}&id=${itemId}`);
|
||||
router.push(`/production/screen-production/${encodeURIComponent(itemCode)}/edit?type=${itemType}&id=${itemId}`);
|
||||
};
|
||||
|
||||
// 삭제 확인 다이얼로그 열기
|
||||
@@ -312,7 +312,7 @@ export default function ItemListClient() {
|
||||
// 등록 버튼 (createButton 사용 - headerActions 대신)
|
||||
createButton: {
|
||||
label: '품목 등록',
|
||||
onClick: () => router.push('/items/create'),
|
||||
onClick: () => router.push('/production/screen-production/create'),
|
||||
icon: Plus,
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user