From 6d2257d25bf78541e277960032e3f49bde048a45 Mon Sep 17 00:00:00 2001
From: Mark Allen <3417310+maallen@users.noreply.github.com>
Date: Tue, 5 Nov 2024 16:32:40 +0000
Subject: [PATCH] Don't allow editing of MT statuses from UI
---
.../workbench/TextUnitsReviewModal.js | 27 +++++++++++++------
1 file changed, 19 insertions(+), 8 deletions(-)
diff --git a/webapp/src/main/resources/public/js/components/workbench/TextUnitsReviewModal.js b/webapp/src/main/resources/public/js/components/workbench/TextUnitsReviewModal.js
index dee06a1420..2eb8be7640 100644
--- a/webapp/src/main/resources/public/js/components/workbench/TextUnitsReviewModal.js
+++ b/webapp/src/main/resources/public/js/components/workbench/TextUnitsReviewModal.js
@@ -31,6 +31,10 @@ class TextUnitsreviewModal extends React.Component {
};
}
+ isMTState = () => {
+ return this.state.currentReviewState === this.MACHINE_TRANSLATED || this.state.currentReviewState === this.MT_REVIEW;
+ }
+
/**
* Sets the state of the component to the button that was clicked upon.
* @param {string} reviewState
@@ -69,7 +73,8 @@ class TextUnitsreviewModal extends React.Component {
getRejectButton = () => {
return (
@@ -82,7 +87,8 @@ class TextUnitsreviewModal extends React.Component {
getMTReviewNeededButton = () => {
return (
@@ -95,7 +101,8 @@ class TextUnitsreviewModal extends React.Component {
getMTButton = () => {
return (
@@ -108,7 +115,8 @@ class TextUnitsreviewModal extends React.Component {
getReviewButton = () => {
return (
@@ -121,7 +129,8 @@ class TextUnitsreviewModal extends React.Component {
getAcceptButton = () => {
return (
@@ -131,7 +140,8 @@ class TextUnitsreviewModal extends React.Component {
getOverriddenButton = () => {
return (
);
@@ -143,7 +153,8 @@ class TextUnitsreviewModal extends React.Component {
getTranslateButton = () => {
return (
@@ -270,7 +281,7 @@ class TextUnitsreviewModal extends React.Component {