Compare commits

...

12 Commits

Author SHA1 Message Date
Mikola
1fd6a73652 active links in nav, delete report, loaders in report, changes routes 2024-02-07 18:54:55 +03:00
Mikola
b75b846335 active links in nav, delete report, loaders in report, changes routes 2024-02-07 18:54:21 +03:00
Victor Batischev
455be87e26 fix adaptive tracker tabs 2024-02-06 19:57:27 +03:00
Victor Batischev
8c68366152 add user by email 2024-02-06 18:59:08 +03:00
Victor Batischev
ef8a0813b3 small fix 2024-02-06 18:22:06 +03:00
Victor Batischev
e9235884dd fix layout min height 2024-02-05 17:32:18 +03:00
Victor Batischev
7a3a70ccd3 fix active nav link state 2024-02-05 17:14:30 +03:00
Victor Batischev
3cc306bbc3 fix adaptive layout in project list 2024-02-05 16:44:03 +03:00
4a81441d35 Merge pull request 'trackerTask' (#15) from trackerTask into main
Reviewed-on: #15
2024-02-02 18:46:03 +03:00
cdba3b4112 Merge pull request 'fix' (#14) from trackerTask into main
Reviewed-on: #14
2024-02-01 23:47:43 +03:00
d4f7b287d3 Merge pull request 'trackerTask' (#13) from trackerTask into main
Reviewed-on: #13
2024-02-01 23:32:46 +03:00
06f5cda1e8 Merge pull request 'trackerTask' (#12) from trackerTask into main
Reviewed-on: #12
2024-02-01 23:15:28 +03:00
38 changed files with 272 additions and 380 deletions

View File

@ -106,22 +106,15 @@ 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/view/" element={<ProfileCalendar />} /> <Route exact path="calendar/report" element={<ReportForm />} />
<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 />} />
@ -133,6 +126,11 @@ 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,9 +24,13 @@ const ArchiveTableTracker = ({ filterCompleteTasks, loader }) => {
); );
}) })
) : ( ) : (
<div className="archive__noItem"> <tr>
<p>В данном месяце у вас не было задач</p> <td>
</div> <div className="archive__noItem">
<p>В данном месяце у вас не было задач</p>
</div>
</td>
</tr>
)} )}
</> </>
)} )}

View File

@ -167,12 +167,8 @@
top: -20px; top: -20px;
@media (max-width: 900px) { @media (max-width: 900px) {
order: 1; top: 100px;
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="/report"> <Link to="/profile/calendar/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: 30px 0; margin: 10px 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: 20px 0; margin: 10px 0;
img { img {
width: 100%; width: 100%;

View File

@ -48,7 +48,7 @@
text-decoration: none; text-decoration: none;
} }
a:focus { a:focus, a.active {
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: 20px; margin-top: 8px;
} }
.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: 54px 76px; padding: 30px;
background: linear-gradient(180deg, #ffffff 0%, #ebebeb 100%); background: linear-gradient(180deg, #ffffff 0%, #ebebeb 100%);
border-radius: 40px; border-radius: 20px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
@ -15,9 +15,7 @@
} }
p { p {
font-size: 12px; font-size: 15px;
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 projectsTab" className="tab active-tab"
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 tasksTab" className="tab"
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 archiveTab" className="tab"
onClick={() => toggleTabs(3)} onClick={() => toggleTabs(3)}
> >
<img src={archive} alt="img" /> <img src={archive} alt="img" />
@ -972,7 +972,7 @@ export const TicketFullScreen = () => {
</div> </div>
<div className="time"> <div className="time">
<img src={watch}></img> <img src={watch}></img>
<span>Длительность : </span> <span>Длительность: </span>
<p> <p>
{correctTimerTime(currentTimerCount.hours)}: {correctTimerTime(currentTimerCount.hours)}:
{correctTimerTime(currentTimerCount.minute)}: {correctTimerTime(currentTimerCount.minute)}:

View File

@ -70,6 +70,7 @@ 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(
"Выберите приоритет колонки" "Выберите приоритет колонки"
); );
@ -305,6 +306,19 @@ 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) => {
@ -386,26 +400,12 @@ export const TrackerModal = ({
}; };
return ( return (
<ModalLayout <ModalLayout active={active} setActive={setActive} type={modalType}>
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,9 +468,14 @@ 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 styles={"button-add invite-person-block__btn"}> <BaseButton
styles={"button-add invite-person-block__btn"}
onClick={inviteUserByEmail}
>
Отправить приглашение Отправить приглашение
</BaseButton> </BaseButton>
</div> </div>
@ -494,11 +499,6 @@ 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,55 +793,49 @@ export const TrackerModal = ({
{modalType === "edit-column" && ( {modalType === "edit-column" && (
<div> <div>
<div className="title-project"> <div className="title-project">
<h4>Введите новое название</h4> <div>
<div className="input-container"> <h4>Название колонки</h4>
<input <div className="input-container">
className="name-project" <input
value={columnName} className="name-project"
onChange={(e) => dispatch(setColumnName(e.target.value))} value={columnName}
/> onChange={(e) => dispatch(setColumnName(e.target.value))}
/>
</div>
</div> </div>
<h4>Приоритет колонки</h4> <div>
<div <h4>Приоритет колонки</h4>
className={ <div
selectColumnPriorityOpen className={
? "select-priority select-priority--open" selectColumnPriorityOpen
: "select-priority" ? "select-priority select-priority--open"
} : "select-priority"
onClick={() => }
setSelectColumnPriorityOpen(!selectColumnPriorityOpen) onClick={() =>
} setSelectColumnPriorityOpen(!selectColumnPriorityOpen)
> }
<span>{selectColumnPriority}</span> >
<img src={arrowDown} alt="arrow" /> <span>{selectColumnPriority}</span>
{selectColumnPriorityOpen && ( <img src={arrowDown} alt="arrow" />
<div className="select-priority__dropDown"> {selectColumnPriorityOpen && (
{projectBoard.columns.map((column, index) => { <div className="select-priority__dropDown">
return ( {projectBoard.columns.map((column, index) => {
<span return (
key={column.id} <span
onClick={() => { key={column.id}
setSelectColumnPriority(index + 1); onClick={() => {
dispatch(setColumnPriority(index + 1)); setSelectColumnPriority(index + 1);
}} dispatch(setColumnPriority(index + 1));
> }}
{index + 1} >
</span> {index + 1}
); </span>
})} );
</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,13 +30,12 @@
display: flex; display: flex;
align-items: center; align-items: center;
flex-direction: column; flex-direction: column;
row-gap: 8px; row-gap: 12px;
padding-bottom: 10px; padding-bottom: 15px;
.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, { useEffect, useState } from "react"; import React, { useState } from "react";
import { useDispatch, useSelector } from "react-redux"; import { 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,9 +9,8 @@ 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"
); );
@ -35,7 +34,7 @@ export const Navigation = () => {
name: "Выплаты" name: "Выплаты"
}, },
{ {
path: "/Quiz", path: "/quiz",
name: "Тесты" name: "Тесты"
}, },
{ {
@ -71,32 +70,17 @@ 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="profileHeader__info"> <div className="profile-header__info">
<div className="profileHeader__container"> <div className="profile-header__container">
<nav className="profileHeader__nav"> <nav className="profile-header__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>
@ -104,8 +88,8 @@ export const Navigation = () => {
})} })}
</nav> </nav>
<div className="profileHeader__personalInfo"> <div className="profile-header__personalInfo">
<h3 className="profileHeader__personalInfoName"> <h3 className="profile-header__personalInfoName">
{profileInfo?.fio ? profileInfo?.fio : profileInfo?.username} {profileInfo?.fio ? profileInfo?.fio : profileInfo?.username}
</h3> </h3>
<NavLink end to={"/profile"}> <NavLink end to={"/profile"}>
@ -113,7 +97,7 @@ export const Navigation = () => {
src={ src={
profileInfo?.photo ? urlForLocal(profileInfo.photo) : avatarMok profileInfo?.photo ? urlForLocal(profileInfo.photo) : avatarMok
} }
className="profileHeader__personalInfoAvatar" className="profile-header__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="/report"> <Link to="/profile/calendar/report">
<button <button
className="calendar__btn" className="calendar__btn"
onClick={() => dispatch(setReportDate(""))} onClick={() => dispatch(setReportDate(""))}

View File

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

View File

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

View File

@ -20,19 +20,6 @@ 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) => {
@ -54,16 +41,16 @@ export const ProfileHeader = () => {
}; };
return ( return (
<header className="profileHeader"> <header className="profile-header">
<div className="profileHeader__head"> <div className="profile-header__head">
<div className="profileHeader__container"> <div className="profile-header__container">
<NavLink to={"/profile"} className="profileHeader__title"> <NavLink to={"/profile"} className="profile-header__title">
itguild. itguild.
<span> <span>
{user === "developer" ? "для разработчиков" : "для партнеров"} {user === "developer" ? "для разработчиков" : "для партнеров"}
</span> </span>
</NavLink> </NavLink>
<button onClick={handler} className="profileHeader__logout"> <button onClick={handler} className="profile-header__logout">
{isLoggingOut ? <Loader /> : "Выйти"} {isLoggingOut ? <Loader /> : "Выйти"}
</button> </button>
</div> </div>

View File

@ -1,4 +1,4 @@
.profileHeader { .profile-header {
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 !important; text-decoration: none;
cursor: pointer; cursor: pointer;
font-weight: 700; font-weight: 700;
font-size: 18px; font-size: 18px;
line-height: 32px; line-height: 32px;
color: #807777 !important; color: #807777;
transition: all 0.3s ease; transition: all 0.3s ease;
&:hover { &:hover {
color: #261a1a !important; color: #261a1a;
} }
} }
a.active {
color: #000000;
}
@media (max-width: 800px) { @media (max-width: 800px) {
column-gap: 15px; column-gap: 15px;

View File

@ -75,8 +75,6 @@ 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,13 +2,11 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
position: relative; position: relative;
width: 322px; width: 300px;
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 {
@ -26,15 +24,12 @@
&__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: 22px; margin-bottom: 10px;
max-width: 380px;
&:hover { &:hover {
color: black; color: black;
@ -45,7 +40,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
position: relative; position: relative;
margin-bottom: 45px; margin-bottom: 30px;
p { p {
color: #6f6f6f; color: #6f6f6f;
@ -53,7 +48,6 @@
font-size: 12px; font-size: 12px;
font-weight: 500; font-weight: 500;
line-height: 17px; line-height: 17px;
width: 60px;
} }
.count { .count {
@ -97,13 +91,13 @@
} }
&__open-tracker { &__open-tracker {
padding: 17px 26px 16px; padding: 10px 15px;
} }
&__statistics { &__statistics {
position: absolute; position: absolute;
bottom: 18px; bottom: 13px;
left: 26px; left: 15px;
color: #0042b4; color: #0042b4;
text-decoration: underline; text-decoration: underline;
font-size: 14px; font-size: 14px;

View File

@ -87,10 +87,12 @@ 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;
} }
} }
@ -292,12 +294,16 @@ 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">
<button {isFetching ? (
className="report-form__footer-btn" <Loader style={"green"} />
onClick={() => handler()} ) : (
> <button
{isFetching ? <Loader /> : "Отправить"} className="report-form__footer-btn"
</button> onClick={() => handler()}
>
Отпаравить
</button>
)}
<p className="report-form__footer-text"> <p className="report-form__footer-text">
Всего за день:{" "} Всего за день:{" "}
<span> <span>

View File

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

View File

@ -9,7 +9,11 @@ export const CardAvailableTest = ({ title, description, path, status }) => {
return ( return (
<div className="card-available-test"> <div className="card-available-test">
<Link <Link
to={status === 2 ? `/quiz/report/${path}` : `/quiz/test/${path}`} to={
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={
@ -33,7 +37,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={`/quiz/report/${path}`}>Отчет по тесту</Link> <Link to={`/profile/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,12 +505,10 @@ $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: 4px; bottom: 20px;
left: 0; left: 0;
display: flex; display: flex;
align-items: center; align-items: center;

View File

@ -1,14 +0,0 @@
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-bottom: 30px; margin: 30px 0;
@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="infoPersonal__title">Настройки профиля</h2> <h2 className="info-personal__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;
.infoPersonal__title { .info-personal__title {
color: #000000; color: #000000;
font-weight: 700; font-weight: 700;
font-size: 22px; font-size: 22px;
@ -12,6 +12,7 @@
} }
&__page { &__page {
min-height: 750px;
max-width: 1160px !important; max-width: 1160px !important;
margin-top: 23px; margin-top: 23px;
} }
@ -134,7 +135,7 @@
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: space-around; justify-content: space-around;
margin-top: 27px; margin-top: 50px;
} }
&__report, &__report,

View File

@ -397,15 +397,8 @@ export const ProjectTracker = () => {
div.classList.contains("tags__list")) div.classList.contains("tags__list"))
) )
) { ) {
setTags({ setTags({ open: false, add: false, edit: false });
open: false, setTagInfo({ description: "", name: "" });
add: false,
edit: false
});
setTagInfo({
description: "",
name: ""
});
setColor("#aabbcc"); setColor("#aabbcc");
} }
@ -451,7 +444,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 projectsTab" className="tab active-tab tab"
onClick={() => dispatch(setToggleTab(1))} onClick={() => dispatch(setToggleTab(1))}
> >
<img src={project} alt="img" /> <img src={project} alt="img" />
@ -459,7 +452,7 @@ export const ProjectTracker = () => {
</Link> </Link>
<Link <Link
to="/profile/tracker" to="/profile/tracker"
className="tab tasksTab" className="tab"
onClick={() => dispatch(setToggleTab(2))} onClick={() => dispatch(setToggleTab(2))}
> >
<img src={tasks} alt="img" /> <img src={tasks} alt="img" />
@ -467,7 +460,7 @@ export const ProjectTracker = () => {
</Link> </Link>
<Link <Link
to="/profile/tracker" to="/profile/tracker"
className="tab archiveTab" className="tab"
onClick={() => dispatch(setToggleTab(3))} onClick={() => dispatch(setToggleTab(3))}
> >
<img src={archive} alt="img" /> <img src={archive} alt="img" />
@ -962,20 +955,11 @@ export const ProjectTracker = () => {
src={commentsBoard} src={commentsBoard}
alt="commentsImg" alt="commentsImg"
/> />
<span> <span>{task.comment_count}</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> <span>{task.file_count}</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: "/Quiz" }, { name: "Тестирование", link: "/profile/quiz" },
{ name: "Отчет по тестированию", link: "/Quiz/report" } { name: "Отчет по тестированию", link: "/profile/quiz" }
]} ]}
/> />
<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 projectsTab" className="tab active-tab"
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 tasksTab" className="tab"
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 archiveTab" className="tab"
onClick={() => toggleTabs(3)} onClick={() => toggleTabs(3)}
> >
<img src={archive} alt="img" /> <img src={archive} alt="img" />

View File

@ -51,7 +51,6 @@ 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);
@ -143,32 +142,28 @@ export const Tracker = () => {
<div className="tracker__tabs"> <div className="tracker__tabs">
<div className="tracker__tabs__head"> <div className="tracker__tabs__head">
<div <div
className={ className={tab === 1 ? "tab active-tab" : "tab"}
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 tasksTab" : "tab tasksTab"} className={tab === 2 ? "tab active-tab" : "tab"}
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={ className={tab === 3 ? "tab active-tab" : "tab"}
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 ${tabs[tab - 1]}`}> <div className={`tracker__tabs__content`}>
<div <div
className={ className={
tab === 1 tab === 1
@ -201,7 +196,7 @@ export const Tracker = () => {
)) && )) &&
!loader && ( !loader && (
<div className="no-projects"> <div className="no-projects">
<div className="no-projects__createNew"> <div className="no-projects__create-new">
<div> <div>
<img src={noProjects} alt="noProjectImg" /> <img src={noProjects} alt="noProjectImg" />
<p>Создайте свой первый проект</p> <p>Создайте свой первый проект</p>
@ -251,7 +246,7 @@ export const Tracker = () => {
<p> <p>
{25} - {35} {25} - {35}
</p> </p>
<h2>Сентября,</h2> <h3>Сентября,</h3>
<h3>2023</h3> <h3>2023</h3>
</div> </div>

View File

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

View File

@ -94,13 +94,8 @@
top: -100px; top: -100px;
right: 58px; right: 58px;
@media (max-width: 1000px) { @media (max-width: 900px) {
position: inherit; display: none;
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, Navigate, useParams } from "react-router-dom"; import { Link, useParams } from "react-router-dom";
import { apiRequest } from "@api/request"; import { apiRequest } from "@api/request";
@ -27,9 +27,11 @@ 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);
@ -39,6 +41,7 @@ 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]);
@ -65,6 +68,18 @@ 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);
@ -110,22 +125,32 @@ export const ViewReport = () => {
<img src={arrow} alt="#" /> <img src={arrow} alt="#" />
<p>Вернуться</p> <p>Вернуться</p>
</Link> </Link>
{/* <div className="viewReport__bar"> {localStorage.getItem("role_status") !== "18" && (
<h3 className="viewReport__bar__date"> <div className="viewReport__bar">
{getCorrectDate(dateReport.id)} <button className="viewReport__bar__edit">Редактировать</button>
</h3> {deleteLoader ? (
<p className="viewReport__bar__hours"> <Loader style={"green"} />
Вами потрачено на работу:{" "} ) : (
<span> <button
{totalHours} {hourOfNum(totalHours)} onClick={deleteReport}
</span> className={
</p> taskText.length
</div> */} ? "viewReport__bar__delete"
: "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={`../view/${getCreatedDate(previousReportDay)}/${params.id}`} to={`/profile/calendar/view/${getCreatedDate(
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" />
@ -141,7 +166,11 @@ export const ViewReport = () => {
getCreatedDate(currentDay) === params.date ? "disable" : "" getCreatedDate(currentDay) === params.date ? "disable" : ""
}`} }`}
> >
<Link to={`../view/${getCreatedDate(nextReportDay)}/${params.id}`}> <Link
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,71 +64,34 @@
height: 72px; height: 72px;
justify-content: space-between; justify-content: space-between;
@media (max-width: 540px) { button {
padding: 10px 15px;
height: 60px;
}
@media (max-width: 500px) {
column-gap: 0;
justify-content: space-between;
}
&__date {
font-weight: 500;
font-size: 22px;
line-height: 32px;
color: #000000; color: #000000;
@media (max-width: 660px) {
font-size: 16px;
}
@media (max-width: 490px) {
font-size: 12px;
}
}
&__hours {
font-weight: 400;
font-size: 15px; font-size: 15px;
font-weight: 500;
line-height: 32px; line-height: 32px;
color: #000000; padding: 8px 24px;
@media (max-width: 660px) {
font-size: 11px;
}
span {
color: #52B709;
font-weight: 700;
}
} }
&__progressBar { &__edit {
max-width: 390px; background: #E1FCCF;
width: 100%; border-radius: 44px;
background: #F1F1F1; border: none;
}
&__delete {
background: white;
border-radius: 12px; border-radius: 12px;
height: 8px; border: 1px dashed #8BCC60;
position: relative;
span {
position: absolute;
height: 100%;
left: 0;
width: 60%;
background: #52B709;
border-radius: 12px;
}
} }
&__total { .disable {
font-weight: 400; pointer-events: none;
font-size: 12px; opacity: 0.5;
line-height: 32px;
} }
.loader {
max-width: 150px;
}
} }
h3 { h3 {