Skip to content

Commit

Permalink
disable auto save for validated, accepted and labeled task status
Browse files Browse the repository at this point in the history
  • Loading branch information
kartikvirendrar committed Feb 7, 2024
1 parent 5d97e02 commit 324c712
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/ui/pages/container/Label-Studio/LSF.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand Down
2 changes: 1 addition & 1 deletion src/ui/pages/container/Label-Studio/ReviewLSF.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/ui/pages/container/Label-Studio/SuperCheckerLSF.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 324c712

Please sign in to comment.