com
This commit is contained in:
commit
9a0364e686
916
package-lock.json
generated
916
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
147
src/App.jsx
147
src/App.jsx
@ -10,50 +10,9 @@ import {
|
||||
|
||||
import { getNotification } from "@redux/outstaffingSlice";
|
||||
|
||||
import { Article } from "@pages/Article/Article";
|
||||
import { Auth } from "@pages/Auth/Auth";
|
||||
import { AuthForCandidate } from "@pages/AuthForCandidate/AuthForCandidate";
|
||||
import { Blog } from "@pages/Blog/Blog";
|
||||
import CatalogSpecialists from "@pages/CatalogSpecialists/CatalogSpecialists";
|
||||
import { CompanyInfo } from "@pages/CompanyInfo/CompanyInfo";
|
||||
import { FormPage } from "@pages/FormPage/FormPage";
|
||||
import { Forms } from "@pages/Forms/Forms";
|
||||
import { FrequentlyAskedQuestion } from "@pages/FrequentlyAskedQuestion/FrequentlyAskedQuestion";
|
||||
import { FrequentlyAskedQuestions } from "@pages/FrequentlyAskedQuestions/FrequentlyAskedQuestions";
|
||||
import { Home } from "@pages/Home/Home";
|
||||
import { PartnerAddRequest } from "@pages/PartnerAddRequest/PartnerAddRequest";
|
||||
import { PartnerBid } from "@pages/PartnerBid/PartnerBid";
|
||||
import { PartnerEmployeeReport } from "@pages/PartnerEmployeeReport/PartnerEmployeeReport";
|
||||
import { PartnerEmployees } from "@pages/PartnerEmployees/PartnerEmployees";
|
||||
import { PartnerRequests } from "@pages/PartnerRequests/PartnerRequests";
|
||||
import { PartnerSettings } from "@pages/PartnerSettings/PartnerSettings";
|
||||
import { PartnerTreaties } from "@pages/PartnerTreaties/PartnerTreaties";
|
||||
import { PartnerCategories } from "@pages/PartnerСategories/PartnerСategories";
|
||||
import { Payouts } from "@pages/Payouts/Payouts";
|
||||
import { Profile } from "@pages/Profile/Profile";
|
||||
import { ProfileCandidate } from "@pages/ProfileCandidate/ProfileCandidate";
|
||||
import { ProjectTracker } from "@pages/ProjectTracker/ProjectTracker";
|
||||
import { PassingTests } from "@pages/Quiz/PassingTests";
|
||||
import { QuizPage } from "@pages/Quiz/QuizPage";
|
||||
import { QuizReportPage } from "@pages/Quiz/QuizReportPage";
|
||||
import { RegistrationForCandidate } from "@pages/RegistrationForCandidate/RegistrationForCandidate";
|
||||
import { RegistrationSetting } from "@pages/RegistrationSetting/RegistrationSetting";
|
||||
import { SingleReportPage } from "@pages/SingleReportPage/SingleReportPage";
|
||||
import Statistics from "@pages/Statistics/Statistics";
|
||||
import { Summary } from "@pages/Summary/Summary";
|
||||
import { Tracker } from "@pages/Tracker/Tracker";
|
||||
import { TrackerAuth } from "@pages/TrackerAuth/TrackerAuth";
|
||||
import { TrackerIntro } from "@pages/TrackerIntro/TrackerIntro";
|
||||
import { TrackerRegistration } from "@pages/TrackerRegistration/TrackerRegistration";
|
||||
import { ViewReport } from "@pages/ViewReport/ViewReport";
|
||||
import { MainPage } from "@pages/MainPage/MainPage";
|
||||
|
||||
import { Calendar } from "@components/Calendar/Calendar";
|
||||
import { Candidate } from "@components/Candidate/Candidate";
|
||||
import { FreeDevelopers } from "@components/FreeDevelopers/FreeDevelopers";
|
||||
import { TicketFullScreen } from "@components/Modal/Tracker/TicketFullScreen/TicketFullScreen";
|
||||
import { Notification } from "@components/Notification/Notification";
|
||||
import { ProfileCalendar } from "@components/ProfileCalendar/ProfileCalendar";
|
||||
import { ReportForm } from "@components/ReportForm/ReportForm";
|
||||
|
||||
import "assets/fonts/stylesheet.css";
|
||||
import "assets/global.scss";
|
||||
@ -64,109 +23,7 @@ const App = () => {
|
||||
<>
|
||||
<Router>
|
||||
<Routes>
|
||||
<Route exact path="/auth" element={<Auth />} />
|
||||
<Route exact path="/tracker-intro" element={<TrackerIntro />} />
|
||||
<Route exact path="/tracker-auth" element={<TrackerAuth />} />
|
||||
<Route exact path="/forms" element={<Forms />} />
|
||||
<Route
|
||||
exact
|
||||
path="/tracker-registration"
|
||||
element={<TrackerRegistration />}
|
||||
/>
|
||||
<Route exact path="/company" element={<CompanyInfo />} />
|
||||
<Route
|
||||
exact
|
||||
path="/registration-setting"
|
||||
element={<RegistrationSetting />}
|
||||
/>
|
||||
<Route
|
||||
exact
|
||||
path="/catalog-specialists"
|
||||
element={<CatalogSpecialists />}
|
||||
/>
|
||||
|
||||
<Route exact path="/worker/:id" element={<FreeDevelopers />} />
|
||||
<Route
|
||||
exact
|
||||
path="/tracker/task/:id"
|
||||
element={<TicketFullScreen />}
|
||||
></Route>
|
||||
<Route
|
||||
exact
|
||||
path="/tracker/project/:id"
|
||||
element={<ProjectTracker />}
|
||||
/>
|
||||
|
||||
<Route exact path="/auth-candidate" element={<AuthForCandidate />} />
|
||||
<Route
|
||||
exact
|
||||
path="/registration-candidate"
|
||||
element={<RegistrationForCandidate />}
|
||||
/>
|
||||
|
||||
<Route exact path="/blog" element={<Blog />}></Route>
|
||||
<Route exact path="/blog/article/:id" element={<Article />}></Route>
|
||||
<Route
|
||||
exact
|
||||
path="/frequently-asked-questions"
|
||||
element={<FrequentlyAskedQuestions />}
|
||||
/>
|
||||
<Route
|
||||
exact
|
||||
path="/frequently-asked-question/:id"
|
||||
element={<FrequentlyAskedQuestion />}
|
||||
/>
|
||||
|
||||
<Route exact path="/candidate/:id" element={<Candidate />} />
|
||||
<Route exact path="/candidate/:id/form" element={<FormPage />} />
|
||||
<Route path="/:userId/calendar" element={<Calendar />} />
|
||||
|
||||
<Route path="/report/:id" element={<SingleReportPage />} />
|
||||
|
||||
<Route exact path="profile">
|
||||
<Route index element={<Profile />} />
|
||||
<Route exact path="catalog" element={<Home />} />
|
||||
<Route exact path="calendar" 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="tracker" element={<Tracker />} />
|
||||
<Route exact path="statistics/:id" element={<Statistics />} />
|
||||
<Route exact path="payouts" element={<Payouts />} />
|
||||
<Route exact path="settings" element={<PartnerSettings />} />
|
||||
<Route exact path="requests" element={<PartnerRequests />} />
|
||||
<Route exact path="requests-add" element={<PartnerAddRequest />} />
|
||||
<Route exact path="requests-edit" element={<PartnerAddRequest />} />
|
||||
<Route exact path="requests-bid" element={<PartnerBid />} />
|
||||
<Route exact path="employees" element={<PartnerCategories />} />
|
||||
<Route
|
||||
exact
|
||||
path="employees/report/:uuid"
|
||||
element={<PartnerEmployeeReport />}
|
||||
/>
|
||||
<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
|
||||
exact
|
||||
path="categories/employees"
|
||||
element={<PartnerEmployees />}
|
||||
/>
|
||||
</Route>
|
||||
|
||||
<Route exact path="profile-candidate/:id">
|
||||
<Route index element={<ProfileCandidate />} />
|
||||
</Route>
|
||||
|
||||
<Route path="*" element={<Navigate to="/auth" replace />} />
|
||||
<Route path="*" element={<MainPage />} />
|
||||
</Routes>
|
||||
</Router>
|
||||
{notification.show && <Notification />}
|
||||
|
@ -41,7 +41,7 @@ export const apiRequest = (
|
||||
if (response.data?.redirect || response.status === 401) {
|
||||
window.location.replace("/auth");
|
||||
localStorage.clear();
|
||||
// dispatch(auth(false));
|
||||
store.dispatch(auth(false));
|
||||
store.dispatch(setProfileInfo({}));
|
||||
}
|
||||
return resolve(response);
|
||||
|
@ -108,7 +108,7 @@ export const AuthBlock = ({ title, description, img, resetModal }) => {
|
||||
>
|
||||
{isLoading ? <Loader /> : "Войти"}
|
||||
</button>
|
||||
<NavLink to="/tracker-registration" className="auth__registration">
|
||||
<NavLink to="/auth" className="auth__registration">
|
||||
Регистрация
|
||||
</NavLink>
|
||||
</div>
|
||||
|
@ -70,6 +70,7 @@ export const AuthBox = ({ title }) => {
|
||||
dispatch(setUserInfo(res));
|
||||
dispatch(loading(false));
|
||||
dispatch(setRole("ROLE_PARTNER"));
|
||||
navigate("/profile");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -24,9 +24,9 @@ export const AuthHeader = () => {
|
||||
<span>Главная</span>
|
||||
</NavLink>
|
||||
</li>
|
||||
<li>
|
||||
<NavLink to={"/profile"}>Кабинет разработчика</NavLink>
|
||||
</li>
|
||||
{/*<li>*/}
|
||||
{/* <NavLink to={"/profile"}>Кабинет разработчика</NavLink>*/}
|
||||
{/*</li>*/}
|
||||
<li>
|
||||
<NavLink to={"/tracker-intro"}>Трекер</NavLink>
|
||||
</li>
|
||||
|
@ -4,10 +4,15 @@ import { backendImg } from "@utils/helper";
|
||||
|
||||
import { apiRequest } from "@api/request";
|
||||
|
||||
import { useNotification } from "@hooks/useNotification";
|
||||
|
||||
import close from "assets/icons/closeProjectPersons.svg";
|
||||
|
||||
const FileTracker = ({ file, setDeletedTask, taskId }) => {
|
||||
const [openImg, setOpenImg] = useState(false);
|
||||
|
||||
const { showNotification } = useNotification();
|
||||
|
||||
function deleteFile(file) {
|
||||
apiRequest("/file/detach", {
|
||||
method: "DELETE",
|
||||
@ -17,8 +22,21 @@ const FileTracker = ({ file, setDeletedTask, taskId }) => {
|
||||
entity_id: taskId,
|
||||
status: 0
|
||||
}
|
||||
}).then(() => {
|
||||
})
|
||||
.then(() => {
|
||||
setDeletedTask(file);
|
||||
showNotification({
|
||||
show: true,
|
||||
text: "Файл успешно удален",
|
||||
type: "success"
|
||||
});
|
||||
})
|
||||
.catch(() => {
|
||||
showNotification({
|
||||
show: true,
|
||||
text: "Ошибка при удалении файла",
|
||||
type: "error"
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -7,6 +7,8 @@ import withReactContent from "sweetalert2-react-content";
|
||||
|
||||
import { apiRequest } from "@api/request";
|
||||
|
||||
import { useNotification } from "@hooks/useNotification";
|
||||
|
||||
import { Loader } from "@components/Common/Loader/Loader";
|
||||
|
||||
import "./form.scss";
|
||||
@ -18,6 +20,8 @@ const Form = () => {
|
||||
|
||||
const urlParams = useParams();
|
||||
|
||||
const { showNotification } = useNotification();
|
||||
|
||||
const [status, setStatus] = useState(null);
|
||||
const [data, setData] = useState({
|
||||
email: "",
|
||||
@ -75,9 +79,22 @@ const Form = () => {
|
||||
profile_id: urlParams.id,
|
||||
...data
|
||||
}
|
||||
}).then((res) => {
|
||||
})
|
||||
.then((res) => {
|
||||
setStatus(res);
|
||||
setIsFetching(false);
|
||||
showNotification({
|
||||
show: true,
|
||||
text: "Отправка успешно завершена",
|
||||
type: "success"
|
||||
});
|
||||
})
|
||||
.catch(() => {
|
||||
showNotification({
|
||||
show: true,
|
||||
text: "Ошибка отправки",
|
||||
type: "error"
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -10,6 +10,8 @@ import { caseOfNum, removeLast, urlForLocal } from "@utils/helper";
|
||||
|
||||
import { apiRequest } from "@api/request";
|
||||
|
||||
import { useNotification } from "@hooks/useNotification";
|
||||
|
||||
import ModalLayout from "@components/Common/ModalLayout/ModalLayout";
|
||||
|
||||
import close from "assets/icons/close.png";
|
||||
@ -24,6 +26,7 @@ const ListEmployees = ({
|
||||
setModalAdd
|
||||
}) => {
|
||||
const dispatch = useDispatch();
|
||||
const { showNotification } = useNotification();
|
||||
|
||||
function deletePerson(userId) {
|
||||
apiRequest("/project/del-user", {
|
||||
@ -32,8 +35,21 @@ const ListEmployees = ({
|
||||
project_id: projectBoard.id,
|
||||
user_id: userId
|
||||
}
|
||||
}).then(() => {
|
||||
})
|
||||
.then(() => {
|
||||
dispatch(deletePersonOnProject(userId));
|
||||
showNotification({
|
||||
show: true,
|
||||
text: "Участник успешно удален",
|
||||
type: "success"
|
||||
});
|
||||
})
|
||||
.catch(() => {
|
||||
showNotification({
|
||||
show: true,
|
||||
text: "Ошибка удаления участника",
|
||||
type: "error"
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -118,13 +118,21 @@ export const ModalTiсket = ({
|
||||
task_id: task.id,
|
||||
status: 0
|
||||
}
|
||||
}).then(() => {
|
||||
})
|
||||
.then(() => {
|
||||
closeModal();
|
||||
dispatch(setProjectBoardFetch(projectId));
|
||||
showNotification({
|
||||
show: true,
|
||||
text: "Задача успешно была перемещена в архив",
|
||||
type: "archive"
|
||||
text: "Задача успешно удалена",
|
||||
type: "success"
|
||||
});
|
||||
})
|
||||
.catch(() => {
|
||||
showNotification({
|
||||
show: true,
|
||||
text: "Ошибка удаления",
|
||||
type: "error"
|
||||
});
|
||||
});
|
||||
}
|
||||
@ -169,7 +177,8 @@ export const ModalTiсket = ({
|
||||
title: inputsValue.title,
|
||||
description: inputsValue.description
|
||||
}
|
||||
}).then((res) => {
|
||||
})
|
||||
.then((res) => {
|
||||
setEditOpen(!editOpen);
|
||||
dispatch(setProjectBoardFetch(projectId));
|
||||
showNotification({
|
||||
@ -177,6 +186,13 @@ export const ModalTiсket = ({
|
||||
text: "Изменения сохранены",
|
||||
type: "success"
|
||||
});
|
||||
})
|
||||
.catch(() => {
|
||||
showNotification({
|
||||
show: true,
|
||||
text: "Ошибка при сохранении изменений",
|
||||
type: "error"
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -982,7 +982,7 @@
|
||||
position: relative;
|
||||
|
||||
row-gap: 10px;
|
||||
padding: 10px 40px 0px 20px;
|
||||
padding: 10px 20px 0px 20px;
|
||||
border-radius: 10px;
|
||||
margin-bottom: 10px;
|
||||
|
||||
@ -1113,7 +1113,7 @@
|
||||
|
||||
&-priority {
|
||||
position: relative;
|
||||
padding: 10px 40px 0 20px;
|
||||
padding: 10px 20px 0 20px;
|
||||
border-radius: 10px;
|
||||
margin-bottom: 10px;
|
||||
.priority {
|
||||
@ -1173,7 +1173,7 @@
|
||||
}
|
||||
|
||||
&-bottom {
|
||||
padding: 0px 90px 10px 35px;
|
||||
padding: 0px 30px 10px 20px;
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
line-height: 32px;
|
||||
@ -1196,9 +1196,10 @@
|
||||
.edit {
|
||||
background: #52b709;
|
||||
border-radius: 50px;
|
||||
|
||||
width: fit-content;
|
||||
p {
|
||||
font-weight: 700;
|
||||
padding-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -137,13 +137,21 @@ export const TrackerModal = ({
|
||||
: 1,
|
||||
title: valueColumn
|
||||
}
|
||||
}).then(() => {
|
||||
})
|
||||
.then(() => {
|
||||
dispatch(setProjectBoardFetch(projectBoard.id));
|
||||
showNotification({
|
||||
show: true,
|
||||
text: "Колонка создана",
|
||||
text: "Колонка успешно создана",
|
||||
type: "success"
|
||||
});
|
||||
})
|
||||
.catch(() => {
|
||||
showNotification({
|
||||
show: true,
|
||||
text: "Ошибка при создании колонки",
|
||||
type: "error"
|
||||
});
|
||||
});
|
||||
setValueColumn("");
|
||||
setActive(false);
|
||||
@ -221,7 +229,7 @@ export const TrackerModal = ({
|
||||
setDeadLineDate("");
|
||||
showNotification({
|
||||
show: true,
|
||||
text: "Задача создана",
|
||||
text: "Задача успешно создана",
|
||||
type: "success"
|
||||
});
|
||||
}
|
||||
@ -295,7 +303,7 @@ export const TrackerModal = ({
|
||||
dispatch(editColumnName({ id: columnId, title: columnName }));
|
||||
showNotification({
|
||||
show: true,
|
||||
text: "Колонка создана",
|
||||
text: "Колонка успешно изменена",
|
||||
type: "success"
|
||||
});
|
||||
});
|
||||
@ -316,6 +324,11 @@ export const TrackerModal = ({
|
||||
dispatch(setProject(result));
|
||||
setActive(false);
|
||||
setNameProject("");
|
||||
showNotification({
|
||||
show: true,
|
||||
text: "Проект успешно создан",
|
||||
type: "success"
|
||||
});
|
||||
} else {
|
||||
showNotification({
|
||||
show: true,
|
||||
|
@ -81,7 +81,7 @@ export const Navigation = () => {
|
||||
<NavLink
|
||||
key={index}
|
||||
end
|
||||
to={link.path === "/quiz" ? link.path : `/profile${link.path}`}
|
||||
to={`/profile${link.path}`}
|
||||
className={
|
||||
currentPath.includes(link.path) ||
|
||||
currentPath.includes(link.active)
|
||||
|
@ -91,11 +91,10 @@ export const ProfileHeader = () => {
|
||||
});
|
||||
}, []);
|
||||
|
||||
const handler = () => {
|
||||
setIsLoggingOut(true);
|
||||
const handler = (e) => {
|
||||
e.preventDefault();
|
||||
localStorage.clear();
|
||||
dispatch(auth(false));
|
||||
setIsLoggingOut(false);
|
||||
navigate("/auth");
|
||||
dispatch(setProfileInfo({}));
|
||||
};
|
||||
@ -144,9 +143,6 @@ export const ProfileHeader = () => {
|
||||
</div>
|
||||
|
||||
<div className={active ? "auth-body active" : "auth-body"}>
|
||||
{/* <div className="auth-body__title">
|
||||
<img src={ITguild}></img>
|
||||
</div> */}
|
||||
<nav className="auth-body__navigation">
|
||||
<div className="profile-header__personal-info">
|
||||
<h3 className="profile-header__personal-info-name">
|
||||
|
@ -34,6 +34,11 @@ export const QuizPassingInformation = ({ setStartTest, uuid, timer }) => {
|
||||
}
|
||||
dispatch(setQuestions(res));
|
||||
setStartTest(true);
|
||||
showNotification({
|
||||
show: true,
|
||||
text: "Тест успешно запущен",
|
||||
type: "success"
|
||||
});
|
||||
restart(
|
||||
moment()
|
||||
.add(res[0]?.time_limit.split(":")[0], "hours")
|
||||
|
@ -1,5 +1,7 @@
|
||||
import React, { Component } from "react";
|
||||
|
||||
import { Fallback } from "./Fallback";
|
||||
|
||||
class ErrorBoundary extends Component {
|
||||
state = {
|
||||
error: null
|
||||
@ -13,7 +15,7 @@ class ErrorBoundary extends Component {
|
||||
const { error } = this.state;
|
||||
|
||||
if (error) {
|
||||
return <div>Что-то пошло не так =( {error}</div>;
|
||||
return <Fallback />;
|
||||
}
|
||||
return this.props.children;
|
||||
}
|
19
src/hoc/Fallback.jsx
Normal file
19
src/hoc/Fallback.jsx
Normal file
@ -0,0 +1,19 @@
|
||||
import React from "react";
|
||||
|
||||
import rightArrow from "assets/icons/arrows/arrowRight.svg";
|
||||
import logo from "assets/images/logo/ITguild.svg";
|
||||
|
||||
import "./fallback.scss";
|
||||
|
||||
export const Fallback = () => {
|
||||
return (
|
||||
<div className="fallback">
|
||||
<img src={logo} alt="logo" className="logo" />
|
||||
<h1>Произошла непредвиденная ошибка</h1>
|
||||
<a href="/profile">
|
||||
Вернуться назад
|
||||
<img src={rightArrow} alt="arrow" />
|
||||
</a>
|
||||
</div>
|
||||
);
|
||||
};
|
24
src/hoc/fallback.scss
Normal file
24
src/hoc/fallback.scss
Normal file
@ -0,0 +1,24 @@
|
||||
.fallback {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: 100px;
|
||||
gap: 15px;
|
||||
|
||||
img {
|
||||
max-width: 250px;
|
||||
}
|
||||
|
||||
a {
|
||||
display: flex;
|
||||
column-gap: 10px;
|
||||
align-items: center;
|
||||
font-size: 20px;
|
||||
color: black;
|
||||
transition: all 0.3s ease;
|
||||
|
||||
&:hover {
|
||||
scale: 1.1;
|
||||
}
|
||||
}
|
||||
}
|
@ -99,7 +99,7 @@ export const useFormValidation = (
|
||||
setLoader(false);
|
||||
if ("errors" in data) {
|
||||
return showNotificationError(
|
||||
"Аккаунт с таким логином или email уже существуе"
|
||||
"Аккаунт с таким логином или email уже существует"
|
||||
);
|
||||
}
|
||||
if (!data.id) {
|
||||
|
@ -3,11 +3,14 @@ import ReactDOM from "react-dom/client";
|
||||
import { Provider } from "react-redux";
|
||||
|
||||
import App from "./App";
|
||||
import ErrorBoundary from "./hoc/ErrorBoundary";
|
||||
import "./index.css";
|
||||
import { store } from "./store/store";
|
||||
|
||||
ReactDOM.createRoot(document.getElementById("root")).render(
|
||||
<ErrorBoundary>
|
||||
<Provider store={store}>
|
||||
<App />
|
||||
</Provider>
|
||||
</ErrorBoundary>
|
||||
);
|
||||
|
@ -19,16 +19,16 @@ import cross from "assets/images/cross.png";
|
||||
import "./auth.scss";
|
||||
|
||||
export const Auth = () => {
|
||||
const isAuth = useSelector(selectAuth);
|
||||
let navigate = useNavigate();
|
||||
// const isAuth = useSelector(selectAuth);
|
||||
// let navigate = useNavigate();
|
||||
//
|
||||
// const getToken = localStorage.getItem("auth_token");
|
||||
|
||||
const getToken = localStorage.getItem("auth_token");
|
||||
|
||||
useEffect(() => {
|
||||
if (isAuth || getToken) {
|
||||
navigate("/profile");
|
||||
}
|
||||
}, [getToken]);
|
||||
// useEffect(() => {
|
||||
// if (isAuth || getToken) {
|
||||
// navigate("/profile");
|
||||
// }
|
||||
// }, [getToken]);
|
||||
|
||||
return (
|
||||
<section className="auth-partners">
|
||||
|
@ -111,13 +111,6 @@ export const AuthForCandidate = () => {
|
||||
<div className="auth-candidate">
|
||||
<AuthHeader />
|
||||
<div className="container">
|
||||
<AuthBlock
|
||||
resetModal={setModalReset}
|
||||
title="Войти, если есть доступ"
|
||||
description="Если вы получили доступ, пройдя
|
||||
2 шага для входа, или хотите узнать
|
||||
свои результаты в кабинете"
|
||||
/>
|
||||
<div className="auth-candidate__start">
|
||||
<h2 className="auth-candidate__start__title">
|
||||
Хочу в команду <span>IT-специалистов</span>
|
||||
|
33
src/pages/MainPage/MainPage.jsx
Normal file
33
src/pages/MainPage/MainPage.jsx
Normal file
@ -0,0 +1,33 @@
|
||||
import React from "react";
|
||||
import { useMemo } from "react";
|
||||
import { useSelector } from "react-redux";
|
||||
|
||||
import { selectAuth } from "@redux/outstaffingSlice";
|
||||
|
||||
import { DeveloperPage } from "@pages/roles/DeveloperPage";
|
||||
import { GuestPage } from "@pages/roles/GuestPage";
|
||||
import { PartnerPage } from "@pages/roles/PartnerPage";
|
||||
|
||||
export const MainPage = () => {
|
||||
const roleId = localStorage.getItem("role_status");
|
||||
const isAuth = useSelector(selectAuth);
|
||||
const user_roles = {
|
||||
developer: 4,
|
||||
partner: 18
|
||||
};
|
||||
|
||||
const CurrentRolePage = useMemo(() => getRolePage(Number(roleId)), [isAuth]);
|
||||
|
||||
function getRolePage(roleId) {
|
||||
switch (roleId) {
|
||||
case user_roles.developer:
|
||||
return DeveloperPage;
|
||||
case user_roles.partner:
|
||||
return PartnerPage;
|
||||
default:
|
||||
return GuestPage;
|
||||
}
|
||||
}
|
||||
|
||||
return <CurrentRolePage />;
|
||||
};
|
@ -6,6 +6,8 @@ import { getPartnerRequestInfo } from "@redux/outstaffingSlice";
|
||||
|
||||
import { apiRequest } from "@api/request";
|
||||
|
||||
import { useNotification } from "@hooks/useNotification";
|
||||
|
||||
import { Footer } from "@components/Common/Footer/Footer";
|
||||
import { Navigation } from "@components/Navigation/Navigation";
|
||||
import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs";
|
||||
@ -47,6 +49,7 @@ export const PartnerAddRequest = () => {
|
||||
"Выберите кол-во сотрудников"
|
||||
);
|
||||
const [inputs, setInputs] = useState({ title: "", description: "" });
|
||||
const { showNotification } = useNotification();
|
||||
|
||||
if (
|
||||
currentUrl[0] === "/profile/requests-edit" &&
|
||||
@ -120,6 +123,11 @@ export const PartnerAddRequest = () => {
|
||||
}
|
||||
}).then(() => {
|
||||
navigate("/profile/requests");
|
||||
showNotification({
|
||||
show: true,
|
||||
text: "Вакансия успешно изменена",
|
||||
type: "success"
|
||||
});
|
||||
});
|
||||
} else {
|
||||
apiRequest("/request/create-request", {
|
||||
@ -138,6 +146,11 @@ export const PartnerAddRequest = () => {
|
||||
}
|
||||
}).then(() => {
|
||||
navigate("/profile/requests");
|
||||
showNotification({
|
||||
show: true,
|
||||
text: "Вакансия успешно создана",
|
||||
type: "success"
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
|
@ -14,6 +14,8 @@ import { urlForLocal } from "@utils/helper";
|
||||
|
||||
import { apiRequest } from "@api/request";
|
||||
|
||||
import { useNotification } from "@hooks/useNotification";
|
||||
|
||||
import { Footer } from "@components/Common/Footer/Footer";
|
||||
import { Loader } from "@components/Common/Loader/Loader";
|
||||
import ModalLayout from "@components/Common/ModalLayout/ModalLayout";
|
||||
@ -37,6 +39,7 @@ export const PartnerBid = () => {
|
||||
const requestId = useSelector(getPartnerRequestId);
|
||||
const partnerRequests = useSelector(getPartnerRequests);
|
||||
const navigate = useNavigate();
|
||||
const { showNotification } = useNotification();
|
||||
|
||||
if (!requestId) {
|
||||
return <Navigate to="/profile/requests" replace />;
|
||||
@ -61,6 +64,11 @@ export const PartnerBid = () => {
|
||||
}
|
||||
}).then(() => {
|
||||
navigate("/profile/requests");
|
||||
showNotification({
|
||||
show: true,
|
||||
text: "Вакансия удалена",
|
||||
type: "success"
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React from "react";
|
||||
import { useSelector } from "react-redux";
|
||||
import { Link, Navigate } from "react-router-dom";
|
||||
import { Link } from "react-router-dom";
|
||||
|
||||
import { getPartnerEmployees } from "@redux/outstaffingSlice";
|
||||
|
||||
@ -16,12 +16,7 @@ import "./partnerEmployees.scss";
|
||||
|
||||
export const PartnerEmployees = () => {
|
||||
const partnerEmployees = useSelector(getPartnerEmployees);
|
||||
// if (
|
||||
// localStorage.getItem("role_status") !== "18" ||
|
||||
// !partnerEmployees.length
|
||||
// ) {
|
||||
// return <Navigate to="/profile/categories" replace />;
|
||||
// }
|
||||
|
||||
return (
|
||||
<div className="partner-employees">
|
||||
<ProfileHeader />
|
||||
|
@ -265,7 +265,7 @@
|
||||
height: 46px;
|
||||
font-weight: 400;
|
||||
font-size: 15px;
|
||||
line-height: 32px;
|
||||
line-height: 20px;
|
||||
transition: 0.3s all ease;
|
||||
|
||||
a {
|
||||
@ -280,7 +280,7 @@
|
||||
color: white;
|
||||
font-weight: 700;
|
||||
font-size: 20px;
|
||||
margin-right: 8px;
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
|
@ -139,7 +139,6 @@
|
||||
&__body {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-around;
|
||||
margin-top: 50px;
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { getTheme } from "@table-library/react-table-library/baseline";
|
||||
import { CompactTable } from "@table-library/react-table-library/compact";
|
||||
import { usePagination } from "@table-library/react-table-library/pagination";
|
||||
import { useSort } from "@table-library/react-table-library/sort";
|
||||
import { useTheme } from "@table-library/react-table-library/theme";
|
||||
import React, { useEffect, useState } from "react";
|
||||
@ -64,6 +65,14 @@ export const PartnerCategories = () => {
|
||||
},
|
||||
{
|
||||
label: "Резюме",
|
||||
renderCell: (item) => (
|
||||
<Link className="table__link" to={`/candidate/${item.user_id}`}>
|
||||
Резюме
|
||||
</Link>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: "Отчет",
|
||||
renderCell: (item) => (
|
||||
<Link
|
||||
className="table__link"
|
||||
@ -93,6 +102,13 @@ export const PartnerCategories = () => {
|
||||
}
|
||||
);
|
||||
|
||||
const pagination = usePagination(data, {
|
||||
state: {
|
||||
page: 0,
|
||||
size: 5
|
||||
}
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
setLoader(true);
|
||||
apiRequest("/project/my-employee").then((el) => {
|
||||
@ -251,7 +267,30 @@ export const PartnerCategories = () => {
|
||||
data={data}
|
||||
theme={theme}
|
||||
sort={sort}
|
||||
pagination={pagination}
|
||||
/>
|
||||
<div className="table__pagination">
|
||||
<span>
|
||||
Total Pages: {pagination.state.getTotalPages(data.nodes)}
|
||||
</span>
|
||||
|
||||
<span className="table__pages">
|
||||
Page:{" "}
|
||||
{pagination.state.getPages(data.nodes).map((_, index) => (
|
||||
<button
|
||||
key={index}
|
||||
type="button"
|
||||
style={{
|
||||
fontWeight:
|
||||
pagination.state.page === index ? "bold" : "normal"
|
||||
}}
|
||||
onClick={() => pagination.fns.onSetPage(index)}
|
||||
>
|
||||
{index + 1}
|
||||
</button>
|
||||
))}
|
||||
</span>
|
||||
</div>
|
||||
</>
|
||||
) : (
|
||||
<div className="partner-categories__empty">
|
||||
|
@ -176,5 +176,19 @@
|
||||
font-size: 16px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
&__pagination {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 16px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
&__pages {
|
||||
display: flex;
|
||||
column-gap: 5px;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ import { Navigation } from "@components/Navigation/Navigation";
|
||||
import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs";
|
||||
import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader";
|
||||
|
||||
import paymentIcon from "assets/icons/paymentIcon.png";
|
||||
// import paymentIcon from "assets/icons/paymentIcon.png";
|
||||
import settingIcon from "assets/icons/settingIcon.png";
|
||||
import summaryIcon from "assets/icons/summaryIcon.png";
|
||||
import timerIcon from "assets/icons/timerIcon.png";
|
||||
@ -64,7 +64,7 @@ export const Profile = () => {
|
||||
img: reportsIcon,
|
||||
title: "Мои вакансии",
|
||||
description:
|
||||
"<span>У вас 2 вакансии<br/></span>открытые от лица компании"
|
||||
"<span>Ваши открытые вакансии, которыми вы можете управлять"
|
||||
},
|
||||
{
|
||||
path: "profile/employees",
|
||||
@ -100,17 +100,10 @@ export const Profile = () => {
|
||||
<div className="container">
|
||||
<ProfileBreadcrumbs links={[{ name: "Главная", link: "/profile" }]} />
|
||||
<h2 className="profile__title">
|
||||
{user === "developer" ? (
|
||||
<span>
|
||||
<p>Добрый день, </p>
|
||||
{profileInfo?.fio || profileInfo?.username}
|
||||
</span>
|
||||
) : (
|
||||
<span>
|
||||
<p>Добрый день, </p>
|
||||
{profileInfo?.fio || profileInfo?.username}
|
||||
</span>
|
||||
)}
|
||||
</h2>
|
||||
<div className="summary__info">
|
||||
<div className="summary__person">
|
||||
@ -122,14 +115,11 @@ export const Profile = () => {
|
||||
alt="avatar"
|
||||
/>
|
||||
<p className="summary__name">
|
||||
{user === "developer" ? (
|
||||
<span>
|
||||
{profileInfo?.fio || profileInfo?.username},{" "}
|
||||
{profileInfo?.specification} разработчик
|
||||
{profileInfo?.fio || profileInfo?.username},
|
||||
{user === "developer" &&
|
||||
` ${profileInfo?.specification} разработчик`}
|
||||
</span>
|
||||
) : (
|
||||
<span>{profileInfo?.fio || profileInfo?.username}</span>
|
||||
)}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -256,7 +256,11 @@ export const ProjectTracker = () => {
|
||||
} else {
|
||||
dispatch(setProjectBoardFetch(projectBoard.id));
|
||||
}
|
||||
showNotification({ show: true, text: "Колонка удалена", type: "error" });
|
||||
showNotification({
|
||||
show: true,
|
||||
text: "Колонка удалена",
|
||||
type: "error"
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@ -319,6 +323,11 @@ export const ProjectTracker = () => {
|
||||
...prevState,
|
||||
add: false
|
||||
}));
|
||||
showNotification({
|
||||
show: true,
|
||||
text: "Тег успешно создан",
|
||||
type: "success"
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
@ -340,6 +349,11 @@ export const ProjectTracker = () => {
|
||||
}));
|
||||
setTagInfo({ description: "", name: "" });
|
||||
setColor("#aabbcc");
|
||||
showNotification({
|
||||
show: true,
|
||||
text: "Тег успешно изменён",
|
||||
type: "success"
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@ -353,6 +367,11 @@ export const ProjectTracker = () => {
|
||||
}
|
||||
}).then(() => {
|
||||
dispatch(deleteTagProject(tagId));
|
||||
showNotification({
|
||||
show: true,
|
||||
text: "Тег удален",
|
||||
type: "success"
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -11,7 +11,6 @@ import { Loader } from "@components/Common/Loader/Loader";
|
||||
import { Navigation } from "@components/Navigation/Navigation";
|
||||
import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs";
|
||||
import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader";
|
||||
// import { HeadBottom } from "@components/features/Candidate-lk/HeadBottom";
|
||||
import { AlertResult } from "@components/features/quiz/AlertResult";
|
||||
import { QuizReport } from "@components/features/quiz/QuizReport";
|
||||
|
||||
@ -41,7 +40,6 @@ export const QuizReportPage = () => {
|
||||
<div className="quiz-report-page">
|
||||
<ProfileHeader />
|
||||
<Navigation />
|
||||
{/*<HeadBottom />*/}
|
||||
<div className="quiz-report-page__container">
|
||||
<ProfileBreadcrumbs
|
||||
links={[
|
||||
|
@ -81,7 +81,6 @@ export const RegistrationForCandidate = () => {
|
||||
<img src={arrowBtn} alt="img" />
|
||||
</Link>
|
||||
</div>
|
||||
{/* форма регистрации */}
|
||||
<form
|
||||
className="registration-candidate__form"
|
||||
onSubmit={handleSubmit}
|
||||
|
@ -211,8 +211,6 @@ const Statistics = () => {
|
||||
<p className="person-type">
|
||||
{person.role ? person.role : "-"}
|
||||
</p>
|
||||
{/* <span className="status status-active"> */}
|
||||
|
||||
<span
|
||||
className={
|
||||
person.status
|
||||
|
@ -10,6 +10,8 @@ import { urlForLocal } from "@utils/helper";
|
||||
|
||||
import { apiRequest } from "@api/request";
|
||||
|
||||
import { useNotification } from "@hooks/useNotification";
|
||||
|
||||
import { Footer } from "@components/Common/Footer/Footer";
|
||||
import { Navigation } from "@components/Navigation/Navigation";
|
||||
import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs";
|
||||
@ -37,6 +39,7 @@ export const Summary = () => {
|
||||
const [selectedSkills, setSelectedSkills] = useState([]);
|
||||
const [selectSkillsOpen, setSelectSkillsOpen] = useState(false);
|
||||
const [skillsList, seSkillsList] = useState([]);
|
||||
const { showNotification } = useNotification();
|
||||
|
||||
useEffect(() => {
|
||||
apiRequest(
|
||||
@ -72,7 +75,13 @@ export const Summary = () => {
|
||||
data: {
|
||||
resume: summery
|
||||
}
|
||||
}).then(() => {});
|
||||
}).then(() => {
|
||||
showNotification({
|
||||
show: true,
|
||||
text: "Изменения успешно сохранены",
|
||||
type: "success"
|
||||
});
|
||||
});
|
||||
}
|
||||
return (
|
||||
<div className="summary">
|
||||
|
@ -1,47 +0,0 @@
|
||||
import React, { useState } from "react";
|
||||
|
||||
import AuthBlock from "@components/AuthBlock/AuthBlock";
|
||||
import { AuthHeader } from "@components/Common/AuthHeader/AuthHeader";
|
||||
import { Footer } from "@components/Common/Footer/Footer";
|
||||
import ModalLayout from "@components/Common/ModalLayout/ModalLayout";
|
||||
import { ModalReset } from "@components/Modal/ModalReset/ModalReset";
|
||||
import ModalResetPassword from "@components/Modal/ModalResetPassword/ModalResetPassword";
|
||||
import SideBar from "@components/SideBar/SideBar";
|
||||
|
||||
import arrowInfo from "assets/icons/trackerIntroInfo.svg";
|
||||
import trackerAuthImg from "assets/images/trackerAuthImg.png";
|
||||
|
||||
import "./trackerAuth.scss";
|
||||
|
||||
export const TrackerAuth = () => {
|
||||
const [modalResetOpen, setModalReset] = useState(false);
|
||||
return (
|
||||
<div className="tracker-auth">
|
||||
<AuthHeader />
|
||||
<SideBar />
|
||||
<div className="tracker-auth__content">
|
||||
<div className="container">
|
||||
<h1 className="tracker-auth__title">
|
||||
Войдите в свое{" "}
|
||||
<span>
|
||||
рабочее пространство
|
||||
<img src={arrowInfo} alt="arrow" />
|
||||
</span>
|
||||
</h1>
|
||||
<AuthBlock
|
||||
description="Создавайте и редактируйте задачи и проекты вместе с другими участниками команды."
|
||||
img={trackerAuthImg}
|
||||
resetModal={setModalReset}
|
||||
/>
|
||||
</div>
|
||||
<ModalResetPassword active={modalResetOpen} setActive={setModalReset} />
|
||||
{/*{modalResetOpen && (*/}
|
||||
{/* <ModalLayout active={modalResetOpen} setActive={setModalReset}>*/}
|
||||
{/* <ModalReset setModalReset={setModalReset} />*/}
|
||||
{/* </ModalLayout>*/}
|
||||
{/*)}*/}
|
||||
</div>
|
||||
<Footer />
|
||||
</div>
|
||||
);
|
||||
};
|
@ -1,58 +0,0 @@
|
||||
.tracker-auth {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 100vh;
|
||||
background-color: #f1f1f1;
|
||||
|
||||
&__content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
color: #000000;
|
||||
padding: 50px 0 0;
|
||||
|
||||
@media (max-width: 1375px) {
|
||||
padding-top: 100px;
|
||||
}
|
||||
|
||||
@media (max-width: 1000px) {
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.container {
|
||||
padding-bottom: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
&__title {
|
||||
font-size: 30px;
|
||||
font-weight: 500;
|
||||
margin-bottom: 46px;
|
||||
color: #000000;
|
||||
span {
|
||||
color: #52b709;
|
||||
position: relative;
|
||||
img {
|
||||
position: absolute;
|
||||
bottom: -15px;
|
||||
right: 10px;
|
||||
max-width: 300px;
|
||||
|
||||
@media (max-width: 600px) {
|
||||
max-width: 257px;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
@media (max-width: 483px) {
|
||||
max-width: 160px;
|
||||
left: -175px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 600px) {
|
||||
font-size: 24px;
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
}
|
||||
}
|
@ -36,7 +36,7 @@ export const TrackerIntro = () => {
|
||||
компании в одном месте: проекты, задачи, цели, сотрудники,
|
||||
документы, переписки, отчеты
|
||||
</p>
|
||||
<NavLink to="/tracker-auth" className="tracker-intro__btn">
|
||||
<NavLink to="/auth" className="tracker-intro__btn">
|
||||
Начать работу
|
||||
</NavLink>
|
||||
</div>
|
||||
@ -57,7 +57,7 @@ export const TrackerIntro = () => {
|
||||
Управление большим количеством проектов и гибкая настройка
|
||||
структуры под любые процессы
|
||||
</p>
|
||||
<NavLink to="/tracker-registration" className="tracker-intro__btn">
|
||||
<NavLink to="/auth" className="tracker-intro__btn">
|
||||
Начать работу
|
||||
</NavLink>
|
||||
</div>
|
||||
|
@ -1,163 +0,0 @@
|
||||
import React, { useState } from "react";
|
||||
import { Navigate } from "react-router-dom";
|
||||
|
||||
import { useFormValidation } from "@hooks/useFormValidation";
|
||||
import { useNotification } from "@hooks/useNotification";
|
||||
|
||||
import { AuthHeader } from "@components/Common/AuthHeader/AuthHeader";
|
||||
import BaseButton from "@components/Common/BaseButton/BaseButton";
|
||||
import { Footer } from "@components/Common/Footer/Footer";
|
||||
import { Loader } from "@components/Common/Loader/Loader";
|
||||
import ModalLayout from "@components/Common/ModalLayout/ModalLayout";
|
||||
import { ModalTrackerRegistration } from "@components/Modal/ModalTrackerRegistration/ModalTrackerRegistration";
|
||||
import SideBar from "@components/SideBar/SideBar";
|
||||
|
||||
import arrowInfo from "assets/icons/trackerIntroInfo.svg";
|
||||
import authImg from "assets/images/partnerProfile/authCandidateFormImg.png";
|
||||
import registrationImg from "assets/images/trackerRegistrationImg.png";
|
||||
|
||||
import "./trackerRegistration.scss";
|
||||
|
||||
export const TrackerRegistration = () => {
|
||||
const [modalConfirmOpen, setModalConfirm] = useState(false);
|
||||
const [loader, setLoader] = useState(false);
|
||||
const [isPartner, setIsPartner] = useState(false);
|
||||
const fields = {
|
||||
username: "",
|
||||
email: "",
|
||||
password: "",
|
||||
secondPassword: ""
|
||||
};
|
||||
|
||||
const apiEndpoint = "/register/sign-up";
|
||||
|
||||
const { showNotification } = useNotification();
|
||||
const showNotificationError = (error) => {
|
||||
showNotification({
|
||||
show: true,
|
||||
text: error,
|
||||
type: "error"
|
||||
});
|
||||
};
|
||||
const showNotificationTrue = () => {
|
||||
showNotification({
|
||||
show: true,
|
||||
text: "Аккаунт успешно создан",
|
||||
type: "success"
|
||||
});
|
||||
};
|
||||
|
||||
const { formData, validationErrors, handleChange, handleSubmit } =
|
||||
useFormValidation(
|
||||
apiEndpoint,
|
||||
fields,
|
||||
showNotificationError,
|
||||
showNotificationTrue,
|
||||
isPartner,
|
||||
setLoader
|
||||
);
|
||||
return (
|
||||
<div className="tracker-registration">
|
||||
<AuthHeader />
|
||||
<SideBar />
|
||||
<div className="tracker-auth__content">
|
||||
<div className="container">
|
||||
<h1 className="tracker-auth__title">
|
||||
Создайте свое{" "}
|
||||
<span>
|
||||
рабочее пространство
|
||||
<img src={arrowInfo} alt="arrow" />
|
||||
</span>
|
||||
</h1>
|
||||
<div className="tracker-registration__form">
|
||||
<div className="tracker-registration__form__inputs">
|
||||
<div className="tracker-registration__input-container">
|
||||
<h5>Ваше имя</h5>
|
||||
<input
|
||||
placeholder="Имя"
|
||||
className={validationErrors.username ? "error" : ""}
|
||||
onChange={handleChange}
|
||||
value={formData.username}
|
||||
id="username"
|
||||
/>
|
||||
<span>{validationErrors.username}</span>
|
||||
</div>
|
||||
<div className="tracker-registration__input-container">
|
||||
<h5>Ваш e-mail</h5>
|
||||
<input
|
||||
onChange={handleChange}
|
||||
className={validationErrors.email ? "error" : ""}
|
||||
placeholder="E-mail"
|
||||
type="email"
|
||||
id="email"
|
||||
value={formData.email}
|
||||
/>
|
||||
<span>{validationErrors.email}</span>
|
||||
</div>
|
||||
<div className="tracker-registration__input-container">
|
||||
<h5>Придумайте пароль</h5>
|
||||
<input
|
||||
placeholder="Пароль"
|
||||
className={validationErrors.password ? "error" : ""}
|
||||
onChange={handleChange}
|
||||
value={formData.password}
|
||||
type="password"
|
||||
id="password"
|
||||
/>
|
||||
<span>{validationErrors.password}</span>
|
||||
</div>
|
||||
<div className="tracker-registration__input-container">
|
||||
<h5>Повторите пароль</h5>
|
||||
<input
|
||||
placeholder="Повторите пароль"
|
||||
className={validationErrors.secondPassword ? "error" : ""}
|
||||
value={formData.secondPassword}
|
||||
type="password"
|
||||
onChange={handleChange}
|
||||
id="secondPassword"
|
||||
/>
|
||||
<span>{validationErrors.secondPassword}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div className="tracker-registration__form__submit">
|
||||
{loader ? (
|
||||
<Loader />
|
||||
) : (
|
||||
<BaseButton
|
||||
onClick={async (e) => {
|
||||
e.preventDefault();
|
||||
await handleSubmit(e);
|
||||
}}
|
||||
styles="button-box__submit"
|
||||
>
|
||||
Отправить
|
||||
</BaseButton>
|
||||
)}
|
||||
<div className="tracker-registration__form__info">
|
||||
<img src={authImg} alt="img" />
|
||||
<p>
|
||||
Создавайте и редактируйте задачи и проекты вместе с другими
|
||||
участниками команды.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<img
|
||||
className="tracker-registration__form__img"
|
||||
src={registrationImg}
|
||||
alt="img"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
{modalConfirmOpen && (
|
||||
<ModalLayout active={modalConfirmOpen} setActive={setModalConfirm}>
|
||||
<ModalTrackerRegistration
|
||||
setModalReset={setModalConfirm}
|
||||
email={formData.email}
|
||||
/>
|
||||
</ModalLayout>
|
||||
)}
|
||||
</div>
|
||||
<Footer />
|
||||
</div>
|
||||
);
|
||||
};
|
@ -1,150 +0,0 @@
|
||||
.tracker-registration {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 100vh;
|
||||
background-color: #f1f1f1;
|
||||
|
||||
&__content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
color: #000000;
|
||||
padding: 50px 0 0;
|
||||
|
||||
@media (max-width: 1375px) {
|
||||
padding-top: 100px;
|
||||
}
|
||||
|
||||
.container {
|
||||
padding-bottom: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
&__form {
|
||||
position: relative;
|
||||
border-radius: 12px;
|
||||
background: #fff;
|
||||
padding: 20px;
|
||||
|
||||
@media (max-width: 1000px) {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
&__inputs {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
max-width: 650px;
|
||||
column-gap: 44px;
|
||||
|
||||
@media (max-width: 1000px) {
|
||||
order: 2;
|
||||
}
|
||||
}
|
||||
|
||||
&__submit {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 5px;
|
||||
|
||||
button {
|
||||
border-radius: 44px;
|
||||
padding: 9px 39px;
|
||||
background: #52b709;
|
||||
font-weight: 500;
|
||||
font-size: 18px;
|
||||
color: #fff;
|
||||
border: none;
|
||||
max-width: 170px;
|
||||
}
|
||||
|
||||
@media (max-width: 1000px) {
|
||||
order: 3;
|
||||
}
|
||||
|
||||
@media (max-width: 675px) {
|
||||
flex-direction: column;
|
||||
align-items: start;
|
||||
row-gap: 35px;
|
||||
}
|
||||
|
||||
.loader {
|
||||
max-width: 170px;
|
||||
}
|
||||
}
|
||||
|
||||
&__info {
|
||||
display: flex;
|
||||
margin-left: 165px;
|
||||
align-items: center;
|
||||
img {
|
||||
margin-right: 31px;
|
||||
|
||||
@media (max-width: 675px) {
|
||||
margin-right: 27px;
|
||||
}
|
||||
}
|
||||
|
||||
p {
|
||||
font-size: 16px;
|
||||
font-weight: 400;
|
||||
line-height: 22px;
|
||||
color: #000;
|
||||
max-width: 430px;
|
||||
|
||||
@media (max-width: 675px) {
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&__img {
|
||||
position: absolute;
|
||||
top: -100px;
|
||||
right: 58px;
|
||||
|
||||
@media (max-width: 900px) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
&__input-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
max-width: 300px;
|
||||
width: 100%;
|
||||
margin-bottom: 44px;
|
||||
|
||||
h5 {
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
span {
|
||||
font-weight: 400;
|
||||
font-size: 12px;
|
||||
color: red;
|
||||
}
|
||||
|
||||
input {
|
||||
outline: none;
|
||||
padding: 8px 12px 9px;
|
||||
background-color: #eff2f7;
|
||||
border-radius: 8px;
|
||||
margin: 10px 0;
|
||||
border: none;
|
||||
font-weight: 400;
|
||||
font-size: 15px;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
@media (max-width: 675px) {
|
||||
margin-bottom: 0;
|
||||
max-width: none;
|
||||
}
|
||||
|
||||
.error {
|
||||
border: 1px solid red;
|
||||
}
|
||||
}
|
||||
}
|
@ -12,6 +12,8 @@ import {
|
||||
|
||||
import { apiRequest } from "@api/request";
|
||||
|
||||
import { useNotification } from "@hooks/useNotification";
|
||||
|
||||
import { Footer } from "@components/Common/Footer/Footer";
|
||||
import { Loader } from "@components/Common/Loader/Loader";
|
||||
import { Navigation } from "@components/Navigation/Navigation";
|
||||
@ -38,6 +40,7 @@ export const ViewReport = () => {
|
||||
const [loader, setLoader] = useState(false);
|
||||
const [deleteLoader, setDeleteLoader] = useState(false);
|
||||
const [reportInfo, setReportInfo] = useState({});
|
||||
const { showNotification } = useNotification();
|
||||
|
||||
function getReportFromDate(day) {
|
||||
setLoader(true);
|
||||
@ -84,6 +87,11 @@ export const ViewReport = () => {
|
||||
if (res) {
|
||||
window.location.replace("/profile/calendar");
|
||||
}
|
||||
showNotification({
|
||||
show: true,
|
||||
text: "Отчет удален",
|
||||
type: "success"
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
51
src/pages/roles/DeveloperPage.jsx
Normal file
51
src/pages/roles/DeveloperPage.jsx
Normal file
@ -0,0 +1,51 @@
|
||||
import React from "react";
|
||||
import { Navigate, Route, Routes } from "react-router-dom";
|
||||
|
||||
import { PartnerSettings } from "@pages/PartnerSettings/PartnerSettings";
|
||||
import { PartnerTreaties } from "@pages/PartnerTreaties/PartnerTreaties";
|
||||
import { Payouts } from "@pages/Payouts/Payouts";
|
||||
import { Profile } from "@pages/Profile/Profile";
|
||||
import { ProjectTracker } from "@pages/ProjectTracker/ProjectTracker";
|
||||
import { PassingTests } from "@pages/Quiz/PassingTests";
|
||||
import { QuizPage } from "@pages/Quiz/QuizPage";
|
||||
import { QuizReportPage } from "@pages/Quiz/QuizReportPage";
|
||||
import Statistics from "@pages/Statistics/Statistics";
|
||||
import { Summary } from "@pages/Summary/Summary";
|
||||
import { Tracker } from "@pages/Tracker/Tracker";
|
||||
import { ViewReport } from "@pages/ViewReport/ViewReport";
|
||||
|
||||
import { TicketFullScreen } from "@components/Modal/Tracker/TicketFullScreen/TicketFullScreen";
|
||||
import { ProfileCalendar } from "@components/ProfileCalendar/ProfileCalendar";
|
||||
import { ReportForm } from "@components/ReportForm/ReportForm";
|
||||
|
||||
export const DeveloperPage = () => {
|
||||
return (
|
||||
<Routes>
|
||||
<Route
|
||||
exact
|
||||
path="/tracker/task/:id"
|
||||
element={<TicketFullScreen />}
|
||||
></Route>
|
||||
<Route exact path="/tracker/project/:id" element={<ProjectTracker />} />
|
||||
|
||||
<Route exact path="profile">
|
||||
<Route index element={<Profile />} />
|
||||
<Route exact path="calendar" 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="tracker" element={<Tracker />} />
|
||||
<Route exact path="statistics/:id" element={<Statistics />} />
|
||||
<Route exact path="payouts" element={<Payouts />} />
|
||||
<Route exact path="settings" element={<PartnerSettings />} />
|
||||
<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 path="*" element={<Navigate to="/profile" replace />} />
|
||||
</Routes>
|
||||
);
|
||||
};
|
66
src/pages/roles/GuestPage.jsx
Normal file
66
src/pages/roles/GuestPage.jsx
Normal file
@ -0,0 +1,66 @@
|
||||
import React from "react";
|
||||
import { Navigate, Route, Routes } from "react-router-dom";
|
||||
|
||||
import { Article } from "@pages/Article/Article";
|
||||
import { Auth } from "@pages/Auth/Auth";
|
||||
import { AuthForCandidate } from "@pages/AuthForCandidate/AuthForCandidate";
|
||||
import { Blog } from "@pages/Blog/Blog";
|
||||
import CatalogSpecialists from "@pages/CatalogSpecialists/CatalogSpecialists";
|
||||
import { CompanyInfo } from "@pages/CompanyInfo/CompanyInfo";
|
||||
import { Forms } from "@pages/Forms/Forms";
|
||||
import { FrequentlyAskedQuestion } from "@pages/FrequentlyAskedQuestion/FrequentlyAskedQuestion";
|
||||
import { FrequentlyAskedQuestions } from "@pages/FrequentlyAskedQuestions/FrequentlyAskedQuestions";
|
||||
import { ProfileCandidate } from "@pages/ProfileCandidate/ProfileCandidate";
|
||||
import { RegistrationForCandidate } from "@pages/RegistrationForCandidate/RegistrationForCandidate";
|
||||
import { RegistrationSetting } from "@pages/RegistrationSetting/RegistrationSetting";
|
||||
import { SingleReportPage } from "@pages/SingleReportPage/SingleReportPage";
|
||||
import { TrackerIntro } from "@pages/TrackerIntro/TrackerIntro";
|
||||
|
||||
import { FreeDevelopers } from "@components/FreeDevelopers/FreeDevelopers";
|
||||
|
||||
export const GuestPage = () => {
|
||||
return (
|
||||
<Routes>
|
||||
<Route exact path="/auth" element={<Auth />} />
|
||||
<Route path="*" element={<Navigate to="/auth" replace />} />
|
||||
<Route exact path="/tracker-intro" element={<TrackerIntro />} />
|
||||
<Route exact path="/forms" element={<Forms />} />
|
||||
<Route exact path="/company" element={<CompanyInfo />} />
|
||||
<Route
|
||||
exact
|
||||
path="/registration-setting"
|
||||
element={<RegistrationSetting />}
|
||||
/>
|
||||
<Route
|
||||
exact
|
||||
path="/catalog-specialists"
|
||||
element={<CatalogSpecialists />}
|
||||
/>
|
||||
<Route exact path="/worker/:id" element={<FreeDevelopers />} />
|
||||
<Route exact path="/auth-candidate" element={<AuthForCandidate />} />
|
||||
<Route
|
||||
exact
|
||||
path="/registration-candidate"
|
||||
element={<RegistrationForCandidate />}
|
||||
/>
|
||||
|
||||
<Route exact path="/blog" element={<Blog />}></Route>
|
||||
<Route exact path="/blog/article/:id" element={<Article />}></Route>
|
||||
<Route
|
||||
exact
|
||||
path="/frequently-asked-questions"
|
||||
element={<FrequentlyAskedQuestions />}
|
||||
/>
|
||||
<Route
|
||||
exact
|
||||
path="/frequently-asked-question/:id"
|
||||
element={<FrequentlyAskedQuestion />}
|
||||
/>
|
||||
|
||||
<Route path="/report/:id" element={<SingleReportPage />} />
|
||||
<Route exact path="profile-candidate/:id">
|
||||
<Route index element={<ProfileCandidate />} />
|
||||
</Route>
|
||||
</Routes>
|
||||
);
|
||||
};
|
65
src/pages/roles/PartnerPage.jsx
Normal file
65
src/pages/roles/PartnerPage.jsx
Normal file
@ -0,0 +1,65 @@
|
||||
import React from "react";
|
||||
import { Navigate, Route, Routes } from "react-router-dom";
|
||||
|
||||
import { FormPage } from "@pages/FormPage/FormPage";
|
||||
import { Home } from "@pages/Home/Home";
|
||||
import { PartnerAddRequest } from "@pages/PartnerAddRequest/PartnerAddRequest";
|
||||
import { PartnerBid } from "@pages/PartnerBid/PartnerBid";
|
||||
import { PartnerEmployeeReport } from "@pages/PartnerEmployeeReport/PartnerEmployeeReport";
|
||||
import { PartnerEmployees } from "@pages/PartnerEmployees/PartnerEmployees";
|
||||
import { PartnerRequests } from "@pages/PartnerRequests/PartnerRequests";
|
||||
import { PartnerSettings } from "@pages/PartnerSettings/PartnerSettings";
|
||||
import { PartnerTreaties } from "@pages/PartnerTreaties/PartnerTreaties";
|
||||
import { PartnerCategories } from "@pages/PartnerСategories/PartnerСategories";
|
||||
import { Profile } from "@pages/Profile/Profile";
|
||||
import { ProjectTracker } from "@pages/ProjectTracker/ProjectTracker";
|
||||
import Statistics from "@pages/Statistics/Statistics";
|
||||
import { Tracker } from "@pages/Tracker/Tracker";
|
||||
import { ViewReport } from "@pages/ViewReport/ViewReport";
|
||||
|
||||
import { Calendar } from "@components/Calendar/Calendar";
|
||||
import { Candidate } from "@components/Candidate/Candidate";
|
||||
import { TicketFullScreen } from "@components/Modal/Tracker/TicketFullScreen/TicketFullScreen";
|
||||
|
||||
export const PartnerPage = () => {
|
||||
return (
|
||||
<Routes>
|
||||
<Route exact path="/candidate/:id" element={<Candidate />} />
|
||||
<Route exact path="/candidate/:id/form" element={<FormPage />} />
|
||||
<Route path="/:userId/calendar" element={<Calendar />} />
|
||||
|
||||
<Route
|
||||
exact
|
||||
path="/tracker/task/:id"
|
||||
element={<TicketFullScreen />}
|
||||
></Route>
|
||||
<Route exact path="/tracker/project/:id" element={<ProjectTracker />} />
|
||||
|
||||
<Route exact path="profile">
|
||||
<Route index element={<Profile />} />
|
||||
<Route exact path="catalog" element={<Home />} />
|
||||
<Route exact path="calendar/view/:date/:id" element={<ViewReport />} />
|
||||
<Route exact path="tracker" element={<Tracker />} />
|
||||
<Route exact path="statistics/:id" element={<Statistics />} />
|
||||
<Route exact path="settings" element={<PartnerSettings />} />
|
||||
<Route exact path="requests" element={<PartnerRequests />} />
|
||||
<Route exact path="requests-add" element={<PartnerAddRequest />} />
|
||||
<Route exact path="requests-edit" element={<PartnerAddRequest />} />
|
||||
<Route exact path="requests-bid" element={<PartnerBid />} />
|
||||
<Route exact path="employees" element={<PartnerCategories />} />
|
||||
<Route
|
||||
exact
|
||||
path="employees/report/:uuid"
|
||||
element={<PartnerEmployeeReport />}
|
||||
/>
|
||||
<Route exact path="treaties" element={<PartnerTreaties />} />
|
||||
<Route
|
||||
exact
|
||||
path="categories/employees"
|
||||
element={<PartnerEmployees />}
|
||||
/>
|
||||
</Route>
|
||||
<Route path="*" element={<Navigate to="/profile" replace />} />
|
||||
</Routes>
|
||||
);
|
||||
};
|
@ -6,7 +6,7 @@ const initialState = {
|
||||
filteredCandidates: null,
|
||||
selectedItems: [],
|
||||
currentCandidate: {},
|
||||
auth: false,
|
||||
auth: null,
|
||||
positionId: null,
|
||||
profileInfo: {},
|
||||
reportsDates: "",
|
||||
|
Loading…
Reference in New Issue
Block a user