pramod_Task#207 Sync activity updates and deletions in Daily Task Planning view without page refresh #96

Merged
vikas.nale merged 5 commits from pramod_Task#207 into Issue_May_2W 2025-05-12 07:58:04 +00:00
Showing only changes of commit 3904c165c9 - Show all commits

View File

@ -76,7 +76,9 @@ const EditActivityModal = ({
setValue("activityID", selectedId);
};
const onSubmitForm = async (data) => {
const onSubmitForm = async ( data ) =>
{
setIsSubmitting(true)
const updatedProject = { ...projects_Details };
const finalData = {
...data,
@ -142,13 +144,17 @@ const EditActivityModal = ({
});
resetForm();
dispatch( refreshData( true ) );
setIsSubmitting(false)
showToast("Activity Updated Successfully","success")
onClose();
}
})
.catch((error) => {
showToast(error.message, "error");
.catch( ( error ) =>
{
setIsSubmitting(false)
const message = error.response.data.message || error.message || "Error Occured During Api Call"
showToast( message, "error" );
});
};