fix: [items] 품목 폼 저장/에러 시 하드코딩 경로 → router.back() 전환
This commit is contained in:
@@ -405,8 +405,7 @@ export default function DynamicItemForm({
|
||||
}
|
||||
}
|
||||
|
||||
router.push('/production/screen-production');
|
||||
router.refresh();
|
||||
router.back();
|
||||
});
|
||||
} catch (error) {
|
||||
// 2025-12-11: 백엔드에서 중복 에러 반환 시 다이얼로그 표시
|
||||
|
||||
@@ -350,7 +350,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('/production/screen-production')}
|
||||
onClick={() => router.back()}
|
||||
className="text-primary hover:underline"
|
||||
>
|
||||
품목 목록으로 돌아가기
|
||||
@@ -365,7 +365,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('/production/screen-production')}
|
||||
onClick={() => router.back()}
|
||||
className="text-primary hover:underline"
|
||||
>
|
||||
품목 목록으로 돌아가기
|
||||
|
||||
@@ -175,8 +175,7 @@ export default function ItemForm({ mode, initialData, onSubmit }: ItemFormProps)
|
||||
certificationFileName: certificationFile?.name,
|
||||
};
|
||||
await onSubmit(finalData);
|
||||
router.push('/production/screen-production');
|
||||
router.refresh();
|
||||
router.back();
|
||||
} catch {
|
||||
toast.error('품목 저장에 실패했습니다.');
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user