Skip to content

Commit

Permalink
Merge pull request #1036 from AI4Bharat/Standardized-Transcription-Ed…
Browse files Browse the repository at this point in the history
…iting

Update AllAudioTranscriptionLandingPage.jsx
  • Loading branch information
ishvindersethi22 authored May 29, 2024
2 parents 313c167 + 7864e0c commit 7dd295e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import ArrowRightIcon from "@mui/icons-material/ArrowRight";
import ArrowBackIcon from "@mui/icons-material/ArrowBack";
import getTaskAssignedUsers from '../../../../utils/getTaskAssignedUsers';
import LightTooltip from "../../component/common/Tooltip";
import StandarisedisedTranscriptionEditing from './StandardisedTranscription';
import StandarisedisedTranscriptionEditing from './StandardizedTranscription';

const AllAudioTranscriptionLandingPage = () => {
const classes = AudioTranscriptionLandingStyle();
Expand Down Expand Up @@ -124,16 +124,16 @@ const AllAudioTranscriptionLandingPage = () => {
};

useEffect(() => {
let standardisedTranscription = "";
let standardizedTranscription = "";

const sub = annotations[0]?.result.filter((item) => {
if ("standardised_transcription" in item) {
standardisedTranscription = item.standardised_transcription;
if ("standardized_transcription" in item) {
standardizedTranscription = item.standardized_transcription;
return false;
} else return true;
}).map((item) => new Sub(item));

setStdTranscription(standardisedTranscription);
setStdTranscription(standardizedTranscription);
dispatch(setSubtitles(sub, C.SUBTITLES));
}, [annotations]);

Expand Down Expand Up @@ -540,7 +540,7 @@ const AllAudioTranscriptionLandingPage = () => {
setShowNotes(false);
}}
>
Standardised Transcription
Standardized Transcription
</Button>
</Grid>}
</Grid>
Expand Down Expand Up @@ -684,7 +684,7 @@ const AllAudioTranscriptionLandingPage = () => {

<Grid md={6} xs={12} sx={{ width: "100%" }}>

{ProjectDetails && ProjectDetails?.data?.project_type === "StandardisedTranscriptionEditing" ?
{ProjectDetails && ProjectDetails?.data?.project_type === "StandardizedTranscriptionEditing" ?
<>
<StandarisedisedTranscriptionEditing
currentIndex={currentIndex}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ import ArrowRightIcon from "@mui/icons-material/ArrowRight";
import ArrowBackIcon from "@mui/icons-material/ArrowBack";
import getTaskAssignedUsers from '../../../../utils/getTaskAssignedUsers';
import LightTooltip from "../../component/common/Tooltip"
import StandarisedisedTranscriptionEditing from './StandardisedTranscription';
import StandarisedisedTranscriptionEditing from './StandardizedTranscription';
import { Tab, Tabs } from "@mui/material";
import FormControl from "@mui/material/FormControl";

Expand Down Expand Up @@ -336,7 +336,7 @@ const ReviewAudioTranscriptionLandingPage = () => {
auto_save: true,
lead_time:
(new Date() - loadtime) / 1000 + Number(currentAnnotation?.lead_time ?? 0),
result: (stdTranscriptionSettings.enable ? [...result, { standardised_transcription: stdTranscription }] : result),
result: (stdTranscriptionSettings.enable ? [...result, { standardized_transcription: stdTranscription }] : result),
};
if(result.length && taskDetails?.review_user === user.id) {
try{
Expand Down Expand Up @@ -482,17 +482,17 @@ const ReviewAudioTranscriptionLandingPage = () => {

useEffect(() => {

let standardisedTranscription = "";
let standardizedTranscription = "";

const sub = annotations[0]?.result?.filter((item) => {
if ("standardised_transcription" in item) {
standardisedTranscription = item.standardised_transcription;
if ("standardized_transcription" in item) {
standardizedTranscription = item.standardized_transcription;
return false;
} else return true;
}).map((item) => new Sub(item));
dispatch(setSubtitles(sub, C.SUBTITLES));

setStdTranscription(standardisedTranscription);
setStdTranscription(standardizedTranscription);

// const newSub = cloneDeep(sub);

Expand Down Expand Up @@ -636,7 +636,7 @@ const ReviewAudioTranscriptionLandingPage = () => {
review_notes: JSON.stringify(reviewNotesRef.current.getEditor().getContents()),
lead_time:
(new Date() - loadtime) / 1000 + Number(lead_time?.lead_time ?? 0),
result: (stdTranscriptionSettings.enable ? [...result, { standardised_transcription: stdTranscription }] : result),
result: (stdTranscriptionSettings.enable ? [...result, { standardized_transcription: stdTranscription }] : result),
...((value === "to_be_revised" || value === "accepted" ||
value === "accepted_with_minor_changes" ||
value === "accepted_with_major_changes") && {
Expand Down Expand Up @@ -1264,7 +1264,7 @@ useEffect(() => {
}}
// style={{ marginBottom: "20px" }}
>
Standardised Transcription
Standardized Transcription
</Button>
</Grid>}
</Grid>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ const StandarisedisedTranscriptionEditing = ({
useEffect(() => {
if(showAcousticText) {
handleStdTranscriptionSettings({
//set enable:true to enable standardised_transcription
//set enable:true to enable standardized_transcription
enable: false,
showAcoustic: true,
rtl: enableRTL_Typing,
Expand Down

0 comments on commit 7dd295e

Please sign in to comment.