Merge pull request #143 from apuc/fixed-pages

Fixed pages
This commit is contained in:
MaxOvs19 2023-10-30 11:46:29 +03:00 committed by GitHub
commit 74ea0f9c77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 13 additions and 11 deletions

View File

@ -32,7 +32,7 @@ const Candidate = () => {
if (localStorage.getItem("role_status") !== "18") {
return <Navigate to="/profile" replace />;
}
const { id: candidateId } = useParams();
// const { id: candidateId } = useParams();
const navigate = useNavigate();
@ -47,10 +47,10 @@ const Candidate = () => {
}, []);
useEffect(() => {
apiRequest(`/profile/${candidateId}`, {
params: Number(candidateId),
}).then((el) => dispatch(currentCandidate(el)));
}, [dispatch, candidateId]);
apiRequest(`/user/me`, {}).then((el) =>
dispatch(currentCandidate(el.userCard))
);
}, [dispatch]);
const { position_id, skillValues, vc_text: text } = currentCandidateObj;

View File

@ -73,8 +73,8 @@ export const Navigation = () => {
if (localStorage.getItem("role_status") === "18") {
return;
}
apiRequest(`/profile/${localStorage.getItem("cardId")}`).then(
(profileInfo) => dispatch(setProfileInfo(profileInfo))
apiRequest(`/user/me`).then((profileInfo) =>
dispatch(setProfileInfo(profileInfo.userCard))
);
}, [dispatch]);

View File

@ -329,6 +329,8 @@ export const ProfileCalendarComponent = React.memo(
styles={"clear-days"}
onClick={() => {
resetRangeDays();
toggleActivePeriod();
toggleRangeDays();
}}
>
Сбросить

View File

@ -26,9 +26,9 @@ export const ProfileHeader = () => {
if (localStorage.getItem("role_status") === "18") {
return;
}
apiRequest(`/profile/${localStorage.getItem("cardId")}`).then(
(profileInfo) => dispatch(setProfileInfo(profileInfo))
);
apiRequest(`/user/me`).then((profileInfo) => {
dispatch(setProfileInfo(profileInfo.userCard));
});
}, [dispatch]);
const handler = () => {

View File

@ -129,7 +129,7 @@ export const Tracker = () => {
e.target.closest("img").classList.toggle("open-desc-item");
e.target
.closest("td")
.querySelector(".taskList__table__name-project")
?.querySelector(".taskList__table__name-project")
.classList.toggle("hide-desc");
}