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

@ -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

@ -286,15 +286,15 @@ export const ProfileCalendarComponent = React.memo(
? `${getCorrectDate(startDate)} - ${getCorrectDate(endDate)}`
: `${getCorrectDate(endDate)} - ${getCorrectDate(startDate)}`
: activePeriod
? "Выберите диапазон на календаре"
: "Выбрать диапазон"}
? "Выберите диапазон на календаре"
: "Выбрать диапазон"}
</span>
<span>
{totalRangeHours
? `${totalRangeHours} ${hourOfNum(totalRangeHours)}`
: endDate
? "0 часов"
: ""}
? "0 часов"
: ""}
</span>
{endDate && (
<BaseButton

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,