2023-05-25 10:57:57 +03:00
|
|
|
|
import React, { useEffect, useState } from "react";
|
2023-04-19 20:22:06 +03:00
|
|
|
|
import { useDispatch, useSelector } from "react-redux";
|
2023-05-25 10:57:57 +03:00
|
|
|
|
import { Link } from "react-router-dom";
|
2023-05-31 08:36:15 +03:00
|
|
|
|
|
2023-12-10 03:24:55 +03:00
|
|
|
|
// import { questionnairesSelector, setQuestionnaires } from "@redux/quizSlice";
|
2023-05-30 10:54:47 +03:00
|
|
|
|
import { apiRequest } from "@api/request";
|
2023-04-19 20:22:06 +03:00
|
|
|
|
|
2023-05-31 08:36:15 +03:00
|
|
|
|
import CategoriesItem from "@components/CategoriesItem/CategoriesItem";
|
|
|
|
|
import { Footer } from "@components/Common/Footer/Footer";
|
2023-12-10 03:25:05 +03:00
|
|
|
|
import { Navigation } from "@components/Navigation/Navigation";
|
2023-05-31 08:36:15 +03:00
|
|
|
|
import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs";
|
2023-05-30 10:54:47 +03:00
|
|
|
|
import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader";
|
2023-12-10 03:24:55 +03:00
|
|
|
|
// import { HeadBottom } from "@components/features/Candidate-lk/HeadBottom";
|
2023-05-30 10:54:47 +03:00
|
|
|
|
import { CardAvailableTest } from "@components/features/quiz/CardAviableTest";
|
2023-05-31 08:36:15 +03:00
|
|
|
|
import { SelectedCategory } from "@components/features/quiz/SelectedCategory";
|
2022-03-18 16:39:13 +03:00
|
|
|
|
|
2023-05-31 08:36:15 +03:00
|
|
|
|
import AdminImg from "assets/images/partnerProfile/PersonalAdmin.svg";
|
2023-05-30 10:54:47 +03:00
|
|
|
|
import ArchitectureImg from "assets/images/partnerProfile/PersonalArchitecture.svg";
|
2023-05-31 08:36:15 +03:00
|
|
|
|
import CopyImg from "assets/images/partnerProfile/PersonalCopy.svg";
|
2023-05-30 10:54:47 +03:00
|
|
|
|
import DesignImg from "assets/images/partnerProfile/PersonalDesign.svg";
|
2023-05-31 08:36:15 +03:00
|
|
|
|
import FrontendImg from "assets/images/partnerProfile/PersonalFrontend.svg";
|
2023-05-30 10:54:47 +03:00
|
|
|
|
import ManageImg from "assets/images/partnerProfile/PersonalMng.svg";
|
|
|
|
|
import SmmImg from "assets/images/partnerProfile/PersonalSMM.svg";
|
2023-05-31 08:36:15 +03:00
|
|
|
|
import TestImg from "assets/images/partnerProfile/PersonalTesters.svg";
|
|
|
|
|
import BackEndImg from "assets/images/partnerProfile/personalBackEnd.svg";
|
2023-05-25 10:57:57 +03:00
|
|
|
|
|
|
|
|
|
import "./quiz-page.scss";
|
2022-03-18 16:39:13 +03:00
|
|
|
|
|
2023-05-25 10:57:57 +03:00
|
|
|
|
export const QuizPage = () => {
|
2023-11-21 17:46:57 +03:00
|
|
|
|
const [questionnaires, setQuestionnaires] = useState([]);
|
2023-05-25 10:57:57 +03:00
|
|
|
|
const dispatch = useDispatch();
|
|
|
|
|
const [personalInfoItems] = useState([
|
|
|
|
|
{
|
|
|
|
|
title: "Backend разработчики",
|
|
|
|
|
link: "/registration-candidate",
|
|
|
|
|
description:
|
|
|
|
|
"Java PHP Python C# React Vue.js NodeJs Golang Ruby JavaScript",
|
|
|
|
|
available: true,
|
2023-12-19 17:36:30 +03:00
|
|
|
|
img: BackEndImg
|
2023-05-25 10:57:57 +03:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "Frontend разработчики",
|
|
|
|
|
link: "/registration-candidate",
|
|
|
|
|
description:
|
|
|
|
|
"Java PHP Python C# React Vue.js NodeJs Golang Ruby JavaScript",
|
|
|
|
|
available: true,
|
2023-12-19 17:36:30 +03:00
|
|
|
|
img: FrontendImg
|
2023-05-25 10:57:57 +03:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "Архитектура проектов",
|
|
|
|
|
link: "/registration-candidate",
|
|
|
|
|
description: "Потоки данных ER ERP CRM CQRS UML BPMN",
|
|
|
|
|
available: true,
|
2023-12-19 17:36:30 +03:00
|
|
|
|
img: ArchitectureImg
|
2023-05-25 10:57:57 +03:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "Дизайн проектов",
|
|
|
|
|
link: "/registration-candidate",
|
|
|
|
|
description:
|
|
|
|
|
"Java PHP Python C# React Vue.js NodeJs Golang Ruby JavaScript",
|
|
|
|
|
available: true,
|
2023-12-19 17:36:30 +03:00
|
|
|
|
img: DesignImg
|
2023-05-25 10:57:57 +03:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "Тестирование проектов",
|
|
|
|
|
link: "/registration-candidate",
|
|
|
|
|
description: "SQL Postman TestRail Kibana Ручное тестирование",
|
|
|
|
|
available: false,
|
2023-12-19 17:36:30 +03:00
|
|
|
|
img: TestImg
|
2023-05-25 10:57:57 +03:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "Администрирование проектов",
|
|
|
|
|
link: "/registration-candidate",
|
|
|
|
|
description: "DevOps ELK Kubernetes Docker Bash Apache Oracle Git",
|
|
|
|
|
available: false,
|
2023-12-19 17:36:30 +03:00
|
|
|
|
img: AdminImg
|
2023-05-25 10:57:57 +03:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "Управление проектом",
|
|
|
|
|
link: "/registration-candidate",
|
|
|
|
|
description: "Scrum Kanban Agile Miro CustDev",
|
|
|
|
|
available: false,
|
2023-12-19 17:36:30 +03:00
|
|
|
|
img: ManageImg
|
2023-05-25 10:57:57 +03:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "Копирайтинг проектов",
|
|
|
|
|
link: "/registration-candidate",
|
|
|
|
|
description: "Теги Заголовок H1 Дескриптор Абзац Сценарий",
|
|
|
|
|
available: false,
|
2023-12-19 17:36:30 +03:00
|
|
|
|
img: CopyImg
|
2023-05-25 10:57:57 +03:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "Реклама и SMM",
|
|
|
|
|
link: "/registration-candidate",
|
|
|
|
|
description:
|
|
|
|
|
"Java PHP Python C# React Vue.js NodeJs Golang Ruby JavaScript",
|
|
|
|
|
available: false,
|
2023-12-19 17:36:30 +03:00
|
|
|
|
img: SmmImg
|
|
|
|
|
}
|
2023-05-25 10:57:57 +03:00
|
|
|
|
]);
|
|
|
|
|
const userId = localStorage.getItem("id");
|
2023-11-21 17:31:22 +03:00
|
|
|
|
const [selectedCategory, setSetSelectedCategory] = useState(false);
|
2023-04-19 20:22:06 +03:00
|
|
|
|
|
2023-05-25 10:57:57 +03:00
|
|
|
|
useEffect(() => {
|
2023-11-21 17:46:57 +03:00
|
|
|
|
apiRequest(`/user-questionnaire/questionnaires-list?user_id=${userId}`)
|
|
|
|
|
.then((res) => setQuestionnaires(res))
|
|
|
|
|
.catch((e) => console.log(e));
|
2023-05-25 10:57:57 +03:00
|
|
|
|
}, []);
|
2022-03-18 16:39:13 +03:00
|
|
|
|
|
2023-05-25 10:57:57 +03:00
|
|
|
|
return (
|
|
|
|
|
<div className="quiz-page">
|
|
|
|
|
<ProfileHeader />
|
2023-12-10 03:24:55 +03:00
|
|
|
|
<Navigation />
|
|
|
|
|
{/*<HeadBottom />*/}
|
2023-05-25 10:57:57 +03:00
|
|
|
|
<div className="quiz-page__container">
|
|
|
|
|
<ProfileBreadcrumbs
|
|
|
|
|
links={[
|
|
|
|
|
{ name: "Главная", link: "/profile-candidate" },
|
2024-02-01 23:32:02 +03:00
|
|
|
|
{ name: "Тестирование", link: "/Quiz" }
|
2023-05-25 10:57:57 +03:00
|
|
|
|
]}
|
|
|
|
|
/>
|
|
|
|
|
<div className="quiz-page__title main-title">
|
|
|
|
|
{!selectedCategory ? "Тестирование" : "Замена специализации"}
|
|
|
|
|
</div>
|
|
|
|
|
{!selectedCategory && (
|
|
|
|
|
<>
|
2024-02-01 23:32:02 +03:00
|
|
|
|
{/*<div className="quiz-page__specialization">*/}
|
|
|
|
|
{/* <SelectedCategory setSelectedCategory={setSetSelectedCategory} />*/}
|
|
|
|
|
{/*</div>*/}
|
2023-05-25 10:57:57 +03:00
|
|
|
|
<div className="quiz-page__block">Доступные тесты</div>
|
|
|
|
|
<div className="quiz-page__cards-test">
|
|
|
|
|
{questionnaires.length ? (
|
|
|
|
|
questionnaires.map((item, index) => (
|
|
|
|
|
<CardAvailableTest
|
2023-11-21 17:31:22 +03:00
|
|
|
|
description={item.description}
|
2023-12-12 11:22:53 +03:00
|
|
|
|
path={item.uuid}
|
2023-05-25 10:57:57 +03:00
|
|
|
|
status={item.status}
|
|
|
|
|
title={item.questionnaire_title}
|
|
|
|
|
passedTest={item.passedTest}
|
|
|
|
|
key={index}
|
|
|
|
|
/>
|
|
|
|
|
))
|
|
|
|
|
) : (
|
|
|
|
|
<h1>Анкет нет</h1>
|
|
|
|
|
)}
|
|
|
|
|
</div>
|
|
|
|
|
<div className="block-text">
|
2023-12-20 19:55:37 +03:00
|
|
|
|
ИЛИ <Link to={""}>выполните тестовое задание</Link>, без
|
2023-05-25 10:57:57 +03:00
|
|
|
|
прохождения тестов
|
|
|
|
|
</div>
|
|
|
|
|
</>
|
|
|
|
|
)}
|
|
|
|
|
{selectedCategory && (
|
|
|
|
|
<div className="quiz-page__categories-items">
|
|
|
|
|
{personalInfoItems.map((item, index) => {
|
|
|
|
|
return (
|
|
|
|
|
<CategoriesItem
|
|
|
|
|
link={item.link}
|
|
|
|
|
key={index}
|
|
|
|
|
title={item.title}
|
|
|
|
|
img={item.img}
|
|
|
|
|
skills={item.description}
|
|
|
|
|
available={item.available}
|
|
|
|
|
/>
|
|
|
|
|
);
|
|
|
|
|
})}
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
2023-04-19 20:22:06 +03:00
|
|
|
|
</div>
|
2023-05-25 10:57:57 +03:00
|
|
|
|
<Footer />
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
};
|