tracker fix

This commit is contained in:
Mikola 2023-10-10 14:22:43 +03:00
parent fe2c45cb22
commit 3a832cc78d
5 changed files with 14 additions and 14 deletions

View File

@ -536,9 +536,6 @@ export const TicketFullScreen = () => {
></TrackerModal> ></TrackerModal>
<div className="tasks__head__persons"> <div className="tasks__head__persons">
{projectInfo.projectUsers?.length > 3 && (
<span className="countPersons">+1...</span>
)}
<div className="projectPersons"> <div className="projectPersons">
{projectInfo.projectUsers?.length && {projectInfo.projectUsers?.length &&
projectInfo.projectUsers.slice(0, 3).map((person) => { projectInfo.projectUsers.slice(0, 3).map((person) => {
@ -555,6 +552,9 @@ export const TicketFullScreen = () => {
); );
})} })}
</div> </div>
{projectInfo.projectUsers?.length > 3 && (
<span className="countPersons">+1</span>
)}
<span <span
className="addPerson" className="addPerson"
onClick={() => { onClick={() => {

View File

@ -541,7 +541,7 @@
.exit { .exit {
cursor: pointer; cursor: pointer;
position: absolute; position: absolute;
top: 15px; top: 36px;
right: 20px; right: 20px;
width: 13px; width: 13px;
height: 13px; height: 13px;

View File

@ -368,9 +368,6 @@ export const ProjectTracker = () => {
: "tasks__head__persons noProjectUsers" : "tasks__head__persons noProjectUsers"
} }
> >
{projectBoard.projectUsers?.length > 3 && (
<span className="countPersons">+1...</span>
)}
{Boolean(projectBoard.projectUsers?.length) && ( {Boolean(projectBoard.projectUsers?.length) && (
<div className="projectPersons"> <div className="projectPersons">
{projectBoard.projectUsers.slice(0, 3).map((person) => { {projectBoard.projectUsers.slice(0, 3).map((person) => {
@ -388,6 +385,9 @@ export const ProjectTracker = () => {
})} })}
</div> </div>
)} )}
{projectBoard.projectUsers?.length > 3 && (
<span className="countPersons">+1</span>
)}
<span <span
className="addPerson" className="addPerson"
onClick={() => { onClick={() => {

View File

@ -70,8 +70,8 @@ export const Tracker = () => {
apiRequest( apiRequest(
`/task/get-user-tasks?user_id=${localStorage.getItem("id")}` `/task/get-user-tasks?user_id=${localStorage.getItem("id")}`
).then((el) => { ).then((el) => {
const allTasks = el.filter((item) => item.status !== 0); const allTasks = el ? el.filter((item) => item.status !== 0) : [];
const completedTasks = el.filter((item) => item.status === 0); const completedTasks = el ? el.filter((item) => item.status === 0) : [];
setAllTasks(allTasks); setAllTasks(allTasks);
setFilteredAllTasks(allTasks); setFilteredAllTasks(allTasks);
setAllCompletedTasks(completedTasks); setAllCompletedTasks(completedTasks);
@ -178,7 +178,7 @@ export const Tracker = () => {
{loader && <Loader style="green" />} {loader && <Loader style="green" />}
{Boolean(projects.length) && {projects && Boolean(projects.length) &&
!loader && !loader &&
projects.map((project, index) => { projects.map((project, index) => {
return project.status !== 10 ? ( return project.status !== 10 ? (
@ -187,7 +187,7 @@ export const Tracker = () => {
"" ""
); );
})} })}
{(!Boolean(projects.length) || {typeof projects === "object" && (!Boolean(projects.length) ||
!Boolean( !Boolean(
projects.filter((project) => project.status !== 10).length projects.filter((project) => project.status !== 10).length
)) && )) &&
@ -215,7 +215,7 @@ export const Tracker = () => {
</div> </div>
</div> </div>
)} )}
{Boolean(projects.length) && !loader && ( {projects && Boolean(projects.length) && !loader && (
<> <>
<BaseButton <BaseButton
styles="createProjectBtn" styles="createProjectBtn"

View File

@ -321,7 +321,7 @@
.projectPersons { .projectPersons {
display: flex; display: flex;
position: relative; position: relative;
left: -10px; left: 5px;
img { img {
position: relative; position: relative;
display: flex; display: flex;
@ -358,7 +358,7 @@
color: #252c32; color: #252c32;
border: 1px solid #dde2e4; border: 1px solid #dde2e4;
background: white; background: white;
left: -6px; left: -20px;
} }
.addPerson { .addPerson {