add empty forms page

This commit is contained in:
Victor Batischev 2024-03-06 14:08:06 +03:00
parent 46c91cfbff
commit 23e8c5c683
36 changed files with 93 additions and 73 deletions

View File

@ -24,6 +24,7 @@ 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 { Forms } from "@pages/Forms/Forms";
import { Profile } from "@pages/Profile/Profile";
import { ProfileCandidate } from "@pages/ProfileCandidate/ProfileCandidate";
import { ProjectTracker } from "@pages/ProjectTracker/ProjectTracker";
@ -39,23 +40,23 @@ 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 { Article } from "@pages/Article/Article";
import { Auth } from "@pages/Auth/Auth";
import { Blog } from "@pages/Blog/Blog";
import { FormPage } from "@pages/FormPage/FormPage";
import { Home } from "@pages/Home/Home";
import { SingleReportPage } from "@pages/SingleReportPage/SingleReportPage";
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 { Calendar } from "@components/Calendar/Calendar";
import { Candidate } from "@components/Candidate/Candidate";
import { FreeDevelopers } from "@components/FreeDevelopers/FreeDevelopers";
import { ReportForm } from "@components/ReportForm/ReportForm";
import "./assets/fonts/stylesheet.css";
import "./assets/global.scss";
import Calendar from "./components/Calendar/Calendar";
import Candidate from "./components/Candidate/Candidate";
import FreeDevelopers from "./components/FreeDevelopers/FreeDevelopers";
import ReportForm from "./components/ReportForm/ReportForm";
import Article from "./pages/Article/Article";
import Auth from "./pages/Auth/Auth";
import Blog from "./pages/Blog/Blog";
import FormPage from "./pages/FormPage/FormPage";
import Home from "./pages/Home/Home";
import SingleReportPage from "./pages/SingleReportPage/SingleReportPage";
import "assets/fonts/stylesheet.css";
import "assets/global.scss";
const App = () => {
const notification = useSelector(getNotification);
@ -66,6 +67,7 @@ const App = () => {
<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"

View File

@ -15,7 +15,7 @@ import { currentMonth } from "../../utils/calendarHelper";
import CalendarComponent from "./CalendarComponent";
import "./calendar.scss";
const Calendar = () => {
export const Calendar = () => {
if (localStorage.getItem("role_status") !== "18") {
return <Navigate to="/profile" replace />;
}
@ -84,5 +84,3 @@ const Calendar = () => {
</div>
);
};
export default Calendar;

View File

@ -28,7 +28,7 @@ import rectangle from "assets/images/rectangle_secondPage.png";
import "./candidate.scss";
const Candidate = () => {
export const Candidate = () => {
if (localStorage.getItem("role_status") !== "18") {
return <Navigate to="/profile" replace />;
}
@ -238,5 +238,3 @@ const Candidate = () => {
</div>
);
};
export default Candidate;

View File

@ -51,5 +51,3 @@ export const AuthHeader = () => {
</div>
);
};
export default AuthHeader;

View File

@ -3,7 +3,7 @@ import { Link } from "react-router-dom";
import { scrollToForm } from "@utils/helper";
import AuthHeader from "@components/Common/AuthHeader/AuthHeader";
import { AuthHeader } from "@components/Common/AuthHeader/AuthHeader";
import BaseButton from "@components/Common/BaseButton/BaseButton";
import { Footer } from "@components/Common/Footer/Footer";
import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs";

View File

@ -81,7 +81,7 @@ export const Navigation = () => {
<NavLink
key={index}
end
to={link.path === "/Quiz" ? link.path : `/profile${link.path}`}
to={link.path === "/quiz" ? link.path : `/profile${link.path}`}
className={
currentPath.includes(link.path) ||
currentPath.includes(link.active)

View File

@ -170,7 +170,7 @@ export const ProfileHeader = () => {
<NavLink
key={index}
end
to={link.path === "/Quiz" ? link.path : `/profile${link.path}`}
to={link.path === "/quiz" ? link.path : `/profile${link.path}`}
className={currentPath.includes(link.path) ? "active" : ""}
>
{link.name}

View File

@ -32,7 +32,7 @@ import "./reportForm.scss";
registerLocale("ru", ru);
const ReportForm = () => {
export const ReportForm = () => {
if (localStorage.getItem("role_status") === "18") {
return <Navigate to="/profile" replace />;
}
@ -456,5 +456,3 @@ const ReportForm = () => {
</section>
);
};
export default ReportForm;

View File

@ -47,23 +47,23 @@ export const SideBar = () => {
</div>
<ul className="auth-body__navigation">
<li>
<Link to={"/auth"}>Вход для партнеров</Link>
<Link to={"/auth"}>Вход</Link>
</li>
<li>
<Link to={"/profile"}>Кабинет разработчика</Link>
<Link to={"/profile"}>Личный кабинет</Link>
</li>
<li>
<Link to={"/tracker-intro"}>Трекер</Link>
</li>
<li>
<Link to={"/Quiz"}>Тесты</Link>
<Link to={"/quiz"}>Тесты</Link>
</li>
<li>
<Link to={"/forms"}>Формы</Link>
</li>
<li>
<a href="#">Школа</a>
</li>
<li>
<a href="#">Отрасли</a>
</li>
<li>
<a href="#">Контакты</a>
</li>

View File

@ -32,7 +32,7 @@ export const HeaderPageTestsQuiz = ({ isVisibilityButton }) => {
</div>
{isVisibilityButton && (
<Link
to={"/Quiz/instruction"}
to={"/quiz/instruction"}
className="quiz-btn quiz-btn_restriction"
>
Пройти

View File

@ -44,7 +44,7 @@ export const MyTestsQuiz = ({ listTests }) => {
</h3>
<div className="item-test__body test-data">
<Link
to={"/Quiz/interjacent"}
to={"/quiz/interjacent"}
className="quiz-btn"
onClick={() => recordSelectedTest(item)}
>

View File

@ -58,7 +58,7 @@ export const TaskQuiz = ({ timer }) => {
text: "Тест успешно пройден",
type: "success"
});
navigate("/Quiz");
navigate("/quiz");
// if (String(res?.status)[0] !== "2") {
// showNotification({
// show: true,

View File

@ -2,7 +2,7 @@ import React, { useState } from "react";
import { Link } from "react-router-dom";
import CardArticle from "@components/CardArticle/CardArticle";
import AuthHeader from "@components/Common/AuthHeader/AuthHeader";
import { AuthHeader } from "@components/Common/AuthHeader/AuthHeader";
import { Footer } from "@components/Common/Footer/Footer";
import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs";
import SideBar from "@components/SideBar/SideBar";

View File

@ -5,7 +5,7 @@ import { useNavigate } from "react-router-dom";
import { selectAuth } from "@redux/outstaffingSlice";
import { AuthBox } from "@components/AuthBox/AuthBox";
import AuthHeader from "@components/Common/AuthHeader/AuthHeader";
import { AuthHeader } from "@components/Common/AuthHeader/AuthHeader";
import { Footer } from "@components/Common/Footer/Footer";
import SideBar from "@components/SideBar/SideBar";
@ -18,7 +18,7 @@ import cross from "assets/images/cross.png";
import "./auth.scss";
const Auth = () => {
export const Auth = () => {
const isAuth = useSelector(selectAuth);
let navigate = useNavigate();
@ -92,5 +92,3 @@ const Auth = () => {
</section>
);
};
export default Auth;

View File

@ -6,7 +6,7 @@ import { selectAuth } from "@redux/outstaffingSlice";
import AuthBlock from "@components/AuthBlock/AuthBlock";
import CategoriesItem from "@components/CategoriesItem/CategoriesItem";
import AuthHeader from "@components/Common/AuthHeader/AuthHeader";
import { AuthHeader } from "@components/Common/AuthHeader/AuthHeader";
import { Footer } from "@components/Common/Footer/Footer";
import ModalResetPassword from "@components/Modal/ModalResetPassword/ModalResetPassword";
import SideBar from "@components/SideBar/SideBar";

View File

@ -1,7 +1,7 @@
import React, { useState } from "react";
import CardArticle from "@components/CardArticle/CardArticle";
import AuthHeader from "@components/Common/AuthHeader/AuthHeader";
import { AuthHeader } from "@components/Common/AuthHeader/AuthHeader";
import { Footer } from "@components/Common/Footer/Footer";
import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs";
import SideBar from "@components/SideBar/SideBar";

View File

@ -2,7 +2,7 @@ import React, { useState } from "react";
import CatalogPersonCard from "@components/CatalogPersonCard/CatalogPersonCard";
import CategoriesItem from "@components/CategoriesItem/CategoriesItem";
import AuthHeader from "@components/Common/AuthHeader/AuthHeader";
import { AuthHeader } from "@components/Common/AuthHeader/AuthHeader";
import { Footer } from "@components/Common/Footer/Footer";
import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs";
import SideBar from "@components/SideBar/SideBar";

View File

@ -1,6 +1,6 @@
import React from "react";
import AuthHeader from "@components/Common/AuthHeader/AuthHeader";
import { AuthHeader } from "@components/Common/AuthHeader/AuthHeader";
import { Footer } from "@components/Common/Footer/Footer";
import SideBar from "@components/SideBar/SideBar";

View File

@ -23,7 +23,7 @@ import rectangle from "assets/images/rectangle_secondPage.png";
import "./formPage.scss";
const FormPage = () => {
export const FormPage = () => {
if (localStorage.getItem("role_status") !== "18") {
return <Navigate to="/profile" replace />;
}
@ -101,5 +101,3 @@ const FormPage = () => {
</div>
);
};
export default FormPage;

21
src/pages/Forms/Forms.jsx Normal file
View File

@ -0,0 +1,21 @@
import React from "react";
import { Footer } from "@components/Common/Footer/Footer";
import { AuthHeader } from "@components/Common/AuthHeader/AuthHeader";
import SideBar from "@components/SideBar/SideBar";
import "./forms.scss";
export const Forms = () => {
return (
<div className="forms">
<AuthHeader />
<SideBar />
<div className="container">
<br />
<h1>Здесь будут формы</h1>
</div>
<Footer />
</div>
);
};

View File

@ -0,0 +1,13 @@
.forms {
display: flex;
flex-direction: column;
min-height: 100vh;
background: #f1f1f1;
.container {
max-width: 1160px;
display: flex;
flex-direction: column;
flex: 1;
}
}

View File

@ -1,7 +1,7 @@
import { useEffect, useState } from "react";
import { useNavigate, useParams } from "react-router";
import AuthHeader from "@components/Common/AuthHeader/AuthHeader";
import { AuthHeader } from "@components/Common/AuthHeader/AuthHeader";
import { Footer } from "@components/Common/Footer/Footer";
import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs";
import SideBar from "@components/SideBar/SideBar";

View File

@ -1,6 +1,6 @@
import React from "react";
import AuthHeader from "@components/Common/AuthHeader/AuthHeader";
import { AuthHeader } from "@components/Common/AuthHeader/AuthHeader";
import { Footer } from "@components/Common/Footer/Footer";
import { FrequentlyAskedQuestionsItem } from "@components/FrequentlyAskedQuestionsItem/FrequentlyAskedQuestionsItem";
import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs";

View File

@ -13,7 +13,7 @@ import Outstaffing from "@components/Outstaffing/Outstaffing";
import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs";
import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader";
const Home = () => {
export const Home = () => {
if (localStorage.getItem("role_status") !== "18") {
return <Navigate to="/profile" replace />;
}
@ -75,5 +75,3 @@ const Home = () => {
</>
);
};
export default Home;

View File

@ -183,7 +183,7 @@ export const PartnerSettings = () => {
использования персональных данных
</span>
</div>
<div className="partner-settings__report">
{/* <div className="partner-settings__report">
<h3 className="settings__title">Документы и отчеты</h3>
<p className="settings__label">Изменить провадера ЭДО</p>
@ -221,7 +221,7 @@ export const PartnerSettings = () => {
Нажимая "Сохранить", вы соглашаетесь с Правилами обработки и
использования персональных данных
</span>
</div>
</div> */}
</div>
</div>
</div>

View File

@ -25,7 +25,7 @@ export const PassingTests = () => {
expiryTimestamp: moment(),
autoStart: false,
onExpire: () => {
navigate("/Quiz");
navigate("/quiz");
}
});
@ -84,8 +84,8 @@ export const PassingTests = () => {
<ProfileBreadcrumbs
links={[
{ name: "Главная", link: "/profile-candidate" },
{ name: "Тестирование", link: "/Quiz" },
{ name: "Прохождение тестов", link: "/Quiz/test" }
{ name: "Тестирование", link: "quiz" },
{ name: "Прохождение тестов", link: "/quiz/test" }
]}
/>
<div className="passing-tests-page__title main-title">

View File

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

View File

@ -21,7 +21,7 @@ export const QuizReportPage = () => {
let navigate = useNavigate();
if (!test) {
navigate("/Quiz");
navigate("/quiz");
}
const [testInfo, setTestInfo] = useState({});

View File

@ -4,7 +4,7 @@ import { Link } from "react-router-dom";
import { useFormValidation } from "@hooks/useFormValidation";
import { useNotification } from "@hooks/useNotification";
import AuthHeader from "@components/Common/AuthHeader/AuthHeader";
import { AuthHeader } from "@components/Common/AuthHeader/AuthHeader";
import { Footer } from "@components/Common/Footer/Footer";
import SideBar from "@components/SideBar/SideBar";
import StepsForCandidate from "@components/StepsForCandidate/StepsForCandidate";

View File

@ -1,6 +1,6 @@
import React, { useState } from "react";
import AuthHeader from "@components/Common/AuthHeader/AuthHeader";
import { AuthHeader } from "@components/Common/AuthHeader/AuthHeader";
import { Footer } from "@components/Common/Footer/Footer";
import SideBar from "@components/SideBar/SideBar";

View File

@ -24,7 +24,7 @@ const tasks = [
}
];
const SingleReportPage = () => {
export const SingleReportPage = () => {
const navigate = useNavigate();
return (
@ -108,5 +108,3 @@ const SingleReportPage = () => {
</div>
);
};
export default SingleReportPage;

View File

@ -1,7 +1,7 @@
import React, { useState } from "react";
import AuthBlock from "@components/AuthBlock/AuthBlock";
import AuthHeader from "@components/Common/AuthHeader/AuthHeader";
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";

View File

@ -1,7 +1,7 @@
import React from "react";
import { NavLink } from "react-router-dom";
import AuthHeader from "@components/Common/AuthHeader/AuthHeader";
import { AuthHeader } from "@components/Common/AuthHeader/AuthHeader";
import { Footer } from "@components/Common/Footer/Footer";
import SideBar from "@components/SideBar/SideBar";

View File

@ -4,7 +4,7 @@ import { Navigate } from "react-router-dom";
import { useFormValidation } from "@hooks/useFormValidation";
import { useNotification } from "@hooks/useNotification";
import AuthHeader from "@components/Common/AuthHeader/AuthHeader";
import { AuthHeader } from "@components/Common/AuthHeader/AuthHeader";
import { Footer } from "@components/Common/Footer/Footer";
import ModalLayout from "@components/Common/ModalLayout/ModalLayout";
import { ModalTrackerRegistration } from "@components/Modal/ModalTrackerRegistration/ModalTrackerRegistration";