This commit is contained in:
Mikola
2023-12-05 14:15:04 +03:00
parent b66537f4a4
commit 9e10088494
32 changed files with 137 additions and 139 deletions

View File

@ -43,7 +43,7 @@ const Home = () => {
const tempTags = values.map((value, index) =>
value.map((val) => {
return { id: val.id, value: val.tags, name: keys[index] };
}),
})
);
dispatch(tags(tempTags));
});

View File

@ -40,11 +40,11 @@ export const PartnerAddRequest = () => {
const [editRequest, setEditRequest] = useState(false);
const [selectedSkills, setSelectedSkills] = useState([]);
const [selectedSpecialization, setSelectedSpecialization] = useState(
"Выберите специализацию",
"Выберите специализацию"
);
const [selectedLevel, setSelectedLevel] = useState("Выберите уровень");
const [selectedCount, setSelectedCount] = useState(
"Выберите кол-во сотрудников",
"Выберите кол-во сотрудников"
);
const [inputs, setInputs] = useState({ title: "", description: "" });
@ -57,7 +57,7 @@ export const PartnerAddRequest = () => {
useEffect(() => {
apiRequest(`/profile/positions-list`).then((el) =>
setSpecializationList(el),
setSpecializationList(el)
);
apiRequest(`/profile/level-list`).then((el) => setLevelList(el));
apiRequest(`/skills/get-skills-list`).then((el) => {
@ -247,7 +247,7 @@ export const PartnerAddRequest = () => {
setSelectedSkills(
selectedSkills.filter((skill, indexSkill) => {
return indexSkill !== index;
}),
})
);
}}
/>
@ -263,7 +263,7 @@ export const PartnerAddRequest = () => {
return skill.name
.toLowerCase()
.includes(e.target.value.toLowerCase());
}),
})
);
}}
/>
@ -282,12 +282,12 @@ export const PartnerAddRequest = () => {
setFilteredSkills(
filteredSkills.filter((skill, skillIndex) => {
return skillIndex !== index;
}),
})
);
setSkills(
skills.filter((initSkill) => {
return initSkill.id !== skill.id;
}),
})
);
setOpenSkillsSelect(false);
}}

View File

@ -140,8 +140,8 @@ export const PartnerBid = () => {
partnerRequests[
partnerRequests.findIndex((el) => el.id === requestId) -
1
].id,
),
].id
)
);
}}
>
@ -162,8 +162,8 @@ export const PartnerBid = () => {
partnerRequests[
partnerRequests.findIndex((el) => el.id === requestId) +
1
].id,
),
].id
)
);
}}
>

View File

@ -33,8 +33,8 @@ export const PartnerRequests = () => {
useEffect(() => {
apiRequest(
`/request/get-request-list?user_id=${localStorage.getItem(
"id",
)}&search_depth=3`,
"id"
)}&search_depth=3`
).then((el) => {
setRequests(el);
setLoader(false);

View File

@ -23,7 +23,7 @@ import "./profile.scss";
export const Profile = () => {
const profileInfo = useSelector(getProfileInfo);
const [user] = useState(
localStorage.getItem("role_status") === "18" ? "partner" : "developer",
localStorage.getItem("role_status") === "18" ? "partner" : "developer"
);
const [profileItemsInfo] = useState({
developer: [

View File

@ -169,7 +169,7 @@ export const ProjectTracker = () => {
startTask: startWrapperIndexTest.current.task,
finishTask: task,
finishIndex: finishTask,
}),
})
);
}
@ -207,7 +207,7 @@ export const ProjectTracker = () => {
moveProjectTask({
startWrapperIndex: startWrapperIndexTest.current,
columnId,
}),
})
);
}
}
@ -382,7 +382,7 @@ export const ProjectTracker = () => {
(div) =>
div.classList &&
(div.classList.contains("addPerson") ||
div.classList.contains("persons__list")),
div.classList.contains("persons__list"))
)
) {
setPersonListOpen(false);
@ -394,7 +394,7 @@ export const ProjectTracker = () => {
(div) =>
div.classList &&
(div.classList.contains("tasks__head__executor") ||
div.classList.contains("tasks__head__executorDropdown")),
div.classList.contains("tasks__head__executorDropdown"))
)
) {
setSelectedExecutorOpen(false);
@ -406,7 +406,7 @@ export const ProjectTracker = () => {
(div) =>
div.classList &&
(div.classList.contains("tasks__head__tags") ||
div.classList.contains("tags__list")),
div.classList.contains("tags__list"))
)
) {
setTags({
@ -427,7 +427,7 @@ export const ProjectTracker = () => {
(div) =>
div.classList &&
(div.classList.contains("board__head__more") ||
div.classList.contains("column__select")),
div.classList.contains("column__select"))
)
) {
setOpenColumnSelect((prevState) => {
@ -577,7 +577,7 @@ export const ProjectTracker = () => {
<span>{projectBoard.projectUsers?.length}</span>
{caseOfNum(
projectBoard.projectUsers?.length,
"persons",
"persons"
)}
</div>
<div className="persons__list__info">
@ -880,7 +880,7 @@ export const ProjectTracker = () => {
column.id,
projectBoard?.columns && column.tasks.length
? column.tasks[0].priority - 1
: 1,
: 1
);
}}
>
@ -959,7 +959,7 @@ export const ProjectTracker = () => {
onClick={() => {
if (window.innerWidth < 985) {
window.location.replace(
`/tracker/task/${task.id}`,
`/tracker/task/${task.id}`
);
}
}}
@ -1037,7 +1037,7 @@ export const ProjectTracker = () => {
{task.comment_count}{" "}
{caseOfNum(
task.comment_count,
"comments",
"comments"
)}
</span>
</div>
@ -1051,7 +1051,7 @@ export const ProjectTracker = () => {
</div>
<TrackerSelectColumn
columns={projectBoard.columns.filter(
(item) => item.id !== column.id,
(item) => item.id !== column.id
)}
currentColumn={column}
task={task}

View File

@ -34,7 +34,7 @@ export const Summary = () => {
useEffect(() => {
apiRequest(
`/profile/portfolio-projects?card_id=${localStorage.getItem("cardId")}`,
`/profile/portfolio-projects?card_id=${localStorage.getItem("cardId")}`
).then((responseGit) => setGitInfo(responseGit));
}, []);

View File

@ -57,8 +57,8 @@ export const Tracker = () => {
setLoader(true);
apiRequest(
`/project/project-list?user_id=${localStorage.getItem(
"id",
)}&expand=columns`,
"id"
)}&expand=columns`
).then((el) => {
dispatch(setAllProjects(el.projects));
setLoader(false);
@ -74,9 +74,7 @@ export const Tracker = () => {
// }, []))
});
apiRequest(
`/task/get-user-tasks?user_id=${localStorage.getItem(
"id",
)}&expand=timers`,
`/task/get-user-tasks?user_id=${localStorage.getItem("id")}&expand=timers`
).then((el) => {
const allTasks = el ? el.filter((item) => item.status !== 0) : [];
const completedTasks = el ? el.filter((item) => item.status === 0) : [];
@ -105,7 +103,7 @@ export const Tracker = () => {
) {
return item;
}
}),
})
);
}
@ -123,7 +121,7 @@ export const Tracker = () => {
) {
return item;
}
}),
})
);
}
@ -207,7 +205,7 @@ export const Tracker = () => {
{typeof projects === "object" &&
(!Boolean(projects.length) ||
!Boolean(
projects.filter((project) => project.status !== 10).length,
projects.filter((project) => project.status !== 10).length
)) &&
!loader && (
<div className="no-projects">
@ -473,7 +471,7 @@ export const Tracker = () => {
? "-"
: task.timers.map((item) => {
let time = new Date(
item.deltaSeconds * 1000,
item.deltaSeconds * 1000
)
.toISOString()
.slice(11, 19);
@ -509,13 +507,13 @@ export const Tracker = () => {
${caseOfNum(
projects.filter((project) => project.status === 10)
.length,
"projects",
"projects"
)}`}
</p>
</div>
<div className="archive__tasksWrapper">
{Boolean(
projects.filter((project) => project.status === 10).length,
projects.filter((project) => project.status === 10).length
) ? (
projects.map((project, index) => {
return project.status === 10 ? (

View File

@ -42,8 +42,8 @@ export const ViewReport = () => {
setTomorrowTask([]);
apiRequest(
`reports/find-by-date?user_card_id=${localStorage.getItem(
"cardId",
)}&date=${day}`,
"cardId"
)}&date=${day}`
).then((res) => {
let spendTime = 0;
for (const item of res) {

View File

@ -103,7 +103,7 @@ export const QuizPage = () => {
useEffect(() => {
apiRequest(
`/user-questionnaire/questionnaires-list?user_id=${userId}`,
`/user-questionnaire/questionnaires-list?user_id=${userId}`
).then((res) => dispatch(setQuestionnaires(res)));
}, []);