[as] chore: 설계자문 삭제 시 목록 쿼리 무효화
This commit is contained in:
@@ -101,8 +101,8 @@ function DesignFormPage({ mode, initialData, createDefaults }: DesignFormPagePro
|
||||
if (!designCnstnDocNo) return;
|
||||
|
||||
alert("저장되었습니다.");
|
||||
router.push(`/design-cnstn/${designCnstnDocNo}/edit`);
|
||||
queryClient.invalidateQueries({ queryKey: designCnstnKeys.all });
|
||||
router.push(`/design-cnstn/${designCnstnDocNo}/edit`);
|
||||
} catch (error) {
|
||||
console.error("저장 실패:", error);
|
||||
alert("저장 중 오류가 발생했습니다.");
|
||||
@@ -125,8 +125,8 @@ function DesignFormPage({ mode, initialData, createDefaults }: DesignFormPagePro
|
||||
if (!designCnstnDocNo) return;
|
||||
|
||||
alert("신청 완료되었습니다.");
|
||||
router.push(`/design-cnstn/${designCnstnDocNo}`);
|
||||
queryClient.invalidateQueries({ queryKey: designCnstnKeys.all });
|
||||
router.push(`/design-cnstn/${designCnstnDocNo}`);
|
||||
} catch (error) {
|
||||
console.error("신청 실패:", error);
|
||||
alert("신청 중 오류가 발생했습니다.");
|
||||
@@ -154,6 +154,7 @@ function DesignFormPage({ mode, initialData, createDefaults }: DesignFormPagePro
|
||||
setIsSubmitting(true);
|
||||
await designCnstnMngService.delete(docNo);
|
||||
alert("삭제되었습니다.");
|
||||
queryClient.invalidateQueries({ queryKey: designCnstnKeys.list() });
|
||||
router.push("/design-cnstn");
|
||||
} catch (error) {
|
||||
console.error("삭제 실패:", error);
|
||||
|
||||
Reference in New Issue
Block a user