From be08dde91ea4e0f2238110fc806c3e0a8cff960c Mon Sep 17 00:00:00 2001 From: Sujit Date: Wed, 1 Jan 2025 09:50:27 +0545 Subject: [PATCH] feat: invalidate task description storing to refetch the updated data on image upload and start processing --- .../DescriptionSection/DescriptionBox/index.tsx | 2 +- .../DescriptionSection/PopoverBox/LoadingBox/index.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/frontend/src/components/DroneOperatorTask/DescriptionSection/DescriptionBox/index.tsx b/src/frontend/src/components/DroneOperatorTask/DescriptionSection/DescriptionBox/index.tsx index 8d1e588e..3844a058 100644 --- a/src/frontend/src/components/DroneOperatorTask/DescriptionSection/DescriptionBox/index.tsx +++ b/src/frontend/src/components/DroneOperatorTask/DescriptionSection/DescriptionBox/index.tsx @@ -54,7 +54,7 @@ const DescriptionBox = () => { >({ mutationFn: postTaskStatus, onSuccess: () => { - queryClient.invalidateQueries(['task-assets-info']); + queryClient.invalidateQueries(['task-description']); }, onError: (err: any) => { toast.error(err.message); diff --git a/src/frontend/src/components/DroneOperatorTask/DescriptionSection/PopoverBox/LoadingBox/index.tsx b/src/frontend/src/components/DroneOperatorTask/DescriptionSection/PopoverBox/LoadingBox/index.tsx index 3911014a..9949e9b3 100644 --- a/src/frontend/src/components/DroneOperatorTask/DescriptionSection/PopoverBox/LoadingBox/index.tsx +++ b/src/frontend/src/components/DroneOperatorTask/DescriptionSection/PopoverBox/LoadingBox/index.tsx @@ -21,7 +21,7 @@ const FilesUploadingPopOver = ({ // function to close modal and refetch task assets to update the UI function closeModal() { - queryClient.invalidateQueries(['task-assets-info']); + queryClient.invalidateQueries(['task-description']); setTimeout(() => { dispatch(toggleModal()); }, 2000);