Compare commits

..

No commits in common. "856076a47e7f73e5c1df9bc693005391849383e3" and "5bcaa9259e388dcf1f5b255c6ebe9766f88113a2" have entirely different histories.

16 changed files with 60 additions and 314 deletions
src
App.js
components
AuthBox
Common
AuthHeader
BaseButton
Modal
AcceptModal
ModalRegistration
Tracker/ModalTicket
ProjectTiket
pages

@ -55,7 +55,6 @@ import "./assets/fonts/stylesheet.css";
import "bootstrap/dist/css/bootstrap.min.css"; import "bootstrap/dist/css/bootstrap.min.css";
const App = () => { const App = () => {
const notification = useSelector(getNotification) const notification = useSelector(getNotification)
return ( return (
@ -80,7 +79,6 @@ const App = () => {
path="/tracker/project/:id" path="/tracker/project/:id"
element={<ProjectTracker />} element={<ProjectTracker />}
/> />
<Route exact path="/auth-candidate" element={<AuthForCandidate />} /> <Route exact path="/auth-candidate" element={<AuthForCandidate />} />
<Route <Route
exact exact
@ -137,8 +135,6 @@ const App = () => {
element={<PartnerEmployees />} element={<PartnerEmployees />}
/> />
</Route> </Route>
<Route exact path="profile-candidate/:id"> <Route exact path="profile-candidate/:id">
<Route index element={<ProfileCandidate />} /> <Route index element={<ProfileCandidate />} />
</Route> </Route>

@ -55,7 +55,7 @@
margin-bottom: 54px; margin-bottom: 54px;
span { span {
color: #8dc63f; color: #8DC63F;
font-size: 50px; font-size: 50px;
font-weight: 700; font-weight: 700;
font-style: normal; font-style: normal;
@ -193,7 +193,7 @@
&__reset { &__reset {
color: #000000; color: #000000;
font-size: 15px; font-size: 13px;
line-height: 16px; line-height: 16px;
cursor: pointer; cursor: pointer;
text-decoration: underline; text-decoration: underline;
@ -208,7 +208,7 @@
span { span {
cursor: pointer; cursor: pointer;
color: #52b709; color: #52B709;
font-weight: 700; font-weight: 700;
} }
} }

@ -25,10 +25,24 @@ export const AuthHeader = () => {
</NavLink> </NavLink>
</li> </li>
<li> <li>
<NavLink to={"/auth"}>Кабинет разработчика</NavLink> <a
onClick={(e) => {
e.preventDefault();
scrollToForm();
}}
>
Кабинет разработчика
</a>
</li> </li>
<li> <li>
<NavLink to={"/tracker-intro"}>Трекер</NavLink> <a
onClick={(e) => {
e.preventDefault();
scrollToForm();
}}
>
Трекер
</a>
</li> </li>
<li> <li>
<NavLink to={"/auth-candidate"} className="candidate"> <NavLink to={"/auth-candidate"} className="candidate">

@ -2,13 +2,9 @@ import React from "react";
import "./basebutton.scss"; import "./basebutton.scss";
export const BaseButton = ({ children, styles, onClick, ...props }) => { export const BaseButton = ({ children, styles, ...props }) => {
return ( return (
<button <button className={styles ? `${styles} button` : "button"} {...props}>
onClick={onClick}
className={styles ? `${styles} button` : "button"}
{...props}
>
{children} {children}
</button> </button>
); );

@ -12,7 +12,7 @@
.acceptModal { .acceptModal {
border-radius: 20px; border-radius: 20px;
background: linear-gradient(180deg, #fff 0%, #ebebeb 100%); background: linear-gradient(180deg, #FFF 0%, #EBEBEB 100%);
padding: 50px 34px 25px; padding: 50px 34px 25px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -43,18 +43,16 @@
} }
.agree { .agree {
background: #52b709; background: #52B709;
} }
.cancel { .cancel {
background: #b0babf; background: #B0BABF;
} }
} }
&__close { &__close {
position: absolute; position: absolute;
width: 14px;
height: 14px;
top: 15px; top: 15px;
right: 22px; right: 22px;
cursor: pointer; cursor: pointer;

@ -7,11 +7,11 @@
border: 1px solid #dde2e4; border: 1px solid #dde2e4;
border-radius: 8px; border-radius: 8px;
width: 1088px; width: 1088px;
height: 515px; height: 529px;
&-body { &-body {
&__left { &__left {
padding: 33px 0 30px 77px; padding: 60px 0 30px 77px;
h2 { h2 {
font-weight: 500; font-weight: 500;
@ -114,13 +114,12 @@
&__right { &__right {
border-left: 1px solid #f1f1f1; border-left: 1px solid #f1f1f1;
padding: 30px 32px 46px 25px; padding: 80px 32px 46px 25px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
h4 { h4 {
margin: 22px 0 22px 0;
font-weight: 900; font-weight: 900;
font-size: 14px; font-size: 14px;
line-height: 24px; line-height: 24px;
@ -141,7 +140,7 @@
} }
img { img {
margin: 0 18px 0 0; margin: 0 18px 20px 0;
} }
} }
} }

@ -1060,7 +1060,7 @@
height: 42px; height: 42px;
cursor: pointer; cursor: pointer;
column-gap: 8px; column-gap: 8px;
padding: 5px 5px 5px 14px; padding: 5px;
border-radius: 8px; border-radius: 8px;
background: #fff; background: #fff;
@ -1138,13 +1138,9 @@
z-index: 10; z-index: 10;
&__item { &__item {
width: 66px;
font-size: 15px;
transition: 0.4s;
cursor: pointer; cursor: pointer;
&:hover { &:hover {
transition: 0.4s;
font-weight: 700; font-weight: 700;
} }
} }

@ -25,7 +25,6 @@ import "./projectTiket.scss";
export const ProjectTiket = ({ project, index }) => { export const ProjectTiket = ({ project, index }) => {
const [modalSelect, setModalSelect] = useState(false); const [modalSelect, setModalSelect] = useState(false);
const [modalAdd, setModalAdd] = useState(false); const [modalAdd, setModalAdd] = useState(false);
const [modalDelete, setModalDelete] = useState(false);
const [acceptModalOpen, setAcceptModalOpen] = useState(false); const [acceptModalOpen, setAcceptModalOpen] = useState(false);
const [path, setPath] = useState(""); const [path, setPath] = useState("");
const dispatch = useDispatch(); const dispatch = useDispatch();
@ -72,7 +71,6 @@ export const ProjectTiket = ({ project, index }) => {
function closeAcceptModal() { function closeAcceptModal() {
setAcceptModalOpen(false); setAcceptModalOpen(false);
setModalDelete(false);
} }
function linkProject() {} function linkProject() {}
@ -146,13 +144,7 @@ export const ProjectTiket = ({ project, index }) => {
<img src={archiveSet}></img> <img src={archiveSet}></img>
<p>в архив</p> <p>в архив</p>
</div> </div>
<div onClick={removeProject}>
<div
onClick={() => {
setModalDelete(true);
setModalSelect(false);
}}
>
<img src={del}></img> <img src={del}></img>
<p>удалить</p> <p>удалить</p>
</div> </div>
@ -160,15 +152,6 @@ export const ProjectTiket = ({ project, index }) => {
</ModalSelect> </ModalSelect>
{acceptModalOpen && ( {acceptModalOpen && (
<AcceptModal <AcceptModal
title={"Вы точно хотите переместить проект в архив?"}
closeModal={closeAcceptModal}
agreeHandler={removeProject}
/>
)}
{modalDelete && (
<AcceptModal
title={"Вы точно хотите удалить?"}
closeModal={closeAcceptModal} closeModal={closeAcceptModal}
agreeHandler={removeProject} agreeHandler={removeProject}
/> />

@ -1,12 +1,7 @@
import React, { useState } from "react"; import React from "react";
import { apiRequest } from "@api/request";
import { useNotification } from "@hooks/useNotification";
import BaseButton from "@components/Common/BaseButton/BaseButton"; import BaseButton from "@components/Common/BaseButton/BaseButton";
import { Footer } from "@components/Common/Footer/Footer"; import { Footer } from "@components/Common/Footer/Footer";
import { Loader } from "@components/Common/Loader/Loader";
import { Navigation } from "@components/Navigation/Navigation"; import { Navigation } from "@components/Navigation/Navigation";
import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs";
import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader";
@ -17,69 +12,6 @@ import kontur from "assets/images/logo/konturLogo.png";
import "./partnerSettings.scss"; import "./partnerSettings.scss";
export const PartnerSettings = () => { export const PartnerSettings = () => {
const { showNotification } = useNotification();
const [inputsValue, setInputsValue] = useState({
name: "",
oldPassword: "",
password: "",
});
const [inputsError, setInputsError] = useState({
name: false,
password: false,
});
const [loader, setLoader] = useState(false);
const setSettings = () => {
if (inputsValue.name.length < 2) {
setInputsError((prevValue) => ({ ...prevValue, name: true }));
return;
}
if (inputsValue.password.length < 6 || inputsValue.oldPassword.length < 6) {
setInputsError(() => ({ name: false, password: true }));
return;
}
setLoader(true);
apiRequest("/user/change-personal-data", {
method: "PUT",
data: {
newUsername: inputsValue.name,
},
}).then((data) => {
apiRequest("/user/change-password", {
method: "PUT",
data: {
password: inputsValue.oldPassword,
newPassword: inputsValue.password,
},
}).then((data) => {
setLoader(false);
if (data.status === "success") {
setInputsError({
name: false,
password: false,
});
setInputsValue({
name: "",
oldPassword: "",
password: "",
});
showNotification({
show: true,
text: "Данные изменены",
type: "success",
});
} else {
showNotification({
show: true,
text: "Неверные данные",
type: "error",
});
}
});
});
};
return ( return (
<div className="settings"> <div className="settings">
<ProfileHeader /> <ProfileHeader />
@ -99,84 +31,21 @@ export const PartnerSettings = () => {
<p className="settings__lable-first">Изменение логина</p> <p className="settings__lable-first">Изменение логина</p>
<div className="settings__input"> <div className="settings__input">
<input <input></input>
className={inputsError.name ? "warning" : ""}
placeholder="Имя"
onChange={(e) => {
setInputsValue((prevValue) => ({
...prevValue,
name: e.target.value,
}));
setInputsError((prevValue) => ({
...prevValue,
name: false,
}));
}}
value={inputsValue.name}
/>
{inputsError.name && (
<span className="error">Минимум 2 символов</span>
)}
</div> </div>
<p className="settings__lable-second">Изменение пароля</p> <p className="settings__lable-second">Изменение пароля</p>
<div className="settings__input oldPassword">
<input
className={inputsError.password ? "warning" : ""}
placeholder="Старый пароль"
type={"password"}
onChange={(e) => {
setInputsValue((prevValue) => ({
...prevValue,
oldPassword: e.target.value,
}));
setInputsError((prevValue) => ({
...prevValue,
password: false,
}));
}}
value={inputsValue.oldPassword}
/>
{inputsError.password && (
<span className="error">Введите верный пароль</span>
)}
</div>
<div className="settings__input"> <div className="settings__input">
<input <input></input>
className={inputsError.password ? "warning" : ""}
placeholder="Новый пароль"
type={"password"}
onChange={(e) => {
setInputsValue((prevValue) => ({
...prevValue,
password: e.target.value,
}));
setInputsError((prevValue) => ({
...prevValue,
password: false,
}));
}}
value={inputsValue.password}
/>
{inputsError.password && (
<span className="error">Минимум 6 символов</span>
)}
</div> </div>
<div className="settings__buttons"> <div className="settings__buttons">
<BaseButton styles={"settings__buttons-cancel"}> <BaseButton styles={"settings__buttons-cancel"}>
Отмена Отмена
</BaseButton> </BaseButton>
{loader ? ( <BaseButton styles={"settings__buttons-save"}>
<Loader style={"green"} width={"40px"} height={"40px"} />
) : (
<BaseButton
onClick={setSettings}
styles={"settings__buttons-save"}
>
Сохранить Сохранить
</BaseButton> </BaseButton>
)}
</div> </div>
<span className="settings__agreement"> <span className="settings__agreement">
Нажимая "Сохранить", вы соглашаетесь с Правилами обработки и Нажимая "Сохранить", вы соглашаетесь с Правилами обработки и

@ -34,37 +34,26 @@
margin: 39px 0 10px 0; margin: 39px 0 10px 0;
} }
&-second { &-second {
margin: 15px 0 10px 0; margin: 31px 0 10px 0;
} }
} }
&__input { &__input {
display: flex;
flex-direction: column;
row-gap: 5px;
input {
padding: 5px 10px;
background: #eff2f7; background: #eff2f7;
border-radius: 8px; border-radius: 8px;
width: 373px; width: 373px;
height: 35px; height: 35px;
border: none; border: none;
input {
font-size: 15px; font-size: 15px;
background: #eff2f7;
height: 100%;
margin-left: 15px;
width: 85%;
border: none;
outline: none; outline: none;
} }
.error {
color: red;
font-size: 12px;
}
.warning {
border: 1px solid red;
}
}
.oldPassword {
margin-bottom: 25px;
} }
&__agreement { &__agreement {
@ -83,7 +72,7 @@
&-cancel, &-cancel,
&-save { &-save {
min-width: 151px; width: 151px;
height: 40px; height: 40px;
font-size: 14px; font-size: 14px;
line-height: 32px; line-height: 32px;
@ -154,6 +143,7 @@
&__report, &__report,
&__login { &__login {
width: 500px; width: 500px;
height: 435px;
background: #ffffff; background: #ffffff;
border-radius: 12px; border-radius: 12px;
padding: 30px 60px; padding: 30px 60px;

@ -531,13 +531,7 @@ export const ProjectTracker = () => {
} }
> >
{Boolean(projectBoard.projectUsers?.length) && ( {Boolean(projectBoard.projectUsers?.length) && (
<div <div className="projectPersons">
className={
projectBoard.projectUsers?.length == 1
? "onePerson"
: "projectPersons"
}
>
{projectBoard.projectUsers.slice(0, 3).map((person) => { {projectBoard.projectUsers.slice(0, 3).map((person) => {
return ( return (
<img <img

@ -1,5 +1,3 @@
import ClassicEditor from "@ckeditor/ckeditor5-build-classic";
import { CKEditor } from "@ckeditor/ckeditor5-react";
import React, { useEffect, useState } from "react"; import React, { useEffect, useState } from "react";
import { useSelector } from "react-redux"; import { useSelector } from "react-redux";
import { Navigate } from "react-router-dom"; import { Navigate } from "react-router-dom";
@ -29,27 +27,12 @@ export const Summary = () => {
const profileInfo = useSelector(getProfileInfo); const profileInfo = useSelector(getProfileInfo);
const [openGit, setOpenGit] = useState(false); const [openGit, setOpenGit] = useState(false);
const [gitInfo, setGitInfo] = useState([]); const [gitInfo, setGitInfo] = useState([]);
const [editSummeryOpen, setEditSummeryOpen] = useState(false);
const [summery, setSummery] = useState("");
useEffect(() => { useEffect(() => {
apiRequest( apiRequest(
`/profile/portfolio-projects?card_id=${localStorage.getItem("cardId")}` `/profile/portfolio-projects?card_id=${localStorage.getItem("cardId")}`
).then((responseGit) => setGitInfo(responseGit)); ).then((responseGit) => setGitInfo(responseGit));
}, []); }, []);
useEffect(() => {
setSummery(profileInfo.vc_text);
}, [profileInfo]);
function editSummery() {
apiRequest("/resume/edit-text", {
method: "PUT",
data: {
resume: summery,
},
}).then(() => {});
}
return ( return (
<div className="summary"> <div className="summary">
<ProfileHeader /> <ProfileHeader />
@ -118,47 +101,12 @@ export const Summary = () => {
<div className="experience__block"> <div className="experience__block">
<div className="summary__sections__head"> <div className="summary__sections__head">
<h3>Описание опыта работы</h3> <h3>Описание опыта работы</h3>
<button <button>Редактировать раздел</button>
className={editSummeryOpen ? "edit" : ""}
onClick={() => {
if (editSummeryOpen) {
editSummery();
}
setEditSummeryOpen(!editSummeryOpen);
}}
>
{editSummeryOpen ? "Сохранить" : "Редактировать раздел"}
</button>
</div> </div>
{editSummeryOpen ? (
<CKEditor
editor={ClassicEditor}
data={summery}
config={{
removePlugins: [
"CKFinderUploadAdapter",
"CKFinder",
"EasyImage",
"Image",
"ImageCaption",
"ImageStyle",
"ImageToolbar",
"ImageUpload",
"MediaEmbed",
"BlockQuote",
],
}}
onChange={(event, editor) => {
const data = editor.getData();
setSummery(data);
}}
/>
) : (
<div <div
className="experience__content" className="experience__content"
dangerouslySetInnerHTML={{ __html: summery }} dangerouslySetInnerHTML={{ __html: profileInfo.vc_text }}
></div> ></div>
)}
</div> </div>
</div> </div>
)} )}

@ -220,11 +220,6 @@
white-space: nowrap; white-space: nowrap;
} }
} }
.edit {
background-color: green;
color: white;
}
} }
.skills__section { .skills__section {
@ -292,15 +287,6 @@
} }
} }
.ck-toolbar {
border: none !important;
}
.ck-content {
border: none !important;
padding: 15px 35px 15px 50px !important;
}
&__sectionGit { &__sectionGit {
margin-top: 25px; margin-top: 25px;

@ -317,8 +317,7 @@ export const Tracker = () => {
<tr key={task.id}> <tr key={task.id}>
<td> <td>
<div className="taskList__table__title-task"> <div className="taskList__table__title-task">
<p>{task.title}</p> {task.title}
<div <div
onClick={(e) => { onClick={(e) => {
toggleDescTask(e); toggleDescTask(e);

@ -322,7 +322,6 @@
display: flex; display: flex;
position: relative; position: relative;
left: 5px; left: 5px;
img { img {
position: relative; position: relative;
display: flex; display: flex;
@ -342,19 +341,6 @@
} }
} }
.onePerson {
display: flex;
position: relative;
left: -15px;
img {
position: relative;
display: flex;
width: 32px;
height: 32px;
}
}
span { span {
width: 32px; width: 32px;
height: 32px; height: 32px;
@ -1611,20 +1597,12 @@
gap: 10px; gap: 10px;
align-items: center; align-items: center;
transition: 0.4s; transition: 0.4s;
max-width: 350px;
p {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
div { div {
cursor: pointer; cursor: pointer;
width: 15px; width: 15px;
min-width: 15px; height: 15px;
min-height: 15px;
display: flex; display: flex;
background-color: #000; background-color: #000;
align-items: center; align-items: center;

@ -36,7 +36,7 @@ export const TrackerIntro = () => {
компании в одном месте: проекты, задачи, цели, сотрудники, компании в одном месте: проекты, задачи, цели, сотрудники,
документы, переписки, отчеты документы, переписки, отчеты
</p> </p>
<NavLink to="/tracker-registration" className="trackerIntro__btn"> <NavLink to="/auth" className="trackerIntro__btn">
Начать работу Начать работу
</NavLink> </NavLink>
</div> </div>
@ -57,7 +57,7 @@ export const TrackerIntro = () => {
Управление большим количеством проектов и гибкая настройка Управление большим количеством проектов и гибкая настройка
структуры под любые процессы структуры под любые процессы
</p> </p>
<NavLink to="/tracker-registration" className="trackerIntro__btn"> <NavLink to="/auth" className="trackerIntro__btn">
Начать работу Начать работу
</NavLink> </NavLink>
</div> </div>