From 712d25f716fce0cfae951ce3808b79bb23db48d6 Mon Sep 17 00:00:00 2001 From: sagarika-padmanaban Date: Mon, 2 Sep 2024 21:23:03 +0530 Subject: [PATCH 1/2] task dialog fixes --- src/common/CreateTaskDialog.jsx | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/common/CreateTaskDialog.jsx b/src/common/CreateTaskDialog.jsx index aa452bd5..261991cb 100644 --- a/src/common/CreateTaskDialog.jsx +++ b/src/common/CreateTaskDialog.jsx @@ -76,9 +76,6 @@ const[langLabel,setlabel] =useState("") const filteredMembers = projectMembers.filter((member) => member.languages.includes(langLabel) ); - const sourceLangMembers = projectMembers.filter((member) => - member.languages.includes(videoDetails?.language_label) - ); useEffect(() => { const taskObj = new FetchTaskTypeAPI(); dispatch(APITransport(taskObj)); @@ -92,8 +89,8 @@ const[langLabel,setlabel] =useState("") // eslint-disable-next-line }, []); useEffect(() => { - console.log(filteredMembers.length,videoDetails) - if (!taskType.includes("TRANSCRIPTION")&&filteredMembers.length === 0) { + console.log(filteredMembers.length) + if (filteredMembers.length === 0) { setShowPopup(true); } else{ @@ -387,11 +384,7 @@ const[langLabel,setlabel] =useState("") inputProps={{ "aria-label": "Without label" }} disabled={isAssignUserDropdownDisabled()} > - {langLabel?filteredMembers.map((item, index) => ( - - {`${item.first_name} ${item.last_name} (${item.email})`} - - )):sourceLangMembers.map((item, index) => ( + {filteredMembers.map((item, index) => ( {`${item.first_name} ${item.last_name} (${item.email})`} From fd1c72d93286ba5abf4019f93f7e3d476a5d71fb Mon Sep 17 00:00:00 2001 From: sagarika-padmanaban Date: Mon, 2 Sep 2024 21:25:22 +0530 Subject: [PATCH 2/2] fixes --- src/common/CreateTaskDialog.jsx | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/common/CreateTaskDialog.jsx b/src/common/CreateTaskDialog.jsx index 261991cb..aa452bd5 100644 --- a/src/common/CreateTaskDialog.jsx +++ b/src/common/CreateTaskDialog.jsx @@ -76,6 +76,9 @@ const[langLabel,setlabel] =useState("") const filteredMembers = projectMembers.filter((member) => member.languages.includes(langLabel) ); + const sourceLangMembers = projectMembers.filter((member) => + member.languages.includes(videoDetails?.language_label) + ); useEffect(() => { const taskObj = new FetchTaskTypeAPI(); dispatch(APITransport(taskObj)); @@ -89,8 +92,8 @@ const[langLabel,setlabel] =useState("") // eslint-disable-next-line }, []); useEffect(() => { - console.log(filteredMembers.length) - if (filteredMembers.length === 0) { + console.log(filteredMembers.length,videoDetails) + if (!taskType.includes("TRANSCRIPTION")&&filteredMembers.length === 0) { setShowPopup(true); } else{ @@ -384,7 +387,11 @@ const[langLabel,setlabel] =useState("") inputProps={{ "aria-label": "Without label" }} disabled={isAssignUserDropdownDisabled()} > - {filteredMembers.map((item, index) => ( + {langLabel?filteredMembers.map((item, index) => ( + + {`${item.first_name} ${item.last_name} (${item.email})`} + + )):sourceLangMembers.map((item, index) => ( {`${item.first_name} ${item.last_name} (${item.email})`}