diff --git a/src/components/Modal/Tracker/TicketFullScreen/TicketFullScreen.jsx b/src/components/Modal/Tracker/TicketFullScreen/TicketFullScreen.jsx index bc5162e8..fd50c8be 100644 --- a/src/components/Modal/Tracker/TicketFullScreen/TicketFullScreen.jsx +++ b/src/components/Modal/Tracker/TicketFullScreen/TicketFullScreen.jsx @@ -536,9 +536,6 @@ export const TicketFullScreen = () => { >
- {projectInfo.projectUsers?.length > 3 && ( - +1... - )}
{projectInfo.projectUsers?.length && projectInfo.projectUsers.slice(0, 3).map((person) => { @@ -555,6 +552,9 @@ export const TicketFullScreen = () => { ); })}
+ {projectInfo.projectUsers?.length > 3 && ( + +1 + )} { diff --git a/src/components/Modal/Tracker/TrackerModal/trackerModal.scss b/src/components/Modal/Tracker/TrackerModal/trackerModal.scss index 8ff8f335..76e26246 100644 --- a/src/components/Modal/Tracker/TrackerModal/trackerModal.scss +++ b/src/components/Modal/Tracker/TrackerModal/trackerModal.scss @@ -541,7 +541,7 @@ .exit { cursor: pointer; position: absolute; - top: 15px; + top: 36px; right: 20px; width: 13px; height: 13px; diff --git a/src/pages/ProjectTracker/ProjectTracker.js b/src/pages/ProjectTracker/ProjectTracker.js index e7313046..99a7ff16 100644 --- a/src/pages/ProjectTracker/ProjectTracker.js +++ b/src/pages/ProjectTracker/ProjectTracker.js @@ -368,9 +368,6 @@ export const ProjectTracker = () => { : "tasks__head__persons noProjectUsers" } > - {projectBoard.projectUsers?.length > 3 && ( - +1... - )} {Boolean(projectBoard.projectUsers?.length) && (
{projectBoard.projectUsers.slice(0, 3).map((person) => { @@ -388,6 +385,9 @@ export const ProjectTracker = () => { })}
)} + {projectBoard.projectUsers?.length > 3 && ( + +1 + )} { diff --git a/src/pages/Tracker/Tracker.js b/src/pages/Tracker/Tracker.js index 84b95e3a..8b99fc5e 100644 --- a/src/pages/Tracker/Tracker.js +++ b/src/pages/Tracker/Tracker.js @@ -70,8 +70,8 @@ export const Tracker = () => { apiRequest( `/task/get-user-tasks?user_id=${localStorage.getItem("id")}` ).then((el) => { - const allTasks = el.filter((item) => item.status !== 0); - const completedTasks = el.filter((item) => item.status === 0); + const allTasks = el ? el.filter((item) => item.status !== 0) : []; + const completedTasks = el ? el.filter((item) => item.status === 0) : []; setAllTasks(allTasks); setFilteredAllTasks(allTasks); setAllCompletedTasks(completedTasks); @@ -178,7 +178,7 @@ export const Tracker = () => { {loader && } - {Boolean(projects.length) && + {projects && Boolean(projects.length) && !loader && projects.map((project, index) => { return project.status !== 10 ? ( @@ -187,7 +187,7 @@ export const Tracker = () => { "" ); })} - {(!Boolean(projects.length) || + {typeof projects === "object" && (!Boolean(projects.length) || !Boolean( projects.filter((project) => project.status !== 10).length )) && @@ -215,7 +215,7 @@ export const Tracker = () => {
)} - {Boolean(projects.length) && !loader && ( + {projects && Boolean(projects.length) && !loader && ( <>