diff --git a/src/components/quality/InspectionManagement/InspectionDetail.tsx b/src/components/quality/InspectionManagement/InspectionDetail.tsx index 17aed631..3c2a98b5 100644 --- a/src/components/quality/InspectionManagement/InspectionDetail.tsx +++ b/src/components/quality/InspectionManagement/InspectionDetail.tsx @@ -286,7 +286,7 @@ export function InspectionDetail({ id }: InspectionDetailProps) { if (result.success) { toast.success('검사가 완료 처리되었습니다.'); setShowCompleteDialog(false); - loadInspection(); + router.push('/quality/inspections'); } else { toast.error(result.error || '검사 완료 처리에 실패했습니다.'); } @@ -296,7 +296,7 @@ export function InspectionDetail({ id }: InspectionDetailProps) { } finally { setIsCompleting(false); } - }, [id, loadInspection]); + }, [id, router]); // ===== 수정 제출 ===== const handleSubmit = useCallback(async (): Promise<{ success: boolean; error?: string }> => { diff --git a/src/components/quality/InspectionManagement/actions.ts b/src/components/quality/InspectionManagement/actions.ts index 992f4285..c11c8d43 100644 --- a/src/components/quality/InspectionManagement/actions.ts +++ b/src/components/quality/InspectionManagement/actions.ts @@ -675,22 +675,15 @@ export async function deleteInspection(id: string): Promise<{ export async function completeInspection( id: string, - data?: { result?: '합격' | '불합격' } ): Promise<{ success: boolean; data?: ProductInspection; error?: string; __authError?: boolean; }> { - const apiData: Record = {}; - if (data?.result) { - apiData.result = data.result === '합격' ? 'pass' : 'fail'; - } - const result = await executeServerAction({ - url: buildApiUrl(`/api/v1/inspections/${id}/complete`), + url: buildApiUrl(`/api/v1/quality/documents/${id}/complete`), method: 'PATCH', - body: apiData, errorMessage: '검사 완료 처리에 실패했습니다.', });