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 { getNotification } from "@redux/outstaffingSlice";
|
||||||
|
|
||||||
import { Article } from "@pages/Article/Article";
|
import { MainPage } from "@pages/MainPage/MainPage";
|
||||||
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 { 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 { Notification } from "@components/Notification/Notification";
|
||||||
import { ProfileCalendar } from "@components/ProfileCalendar/ProfileCalendar";
|
|
||||||
import { ReportForm } from "@components/ReportForm/ReportForm";
|
|
||||||
|
|
||||||
import "assets/fonts/stylesheet.css";
|
import "assets/fonts/stylesheet.css";
|
||||||
import "assets/global.scss";
|
import "assets/global.scss";
|
||||||
@ -64,109 +23,7 @@ const App = () => {
|
|||||||
<>
|
<>
|
||||||
<Router>
|
<Router>
|
||||||
<Routes>
|
<Routes>
|
||||||
<Route exact path="/auth" element={<Auth />} />
|
<Route path="*" element={<MainPage />} />
|
||||||
<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 />} />
|
|
||||||
</Routes>
|
</Routes>
|
||||||
</Router>
|
</Router>
|
||||||
{notification.show && <Notification />}
|
{notification.show && <Notification />}
|
||||||
|
@ -41,7 +41,7 @@ export const apiRequest = (
|
|||||||
if (response.data?.redirect || response.status === 401) {
|
if (response.data?.redirect || response.status === 401) {
|
||||||
window.location.replace("/auth");
|
window.location.replace("/auth");
|
||||||
localStorage.clear();
|
localStorage.clear();
|
||||||
// dispatch(auth(false));
|
store.dispatch(auth(false));
|
||||||
store.dispatch(setProfileInfo({}));
|
store.dispatch(setProfileInfo({}));
|
||||||
}
|
}
|
||||||
return resolve(response);
|
return resolve(response);
|
||||||
|
@ -108,7 +108,7 @@ export const AuthBlock = ({ title, description, img, resetModal }) => {
|
|||||||
>
|
>
|
||||||
{isLoading ? <Loader /> : "Войти"}
|
{isLoading ? <Loader /> : "Войти"}
|
||||||
</button>
|
</button>
|
||||||
<NavLink to="/tracker-registration" className="auth__registration">
|
<NavLink to="/auth" className="auth__registration">
|
||||||
Регистрация
|
Регистрация
|
||||||
</NavLink>
|
</NavLink>
|
||||||
</div>
|
</div>
|
||||||
|
@ -70,6 +70,7 @@ export const AuthBox = ({ title }) => {
|
|||||||
dispatch(setUserInfo(res));
|
dispatch(setUserInfo(res));
|
||||||
dispatch(loading(false));
|
dispatch(loading(false));
|
||||||
dispatch(setRole("ROLE_PARTNER"));
|
dispatch(setRole("ROLE_PARTNER"));
|
||||||
|
navigate("/profile");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -24,9 +24,9 @@ export const AuthHeader = () => {
|
|||||||
<span>Главная</span>
|
<span>Главная</span>
|
||||||
</NavLink>
|
</NavLink>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
{/*<li>*/}
|
||||||
<NavLink to={"/profile"}>Кабинет разработчика</NavLink>
|
{/* <NavLink to={"/profile"}>Кабинет разработчика</NavLink>*/}
|
||||||
</li>
|
{/*</li>*/}
|
||||||
<li>
|
<li>
|
||||||
<NavLink to={"/tracker-intro"}>Трекер</NavLink>
|
<NavLink to={"/tracker-intro"}>Трекер</NavLink>
|
||||||
</li>
|
</li>
|
||||||
|
@ -4,10 +4,15 @@ import { backendImg } from "@utils/helper";
|
|||||||
|
|
||||||
import { apiRequest } from "@api/request";
|
import { apiRequest } from "@api/request";
|
||||||
|
|
||||||
|
import { useNotification } from "@hooks/useNotification";
|
||||||
|
|
||||||
import close from "assets/icons/closeProjectPersons.svg";
|
import close from "assets/icons/closeProjectPersons.svg";
|
||||||
|
|
||||||
const FileTracker = ({ file, setDeletedTask, taskId }) => {
|
const FileTracker = ({ file, setDeletedTask, taskId }) => {
|
||||||
const [openImg, setOpenImg] = useState(false);
|
const [openImg, setOpenImg] = useState(false);
|
||||||
|
|
||||||
|
const { showNotification } = useNotification();
|
||||||
|
|
||||||
function deleteFile(file) {
|
function deleteFile(file) {
|
||||||
apiRequest("/file/detach", {
|
apiRequest("/file/detach", {
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
@ -17,8 +22,21 @@ const FileTracker = ({ file, setDeletedTask, taskId }) => {
|
|||||||
entity_id: taskId,
|
entity_id: taskId,
|
||||||
status: 0
|
status: 0
|
||||||
}
|
}
|
||||||
}).then(() => {
|
})
|
||||||
|
.then(() => {
|
||||||
setDeletedTask(file);
|
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 { apiRequest } from "@api/request";
|
||||||
|
|
||||||
|
import { useNotification } from "@hooks/useNotification";
|
||||||
|
|
||||||
import { Loader } from "@components/Common/Loader/Loader";
|
import { Loader } from "@components/Common/Loader/Loader";
|
||||||
|
|
||||||
import "./form.scss";
|
import "./form.scss";
|
||||||
@ -18,6 +20,8 @@ const Form = () => {
|
|||||||
|
|
||||||
const urlParams = useParams();
|
const urlParams = useParams();
|
||||||
|
|
||||||
|
const { showNotification } = useNotification();
|
||||||
|
|
||||||
const [status, setStatus] = useState(null);
|
const [status, setStatus] = useState(null);
|
||||||
const [data, setData] = useState({
|
const [data, setData] = useState({
|
||||||
email: "",
|
email: "",
|
||||||
@ -75,9 +79,22 @@ const Form = () => {
|
|||||||
profile_id: urlParams.id,
|
profile_id: urlParams.id,
|
||||||
...data
|
...data
|
||||||
}
|
}
|
||||||
}).then((res) => {
|
})
|
||||||
|
.then((res) => {
|
||||||
setStatus(res);
|
setStatus(res);
|
||||||
setIsFetching(false);
|
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 { apiRequest } from "@api/request";
|
||||||
|
|
||||||
|
import { useNotification } from "@hooks/useNotification";
|
||||||
|
|
||||||
import ModalLayout from "@components/Common/ModalLayout/ModalLayout";
|
import ModalLayout from "@components/Common/ModalLayout/ModalLayout";
|
||||||
|
|
||||||
import close from "assets/icons/close.png";
|
import close from "assets/icons/close.png";
|
||||||
@ -24,6 +26,7 @@ const ListEmployees = ({
|
|||||||
setModalAdd
|
setModalAdd
|
||||||
}) => {
|
}) => {
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
|
const { showNotification } = useNotification();
|
||||||
|
|
||||||
function deletePerson(userId) {
|
function deletePerson(userId) {
|
||||||
apiRequest("/project/del-user", {
|
apiRequest("/project/del-user", {
|
||||||
@ -32,8 +35,21 @@ const ListEmployees = ({
|
|||||||
project_id: projectBoard.id,
|
project_id: projectBoard.id,
|
||||||
user_id: userId
|
user_id: userId
|
||||||
}
|
}
|
||||||
}).then(() => {
|
})
|
||||||
|
.then(() => {
|
||||||
dispatch(deletePersonOnProject(userId));
|
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,
|
task_id: task.id,
|
||||||
status: 0
|
status: 0
|
||||||
}
|
}
|
||||||
}).then(() => {
|
})
|
||||||
|
.then(() => {
|
||||||
closeModal();
|
closeModal();
|
||||||
dispatch(setProjectBoardFetch(projectId));
|
dispatch(setProjectBoardFetch(projectId));
|
||||||
showNotification({
|
showNotification({
|
||||||
show: true,
|
show: true,
|
||||||
text: "Задача успешно была перемещена в архив",
|
text: "Задача успешно удалена",
|
||||||
type: "archive"
|
type: "success"
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
showNotification({
|
||||||
|
show: true,
|
||||||
|
text: "Ошибка удаления",
|
||||||
|
type: "error"
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -169,7 +177,8 @@ export const ModalTiсket = ({
|
|||||||
title: inputsValue.title,
|
title: inputsValue.title,
|
||||||
description: inputsValue.description
|
description: inputsValue.description
|
||||||
}
|
}
|
||||||
}).then((res) => {
|
})
|
||||||
|
.then((res) => {
|
||||||
setEditOpen(!editOpen);
|
setEditOpen(!editOpen);
|
||||||
dispatch(setProjectBoardFetch(projectId));
|
dispatch(setProjectBoardFetch(projectId));
|
||||||
showNotification({
|
showNotification({
|
||||||
@ -177,6 +186,13 @@ export const ModalTiсket = ({
|
|||||||
text: "Изменения сохранены",
|
text: "Изменения сохранены",
|
||||||
type: "success"
|
type: "success"
|
||||||
});
|
});
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
showNotification({
|
||||||
|
show: true,
|
||||||
|
text: "Ошибка при сохранении изменений",
|
||||||
|
type: "error"
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -982,7 +982,7 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
row-gap: 10px;
|
row-gap: 10px;
|
||||||
padding: 10px 40px 0px 20px;
|
padding: 10px 20px 0px 20px;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
|
|
||||||
@ -1113,7 +1113,7 @@
|
|||||||
|
|
||||||
&-priority {
|
&-priority {
|
||||||
position: relative;
|
position: relative;
|
||||||
padding: 10px 40px 0 20px;
|
padding: 10px 20px 0 20px;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
.priority {
|
.priority {
|
||||||
@ -1173,7 +1173,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&-bottom {
|
&-bottom {
|
||||||
padding: 0px 90px 10px 35px;
|
padding: 0px 30px 10px 20px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
line-height: 32px;
|
line-height: 32px;
|
||||||
@ -1196,9 +1196,10 @@
|
|||||||
.edit {
|
.edit {
|
||||||
background: #52b709;
|
background: #52b709;
|
||||||
border-radius: 50px;
|
border-radius: 50px;
|
||||||
|
width: fit-content;
|
||||||
p {
|
p {
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
|
padding-right: 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -137,13 +137,21 @@ export const TrackerModal = ({
|
|||||||
: 1,
|
: 1,
|
||||||
title: valueColumn
|
title: valueColumn
|
||||||
}
|
}
|
||||||
}).then(() => {
|
})
|
||||||
|
.then(() => {
|
||||||
dispatch(setProjectBoardFetch(projectBoard.id));
|
dispatch(setProjectBoardFetch(projectBoard.id));
|
||||||
showNotification({
|
showNotification({
|
||||||
show: true,
|
show: true,
|
||||||
text: "Колонка создана",
|
text: "Колонка успешно создана",
|
||||||
type: "success"
|
type: "success"
|
||||||
});
|
});
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
showNotification({
|
||||||
|
show: true,
|
||||||
|
text: "Ошибка при создании колонки",
|
||||||
|
type: "error"
|
||||||
|
});
|
||||||
});
|
});
|
||||||
setValueColumn("");
|
setValueColumn("");
|
||||||
setActive(false);
|
setActive(false);
|
||||||
@ -221,7 +229,7 @@ export const TrackerModal = ({
|
|||||||
setDeadLineDate("");
|
setDeadLineDate("");
|
||||||
showNotification({
|
showNotification({
|
||||||
show: true,
|
show: true,
|
||||||
text: "Задача создана",
|
text: "Задача успешно создана",
|
||||||
type: "success"
|
type: "success"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -295,7 +303,7 @@ export const TrackerModal = ({
|
|||||||
dispatch(editColumnName({ id: columnId, title: columnName }));
|
dispatch(editColumnName({ id: columnId, title: columnName }));
|
||||||
showNotification({
|
showNotification({
|
||||||
show: true,
|
show: true,
|
||||||
text: "Колонка создана",
|
text: "Колонка успешно изменена",
|
||||||
type: "success"
|
type: "success"
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -316,6 +324,11 @@ export const TrackerModal = ({
|
|||||||
dispatch(setProject(result));
|
dispatch(setProject(result));
|
||||||
setActive(false);
|
setActive(false);
|
||||||
setNameProject("");
|
setNameProject("");
|
||||||
|
showNotification({
|
||||||
|
show: true,
|
||||||
|
text: "Проект успешно создан",
|
||||||
|
type: "success"
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
showNotification({
|
showNotification({
|
||||||
show: true,
|
show: true,
|
||||||
|
@ -81,7 +81,7 @@ export const Navigation = () => {
|
|||||||
<NavLink
|
<NavLink
|
||||||
key={index}
|
key={index}
|
||||||
end
|
end
|
||||||
to={link.path === "/quiz" ? link.path : `/profile${link.path}`}
|
to={`/profile${link.path}`}
|
||||||
className={
|
className={
|
||||||
currentPath.includes(link.path) ||
|
currentPath.includes(link.path) ||
|
||||||
currentPath.includes(link.active)
|
currentPath.includes(link.active)
|
||||||
|
@ -91,11 +91,10 @@ export const ProfileHeader = () => {
|
|||||||
});
|
});
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const handler = () => {
|
const handler = (e) => {
|
||||||
setIsLoggingOut(true);
|
e.preventDefault();
|
||||||
localStorage.clear();
|
localStorage.clear();
|
||||||
dispatch(auth(false));
|
dispatch(auth(false));
|
||||||
setIsLoggingOut(false);
|
|
||||||
navigate("/auth");
|
navigate("/auth");
|
||||||
dispatch(setProfileInfo({}));
|
dispatch(setProfileInfo({}));
|
||||||
};
|
};
|
||||||
@ -144,9 +143,6 @@ export const ProfileHeader = () => {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className={active ? "auth-body active" : "auth-body"}>
|
<div className={active ? "auth-body active" : "auth-body"}>
|
||||||
{/* <div className="auth-body__title">
|
|
||||||
<img src={ITguild}></img>
|
|
||||||
</div> */}
|
|
||||||
<nav className="auth-body__navigation">
|
<nav className="auth-body__navigation">
|
||||||
<div className="profile-header__personal-info">
|
<div className="profile-header__personal-info">
|
||||||
<h3 className="profile-header__personal-info-name">
|
<h3 className="profile-header__personal-info-name">
|
||||||
|
@ -34,6 +34,11 @@ export const QuizPassingInformation = ({ setStartTest, uuid, timer }) => {
|
|||||||
}
|
}
|
||||||
dispatch(setQuestions(res));
|
dispatch(setQuestions(res));
|
||||||
setStartTest(true);
|
setStartTest(true);
|
||||||
|
showNotification({
|
||||||
|
show: true,
|
||||||
|
text: "Тест успешно запущен",
|
||||||
|
type: "success"
|
||||||
|
});
|
||||||
restart(
|
restart(
|
||||||
moment()
|
moment()
|
||||||
.add(res[0]?.time_limit.split(":")[0], "hours")
|
.add(res[0]?.time_limit.split(":")[0], "hours")
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
import React, { Component } from "react";
|
import React, { Component } from "react";
|
||||||
|
|
||||||
|
import { Fallback } from "./Fallback";
|
||||||
|
|
||||||
class ErrorBoundary extends Component {
|
class ErrorBoundary extends Component {
|
||||||
state = {
|
state = {
|
||||||
error: null
|
error: null
|
||||||
@ -13,7 +15,7 @@ class ErrorBoundary extends Component {
|
|||||||
const { error } = this.state;
|
const { error } = this.state;
|
||||||
|
|
||||||
if (error) {
|
if (error) {
|
||||||
return <div>Что-то пошло не так =( {error}</div>;
|
return <Fallback />;
|
||||||
}
|
}
|
||||||
return this.props.children;
|
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);
|
setLoader(false);
|
||||||
if ("errors" in data) {
|
if ("errors" in data) {
|
||||||
return showNotificationError(
|
return showNotificationError(
|
||||||
"Аккаунт с таким логином или email уже существуе"
|
"Аккаунт с таким логином или email уже существует"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (!data.id) {
|
if (!data.id) {
|
||||||
|
@ -3,11 +3,14 @@ import ReactDOM from "react-dom/client";
|
|||||||
import { Provider } from "react-redux";
|
import { Provider } from "react-redux";
|
||||||
|
|
||||||
import App from "./App";
|
import App from "./App";
|
||||||
|
import ErrorBoundary from "./hoc/ErrorBoundary";
|
||||||
import "./index.css";
|
import "./index.css";
|
||||||
import { store } from "./store/store";
|
import { store } from "./store/store";
|
||||||
|
|
||||||
ReactDOM.createRoot(document.getElementById("root")).render(
|
ReactDOM.createRoot(document.getElementById("root")).render(
|
||||||
|
<ErrorBoundary>
|
||||||
<Provider store={store}>
|
<Provider store={store}>
|
||||||
<App />
|
<App />
|
||||||
</Provider>
|
</Provider>
|
||||||
|
</ErrorBoundary>
|
||||||
);
|
);
|
||||||
|
@ -19,16 +19,16 @@ import cross from "assets/images/cross.png";
|
|||||||
import "./auth.scss";
|
import "./auth.scss";
|
||||||
|
|
||||||
export const Auth = () => {
|
export const Auth = () => {
|
||||||
const isAuth = useSelector(selectAuth);
|
// const isAuth = useSelector(selectAuth);
|
||||||
let navigate = useNavigate();
|
// let navigate = useNavigate();
|
||||||
|
//
|
||||||
|
// const getToken = localStorage.getItem("auth_token");
|
||||||
|
|
||||||
const getToken = localStorage.getItem("auth_token");
|
// useEffect(() => {
|
||||||
|
// if (isAuth || getToken) {
|
||||||
useEffect(() => {
|
// navigate("/profile");
|
||||||
if (isAuth || getToken) {
|
// }
|
||||||
navigate("/profile");
|
// }, [getToken]);
|
||||||
}
|
|
||||||
}, [getToken]);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section className="auth-partners">
|
<section className="auth-partners">
|
||||||
|
@ -111,13 +111,6 @@ export const AuthForCandidate = () => {
|
|||||||
<div className="auth-candidate">
|
<div className="auth-candidate">
|
||||||
<AuthHeader />
|
<AuthHeader />
|
||||||
<div className="container">
|
<div className="container">
|
||||||
<AuthBlock
|
|
||||||
resetModal={setModalReset}
|
|
||||||
title="Войти, если есть доступ"
|
|
||||||
description="Если вы получили доступ, пройдя
|
|
||||||
2 шага для входа, или хотите узнать
|
|
||||||
свои результаты в кабинете"
|
|
||||||
/>
|
|
||||||
<div className="auth-candidate__start">
|
<div className="auth-candidate__start">
|
||||||
<h2 className="auth-candidate__start__title">
|
<h2 className="auth-candidate__start__title">
|
||||||
Хочу в команду <span>IT-специалистов</span>
|
Хочу в команду <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 { apiRequest } from "@api/request";
|
||||||
|
|
||||||
|
import { useNotification } from "@hooks/useNotification";
|
||||||
|
|
||||||
import { Footer } from "@components/Common/Footer/Footer";
|
import { Footer } from "@components/Common/Footer/Footer";
|
||||||
import { Navigation } from "@components/Navigation/Navigation";
|
import { Navigation } from "@components/Navigation/Navigation";
|
||||||
import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs";
|
import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs";
|
||||||
@ -47,6 +49,7 @@ export const PartnerAddRequest = () => {
|
|||||||
"Выберите кол-во сотрудников"
|
"Выберите кол-во сотрудников"
|
||||||
);
|
);
|
||||||
const [inputs, setInputs] = useState({ title: "", description: "" });
|
const [inputs, setInputs] = useState({ title: "", description: "" });
|
||||||
|
const { showNotification } = useNotification();
|
||||||
|
|
||||||
if (
|
if (
|
||||||
currentUrl[0] === "/profile/requests-edit" &&
|
currentUrl[0] === "/profile/requests-edit" &&
|
||||||
@ -120,6 +123,11 @@ export const PartnerAddRequest = () => {
|
|||||||
}
|
}
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
navigate("/profile/requests");
|
navigate("/profile/requests");
|
||||||
|
showNotification({
|
||||||
|
show: true,
|
||||||
|
text: "Вакансия успешно изменена",
|
||||||
|
type: "success"
|
||||||
|
});
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
apiRequest("/request/create-request", {
|
apiRequest("/request/create-request", {
|
||||||
@ -138,6 +146,11 @@ export const PartnerAddRequest = () => {
|
|||||||
}
|
}
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
navigate("/profile/requests");
|
navigate("/profile/requests");
|
||||||
|
showNotification({
|
||||||
|
show: true,
|
||||||
|
text: "Вакансия успешно создана",
|
||||||
|
type: "success"
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -14,6 +14,8 @@ import { urlForLocal } from "@utils/helper";
|
|||||||
|
|
||||||
import { apiRequest } from "@api/request";
|
import { apiRequest } from "@api/request";
|
||||||
|
|
||||||
|
import { useNotification } from "@hooks/useNotification";
|
||||||
|
|
||||||
import { Footer } from "@components/Common/Footer/Footer";
|
import { Footer } from "@components/Common/Footer/Footer";
|
||||||
import { Loader } from "@components/Common/Loader/Loader";
|
import { Loader } from "@components/Common/Loader/Loader";
|
||||||
import ModalLayout from "@components/Common/ModalLayout/ModalLayout";
|
import ModalLayout from "@components/Common/ModalLayout/ModalLayout";
|
||||||
@ -37,6 +39,7 @@ export const PartnerBid = () => {
|
|||||||
const requestId = useSelector(getPartnerRequestId);
|
const requestId = useSelector(getPartnerRequestId);
|
||||||
const partnerRequests = useSelector(getPartnerRequests);
|
const partnerRequests = useSelector(getPartnerRequests);
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
const { showNotification } = useNotification();
|
||||||
|
|
||||||
if (!requestId) {
|
if (!requestId) {
|
||||||
return <Navigate to="/profile/requests" replace />;
|
return <Navigate to="/profile/requests" replace />;
|
||||||
@ -61,6 +64,11 @@ export const PartnerBid = () => {
|
|||||||
}
|
}
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
navigate("/profile/requests");
|
navigate("/profile/requests");
|
||||||
|
showNotification({
|
||||||
|
show: true,
|
||||||
|
text: "Вакансия удалена",
|
||||||
|
type: "success"
|
||||||
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { useSelector } from "react-redux";
|
import { useSelector } from "react-redux";
|
||||||
import { Link, Navigate } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
|
|
||||||
import { getPartnerEmployees } from "@redux/outstaffingSlice";
|
import { getPartnerEmployees } from "@redux/outstaffingSlice";
|
||||||
|
|
||||||
@ -16,12 +16,7 @@ import "./partnerEmployees.scss";
|
|||||||
|
|
||||||
export const PartnerEmployees = () => {
|
export const PartnerEmployees = () => {
|
||||||
const partnerEmployees = useSelector(getPartnerEmployees);
|
const partnerEmployees = useSelector(getPartnerEmployees);
|
||||||
// if (
|
|
||||||
// localStorage.getItem("role_status") !== "18" ||
|
|
||||||
// !partnerEmployees.length
|
|
||||||
// ) {
|
|
||||||
// return <Navigate to="/profile/categories" replace />;
|
|
||||||
// }
|
|
||||||
return (
|
return (
|
||||||
<div className="partner-employees">
|
<div className="partner-employees">
|
||||||
<ProfileHeader />
|
<ProfileHeader />
|
||||||
|
@ -265,7 +265,7 @@
|
|||||||
height: 46px;
|
height: 46px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
line-height: 32px;
|
line-height: 20px;
|
||||||
transition: 0.3s all ease;
|
transition: 0.3s all ease;
|
||||||
|
|
||||||
a {
|
a {
|
||||||
@ -280,7 +280,7 @@
|
|||||||
color: white;
|
color: white;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
margin-right: 8px;
|
margin-left: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
|
@ -139,7 +139,6 @@
|
|||||||
&__body {
|
&__body {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: space-around;
|
|
||||||
margin-top: 50px;
|
margin-top: 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import { getTheme } from "@table-library/react-table-library/baseline";
|
import { getTheme } from "@table-library/react-table-library/baseline";
|
||||||
import { CompactTable } from "@table-library/react-table-library/compact";
|
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 { useSort } from "@table-library/react-table-library/sort";
|
||||||
import { useTheme } from "@table-library/react-table-library/theme";
|
import { useTheme } from "@table-library/react-table-library/theme";
|
||||||
import React, { useEffect, useState } from "react";
|
import React, { useEffect, useState } from "react";
|
||||||
@ -64,6 +65,14 @@ export const PartnerCategories = () => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Резюме",
|
label: "Резюме",
|
||||||
|
renderCell: (item) => (
|
||||||
|
<Link className="table__link" to={`/candidate/${item.user_id}`}>
|
||||||
|
Резюме
|
||||||
|
</Link>
|
||||||
|
)
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Отчет",
|
||||||
renderCell: (item) => (
|
renderCell: (item) => (
|
||||||
<Link
|
<Link
|
||||||
className="table__link"
|
className="table__link"
|
||||||
@ -93,6 +102,13 @@ export const PartnerCategories = () => {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const pagination = usePagination(data, {
|
||||||
|
state: {
|
||||||
|
page: 0,
|
||||||
|
size: 5
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setLoader(true);
|
setLoader(true);
|
||||||
apiRequest("/project/my-employee").then((el) => {
|
apiRequest("/project/my-employee").then((el) => {
|
||||||
@ -251,7 +267,30 @@ export const PartnerCategories = () => {
|
|||||||
data={data}
|
data={data}
|
||||||
theme={theme}
|
theme={theme}
|
||||||
sort={sort}
|
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">
|
<div className="partner-categories__empty">
|
||||||
|
@ -176,5 +176,19 @@
|
|||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
align-items: center;
|
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 { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs";
|
||||||
import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader";
|
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 settingIcon from "assets/icons/settingIcon.png";
|
||||||
import summaryIcon from "assets/icons/summaryIcon.png";
|
import summaryIcon from "assets/icons/summaryIcon.png";
|
||||||
import timerIcon from "assets/icons/timerIcon.png";
|
import timerIcon from "assets/icons/timerIcon.png";
|
||||||
@ -64,7 +64,7 @@ export const Profile = () => {
|
|||||||
img: reportsIcon,
|
img: reportsIcon,
|
||||||
title: "Мои вакансии",
|
title: "Мои вакансии",
|
||||||
description:
|
description:
|
||||||
"<span>У вас 2 вакансии<br/></span>открытые от лица компании"
|
"<span>Ваши открытые вакансии, которыми вы можете управлять"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "profile/employees",
|
path: "profile/employees",
|
||||||
@ -100,17 +100,10 @@ export const Profile = () => {
|
|||||||
<div className="container">
|
<div className="container">
|
||||||
<ProfileBreadcrumbs links={[{ name: "Главная", link: "/profile" }]} />
|
<ProfileBreadcrumbs links={[{ name: "Главная", link: "/profile" }]} />
|
||||||
<h2 className="profile__title">
|
<h2 className="profile__title">
|
||||||
{user === "developer" ? (
|
|
||||||
<span>
|
<span>
|
||||||
<p>Добрый день, </p>
|
<p>Добрый день, </p>
|
||||||
{profileInfo?.fio || profileInfo?.username}
|
{profileInfo?.fio || profileInfo?.username}
|
||||||
</span>
|
</span>
|
||||||
) : (
|
|
||||||
<span>
|
|
||||||
<p>Добрый день, </p>
|
|
||||||
{profileInfo?.fio || profileInfo?.username}
|
|
||||||
</span>
|
|
||||||
)}
|
|
||||||
</h2>
|
</h2>
|
||||||
<div className="summary__info">
|
<div className="summary__info">
|
||||||
<div className="summary__person">
|
<div className="summary__person">
|
||||||
@ -122,14 +115,11 @@ export const Profile = () => {
|
|||||||
alt="avatar"
|
alt="avatar"
|
||||||
/>
|
/>
|
||||||
<p className="summary__name">
|
<p className="summary__name">
|
||||||
{user === "developer" ? (
|
|
||||||
<span>
|
<span>
|
||||||
{profileInfo?.fio || profileInfo?.username},{" "}
|
{profileInfo?.fio || profileInfo?.username},
|
||||||
{profileInfo?.specification} разработчик
|
{user === "developer" &&
|
||||||
|
` ${profileInfo?.specification} разработчик`}
|
||||||
</span>
|
</span>
|
||||||
) : (
|
|
||||||
<span>{profileInfo?.fio || profileInfo?.username}</span>
|
|
||||||
)}
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -256,7 +256,11 @@ export const ProjectTracker = () => {
|
|||||||
} else {
|
} else {
|
||||||
dispatch(setProjectBoardFetch(projectBoard.id));
|
dispatch(setProjectBoardFetch(projectBoard.id));
|
||||||
}
|
}
|
||||||
showNotification({ show: true, text: "Колонка удалена", type: "error" });
|
showNotification({
|
||||||
|
show: true,
|
||||||
|
text: "Колонка удалена",
|
||||||
|
type: "error"
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -319,6 +323,11 @@ export const ProjectTracker = () => {
|
|||||||
...prevState,
|
...prevState,
|
||||||
add: false
|
add: false
|
||||||
}));
|
}));
|
||||||
|
showNotification({
|
||||||
|
show: true,
|
||||||
|
text: "Тег успешно создан",
|
||||||
|
type: "success"
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -340,6 +349,11 @@ export const ProjectTracker = () => {
|
|||||||
}));
|
}));
|
||||||
setTagInfo({ description: "", name: "" });
|
setTagInfo({ description: "", name: "" });
|
||||||
setColor("#aabbcc");
|
setColor("#aabbcc");
|
||||||
|
showNotification({
|
||||||
|
show: true,
|
||||||
|
text: "Тег успешно изменён",
|
||||||
|
type: "success"
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -353,6 +367,11 @@ export const ProjectTracker = () => {
|
|||||||
}
|
}
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
dispatch(deleteTagProject(tagId));
|
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 { 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";
|
||||||
// import { HeadBottom } from "@components/features/Candidate-lk/HeadBottom";
|
|
||||||
import { AlertResult } from "@components/features/quiz/AlertResult";
|
import { AlertResult } from "@components/features/quiz/AlertResult";
|
||||||
import { QuizReport } from "@components/features/quiz/QuizReport";
|
import { QuizReport } from "@components/features/quiz/QuizReport";
|
||||||
|
|
||||||
@ -41,7 +40,6 @@ export const QuizReportPage = () => {
|
|||||||
<div className="quiz-report-page">
|
<div className="quiz-report-page">
|
||||||
<ProfileHeader />
|
<ProfileHeader />
|
||||||
<Navigation />
|
<Navigation />
|
||||||
{/*<HeadBottom />*/}
|
|
||||||
<div className="quiz-report-page__container">
|
<div className="quiz-report-page__container">
|
||||||
<ProfileBreadcrumbs
|
<ProfileBreadcrumbs
|
||||||
links={[
|
links={[
|
||||||
|
@ -81,7 +81,6 @@ export const RegistrationForCandidate = () => {
|
|||||||
<img src={arrowBtn} alt="img" />
|
<img src={arrowBtn} alt="img" />
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
{/* форма регистрации */}
|
|
||||||
<form
|
<form
|
||||||
className="registration-candidate__form"
|
className="registration-candidate__form"
|
||||||
onSubmit={handleSubmit}
|
onSubmit={handleSubmit}
|
||||||
|
@ -211,8 +211,6 @@ const Statistics = () => {
|
|||||||
<p className="person-type">
|
<p className="person-type">
|
||||||
{person.role ? person.role : "-"}
|
{person.role ? person.role : "-"}
|
||||||
</p>
|
</p>
|
||||||
{/* <span className="status status-active"> */}
|
|
||||||
|
|
||||||
<span
|
<span
|
||||||
className={
|
className={
|
||||||
person.status
|
person.status
|
||||||
|
@ -10,6 +10,8 @@ import { urlForLocal } from "@utils/helper";
|
|||||||
|
|
||||||
import { apiRequest } from "@api/request";
|
import { apiRequest } from "@api/request";
|
||||||
|
|
||||||
|
import { useNotification } from "@hooks/useNotification";
|
||||||
|
|
||||||
import { Footer } from "@components/Common/Footer/Footer";
|
import { Footer } from "@components/Common/Footer/Footer";
|
||||||
import { Navigation } from "@components/Navigation/Navigation";
|
import { Navigation } from "@components/Navigation/Navigation";
|
||||||
import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs";
|
import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs";
|
||||||
@ -37,6 +39,7 @@ export const Summary = () => {
|
|||||||
const [selectedSkills, setSelectedSkills] = useState([]);
|
const [selectedSkills, setSelectedSkills] = useState([]);
|
||||||
const [selectSkillsOpen, setSelectSkillsOpen] = useState(false);
|
const [selectSkillsOpen, setSelectSkillsOpen] = useState(false);
|
||||||
const [skillsList, seSkillsList] = useState([]);
|
const [skillsList, seSkillsList] = useState([]);
|
||||||
|
const { showNotification } = useNotification();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
apiRequest(
|
apiRequest(
|
||||||
@ -72,7 +75,13 @@ export const Summary = () => {
|
|||||||
data: {
|
data: {
|
||||||
resume: summery
|
resume: summery
|
||||||
}
|
}
|
||||||
}).then(() => {});
|
}).then(() => {
|
||||||
|
showNotification({
|
||||||
|
show: true,
|
||||||
|
text: "Изменения успешно сохранены",
|
||||||
|
type: "success"
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<div className="summary">
|
<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>
|
</p>
|
||||||
<NavLink to="/tracker-auth" className="tracker-intro__btn">
|
<NavLink to="/auth" className="tracker-intro__btn">
|
||||||
Начать работу
|
Начать работу
|
||||||
</NavLink>
|
</NavLink>
|
||||||
</div>
|
</div>
|
||||||
@ -57,7 +57,7 @@ export const TrackerIntro = () => {
|
|||||||
Управление большим количеством проектов и гибкая настройка
|
Управление большим количеством проектов и гибкая настройка
|
||||||
структуры под любые процессы
|
структуры под любые процессы
|
||||||
</p>
|
</p>
|
||||||
<NavLink to="/tracker-registration" className="tracker-intro__btn">
|
<NavLink to="/auth" className="tracker-intro__btn">
|
||||||
Начать работу
|
Начать работу
|
||||||
</NavLink>
|
</NavLink>
|
||||||
</div>
|
</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 { apiRequest } from "@api/request";
|
||||||
|
|
||||||
|
import { useNotification } from "@hooks/useNotification";
|
||||||
|
|
||||||
import { Footer } from "@components/Common/Footer/Footer";
|
import { Footer } from "@components/Common/Footer/Footer";
|
||||||
import { Loader } from "@components/Common/Loader/Loader";
|
import { Loader } from "@components/Common/Loader/Loader";
|
||||||
import { Navigation } from "@components/Navigation/Navigation";
|
import { Navigation } from "@components/Navigation/Navigation";
|
||||||
@ -38,6 +40,7 @@ export const ViewReport = () => {
|
|||||||
const [loader, setLoader] = useState(false);
|
const [loader, setLoader] = useState(false);
|
||||||
const [deleteLoader, setDeleteLoader] = useState(false);
|
const [deleteLoader, setDeleteLoader] = useState(false);
|
||||||
const [reportInfo, setReportInfo] = useState({});
|
const [reportInfo, setReportInfo] = useState({});
|
||||||
|
const { showNotification } = useNotification();
|
||||||
|
|
||||||
function getReportFromDate(day) {
|
function getReportFromDate(day) {
|
||||||
setLoader(true);
|
setLoader(true);
|
||||||
@ -84,6 +87,11 @@ export const ViewReport = () => {
|
|||||||
if (res) {
|
if (res) {
|
||||||
window.location.replace("/profile/calendar");
|
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,
|
filteredCandidates: null,
|
||||||
selectedItems: [],
|
selectedItems: [],
|
||||||
currentCandidate: {},
|
currentCandidate: {},
|
||||||
auth: false,
|
auth: null,
|
||||||
positionId: null,
|
positionId: null,
|
||||||
profileInfo: {},
|
profileInfo: {},
|
||||||
reportsDates: "",
|
reportsDates: "",
|
||||||
|
Loading…
Reference in New Issue
Block a user