From fe61b806cbdb22a56ea9407e79700328ac25ba4a Mon Sep 17 00:00:00 2001 From: kartikvirendrar Date: Thu, 18 Jul 2024 16:43:12 +0530 Subject: [PATCH 01/25] changes for reports --- .../Organization/OrganizationReport.jsx | 202 +++++++++++++++--- .../Organization/Project/ProjectReport.jsx | 33 ++- .../Organization/FetchOrganizationReports.js | 17 +- 3 files changed, 221 insertions(+), 31 deletions(-) diff --git a/src/containers/Organization/OrganizationReport.jsx b/src/containers/Organization/OrganizationReport.jsx index 4aa1ef66..0d2d73d0 100644 --- a/src/containers/Organization/OrganizationReport.jsx +++ b/src/containers/Organization/OrganizationReport.jsx @@ -20,22 +20,29 @@ import { Grid, Tooltip, Button, + TextField, + Badge } from "@mui/material"; import MUIDataTable from "mui-datatables"; import ViewColumnIcon from "@mui/icons-material/ViewColumn"; import MailIcon from "@mui/icons-material/Mail"; -import { ColumnSelector } from "common"; +import { ColumnSelector, FilterList } from "common"; //APIs import { APITransport, FetchOrganizationReportsAPI, DownloadOrganizationReportsAPI, + updateOrgSelectedFilter, } from "redux/actions"; //Themes import { ProjectStyle, TableStyles } from "styles"; import { tableTheme } from "theme"; +import { Download } from "@mui/icons-material"; +import FilterListIcon from "@mui/icons-material/FilterList"; +import { DatePicker } from "@mui/x-date-pickers"; +import moment from "moment"; const OrganizationReport = () => { const { id } = useParams(); @@ -49,18 +56,23 @@ const OrganizationReport = () => { const [options, setOptions] = useState(); const [tableData, setTableData] = useState([]); const [anchorEl, setAnchorEl] = useState(null); + const [anchorEle, setAnchorEle] = useState(null); const [originalTableData, setOriginalTableData] = useState([]); const [showUserReportProjectColumn, setShowUserReportProjectColumn] = useState(true); const [offset, setOffset] = useState(0); const [limit, setLimit] = useState(10); - + const [taskStartDate, setTaskStartDate] = useState(moment().format("YYYY-MM-DD")); + const [taskEndDate, setTaskEndDate] = useState(moment().format("YYYY-MM-DD")); const openSelector = Boolean(anchorEl); const apiStatus = useSelector((state) => state.apiStatus); const { reports: reportData, total_count } = useSelector( (state) => state.getOrganizationReports?.data ); + const orgSelectedFilters = useSelector( + (state) => state.orgTaskFilters.orgSelectedFilters + ); const SearchProject = useSelector((state) => state.searchList.data); const handleChangeReportsLevel = (event) => { @@ -68,7 +80,7 @@ const OrganizationReport = () => { setlanguageLevelStats(""); setOffset(0); setShowUserReportProjectColumn(true); - if (event.target.value === "Project Language") return; + if (event.target.value === "Project Language" || event.target.value === "Task") return; const temp = reportLevels.filter( (item) => item.reportLevel === event.target.value ); @@ -82,6 +94,40 @@ const OrganizationReport = () => { dispatch(APITransport(apiObj)); }; + const handleTaskReportSubmit = () => { + const filter = { + task_type: orgSelectedFilters?.taskType, + status: orgSelectedFilters?.status, + src_language: orgSelectedFilters?.srcLanguage, + target_language: orgSelectedFilters?.tgtLanguage, + }; + const temp = reportLevels.filter( + (item) => item.reportLevel === reportsLevel + ); + const filterRequest = Object.entries(filter).reduce((acc, [key, value]) => { + if (value.length > 0) { + acc[key] = value; + } + return acc; + }, {}); + const apiObj = new FetchOrganizationReportsAPI( + id, + temp[0].endPoint, + limit, + offset + 1, + "", + filterRequest, + taskStartDate, + taskEndDate + ); + dispatch(APITransport(apiObj)); + } + + useEffect(() => { + if(reportLevels !== undefined && reportsLevel === "Task") + {handleTaskReportSubmit();} + }, [orgSelectedFilters]); + const handleChangelanguageLevelStats = (event) => { setlanguageLevelStats(event.target.value); setOffset(0); @@ -110,6 +156,26 @@ const OrganizationReport = () => { dispatch(APITransport(apiObj)); }; + const handleDownloadReportCsv = () => { + var header = ''; + columns.forEach((item) => { + header += item.label + "," + }) + var data = tableData.map((item) => { + var row = item; + return row.join(","); + }).join("\n"); + const blob = new Blob([header.slice(0,-1)+'\n'+data], { type: 'text/csv;charset=utf-8;' }); + const link = document.createElement("a"); + const url = URL.createObjectURL(blob); + link.setAttribute("href", url); + link.setAttribute("download", "reports_"+Date.now()+".csv"); + link.style.visibility = 'hidden'; + document.body.appendChild(link); + link.click(); + document.body.removeChild(link); + }; + useEffect(() => { if (reportsLevel === "") return; if (showUserReportProjectColumn) { @@ -270,6 +336,10 @@ const OrganizationReport = () => { }; const renderToolBar = () => { + const arrayLengths = Object.values(orgSelectedFilters).map( + (arr) => arr.length + ); + const sumOfLengths = arrayLengths.reduce((acc, length) => acc + length, 0); return ( <> )} + {reportsLevel && tableData?.length > 0 && ( + + )} + {reportsLevel === "Task" && + } ); }; @@ -323,7 +414,7 @@ const OrganizationReport = () => { setOptions(option); // eslint-disable-next-line - }, [apiStatus]); + }, [apiStatus, tableData]); return ( <> @@ -351,30 +442,74 @@ const OrganizationReport = () => { - - {reportsLevel.includes("Language") && ( - - - Select Task Type - - - - - )} - + {reportsLevel.includes("Language") && ( + + + + Select Task Type + + + + + + )} + {reportsLevel.includes("Task") && ( + <> + + { + let formatedDate=newValue.toDate().toLocaleDateString("en-GB").split("/").reverse().join("-") + console.log(formatedDate) + setTaskStartDate(formatedDate) + } + } + renderInput={(params) => } + className={classes.datePicker} + /> + + + { + let formatedDate=newValue.toDate().toLocaleDateString("en-GB").split("/").reverse().join("-") + console.log(formatedDate) + setTaskEndDate(formatedDate) + }} + renderInput={(params) => } + className={classes.datePicker} + /> + + + + + + )} @@ -396,6 +531,17 @@ const OrganizationReport = () => { handleColumnSelection={handleColumnSelection} /> )} + + {Boolean(anchorEle) && ( + setAnchorEle(null)} + updateFilters={updateOrgSelectedFilter} + currentFilters={orgSelectedFilters} + /> + )} ); }; diff --git a/src/containers/Organization/Project/ProjectReport.jsx b/src/containers/Organization/Project/ProjectReport.jsx index 3810ca9e..0b3b06e8 100644 --- a/src/containers/Organization/Project/ProjectReport.jsx +++ b/src/containers/Organization/Project/ProjectReport.jsx @@ -29,6 +29,7 @@ import { Button, } from "@mui/material"; import ViewColumnIcon from "@mui/icons-material/ViewColumn"; +import { Download } from "@mui/icons-material"; import MailIcon from "@mui/icons-material/Mail"; import { ColumnSelector } from "common"; import constants from "redux/constants"; @@ -88,6 +89,26 @@ const ProjectReport = () => { dispatch(APITransport(apiObj)); }; + const handleDownloadReportCsv = () => { + var header = ''; + columns.forEach((item) => { + header += item.label + "," + }) + var data = tableData.map((item) => { + var row = item; + return row.join(","); + }).join("\n"); + const blob = new Blob([header.slice(0,-1)+'\n'+data], { type: 'text/csv;charset=utf-8;' }); + const link = document.createElement("a"); + const url = URL.createObjectURL(blob); + link.setAttribute("href", url); + link.setAttribute("download", "reports_"+Date.now()+".csv"); + link.style.visibility = 'hidden'; + document.body.appendChild(link); + link.click(); + document.body.removeChild(link); + }; + useEffect(() => { return () => { setTableData([]); @@ -201,6 +222,16 @@ const ProjectReport = () => { )} + {reportsLevel && tableData?.length > 0 && ( + + )} ); }; @@ -233,7 +264,7 @@ const ProjectReport = () => { setOptions(option); // eslint-disable-next-line - }, [apiStatus.progress]); + }, [apiStatus.progress, tableData]); const handleColumnSelection = (e) => { const selectedColumns = [...columns]; diff --git a/src/redux/actions/api/Organization/FetchOrganizationReports.js b/src/redux/actions/api/Organization/FetchOrganizationReports.js index a429140d..0511a02a 100644 --- a/src/redux/actions/api/Organization/FetchOrganizationReports.js +++ b/src/redux/actions/api/Organization/FetchOrganizationReports.js @@ -1,10 +1,23 @@ import API from "../../../api"; import ENDPOINTS from "../../../../config/apiendpoint"; import C from "../../../constants"; +import moment from "moment"; export default class FetchOrganizationReportsAPI extends API { - constructor(id, endPoint, limit, offset, task_type = "", timeout = 2000) { + constructor( + id, + endPoint, + limit, + offset, + task_type = "", + filter, + taskStartDate = moment().format("YYYY-MM-DD"), + taskEndDate = moment().format("YYYY-MM-DD"), + timeout = 2000 + ) { super("GET", timeout, false); + const params = new URLSearchParams(); + params.append("filter", JSON.stringify(filter)); this.type = C.GET_ORGANIZATION_REPORTS; this.endpoint = endPoint === "get_report_languages" @@ -13,7 +26,7 @@ export default class FetchOrganizationReportsAPI extends API { }${id}/${endPoint}/?limit=${limit}&offset=${offset}&task_type=${task_type}` : `${super.apiEndPointAuto()}${ ENDPOINTS.organization - }${id}/${endPoint}/?limit=${limit}&offset=${offset}`; + }${id}/${endPoint}/?limit=${limit}&offset=${offset}&taskStartDate=${taskStartDate}&taskEndDate=${taskEndDate}`+`&${params.toString()}`; } processResponse(res) { From 34bee6ec748851b6ce09adb210d0bafba9dad4f5 Mon Sep 17 00:00:00 2001 From: sagarika-padmanaban Date: Fri, 26 Jul 2024 12:33:37 +0530 Subject: [PATCH 02/25] removed bg-music --- src/common/ExportDialog.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/ExportDialog.jsx b/src/common/ExportDialog.jsx index a548658c..c00038b8 100644 --- a/src/common/ExportDialog.jsx +++ b/src/common/ExportDialog.jsx @@ -66,7 +66,7 @@ const ExportDialog = ({ PaperProps={{ style: { borderRadius: "10px" } }} > - Export Subtitles{" "} + Export Voiceover{" "} )} - +{/* {currentTaskType?.includes("VOICEOVER") && !isBulkTaskDownload && ( <> @@ -187,7 +187,7 @@ const ExportDialog = ({ - )} + )} */} + + + + +)} + Voice Selection From 9a563ec764741094bed4d91013bda073b62130c2 Mon Sep 17 00:00:00 2001 From: kartikvirendrar Date: Sun, 11 Aug 2024 12:05:34 +0530 Subject: [PATCH 16/25] minor changes for reports --- .../Organization/OrganizationReport.jsx | 53 ++++++++++++++++--- .../Organization/Project/ProjectReport.jsx | 3 +- 2 files changed, 47 insertions(+), 9 deletions(-) diff --git a/src/containers/Organization/OrganizationReport.jsx b/src/containers/Organization/OrganizationReport.jsx index d2bef16f..7cd2a873 100644 --- a/src/containers/Organization/OrganizationReport.jsx +++ b/src/containers/Organization/OrganizationReport.jsx @@ -21,7 +21,8 @@ import { Tooltip, Button, TextField, - Badge + Badge, + CircularProgress } from "@mui/material"; import MUIDataTable from "mui-datatables"; import ViewColumnIcon from "@mui/icons-material/ViewColumn"; @@ -63,6 +64,7 @@ const OrganizationReport = () => { const [offset, setOffset] = useState(0); const [limit, setLimit] = useState(10); + const [loading, setLoading] = useState(false); const [taskStartDate, setTaskStartDate] = useState(moment().format("YYYY-MM-DD")); const [taskEndDate, setTaskEndDate] = useState(moment().format("YYYY-MM-DD")); const openSelector = Boolean(anchorEl); @@ -77,6 +79,7 @@ const OrganizationReport = () => { const SearchProject = useSelector((state) => state.searchList.data); const handleChangeReportsLevel = (event) => { + setTableData([]); setReportsLevel(event.target.value); setlanguageLevelStats(""); setOffset(0); @@ -111,6 +114,7 @@ const OrganizationReport = () => { } return acc; }, {}); + setLoading(true); const apiObj = new FetchOrganizationReportsAPI( id, temp[0].endPoint, @@ -144,6 +148,7 @@ const OrganizationReport = () => { (item) => item.reportLevel === reportsLevel ); + setLoading(true); const apiObj = new FetchOrganizationReportsAPI( id, temp[0].endPoint, @@ -191,6 +196,7 @@ const OrganizationReport = () => { const temp = reportLevels.filter( (item) => item.reportLevel === reportsLevel ); + setLoading(true); const apiObj = new FetchOrganizationReportsAPI( id, temp[0].endPoint, @@ -201,6 +207,7 @@ const OrganizationReport = () => { dispatch(APITransport(apiObj)); } else { const endPoint = "get_aggregated_report_users"; + setLoading(true); const apiObj = new FetchOrganizationReportsAPI( id, endPoint, @@ -214,16 +221,43 @@ const OrganizationReport = () => { useEffect(() => { setOffset(0); + if (reportsLevel === "") return; + if (showUserReportProjectColumn) { + const temp = reportLevels.filter( + (item) => item.reportLevel === reportsLevel + ); + setLoading(true); + const apiObj = new FetchOrganizationReportsAPI( + id, + temp[0].endPoint, + limit, + 1, + languageLevelsStats + ); + dispatch(APITransport(apiObj)); + } else { + const endPoint = "get_aggregated_report_users"; + setLoading(true); + const apiObj = new FetchOrganizationReportsAPI( + id, + endPoint, + limit, + 1, + languageLevelsStats + ); + dispatch(APITransport(apiObj)); + } }, [limit]); useEffect(() => { + setLoading(false); let rawData = []; rawData = reportData; createTableData(rawData); createReportColumns(rawData); // eslint-disable-next-line - }, [reportData, languageLevelsStats, reportsLevel]); + }, [reportData, languageLevelsStats]); const createReportColumns = (rawData) => { let tempColumns = []; @@ -523,12 +557,15 @@ const OrganizationReport = () => { - +
+ +
+ { loading && }
{openSelector && ( diff --git a/src/containers/Organization/Project/ProjectReport.jsx b/src/containers/Organization/Project/ProjectReport.jsx index 9f15aca2..0fd0e2d5 100644 --- a/src/containers/Organization/Project/ProjectReport.jsx +++ b/src/containers/Organization/Project/ProjectReport.jsx @@ -58,6 +58,7 @@ const ProjectReport = () => { const SearchProject = useSelector((state) => state.searchList.data); const handleChangeReportsLevel = (event) => { + setTableData([]); setreportsLevel(event.target.value); setlanguageLevelStats(""); setOffset(0); @@ -140,7 +141,7 @@ const ProjectReport = () => { createReportColumns(rawData); // eslint-disable-next-line - }, [projectReportData, languageLevelsStats, reportsLevel]); + }, [projectReportData, languageLevelsStats]); const createReportColumns = (rawData) => { let tempColumns = []; From 9ce14e5f3b5e992dc5fd606f7ec01dd14ce9f407 Mon Sep 17 00:00:00 2001 From: kartikvirendrar Date: Sun, 11 Aug 2024 15:39:38 +0530 Subject: [PATCH 17/25] enable add button for manually created transcription task --- .../Video/components/SettingsButtonComponent.jsx | 2 +- src/utils/subtitleUtils.js | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/containers/Organization/Video/components/SettingsButtonComponent.jsx b/src/containers/Organization/Video/components/SettingsButtonComponent.jsx index 4e2590ec..b93187ee 100644 --- a/src/containers/Organization/Video/components/SettingsButtonComponent.jsx +++ b/src/containers/Organization/Video/components/SettingsButtonComponent.jsx @@ -163,7 +163,7 @@ const SettingsButtonComponent = ({ { const copySub = [...subtitles]; + if(index === -1){ + copySub.splice( + 0, + 0, + newSub({ + start_time: DT.d2t(0), + end_time: DT.d2t(0), + text: "", + speaker_id: "", + target_text: "", + }) + ); + + return copySub; + }else{ const duration = DT.t2d(copySub[index].end_time); copySub.splice( @@ -110,6 +125,7 @@ export const addSubtitleBox = (index) => { ); return copySub; + } }; export const onMerge = (index, votr=false) => { From 0128a583d77d8e36175c6f20753926ff4de7a56c Mon Sep 17 00:00:00 2001 From: kartikvirendrar Date: Sun, 11 Aug 2024 16:40:53 +0530 Subject: [PATCH 18/25] disable error for video link failure --- src/redux/actions/apitransport/apitransport.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/redux/actions/apitransport/apitransport.js b/src/redux/actions/apitransport/apitransport.js index 84e8094a..5db675fa 100644 --- a/src/redux/actions/apitransport/apitransport.js +++ b/src/redux/actions/apitransport/apitransport.js @@ -91,6 +91,7 @@ const error = (err, api, dispatch) => { api.processNextErrorStep(); } + if(api.type !== "GET_VIDEO_DETAILS"){ dispatch( setSnackBar({ open: true, @@ -98,6 +99,7 @@ const error = (err, api, dispatch) => { variant: "error", }) ); + } if (status === 401 && api.type !== "GET_USER_ACCESS_TOKEN") { window.location.replace("/#/login"); From f642151d34f40cc4148a46fbccc0421ac44ccad2 Mon Sep 17 00:00:00 2001 From: Kartik Virendra Rajput <88619994+kartikvirendrar@users.noreply.github.com> Date: Sun, 11 Aug 2024 16:53:55 +0530 Subject: [PATCH 19/25] Minor fix --- src/utils/subtitleUtils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/subtitleUtils.js b/src/utils/subtitleUtils.js index fa70714a..f9ab56c4 100644 --- a/src/utils/subtitleUtils.js +++ b/src/utils/subtitleUtils.js @@ -98,7 +98,7 @@ export const addSubtitleBox = (index) => { 0, newSub({ start_time: DT.d2t(0), - end_time: DT.d2t(0), + end_time: DT.d2t(5), text: "", speaker_id: "", target_text: "", From 8866e4020f52545d6ff6e02aaf72d12acfd1be24 Mon Sep 17 00:00:00 2001 From: kartikvirendrar Date: Mon, 12 Aug 2024 10:22:47 +0530 Subject: [PATCH 20/25] minor fix for timestamp editing --- src/utils/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/utils.js b/src/utils/utils.js index ab2e5e5f..fc8a3f4f 100644 --- a/src/utils/utils.js +++ b/src/utils/utils.js @@ -252,7 +252,7 @@ export const getMilliseconds = (timeInString) => { export const getUpdatedTime = (value, type, time, index, startEnd, player) => { const subtitles = store.getState().commonReducer.subtitles; - const videoDuration = typeof player.getDuration === 'function' ? player.getDuration() : store.getState().getVideoDetails.data.video.duration; + const videoDuration = typeof player.getDuration === 'function' ? DT.d2t(player.getDuration()) : store.getState().getVideoDetails.data.video.duration; let newValue = ""; From ac6bd4ed24e742f406916a9e7f3e1b2882e16c55 Mon Sep 17 00:00:00 2001 From: kartikvirendrar Date: Mon, 12 Aug 2024 14:58:32 +0530 Subject: [PATCH 21/25] changes for org reports getting all rows --- src/containers/Organization/OrganizationReport.jsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/containers/Organization/OrganizationReport.jsx b/src/containers/Organization/OrganizationReport.jsx index 7cd2a873..785317ec 100644 --- a/src/containers/Organization/OrganizationReport.jsx +++ b/src/containers/Organization/OrganizationReport.jsx @@ -221,7 +221,7 @@ const OrganizationReport = () => { useEffect(() => { setOffset(0); - if (reportsLevel === "") return; + if (reportsLevel === "" || reportsLevel === "Task") return; if (showUserReportProjectColumn) { const temp = reportLevels.filter( (item) => item.reportLevel === reportsLevel @@ -441,14 +441,19 @@ const OrganizationReport = () => { rowsPerPage: limit, count: total_count, customToolbar: renderToolBar, - rowsPerPageOptions: [10, 25, 50, 100, 1000], + rowsPerPageOptions: [10, 25, 50, 100, "All"], onTableChange: (action, tableState) => { switch (action) { case "changePage": setOffset(tableState.page); break; case "changeRowsPerPage": - setLimit(tableState.rowsPerPage); + if (tableState.rowsPerPage == "All"){ + setLimit(total_count) + } + else{ + setLimit(tableState.rowsPerPage); + } break; default: } From 46a181002635f95f84d5aca0db97f51ed6d0f037 Mon Sep 17 00:00:00 2001 From: kartikvirendrar Date: Mon, 12 Aug 2024 17:55:49 +0530 Subject: [PATCH 22/25] minor fixes for youtube player --- src/containers/Organization/Video/components/VideoName.jsx | 2 +- src/containers/Organization/Video/components/VideoPanel.jsx | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/containers/Organization/Video/components/VideoName.jsx b/src/containers/Organization/Video/components/VideoName.jsx index 41bb4373..6e6685be 100644 --- a/src/containers/Organization/Video/components/VideoName.jsx +++ b/src/containers/Organization/Video/components/VideoName.jsx @@ -44,7 +44,7 @@ const VideoName = ({ className={classes.videoName} style={fullscreenVideo ? { color: "white" } : {}} > - {videoDetails?.video?.name ? videoDetails?.video?.name : player?.playerInfo?.videoData?.title && player?.playerInfo?.videoData?.title} + {videoDetails?.video?.name && videoDetails?.direct_video_url !== "" ? videoDetails?.video?.name : player?.playerInfo?.videoData?.title && player?.playerInfo?.videoData?.title} diff --git a/src/containers/Organization/Video/components/VideoPanel.jsx b/src/containers/Organization/Video/components/VideoPanel.jsx index 8f87dc82..e02d44c2 100644 --- a/src/containers/Organization/Video/components/VideoPanel.jsx +++ b/src/containers/Organization/Video/components/VideoPanel.jsx @@ -59,6 +59,12 @@ const VideoPanel = ({ setCurrentTime, setPlaying, useYtdlp, setUseYtdlp }) => { } }, [$video]); + useEffect(() => { + if(videoDetails?.direct_video_url === ""){ + setUseYtdlp(false); + } + }, [videoDetails?.direct_video_url]) + return (
{ ((videoDetails.length === 0 && taskData?.video_url?.includes("youtube")) || useYtdlp === false) ? From 943007052044e4148fd2629700caeffe67e1fc95 Mon Sep 17 00:00:00 2001 From: Akshayasree Padmanaban Date: Thu, 15 Aug 2024 20:08:10 +0530 Subject: [PATCH 23/25] login page - email made case insensitive --- src/containers/Organization/Project/ProjectReport.jsx | 2 +- src/containers/UserManagement/Login.jsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/containers/Organization/Project/ProjectReport.jsx b/src/containers/Organization/Project/ProjectReport.jsx index 79c7daf1..b08ffdf6 100644 --- a/src/containers/Organization/Project/ProjectReport.jsx +++ b/src/containers/Organization/Project/ProjectReport.jsx @@ -33,7 +33,7 @@ import { Download } from "@mui/icons-material"; import MailIcon from "@mui/icons-material/Mail"; import { ColumnSelector } from "common"; import constants from "redux/constants"; -import { Download } from "@mui/icons-material"; +// import { Download } from "@mui/icons-material"; const ProjectReport = () => { const { projectId } = useParams(); diff --git a/src/containers/UserManagement/Login.jsx b/src/containers/UserManagement/Login.jsx index 3816051f..137eec86 100644 --- a/src/containers/UserManagement/Login.jsx +++ b/src/containers/UserManagement/Login.jsx @@ -125,7 +125,7 @@ const Login = () => { }; const createToken = async () => { - const apiObj = new LoginAPI(credentials.email, credentials.password); + const apiObj = new LoginAPI(credentials.email.toLowerCase(), credentials.password); dispatch(APITransport(apiObj)); }; From 3a0c2070f2ea9b99f7490bc61a92f0cd99e3976c Mon Sep 17 00:00:00 2001 From: kartikvirendrar Date: Fri, 16 Aug 2024 17:41:12 +0530 Subject: [PATCH 24/25] minor fix for paraphrase setting --- src/containers/Organization/Project/EditProject.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/containers/Organization/Project/EditProject.jsx b/src/containers/Organization/Project/EditProject.jsx index 7c0d5534..727d5f35 100644 --- a/src/containers/Organization/Project/EditProject.jsx +++ b/src/containers/Organization/Project/EditProject.jsx @@ -160,7 +160,7 @@ const EditProject = () => { setVoiceOverSourceType(projectInfo?.default_voiceover_type); setDate(projectInfo?.default_eta); setIntegrateVideo(projectInfo?.video_integration); - setParaphrase(projectInfo?.paraphrase_enabled); + setParaphrase(projectInfo?.paraphrasing_enabled); } }, [projectInfo]); From f473dd79b8b210c262dbe75ae46e4ae0af4dc78f Mon Sep 17 00:00:00 2001 From: Akshayasree Padmanaban Date: Mon, 19 Aug 2024 08:16:11 +0530 Subject: [PATCH 25/25] removed names of already existing user from the drop-down --- src/common/AddProjectMembers.jsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/common/AddProjectMembers.jsx b/src/common/AddProjectMembers.jsx index 5b90e194..a41d5439 100644 --- a/src/common/AddProjectMembers.jsx +++ b/src/common/AddProjectMembers.jsx @@ -1,5 +1,5 @@ import React from "react"; - +import { useSelector } from "react-redux"; //Components import { Button, @@ -30,8 +30,13 @@ const AddProjectMembers = ({ handleSelectField, managerNames, }) => { - const acceptedManagers = managerNames.filter((manager) => manager.has_accepted_invite==true); - + const alreadyExistingUsers = useSelector((state)=>state. + getProjectMembers.data); + console.log(alreadyExistingUsers); + const acceptedManagers = managerNames.filter((manager) =>manager.has_accepted_invite === true && + !alreadyExistingUsers.some((user) => user.id === manager.id) + ); + console.log(acceptedManagers) const filterOptions = (options, state) => { const newOptions = options.filter((user) => { const { first_name, last_name, email } = user;