Compare commits

..

No commits in common. "1fd6a736521086001bf1e7a2dc216021b83e0a46" and "8a2876e30bbb0b0148f00362acaf4c57f8da5829" have entirely different histories.

38 changed files with 379 additions and 271 deletions

View File

@ -106,15 +106,22 @@ const App = () => {
<Route exact path="/candidate/:id/form" element={<FormPage />} /> <Route exact path="/candidate/:id/form" element={<FormPage />} />
<Route path="/:userId/calendar" element={<Calendar />} /> <Route path="/:userId/calendar" element={<Calendar />} />
<Route exact path="/report" element={<ReportForm />} />
<Route path="/report/:id" element={<SingleReportPage />} /> <Route path="/report/:id" element={<SingleReportPage />} />
<Route exact path="quiz">
<Route index element={<QuizPage />} />
<Route exact path="test/:uuid" element={<PassingTests />} />
<Route exact path="report/:uuid" element={<QuizReportPage />} />
</Route>
<Route exact path="profile"> <Route exact path="profile">
<Route index element={<Profile />} /> <Route index element={<Profile />} />
<Route exact path="catalog" element={<Home />} /> <Route exact path="catalog" element={<Home />} />
<Route exact path="calendar" element={<ProfileCalendar />} /> <Route exact path="calendar" element={<ProfileCalendar />} />
<Route exact path="calendar/report" element={<ReportForm />} /> <Route exact path="calendar/view/" element={<ProfileCalendar />} />
<Route exact path="calendar/view/:date/:id" element={<ViewReport />} />
<Route exact path="summary" element={<Summary />} /> <Route exact path="summary" element={<Summary />} />
<Route exact path="view/:date/:id" element={<ViewReport />} />
<Route exact path="tracker" element={<Tracker />} /> <Route exact path="tracker" element={<Tracker />} />
<Route exact path="statistics/:id" element={<Statistics/>}/> <Route exact path="statistics/:id" element={<Statistics/>}/>
<Route exact path="payouts" element={<Payouts />} /> <Route exact path="payouts" element={<Payouts />} />
@ -126,11 +133,6 @@ const App = () => {
<Route exact path="employees" element={<PartnerCategories />} /> <Route exact path="employees" element={<PartnerCategories />} />
<Route exact path="employees/report/:uuid" element={<PartnerEmployeeReport />} /> <Route exact path="employees/report/:uuid" element={<PartnerEmployeeReport />} />
<Route exact path="treaties" element={<PartnerTreaties />} /> <Route exact path="treaties" element={<PartnerTreaties />} />
<Route exact path="quiz">
<Route index element={<QuizPage />} />
<Route exact path="test/:uuid" element={<PassingTests />} />
<Route exact path="report/:uuid" element={<QuizReportPage />} />
</Route>
<Route <Route
exact exact

View File

@ -24,13 +24,9 @@ const ArchiveTableTracker = ({ filterCompleteTasks, loader }) => {
); );
}) })
) : ( ) : (
<tr>
<td>
<div className="archive__noItem"> <div className="archive__noItem">
<p>В данном месяце у вас не было задач</p> <p>В данном месяце у вас не было задач</p>
</div> </div>
</td>
</tr>
)} )}
</> </>
)} )}

View File

@ -167,8 +167,12 @@
top: -20px; top: -20px;
@media (max-width: 900px) { @media (max-width: 900px) {
top: 100px; order: 1;
position: inherit;
right: inherit;
top: inherit;
max-width: 115px; max-width: 115px;
margin-bottom: 35px;
} }
} }
} }

View File

@ -60,7 +60,7 @@ const Calendar = () => {
<img className="calendar__title-img" src={rectangle} alt="img" /> <img className="calendar__title-img" src={rectangle} alt="img" />
</div> </div>
<div> <div>
<Link to="/profile/calendar/report"> <Link to="/report">
<button className="calendar__btn">Заполнить отчет</button> <button className="calendar__btn">Заполнить отчет</button>
</Link> </Link>
</div> </div>

View File

@ -1,6 +1,6 @@
.calendar-component { .calendar-component {
position: relative; position: relative;
margin: 10px 0; margin: 30px 0;
background-color: #f9f9f9; background-color: #f9f9f9;
padding: 20px 30px; padding: 20px 30px;
font-family: "LabGrotesque", sans-serif; font-family: "LabGrotesque", sans-serif;
@ -94,7 +94,7 @@
} }
&__rectangle { &__rectangle {
margin: 10px 0; margin: 20px 0;
img { img {
width: 100%; width: 100%;

View File

@ -48,7 +48,7 @@
text-decoration: none; text-decoration: none;
} }
a:focus, a.active { a:focus {
color: #000000; color: #000000;
} }

View File

@ -133,9 +133,9 @@
.edit-project, .edit-project,
.add-worker, .add-worker,
.edit-column { .edit-column {
// background: linear-gradient(180deg, #fff 0%, #ebebeb 37.29%); background: linear-gradient(180deg, #fff 0%, #ebebeb 37.29%);
.title-project { .title-project {
margin-top: 8px; margin-top: 20px;
} }
.button-add { .button-add {
margin-top: 8px; margin-top: 8px;

View File

@ -1,8 +1,8 @@
.error-login { .error-login {
position: relative; position: relative;
padding: 30px; padding: 54px 76px;
background: linear-gradient(180deg, #ffffff 0%, #ebebeb 100%); background: linear-gradient(180deg, #ffffff 0%, #ebebeb 100%);
border-radius: 20px; border-radius: 40px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
@ -15,7 +15,9 @@
} }
p { p {
font-size: 15px; font-size: 12px;
line-height: 14px;
width: 176px;
text-align: center; text-align: center;
font-weight: 300; font-weight: 300;
margin-bottom: 30px; margin-bottom: 30px;

View File

@ -616,7 +616,7 @@ export const TicketFullScreen = () => {
<div className="tracker__tabs__head"> <div className="tracker__tabs__head">
<Link <Link
to="/profile/tracker" to="/profile/tracker"
className="tab active-tab" className="tab active-tab projectsTab"
onClick={() => toggleTabs(1)} onClick={() => toggleTabs(1)}
> >
<img src={project} alt="img" /> <img src={project} alt="img" />
@ -624,7 +624,7 @@ export const TicketFullScreen = () => {
</Link> </Link>
<Link <Link
to="/profile/tracker" to="/profile/tracker"
className="tab" className="tab tasksTab"
onClick={() => toggleTabs(2)} onClick={() => toggleTabs(2)}
> >
<img src={tasks} alt="img" /> <img src={tasks} alt="img" />
@ -632,7 +632,7 @@ export const TicketFullScreen = () => {
</Link> </Link>
<Link <Link
to="/profile/tracker" to="/profile/tracker"
className="tab" className="tab archiveTab"
onClick={() => toggleTabs(3)} onClick={() => toggleTabs(3)}
> >
<img src={archive} alt="img" /> <img src={archive} alt="img" />

View File

@ -70,7 +70,6 @@ export const TrackerModal = ({
const [workers, setWorkers] = useState([]); const [workers, setWorkers] = useState([]);
const [selectWorkersOpen, setSelectWorkersOpen] = useState(false); const [selectWorkersOpen, setSelectWorkersOpen] = useState(false);
const [selectedWorker, setSelectedWorker] = useState(null); const [selectedWorker, setSelectedWorker] = useState(null);
const [emailWorker, setEmailWorker] = useState("");
const [selectColumnPriority, setSelectColumnPriority] = useState( const [selectColumnPriority, setSelectColumnPriority] = useState(
"Выберите приоритет колонки" "Выберите приоритет колонки"
); );
@ -306,19 +305,6 @@ export const TrackerModal = ({
}); });
} }
function inviteUserByEmail() {
apiRequest("/project/add-user-by-email", {
method: "POST",
data: {
email: emailWorker,
project_id: projectBoard.id
}
}).then((el) => {
setActive(false);
setEmailWorker("");
});
}
useEffect(() => { useEffect(() => {
modalType === "add-worker" modalType === "add-worker"
? apiRequest("/project/my-employee").then((el) => { ? apiRequest("/project/my-employee").then((el) => {
@ -400,12 +386,26 @@ export const TrackerModal = ({
}; };
return ( return (
<ModalLayout active={active} setActive={setActive} type={modalType}> <ModalLayout
active={active}
setActive={setActive}
type={modalType}
// onClick={() => {
// setSelectWorkersOpen(false);
// }}
>
{modalType === "add-worker" && ( {modalType === "add-worker" && (
<> <>
<div className="select__person"> <div className="select__person">
<div className="title-project select-person"> <div className="title-project select-person">
<h4>Добавьте участника</h4> <h4>Добавьте участника</h4>
{/*<div className="input-container">*/}
{/* <input*/}
{/* className="name-project"*/}
{/* value={emailWorker}*/}
{/* onChange={(e) => setEmailWorker(e.target.value)}*/}
{/* />*/}
{/*</div>*/}
<p className="select-person__info"> <p className="select-person__info">
Выберите пользователя в проекте или добавьте по e-mail Выберите пользователя в проекте или добавьте по e-mail
</p> </p>
@ -468,14 +468,9 @@ export const TrackerModal = ({
className="name-project" className="name-project"
placeholder="e-mail" placeholder="e-mail"
type="email" type="email"
value={emailWorker}
onChange={(e) => setEmailWorker(e.target.value)}
/> />
</div> </div>
<BaseButton <BaseButton styles={"button-add invite-person-block__btn"}>
styles={"button-add invite-person-block__btn"}
onClick={inviteUserByEmail}
>
Отправить приглашение Отправить приглашение
</BaseButton> </BaseButton>
</div> </div>
@ -499,6 +494,11 @@ export const TrackerModal = ({
alt="avatar" alt="avatar"
/> />
</div> </div>
{/*<span>Этап</span>*/}
{/*<div className="createTaskHead__selectColumn">*/}
{/* <span>Backlog</span>*/}
{/* <img src={arrowCreateTask} alt="arrow" />*/}
{/*</div>*/}
</div> </div>
<div className="createTaskBody"> <div className="createTaskBody">
<div className="createTaskBody__left"> <div className="createTaskBody__left">
@ -793,8 +793,7 @@ export const TrackerModal = ({
{modalType === "edit-column" && ( {modalType === "edit-column" && (
<div> <div>
<div className="title-project"> <div className="title-project">
<div> <h4>Введите новое название</h4>
<h4>Название колонки</h4>
<div className="input-container"> <div className="input-container">
<input <input
className="name-project" className="name-project"
@ -802,8 +801,6 @@ export const TrackerModal = ({
onChange={(e) => dispatch(setColumnName(e.target.value))} onChange={(e) => dispatch(setColumnName(e.target.value))}
/> />
</div> </div>
</div>
<div>
<h4>Приоритет колонки</h4> <h4>Приоритет колонки</h4>
<div <div
className={ className={
@ -835,7 +832,16 @@ export const TrackerModal = ({
</div> </div>
)} )}
</div> </div>
</div> {/*<div className="input-container">*/}
{/* <input*/}
{/* className="name-project"*/}
{/* placeholder="Приоритет колонки"*/}
{/* type="number"*/}
{/* step="1"*/}
{/* value={columnPriority}*/}
{/* onChange={(e) => dispatch(setColumnPriority(e.target.value))}*/}
{/* />*/}
{/*</div>*/}
</div> </div>
<BaseButton styles={"button-add"} onClick={changeColumnParams}> <BaseButton styles={"button-add"} onClick={changeColumnParams}>
Сохранить Сохранить

View File

@ -30,12 +30,13 @@
display: flex; display: flex;
align-items: center; align-items: center;
flex-direction: column; flex-direction: column;
row-gap: 12px; row-gap: 8px;
padding-bottom: 15px; padding-bottom: 10px;
.select-priority { .select-priority {
background-color: white; background-color: white;
width: 100%; width: 100%;
margin: 12px 0;
padding: 10px 8px; padding: 10px 8px;
border-radius: 8px; border-radius: 8px;
font-size: 14px; font-size: 14px;

View File

@ -1,5 +1,5 @@
import React, { useState } from "react"; import React, { useEffect, useState } from "react";
import { useSelector } from "react-redux"; import { useDispatch, useSelector } from "react-redux";
import { NavLink } from "react-router-dom"; import { NavLink } from "react-router-dom";
import { getProfileInfo } from "@redux/outstaffingSlice"; import { getProfileInfo } from "@redux/outstaffingSlice";
@ -9,8 +9,9 @@ import { urlForLocal } from "@utils/helper";
import avatarMok from "assets/images/avatarMok.png"; import avatarMok from "assets/images/avatarMok.png";
export const Navigation = () => { export const Navigation = () => {
const dispatch = useDispatch();
const profileInfo = useSelector(getProfileInfo); const profileInfo = useSelector(getProfileInfo);
const currentPath = window.location.pathname;
const [user] = useState( const [user] = useState(
localStorage.getItem("role_status") === "18" ? "partner" : "developer" localStorage.getItem("role_status") === "18" ? "partner" : "developer"
); );
@ -34,7 +35,7 @@ export const Navigation = () => {
name: "Выплаты" name: "Выплаты"
}, },
{ {
path: "/quiz", path: "/Quiz",
name: "Тесты" name: "Тесты"
}, },
{ {
@ -70,17 +71,32 @@ export const Navigation = () => {
] ]
}); });
useEffect(() => {
if (localStorage.getItem("role_status") === "18") {
return;
}
// if (Object.keys(profileInfo).length) {
// return;
// }
// apiRequest(`/user/me`).then((profileInfo) =>
// dispatch(
// setProfileInfo(
// profileInfo.userCard ? profileInfo.userCard : profileInfo
// )
// )
// );
}, []);
return ( return (
<div className="profile-header__info"> <div className="profileHeader__info">
<div className="profile-header__container"> <div className="profileHeader__container">
<nav className="profile-header__nav"> <nav className="profileHeader__nav">
{navInfo[user].map((link, index) => { {navInfo[user].map((link, index) => {
return ( return (
<NavLink <NavLink
key={index} key={index}
end end
to={link.path === "/Quiz" ? link.path : `/profile${link.path}`} to={link.path === "/Quiz" ? link.path : `/profile${link.path}`}
className={currentPath.includes(link.path) ? "active" : ""}
> >
{link.name} {link.name}
</NavLink> </NavLink>
@ -88,8 +104,8 @@ export const Navigation = () => {
})} })}
</nav> </nav>
<div className="profile-header__personalInfo"> <div className="profileHeader__personalInfo">
<h3 className="profile-header__personalInfoName"> <h3 className="profileHeader__personalInfoName">
{profileInfo?.fio ? profileInfo?.fio : profileInfo?.username} {profileInfo?.fio ? profileInfo?.fio : profileInfo?.username}
</h3> </h3>
<NavLink end to={"/profile"}> <NavLink end to={"/profile"}>
@ -97,7 +113,7 @@ export const Navigation = () => {
src={ src={
profileInfo?.photo ? urlForLocal(profileInfo.photo) : avatarMok profileInfo?.photo ? urlForLocal(profileInfo.photo) : avatarMok
} }
className="profile-header__personalInfoAvatar" className="profileHeader__personalInfoAvatar"
alt="avatar" alt="avatar"
/> />
</NavLink> </NavLink>

View File

@ -98,7 +98,7 @@ export const ProfileCalendar = () => {
{profileInfo.specification} разработчик {profileInfo.specification} разработчик
</p> </p>
</div> </div>
<Link to="/profile/calendar/report"> <Link to="/report">
<button <button
className="calendar__btn" className="calendar__btn"
onClick={() => dispatch(setReportDate(""))} onClick={() => dispatch(setReportDate(""))}

View File

@ -96,11 +96,9 @@ export const ProfileCalendarComponent = React.memo(
)}-${correctDay(new Date(day).getDate())}` === date.created_at )}-${correctDay(new Date(day).getDate())}` === date.created_at
) { ) {
if (userId) { if (userId) {
return `/profile/calendar/view/${date.created_at}/${userId}`; return `../view/${date.created_at}/${userId}`;
} }
return `/profile/calendar/view/${ return `../view/${date.created_at}/${localStorage.getItem("id")}`;
date.created_at
}/${localStorage.getItem("id")}`;
} }
} }
@ -108,7 +106,7 @@ export const ProfileCalendarComponent = React.memo(
return "#"; return "#";
} }
return "/profile/calendar/report"; return "../../report";
} }
const prevMonth = () => value.clone().subtract(1, "month"); const prevMonth = () => value.clone().subtract(1, "month");

View File

@ -33,6 +33,7 @@
} }
.calendar__wrapper { .calendar__wrapper {
min-height: 719px;
@media (max-width: 1000px) { @media (max-width: 1000px) {
min-height: auto; min-height: auto;

View File

@ -20,6 +20,19 @@ export const ProfileHeader = () => {
const [isLoggingOut, setIsLoggingOut] = useState(false); const [isLoggingOut, setIsLoggingOut] = useState(false);
// useEffect(() => {
// if (Object.keys(profileInfo).length) {
// return;
// }
// apiRequest(`/user/me`).then((profileInfo) => {
// dispatch(
// setProfileInfo(
// profileInfo.userCard ? profileInfo.userCard : profileInfo
// )
// );
// });
// }, [dispatch]);
useEffect(() => { useEffect(() => {
if (!Object.keys(profileInfo).length) if (!Object.keys(profileInfo).length)
apiRequest(`/user/me`).then((profileInfo) => { apiRequest(`/user/me`).then((profileInfo) => {
@ -41,16 +54,16 @@ export const ProfileHeader = () => {
}; };
return ( return (
<header className="profile-header"> <header className="profileHeader">
<div className="profile-header__head"> <div className="profileHeader__head">
<div className="profile-header__container"> <div className="profileHeader__container">
<NavLink to={"/profile"} className="profile-header__title"> <NavLink to={"/profile"} className="profileHeader__title">
itguild. itguild.
<span> <span>
{user === "developer" ? "для разработчиков" : "для партнеров"} {user === "developer" ? "для разработчиков" : "для партнеров"}
</span> </span>
</NavLink> </NavLink>
<button onClick={handler} className="profile-header__logout"> <button onClick={handler} className="profileHeader__logout">
{isLoggingOut ? <Loader /> : "Выйти"} {isLoggingOut ? <Loader /> : "Выйти"}
</button> </button>
</div> </div>

View File

@ -1,4 +1,4 @@
.profile-header { .profileHeader {
width: 100%; width: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -53,24 +53,24 @@
flex-wrap: wrap; flex-wrap: wrap;
column-gap: 30px; column-gap: 30px;
.active {
color: #000000 !important;
}
a { a {
text-decoration: none; text-decoration: none !important;
cursor: pointer; cursor: pointer;
font-weight: 700; font-weight: 700;
font-size: 18px; font-size: 18px;
line-height: 32px; line-height: 32px;
color: #807777; color: #807777 !important;
transition: all 0.3s ease; transition: all 0.3s ease;
&:hover { &:hover {
color: #261a1a; color: #261a1a !important;
} }
} }
a.active {
color: #000000;
}
@media (max-width: 800px) { @media (max-width: 800px) {
column-gap: 15px; column-gap: 15px;

View File

@ -75,6 +75,8 @@ export const ProjectTicket = ({ project, index }) => {
setModalDelete(false); setModalDelete(false);
} }
function linkProject() {}
return ( return (
<div className={`project project-${project.id}`} key={index}> <div className={`project project-${project.id}`} key={index}>
<Link <Link

View File

@ -2,11 +2,13 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
position: relative; position: relative;
width: 300px; width: 322px;
background: #f1f1f1; background: #f1f1f1;
border-radius: 12px; border-radius: 12px;
cursor: pointer; cursor: pointer;
max-width: 440px;
transition: 0.4s; transition: 0.4s;
&:hover { &:hover {
@ -24,12 +26,15 @@
&__link { &__link {
font-weight: 700; font-weight: 700;
width: 194px;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
font-size: 18px; font-size: 18px;
line-height: 32px;
color: #111112; color: #111112;
margin-bottom: 10px; margin-bottom: 22px;
max-width: 380px;
&:hover { &:hover {
color: black; color: black;
@ -40,7 +45,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
position: relative; position: relative;
margin-bottom: 30px; margin-bottom: 45px;
p { p {
color: #6f6f6f; color: #6f6f6f;
@ -48,6 +53,7 @@
font-size: 12px; font-size: 12px;
font-weight: 500; font-weight: 500;
line-height: 17px; line-height: 17px;
width: 60px;
} }
.count { .count {
@ -91,13 +97,13 @@
} }
&__open-tracker { &__open-tracker {
padding: 10px 15px; padding: 17px 26px 16px;
} }
&__statistics { &__statistics {
position: absolute; position: absolute;
bottom: 13px; bottom: 18px;
left: 15px; left: 26px;
color: #0042b4; color: #0042b4;
text-decoration: underline; text-decoration: underline;
font-size: 14px; font-size: 14px;

View File

@ -87,12 +87,10 @@ const ReportForm = () => {
}; };
const handler = () => { const handler = () => {
setIsFetching(true);
for (let input of inputs) { for (let input of inputs) {
if (!input.task || !input.hours_spent) { if (!input.task || !input.hours_spent) {
setReportSuccess("Заполните задачи"); setReportSuccess("Заполните задачи");
setTimeout(() => setReportSuccess(""), 2000); setTimeout(() => setReportSuccess(""), 2000);
setIsFetching(false);
return; return;
} }
} }
@ -294,16 +292,12 @@ const ReportForm = () => {
<div className="row"> <div className="row">
<div className="col-12"> <div className="col-12">
<div className="report-form__footer"> <div className="report-form__footer">
{isFetching ? (
<Loader style={"green"} />
) : (
<button <button
className="report-form__footer-btn" className="report-form__footer-btn"
onClick={() => handler()} onClick={() => handler()}
> >
Отпаравить {isFetching ? <Loader /> : "Отправить"}
</button> </button>
)}
<p className="report-form__footer-text"> <p className="report-form__footer-text">
Всего за день:{" "} Всего за день:{" "}
<span> <span>

View File

@ -80,9 +80,7 @@ export const ShortReport = () => {
<h2 className="viewReport__title"> <h2 className="viewReport__title">
Ваши отчеты - <span>просмотр отчета за день</span> Ваши отчеты - <span>просмотр отчета за день</span>
</h2> </h2>
<Link to={`/profile/calendar/view/${dateCreate}`}> <Link to={`../view/${dateCreate}`}>Посмотреть подробный отчет</Link>
Посмотреть подробный отчет
</Link>
</div> </div>
<div className="viewReport__bar"> <div className="viewReport__bar">

View File

@ -9,11 +9,7 @@ export const CardAvailableTest = ({ title, description, path, status }) => {
return ( return (
<div className="card-available-test"> <div className="card-available-test">
<Link <Link
to={ to={status === 2 ? `/quiz/report/${path}` : `/quiz/test/${path}`}
status === 2
? `/profile/quiz/report/${path}`
: `/profile/quiz/test/${path}`
}
aria-disabled={true} aria-disabled={true}
className="card-available-test__container" className="card-available-test__container"
style={ style={
@ -37,7 +33,7 @@ export const CardAvailableTest = ({ title, description, path, status }) => {
{status === 2 && ( {status === 2 && (
<div className="card-available-test__finished"> <div className="card-available-test__finished">
<p>Получить отчет по тестированию</p> <p>Получить отчет по тестированию</p>
<Link to={`/profile/quiz/report/${path}`}>Отчет по тесту</Link> <Link to={`/quiz/report/${path}`}>Отчет по тесту</Link>
</div> </div>
)} )}
</div> </div>

View File

@ -25,13 +25,13 @@ export const QuizReport = ({ info }) => {
<div className="report__value"> <div className="report__value">
{Boolean(correctAnswers()) ? correctAnswers() : 0} {Boolean(correctAnswers()) ? correctAnswers() : 0}
</div> </div>
<div className="report__text">правильных ответов</div> <div className="report__text">Правильных ответов</div>
</div> </div>
<div className="report__column"> <div className="report__column">
<div className="report__value report__value_false"> <div className="report__value report__value_false">
{Boolean(correctWrongAnswers()) ? correctWrongAnswers() : 0} {Boolean(correctWrongAnswers()) ? correctWrongAnswers() : 0}
</div> </div>
<div className="report__text">неправильных ответов</div> <div className="report__text">Не правильных ответов</div>
</div> </div>
<div className="report__column"> <div className="report__column">
<div className="report__status-text">Статус:</div> <div className="report__status-text">Статус:</div>

View File

@ -505,10 +505,12 @@ $maxWidthContainer: 1123;
} }
&__finished { &__finished {
background: white; background: white;
mix-blend-mode: normal;
border: 3px solid #52b709;
border-radius: 12px; border-radius: 12px;
padding: 13px 16px; padding: 13px 16px;
position: absolute; position: absolute;
bottom: 20px; bottom: 4px;
left: 0; left: 0;
display: flex; display: flex;
align-items: center; align-items: center;

View File

@ -0,0 +1,14 @@
import React from "react";
import { ActContent } from "@components/features/bookkeeping/ActContent/ActContent";
import { BookkeepingTemplete } from "@components/features/bookkeeping/BookkeepingTemplete/BookkeepingTemplete";
export const ActPage = () => {
return (
<div>
<BookkeepingTemplete showBreadcrumps nameBreeadcrumps="Создание акта">
<ActContent></ActContent>
</BookkeepingTemplete>
</div>
);
};

View File

@ -15,7 +15,7 @@
&__about { &__about {
display: flex; display: flex;
align-items: center; align-items: center;
margin: 30px 0; margin-bottom: 30px;
@media (max-width: 600px) { @media (max-width: 600px) {
flex-wrap: wrap; flex-wrap: wrap;
row-gap: 25px; row-gap: 25px;

View File

@ -92,7 +92,7 @@ export const PartnerSettings = () => {
]} ]}
/> />
<div className="partner-settings"> <div className="partner-settings">
<h2 className="info-personal__title">Настройки профиля</h2> <h2 className="infoPersonal__title">Настройки профиля</h2>
<div className="partner-settings__body"> <div className="partner-settings__body">
<div className="partner-settings__login"> <div className="partner-settings__login">
<h3 className="settings__title">Вход в систему</h3> <h3 className="settings__title">Вход в систему</h3>

View File

@ -4,7 +4,7 @@
min-height: 100vh; min-height: 100vh;
font-family: "LabGrotesque", sans-serif; font-family: "LabGrotesque", sans-serif;
.info-personal__title { .infoPersonal__title {
color: #000000; color: #000000;
font-weight: 700; font-weight: 700;
font-size: 22px; font-size: 22px;
@ -12,7 +12,6 @@
} }
&__page { &__page {
min-height: 750px;
max-width: 1160px !important; max-width: 1160px !important;
margin-top: 23px; margin-top: 23px;
} }
@ -135,7 +134,7 @@
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: space-around; justify-content: space-around;
margin-top: 50px; margin-top: 27px;
} }
&__report, &__report,

View File

@ -397,8 +397,15 @@ export const ProjectTracker = () => {
div.classList.contains("tags__list")) div.classList.contains("tags__list"))
) )
) { ) {
setTags({ open: false, add: false, edit: false }); setTags({
setTagInfo({ description: "", name: "" }); open: false,
add: false,
edit: false
});
setTagInfo({
description: "",
name: ""
});
setColor("#aabbcc"); setColor("#aabbcc");
} }
@ -444,7 +451,7 @@ export const ProjectTracker = () => {
<div className="tracker__tabs__head"> <div className="tracker__tabs__head">
<Link <Link
to="/profile/tracker" to="/profile/tracker"
className="tab active-tab tab" className="tab active-tab tab projectsTab"
onClick={() => dispatch(setToggleTab(1))} onClick={() => dispatch(setToggleTab(1))}
> >
<img src={project} alt="img" /> <img src={project} alt="img" />
@ -452,7 +459,7 @@ export const ProjectTracker = () => {
</Link> </Link>
<Link <Link
to="/profile/tracker" to="/profile/tracker"
className="tab" className="tab tasksTab"
onClick={() => dispatch(setToggleTab(2))} onClick={() => dispatch(setToggleTab(2))}
> >
<img src={tasks} alt="img" /> <img src={tasks} alt="img" />
@ -460,7 +467,7 @@ export const ProjectTracker = () => {
</Link> </Link>
<Link <Link
to="/profile/tracker" to="/profile/tracker"
className="tab" className="tab archiveTab"
onClick={() => dispatch(setToggleTab(3))} onClick={() => dispatch(setToggleTab(3))}
> >
<img src={archive} alt="img" /> <img src={archive} alt="img" />
@ -955,11 +962,20 @@ export const ProjectTracker = () => {
src={commentsBoard} src={commentsBoard}
alt="commentsImg" alt="commentsImg"
/> />
<span>{task.comment_count}</span> <span>
{task.comment_count}{" "}
{/* {caseOfNum(
task.comment_count,
"comments"
)} */}
</span>
</div> </div>
<div className="tasks__board__item__info__more"> <div className="tasks__board__item__info__more">
<img src={filesBoard} alt="filesImg" /> <img src={filesBoard} alt="filesImg" />
<span>{task.file_count}</span> <span>
{task.file_count ? task.file_count : 0}{" "}
{/* {caseOfNum(0, "files")} */}
</span>
</div> </div>
</div> </div>
<TrackerSelectColumn <TrackerSelectColumn

View File

@ -120,12 +120,12 @@ export const PassingTests = () => {
))} ))}
</div> </div>
)} )}
{/*{!startTest && (*/} {!startTest && (
{/* <div className="passing-tests-page__block-text block-text">*/} <div className="passing-tests-page__block-text block-text">
{/* ИЛИ <Link to={""}>выполните тестовое задание</Link>, без*/} ИЛИ <Link to={""}>выполните тестовое задание</Link>, без
{/* прохождения тестов*/} прохождения тестов
{/* </div>*/} </div>
{/*)}*/} )}
</> </>
)} )}
{completedTest && ( {completedTest && (

View File

@ -144,10 +144,10 @@ export const QuizPage = () => {
<h1>Анкет нет</h1> <h1>Анкет нет</h1>
)} )}
</div> </div>
{/*<div className="block-text">*/} <div className="block-text">
{/* ИЛИ <Link to={""}>выполните тестовое задание</Link>, без*/} ИЛИ <Link to={""}>выполните тестовое задание</Link>, без
{/* прохождения тестов*/} прохождения тестов
{/*</div>*/} </div>
</> </>
)} )}
{selectedCategory && ( {selectedCategory && (

View File

@ -42,8 +42,8 @@ export const QuizReportPage = () => {
<ProfileBreadcrumbs <ProfileBreadcrumbs
links={[ links={[
{ name: "Главная", link: "/profile-candidate" }, { name: "Главная", link: "/profile-candidate" },
{ name: "Тестирование", link: "/profile/quiz" }, { name: "Тестирование", link: "/Quiz" },
{ name: "Отчет по тестированию", link: "/profile/quiz" } { name: "Отчет по тестированию", link: "/Quiz/report" }
]} ]}
/> />
<div className="quiz-report-page__title main-title"> <div className="quiz-report-page__title main-title">

View File

@ -76,7 +76,7 @@ const Statistics = () => {
<div className="tracker__tabs__head"> <div className="tracker__tabs__head">
<Link <Link
to="/profile/tracker" to="/profile/tracker"
className="tab active-tab" className="tab active-tab projectsTab"
onClick={() => toggleTabs(1)} onClick={() => toggleTabs(1)}
> >
<img src={project} alt="img" /> <img src={project} alt="img" />
@ -84,7 +84,7 @@ const Statistics = () => {
</Link> </Link>
<Link <Link
to="/profile/tracker" to="/profile/tracker"
className="tab" className="tab tasksTab"
onClick={() => toggleTabs(2)} onClick={() => toggleTabs(2)}
> >
<img src={tasks} alt="img" /> <img src={tasks} alt="img" />
@ -92,7 +92,7 @@ const Statistics = () => {
</Link> </Link>
<Link <Link
to="/profile/tracker" to="/profile/tracker"
className="tab" className="tab archiveTab"
onClick={() => toggleTabs(3)} onClick={() => toggleTabs(3)}
> >
<img src={archive} alt="img" /> <img src={archive} alt="img" />

View File

@ -51,6 +51,7 @@ export const Tracker = () => {
const [allCompletedTasks, setAllCompletedTasks] = useState([]); const [allCompletedTasks, setAllCompletedTasks] = useState([]);
const [modalCreateProject, setModalCreateProject] = useState(false); const [modalCreateProject, setModalCreateProject] = useState(false);
const tabs = ["projectsTab", "tasksTab", "archiveTab"];
useEffect(() => { useEffect(() => {
setLoader(true); setLoader(true);
@ -142,28 +143,32 @@ export const Tracker = () => {
<div className="tracker__tabs"> <div className="tracker__tabs">
<div className="tracker__tabs__head"> <div className="tracker__tabs__head">
<div <div
className={tab === 1 ? "tab active-tab" : "tab"} className={
tab === 1 ? "tab active-tab projectsTab" : "tab projectsTab"
}
onClick={() => toggleTabs(1)} onClick={() => toggleTabs(1)}
> >
<img src={project} alt="img" /> <img src={project} alt="img" />
<p>Проекты </p> <p>Проекты </p>
</div> </div>
<div <div
className={tab === 2 ? "tab active-tab" : "tab"} className={tab === 2 ? "tab active-tab tasksTab" : "tab tasksTab"}
onClick={() => toggleTabs(2)} onClick={() => toggleTabs(2)}
> >
<img src={tasks} alt="img" /> <img src={tasks} alt="img" />
<p>Все мои задачи</p> <p>Все мои задачи</p>
</div> </div>
<div <div
className={tab === 3 ? "tab active-tab" : "tab"} className={
tab === 3 ? "tab active-tab archiveTab" : "tab archiveTab"
}
onClick={() => toggleTabs(3)} onClick={() => toggleTabs(3)}
> >
<img src={archive} alt="img" /> <img src={archive} alt="img" />
<p>Архив</p> <p>Архив</p>
</div> </div>
</div> </div>
<div className={`tracker__tabs__content`}> <div className={`tracker__tabs__content ${tabs[tab - 1]}`}>
<div <div
className={ className={
tab === 1 tab === 1
@ -196,7 +201,7 @@ export const Tracker = () => {
)) && )) &&
!loader && ( !loader && (
<div className="no-projects"> <div className="no-projects">
<div className="no-projects__create-new"> <div className="no-projects__createNew">
<div> <div>
<img src={noProjects} alt="noProjectImg" /> <img src={noProjects} alt="noProjectImg" />
<p>Создайте свой первый проект</p> <p>Создайте свой первый проект</p>
@ -246,7 +251,7 @@ export const Tracker = () => {
<p> <p>
{25} - {35} {25} - {35}
</p> </p>
<h3>Сентября,</h3> <h2>Сентября,</h2>
<h3>2023</h3> <h3>2023</h3>
</div> </div>

View File

@ -34,7 +34,6 @@
} }
&__tabs { &__tabs {
min-height: 600px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -49,9 +48,11 @@
height: 60px; height: 60px;
@media (max-width: 650px) { @media (max-width: 650px) {
background: none;
justify-content: space-between; justify-content: space-between;
position: relative; position: relative;
top: 15px; top: 15px;
height: auto;
} }
} }
@ -88,19 +89,22 @@
} }
@media (max-width: 650px) { @media (max-width: 650px) {
border-radius: 10px 10px 0 0; border-radius: 10px;
padding: 10px; flex-direction: column;
align-items: center; padding: 20px;
align-items: start;
row-gap: 20px;
height: auto !important;
p { p {
margin-left: 5px; margin-left: 0;
} }
} }
} }
.active-tab { .active-tab {
background: white; background: white;
border-radius: 12px 12px 0px 0px; border-radius: 12px 12px 5px 5px;
position: relative; position: relative;
height: 73px; height: 73px;
display: flex; display: flex;
@ -117,15 +121,17 @@
} }
@media (max-width: 650px) { @media (max-width: 650px) {
padding: 10px 20px; border-radius: 10px;
align-items: start;
top: 0;
} }
} }
&__content { &__content {
width: 100%; width: 100%;
background: #ffffff; background: #ffffff;
padding: 30px 0; padding: 15px 0;
margin-bottom: 10px; margin-bottom: 50px;
&__wrapper { &__wrapper {
max-width: 1160px; max-width: 1160px;
@ -139,10 +145,10 @@
row-gap: 30px; row-gap: 30px;
display: none; display: none;
align-items: center; align-items: center;
justify-content: center;
@media (max-width: 785px) { @media (max-width: 785px) {
row-gap: 25px; row-gap: 25px;
justify-content: center;
padding: 0 15px 20px; padding: 0 15px 20px;
} }
@ -152,7 +158,7 @@
padding: 20px; padding: 20px;
width: 100%; width: 100%;
&__create-new { &__createNew {
display: flex; display: flex;
div { div {
display: flex; display: flex;
@ -171,11 +177,14 @@
} }
.create-project-btn { .create-project-btn {
width: 300px; max-width: 322px;
height: 113px; width: 322px;
height: 166px;
border-radius: 12px; border-radius: 12px;
background: #ecf8e5; background: #ecf8e5;
color: #000000; color: #000000;
font-weight: 400;
font-size: 15px;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
@ -183,9 +192,10 @@
&__text { &__text {
text-align: left; text-align: left;
font-weight: 400; font-size: 14px;
font-size: 18px; font-weight: 250;
margin-left: 15px; width: 190px;
margin-left: 25px;
} }
&:hover { &:hover {
@ -193,13 +203,10 @@
box-shadow: 4px 4px 8px 0px rgba(34, 60, 80, 0.11); box-shadow: 4px 4px 8px 0px rgba(34, 60, 80, 0.11);
} }
@media (max-width: 1068px) { @media (max-width: 650px) {
width: 47%; height: 40px;
} font-size: 12px;
height: 166px;
@media (max-width: 785px) {
max-width: 394px;
width: 100%;
} }
} }
} }
@ -224,6 +231,10 @@
padding: 0 15px 15px; padding: 0 15px 15px;
} }
@media (max-width: 650px) {
background-color: #dff1ff;
}
&__wrapper { &__wrapper {
display: flex; display: flex;
max-width: 1400px; max-width: 1400px;
@ -1902,12 +1913,25 @@
@media (max-width: 650px) { @media (max-width: 650px) {
&__content { &__content {
padding: 28px 0 0; padding: 28px 0 0;
background-color: #dff1ff;
.project { .project {
background-color: #eeeeee; background-color: white;
max-width: 394px; max-width: 394px;
} }
} }
.projectsTab {
background-color: #dff1ff;
}
.tasksTab {
background-color: #e8ffeb;
}
.archiveTab {
background-color: #ffecef;
}
} }
} }
} }

View File

@ -94,8 +94,13 @@
top: -100px; top: -100px;
right: 58px; right: 58px;
@media (max-width: 900px) { @media (max-width: 1000px) {
display: none; position: inherit;
order: 1;
top: inherit;
right: inherit;
max-width: 115px;
margin-bottom: 25px;
} }
} }
} }

View File

@ -1,5 +1,5 @@
import React, { useEffect, useState } from "react"; import React, { useEffect, useState } from "react";
import { Link, useParams } from "react-router-dom"; import { Link, Navigate, useParams } from "react-router-dom";
import { apiRequest } from "@api/request"; import { apiRequest } from "@api/request";
@ -27,11 +27,9 @@ export const ViewReport = () => {
const [taskText, setTaskText] = useState([]); const [taskText, setTaskText] = useState([]);
const [difficulties, setDifficulties] = useState([]); const [difficulties, setDifficulties] = useState([]);
const [tomorrowTask, setTomorrowTask] = useState([]); const [tomorrowTask, setTomorrowTask] = useState([]);
const [taskId, setTaskId] = useState("");
const [totalHours, setTotalHours] = useState(0); const [totalHours, setTotalHours] = useState(0);
const [currentDay] = useState(new Date()); const [currentDay] = useState(new Date());
const [loader, setLoader] = useState(false); const [loader, setLoader] = useState(false);
const [deleteLoader, setDeleteLoader] = useState(false);
function getReportFromDate(day) { function getReportFromDate(day) {
setLoader(true); setLoader(true);
@ -41,7 +39,6 @@ export const ViewReport = () => {
apiRequest(`reports/find-by-date?user_id=${params.id}&date=${day}`).then( apiRequest(`reports/find-by-date?user_id=${params.id}&date=${day}`).then(
(res) => { (res) => {
let spendTime = 0; let spendTime = 0;
setTaskId(res[0]?.id);
for (const item of res) { for (const item of res) {
if (item.difficulties) { if (item.difficulties) {
setDifficulties((prevArray) => [...prevArray, item.difficulties]); setDifficulties((prevArray) => [...prevArray, item.difficulties]);
@ -68,18 +65,6 @@ export const ViewReport = () => {
nextReportDay.setDate(nextReportDay.getDate() + 1); nextReportDay.setDate(nextReportDay.getDate() + 1);
} }
function deleteReport() {
setDeleteLoader(true);
apiRequest(`reports/delete?id=${taskId}`, {
method: "DELETE"
}).then((res) => {
setDeleteLoader(false);
if (res) {
window.location.replace("/profile/calendar");
}
});
}
function nextDay() { function nextDay() {
getReportFromDate(getCreatedDate(nextReportDay)); getReportFromDate(getCreatedDate(nextReportDay));
previousReportDay.setDate(previousReportDay.getDate() + 2); previousReportDay.setDate(previousReportDay.getDate() + 2);
@ -125,32 +110,22 @@ export const ViewReport = () => {
<img src={arrow} alt="#" /> <img src={arrow} alt="#" />
<p>Вернуться</p> <p>Вернуться</p>
</Link> </Link>
{localStorage.getItem("role_status") !== "18" && ( {/* <div className="viewReport__bar">
<div className="viewReport__bar"> <h3 className="viewReport__bar__date">
<button className="viewReport__bar__edit">Редактировать</button> {getCorrectDate(dateReport.id)}
{deleteLoader ? ( </h3>
<Loader style={"green"} /> <p className="viewReport__bar__hours">
) : ( Вами потрачено на работу:{" "}
<button <span>
onClick={deleteReport} {totalHours} {hourOfNum(totalHours)}
className={ </span>
taskText.length </p>
? "viewReport__bar__delete" </div> */}
: "viewReport__bar__delete disable"
}
>
Удалить отчет
</button>
)}
</div>
)}
</div> </div>
<div className="viewReport__switch-date"> <div className="viewReport__switch-date">
<div onClick={() => previousDay()}> <div onClick={() => previousDay()}>
<Link <Link
to={`/profile/calendar/view/${getCreatedDate( to={`../view/${getCreatedDate(previousReportDay)}/${params.id}`}
previousReportDay
)}/${params.id}`}
> >
<div className="viewReport__switch-date__prev switch-date"> <div className="viewReport__switch-date__prev switch-date">
<img src={arrowSwitchDate} alt="arrow" /> <img src={arrowSwitchDate} alt="arrow" />
@ -166,11 +141,7 @@ export const ViewReport = () => {
getCreatedDate(currentDay) === params.date ? "disable" : "" getCreatedDate(currentDay) === params.date ? "disable" : ""
}`} }`}
> >
<Link <Link to={`../view/${getCreatedDate(nextReportDay)}/${params.id}`}>
to={`/profile/calendar/view/${getCreatedDate(nextReportDay)}/${
params.id
}`}
>
<div className={`viewReport__switch-date__next switch-date`}> <div className={`viewReport__switch-date__next switch-date`}>
<img src={arrowSwitchDate} alt="arrow" /> <img src={arrowSwitchDate} alt="arrow" />
</div> </div>

View File

@ -64,34 +64,71 @@
height: 72px; height: 72px;
justify-content: space-between; justify-content: space-between;
button { @media (max-width: 540px) {
color: #000000; padding: 10px 15px;
font-size: 15px; height: 60px;
}
@media (max-width: 500px) {
column-gap: 0;
justify-content: space-between;
}
&__date {
font-weight: 500; font-weight: 500;
font-size: 22px;
line-height: 32px; line-height: 32px;
padding: 8px 24px; color: #000000;
@media (max-width: 660px) {
font-size: 16px;
} }
&__edit { @media (max-width: 490px) {
background: #E1FCCF; font-size: 12px;
border-radius: 44px; }
border: none;
} }
&__delete { &__hours {
background: white; font-weight: 400;
font-size: 15px;
line-height: 32px;
color: #000000;
@media (max-width: 660px) {
font-size: 11px;
}
span {
color: #52B709;
font-weight: 700;
}
}
&__progressBar {
max-width: 390px;
width: 100%;
background: #F1F1F1;
border-radius: 12px; border-radius: 12px;
border: 1px dashed #8BCC60; height: 8px;
position: relative;
span {
position: absolute;
height: 100%;
left: 0;
width: 60%;
background: #52B709;
border-radius: 12px;
}
} }
.disable { &__total {
pointer-events: none; font-weight: 400;
opacity: 0.5; font-size: 12px;
line-height: 32px;
} }
.loader {
max-width: 150px;
}
} }
h3 { h3 {