From bfb9cc897c6f837cbb32e89dfa540acf170cdefd Mon Sep 17 00:00:00 2001 From: kartikvirendrar Date: Tue, 27 Aug 2024 10:08:10 +0530 Subject: [PATCH 01/41] changes for date ranged email reports --- src/containers/Organization/OrganizationReport.jsx | 4 +++- .../api/Organization/DownloadOrganizationReports.js | 8 ++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/containers/Organization/OrganizationReport.jsx b/src/containers/Organization/OrganizationReport.jsx index 785317ec..e1add2c3 100644 --- a/src/containers/Organization/OrganizationReport.jsx +++ b/src/containers/Organization/OrganizationReport.jsx @@ -165,7 +165,9 @@ const OrganizationReport = () => { ); const apiObj = new DownloadOrganizationReportsAPI( id, - temp[0].downloadEndPoint + temp[0].downloadEndPoint, + taskStartDate, + taskEndDate, ); dispatch(APITransport(apiObj)); }; diff --git a/src/redux/actions/api/Organization/DownloadOrganizationReports.js b/src/redux/actions/api/Organization/DownloadOrganizationReports.js index c9d7eae5..59374f4a 100644 --- a/src/redux/actions/api/Organization/DownloadOrganizationReports.js +++ b/src/redux/actions/api/Organization/DownloadOrganizationReports.js @@ -3,10 +3,14 @@ import ENDPOINTS from "../../../../config/apiendpoint"; import C from "../../../constants"; export default class DownloadOrganizationReportsAPI extends API { - constructor(id, endPoint, timeout = 2000) { + constructor(id, endPoint, taskStartDate="", taskEndDate="", timeout = 2000) { super("GET", timeout, false); this.type = C.DOWNLOAD_ORGANIZATION_REPORTS; - this.endpoint = `${super.apiEndPointAuto()}${ + this.endpoint = endPoint === "send_tasks_report_email" ? + `${super.apiEndPointAuto()}${ + ENDPOINTS.organization + }${id}/${endPoint}/?taskStartDate=${taskStartDate}&taskEndDate=${taskEndDate}` + :`${super.apiEndPointAuto()}${ ENDPOINTS.organization }${id}/${endPoint}/`; } From 8b9c3deed6f035253bc4d086433aa2579ed28803 Mon Sep 17 00:00:00 2001 From: kartikvirendrar Date: Tue, 3 Sep 2024 10:58:24 +0530 Subject: [PATCH 02/41] fixed endpoint for reopen votr task --- src/redux/actions/api/Project/ReopenTask.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/redux/actions/api/Project/ReopenTask.js b/src/redux/actions/api/Project/ReopenTask.js index 345ae402..c0eadcee 100644 --- a/src/redux/actions/api/Project/ReopenTask.js +++ b/src/redux/actions/api/Project/ReopenTask.js @@ -9,7 +9,7 @@ export default class ReopenTaskAPI extends API { this.delete_and_reopen=delete_voiceover_and_reopen; this.id = id; - this.endpoint = taskType.includes("VOICEOVER") ? `${super.apiEndPointAuto()}/voiceover/reopen_translation_voiceover_task` : + this.endpoint = taskType.includes("VOICEOVER") ? `${super.apiEndPointAuto()}/voiceover/reopen_translation_voiceover_task/` : `${super.apiEndPointAuto()}${ ENDPOINTS.task }${id}/reopen_translation_task/?delete_voiceover_and_reopen=${delete_voiceover_and_reopen}`; From 7c3cbec1ce7d78423574c8b4a6608b620221999c Mon Sep 17 00:00:00 2001 From: kartikvirendrar Date: Wed, 4 Sep 2024 10:16:47 +0530 Subject: [PATCH 03/41] chnages to disable timeline toggle --- src/common/CustomMenuComponent.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/CustomMenuComponent.jsx b/src/common/CustomMenuComponent.jsx index b66763fd..b1cac210 100644 --- a/src/common/CustomMenuComponent.jsx +++ b/src/common/CustomMenuComponent.jsx @@ -98,7 +98,7 @@ const CustomMenuComponent = ({ {setShowSubtitles(!showSubtitles)}}/> - + {/*
Show Timeline {setShowTimeline(!showTimeline)}}/>
-
+
*/}
Date: Thu, 5 Sep 2024 16:46:29 +0530 Subject: [PATCH 04/41] Delete .env --- .env | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 .env diff --git a/.env b/.env deleted file mode 100644 index e963ff50..00000000 --- a/.env +++ /dev/null @@ -1,3 +0,0 @@ -REACT_APP_CLIENT_ID=874354657793-vjglkmnn18d872tps5m9vlfeu4f3e20s.apps.googleusercontent.com -REACT_APP_CLIENT_SECRET=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 -REACT_APP_SCOPE=https://www.googleapis.com/auth/youtubepartner From 9875a62939a24afeaac39cebea0b8b76c4d4b20e Mon Sep 17 00:00:00 2001 From: kartikvirendrar Date: Fri, 6 Sep 2024 11:31:00 +0530 Subject: [PATCH 05/41] minor bug fixes for paraphrase --- src/common/PreviewDialog.jsx | 2 +- src/containers/Organization/Video/ParaphraseRightPanel.jsx | 4 ++-- src/utils/Sub.js | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/common/PreviewDialog.jsx b/src/common/PreviewDialog.jsx index 9ce8b5eb..3719272c 100644 --- a/src/common/PreviewDialog.jsx +++ b/src/common/PreviewDialog.jsx @@ -231,7 +231,7 @@ const PreviewDialog = ({ }} > {taskType.includes("TRANSCRIPTION") - ? el.text + ? el.verbatim_text ? el.verbatim_text : el.text : el.target_text} diff --git a/src/containers/Organization/Video/ParaphraseRightPanel.jsx b/src/containers/Organization/Video/ParaphraseRightPanel.jsx index c2db06cc..78fc5149 100644 --- a/src/containers/Organization/Video/ParaphraseRightPanel.jsx +++ b/src/containers/Organization/Video/ParaphraseRightPanel.jsx @@ -821,10 +821,10 @@ const ParaphraseRightPanel = ({ currentIndex, currentSubs,setCurrentIndex, showT }
- {enableTransliteration ? ( + {taskData?.src_language !== "en" && enableTransliteration ? ( { changeTranscriptHandler(text, index, "transaltion"); diff --git a/src/utils/Sub.js b/src/utils/Sub.js index 8bd03f00..a1806564 100644 --- a/src/utils/Sub.js +++ b/src/utils/Sub.js @@ -15,6 +15,7 @@ export default class Sub { this.speaker_id = obj.speaker_id; this.transcription_text = obj.transcription_text; this.paraphrased_text = obj.paraphrased_text; + this.verbatim_text = obj.verbatim_text; } get check() { From 02984c3f064d6d6625f22ad14d6bd458fbf45f4d Mon Sep 17 00:00:00 2001 From: kartikvirendrar Date: Mon, 9 Sep 2024 15:59:00 +0530 Subject: [PATCH 06/41] add copy to paraphrased segment button --- .../Video/ParaphraseRightPanel.jsx | 19 ++++++++++++++++++- src/utils/subtitleUtils.js | 6 ++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/src/containers/Organization/Video/ParaphraseRightPanel.jsx b/src/containers/Organization/Video/ParaphraseRightPanel.jsx index 78fc5149..b53f4b5b 100644 --- a/src/containers/Organization/Video/ParaphraseRightPanel.jsx +++ b/src/containers/Organization/Video/ParaphraseRightPanel.jsx @@ -52,8 +52,9 @@ import { setSubtitles, } from "redux/actions"; import GlossaryDialog from "common/GlossaryDialog"; -import { bookmarkSegment, onExpandTimeline, paraphrase } from "utils/subtitleUtils"; +import { bookmarkSegment, onCopyToParaphrasedSegment, onExpandTimeline, paraphrase } from "utils/subtitleUtils"; import LoopIcon from "@mui/icons-material/Loop"; +import { ArrowForward } from "@mui/icons-material"; const ParaphraseRightPanel = ({ currentIndex, currentSubs,setCurrentIndex, showTimeline, segment }) => { const { taskId } = useParams(); @@ -301,6 +302,11 @@ const ParaphraseRightPanel = ({ currentIndex, currentSubs,setCurrentIndex, showT // eslint-disable-next-line }, [currentIndexToSplitTextBlock, selectionStart, limit, currentOffset]); + const copyToParaphrasedText = useCallback((index) => { + const sub = onCopyToParaphrasedSegment(index); + dispatch(setSubtitles(sub, C.SUBTITLES)); + }, [limit, currentOffset]); + useEffect(() => { setSourceText(subtitles); }, [subtitles]); @@ -808,6 +814,7 @@ const ParaphraseRightPanel = ({ currentIndex, currentSubs,setCurrentIndex, showT type={"endTime"} /> {currentIndex === index && +
+ + copyToParaphrasedText(index)} + style={{ marginTop: "10px"}} + > + + + +
} diff --git a/src/utils/subtitleUtils.js b/src/utils/subtitleUtils.js index c4bc31e4..b434e1e6 100644 --- a/src/utils/subtitleUtils.js +++ b/src/utils/subtitleUtils.js @@ -186,6 +186,12 @@ export const onSubtitleDelete = (index) => { return copySub; }; +export const onCopyToParaphrasedSegment = (index) => { + const subtitles = store.getState().commonReducer.subtitles; + subtitles[index].paraphrased_text = subtitles[index].text; + return subtitles; +}; + export const onSplit = ( currentIndex, selectionStart, From 80c14f0cbb303b8dc808039ec8b77b2d86b78cf0 Mon Sep 17 00:00:00 2001 From: Kartik Virendra Rajput <88619994+kartikvirendrar@users.noreply.github.com> Date: Mon, 9 Sep 2024 16:39:06 +0530 Subject: [PATCH 07/41] Update deploy-prod-azure.yml --- .github/workflows/deploy-prod-azure.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/deploy-prod-azure.yml b/.github/workflows/deploy-prod-azure.yml index cd084be0..db919e83 100644 --- a/.github/workflows/deploy-prod-azure.yml +++ b/.github/workflows/deploy-prod-azure.yml @@ -13,6 +13,9 @@ env: AZURE_CDN_PROFILE: ${{ vars.PROD__AZURE_CDN_PROFILE }} AZURE_ENDPOINT_NAME: ${{ vars.PROD__AZURE_ENDPOINT_NAME }} AZURE_RESOURCE_GROUP: ${{ vars.PROD__AZURE_RESOURCE_GROUP }} + REACT_APP_CLIENT_ID: ${{ vars.REACT_APP_CLIENT_ID }} + REACT_APP_CLIENT_SECRET: ${{ vars.REACT_APP_CLIENT_SECRET }} + REACT_APP_SCOPE: ${{ vars.REACT_APP_SCOPE }} jobs: cicd: From 33e606730180c84b13e98ebcfabac8a086708ec9 Mon Sep 17 00:00:00 2001 From: kartikvirendrar Date: Mon, 7 Oct 2024 12:43:49 +0530 Subject: [PATCH 08/41] added votr active task export transcript and translation --- src/common/ExportDialog.jsx | 22 ++- .../Video/VoiceOverRightPanel1.jsx | 162 +++++++++++++++++- .../components/SettingsButtonComponent.jsx | 18 ++ 3 files changed, 197 insertions(+), 5 deletions(-) diff --git a/src/common/ExportDialog.jsx b/src/common/ExportDialog.jsx index 410a974a..f32b5ffd 100644 --- a/src/common/ExportDialog.jsx +++ b/src/common/ExportDialog.jsx @@ -17,9 +17,11 @@ import { RadioGroup, Typography, FormGroup, + Select, } from "@mui/material"; import CloseIcon from "@mui/icons-material/Close"; import { speakerInfoOptions, bgMusicOptions } from "config"; +import { MenuItem } from "react-contextmenu"; const ExportDialog = ({ open, @@ -32,11 +34,12 @@ const ExportDialog = ({ handleExportCheckboxChange, isBulkTaskDownload, currentSelectedTasks, + multiOptionDialog=false, }) => { const { transcription, translation, voiceover, speakerInfo, bgMusic } = exportTypes; - const [currentTaskType, setCurrentTaskType] = useState(""); + const [currentTaskType, setCurrentTaskType] = useState(taskType); const transcriptExportTypes = useSelector( (state) => state.getTranscriptExportTypes.data.export_types @@ -58,7 +61,9 @@ const ExportDialog = ({ setCurrentTaskType("TRANSLATION_EDIT"); } } else { - setCurrentTaskType(taskType); + if(!multiOptionDialog){ + setCurrentTaskType(taskType); + } } }, [taskType, isBulkTaskDownload, currentSelectedTasks]); @@ -69,7 +74,16 @@ const ExportDialog = ({ PaperProps={{ style: { borderRadius: "10px" } }} > - Export Voiceover{" "} + {multiOptionDialog ? + Export   + + + : + Export {currentTaskType} + } + + + + + ); +}; + +export default RegenerateFailedVotrTasksDialog; diff --git a/src/containers/Organization/MyOrganization.jsx b/src/containers/Organization/MyOrganization.jsx index 54b85cc3..e515a833 100644 --- a/src/containers/Organization/MyOrganization.jsx +++ b/src/containers/Organization/MyOrganization.jsx @@ -37,6 +37,7 @@ import ProjectList from "./ProjectList"; import InfoOutlinedIcon from "@mui/icons-material/InfoOutlined"; import { AddOrganizationMember, AlertComponent, Loader } from "common"; import UploadFileDialog from "common/UploadFileDialog"; +import RegenerateFailedVotrTasksDialog from "common/RegenerateFailedVotrTasksDialog"; const TabPanel = (props) => { const { children, value, index, ...other } = props; @@ -72,6 +73,7 @@ const MyOrganization = () => { const [openUploadBulkVideoDialog, setOpenUploadBulkVideoDialog] = useState(false); const [isUserOrgOwner, setIsUserOrgOwner] = useState(false); + const [openRegenerateFailedVotrTasksDialog, setOpenRegenerateFailedVotrTasksDialog] = useState(false); const organizationDetails = useSelector( (state) => state.getOrganizationDetails.data @@ -88,6 +90,7 @@ const MyOrganization = () => { if (success) { if (apiType === "UPLOAD_CSV") { setOpenUploadBulkVideoDialog(false); + setOpenRegenerateFailedVotrTasksDialog(false); } if (apiType === "GET_USERS_ROLES") { @@ -103,6 +106,7 @@ const MyOrganization = () => { setAlertMessage(data.message); setAlertColumn("csvAlertColumns"); setOpenUploadBulkVideoDialog(false); + setOpenRegenerateFailedVotrTasksDialog(false); } } } @@ -175,13 +179,13 @@ const MyOrganization = () => { ); }; - const handeFileUpload = (file) => { + const handeFileUpload = (file, regenerate = false) => { const reader = new FileReader(); reader.onload = async () => { const csvData = reader.result; const csv = btoa(csvData); - const uploadCSVObj = new UploadCSVAPI("org", id, csv); + const uploadCSVObj = new UploadCSVAPI("org", id, csv, regenerate); dispatch(APITransport(uploadCSVObj)); }; reader.readAsBinaryString(file[0]); @@ -243,6 +247,15 @@ const MyOrganization = () => { Add New Project + +