From 324c7127117afefb503db804aa9acd71ab902bc0 Mon Sep 17 00:00:00 2001 From: kartikvirendrar Date: Wed, 7 Feb 2024 16:40:56 +0530 Subject: [PATCH] disable auto save for validated, accepted and labeled task status --- .../CL-Transcription/AudioTranscriptionLandingPage.jsx | 2 +- src/ui/pages/container/Label-Studio/LSF.jsx | 2 +- src/ui/pages/container/Label-Studio/ReviewLSF.jsx | 2 +- src/ui/pages/container/Label-Studio/SuperCheckerLSF.jsx | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ui/pages/container/CL-Transcription/AudioTranscriptionLandingPage.jsx b/src/ui/pages/container/CL-Transcription/AudioTranscriptionLandingPage.jsx index c73f41e76..ec049dde8 100644 --- a/src/ui/pages/container/CL-Transcription/AudioTranscriptionLandingPage.jsx +++ b/src/ui/pages/container/CL-Transcription/AudioTranscriptionLandingPage.jsx @@ -297,7 +297,7 @@ const AudioTranscriptionLandingPage = () => { const handleAutosave = async () => { setAutoSaveTrigger(false); - if(taskDetails?.task_status !== "labeled" && taskDetails?.task_status !== "accepted" && taskDetails?.task_status !== "validated"){ + if(taskDetails?.task_status !== "labeled"){ if(!autoSave) return; const reqBody = { task_id: taskId, diff --git a/src/ui/pages/container/Label-Studio/LSF.jsx b/src/ui/pages/container/Label-Studio/LSF.jsx index dc06d85e0..7037cddfb 100644 --- a/src/ui/pages/container/Label-Studio/LSF.jsx +++ b/src/ui/pages/container/Label-Studio/LSF.jsx @@ -764,7 +764,7 @@ const LabelStudioWrapper = ({ }, [taskData]); const autoSaveAnnotation = () => { - if (autoSave && lsfRef.current?.store?.annotationStore?.selected && taskData.task_status.toLowerCase() !== "labeled" && taskData.task_status.toLowerCase() !== "accepted" && taskData.task_status.toLowerCase() !== "validated") { + if (autoSave && lsfRef.current?.store?.annotationStore?.selected && taskData.task_status.toLowerCase() !== "labeled") { if (taskData?.annotation_status !== "freezed") { let annotation = lsfRef.current.store.annotationStore.selected; for (let i = 0; i < annotations.length; i++) { diff --git a/src/ui/pages/container/Label-Studio/ReviewLSF.jsx b/src/ui/pages/container/Label-Studio/ReviewLSF.jsx index 8844903c2..75e43c675 100644 --- a/src/ui/pages/container/Label-Studio/ReviewLSF.jsx +++ b/src/ui/pages/container/Label-Studio/ReviewLSF.jsx @@ -988,7 +988,7 @@ const LabelStudioWrapper = ({ }, [taskId]); const autoSaveReview = () => { - if (autoSave && lsfRef.current?.store?.annotationStore?.selected && taskData.task_status.toLowerCase() !== "labeled" && taskData.task_status.toLowerCase() !== "accepted" && taskData.task_status.toLowerCase() !== "validated") { + if (autoSave && lsfRef.current?.store?.annotationStore?.selected && taskData.task_status.toLowerCase() !== "accepted" && taskData.task_status.toLowerCase() !== "accepted_with_minor_changes" && taskData.task_status.toLowerCase() !== "accepted_with_major_changes") { if (taskData?.annotation_status !== "freezed") { let annotation = lsfRef.current.store.annotationStore.selected; let temp = annotation.serializeAnnotation(); diff --git a/src/ui/pages/container/Label-Studio/SuperCheckerLSF.jsx b/src/ui/pages/container/Label-Studio/SuperCheckerLSF.jsx index 4792e0e56..ec001ecef 100644 --- a/src/ui/pages/container/Label-Studio/SuperCheckerLSF.jsx +++ b/src/ui/pages/container/Label-Studio/SuperCheckerLSF.jsx @@ -703,7 +703,7 @@ const LabelStudioWrapper = ({ }, [taskData]); const autoSaveSuperCheck = () => { - if (autoSave && lsfRef.current?.store?.annotationStore?.selected && taskData.task_status.toLowerCase() !== "labeled" && taskData.task_status.toLowerCase() !== "accepted" && taskData.task_status.toLowerCase() !== "validated") { + if (autoSave && lsfRef.current?.store?.annotationStore?.selected && taskData.task_status.toLowerCase() !== "validated" && taskData.task_status.toLowerCase() !== "validated_with_changes") { if (taskData?.annotation_status !== "freezed") { let annotation = lsfRef.current.store.annotationStore.selected; let temp = annotation.serializeAnnotation();