|
|
|
|
@ -52,13 +52,7 @@ export const reviewActions = {
|
|
|
|
|
reopenIssueSuccess: () => createAction(ReviewActionTypes.REOPEN_ISSUE_SUCCESS),
|
|
|
|
|
reopenIssueFailed: (error: any) => createAction(ReviewActionTypes.REOPEN_ISSUE_FAILED, { error }),
|
|
|
|
|
submitReview: (reviewId: number) => createAction(ReviewActionTypes.SUBMIT_REVIEW, { reviewId }),
|
|
|
|
|
submitReviewSuccess: (activeReview: any, reviews: any[], issues: any[], frame: number) =>
|
|
|
|
|
createAction(ReviewActionTypes.SUBMIT_REVIEW_SUCCESS, {
|
|
|
|
|
activeReview,
|
|
|
|
|
reviews,
|
|
|
|
|
issues,
|
|
|
|
|
frame,
|
|
|
|
|
}),
|
|
|
|
|
submitReviewSuccess: () => createAction(ReviewActionTypes.SUBMIT_REVIEW_SUCCESS),
|
|
|
|
|
submitReviewFailed: (error: any) => createAction(ReviewActionTypes.SUBMIT_REVIEW_FAILED, { error }),
|
|
|
|
|
switchIssuesHiddenFlag: (hidden: boolean) => createAction(ReviewActionTypes.SWITCH_ISSUES_HIDDEN_FLAG, { hidden }),
|
|
|
|
|
};
|
|
|
|
|
@ -193,9 +187,6 @@ export const submitReviewAsync = (review: any): ThunkAction => async (dispatch,
|
|
|
|
|
const {
|
|
|
|
|
annotation: {
|
|
|
|
|
job: { instance: jobInstance },
|
|
|
|
|
player: {
|
|
|
|
|
frame: { number: frame },
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
} = state;
|
|
|
|
|
|
|
|
|
|
@ -204,13 +195,8 @@ export const submitReviewAsync = (review: any): ThunkAction => async (dispatch,
|
|
|
|
|
await review.submit(jobInstance.id);
|
|
|
|
|
|
|
|
|
|
const [task] = await cvat.tasks.get({ id: jobInstance.task.id });
|
|
|
|
|
dispatch(updateTaskSuccess(task));
|
|
|
|
|
|
|
|
|
|
const reviews = await jobInstance.reviews();
|
|
|
|
|
const issues = await jobInstance.issues();
|
|
|
|
|
const reviewInstance = new cvat.classes.Review({ job: jobInstance.id });
|
|
|
|
|
|
|
|
|
|
dispatch(reviewActions.submitReviewSuccess(reviewInstance, reviews, issues, frame));
|
|
|
|
|
dispatch(updateTaskSuccess(task, jobInstance.task.id));
|
|
|
|
|
dispatch(reviewActions.submitReviewSuccess());
|
|
|
|
|
} catch (error) {
|
|
|
|
|
dispatch(reviewActions.submitReviewFailed(error));
|
|
|
|
|
}
|
|
|
|
|
|