From fc8fc33733901e4ce9333ee7f7ade4213985d498 Mon Sep 17 00:00:00 2001 From: MaxOvs19 Date: Wed, 31 May 2023 08:36:15 +0300 Subject: [PATCH 1/3] Added prettier format imports --- .prettierignore | 7 + .prettierrc | 15 +- package-lock.json | 103 ++++++++ package.json | 4 +- postcss.config.js | 7 +- src/api/index.js | 6 +- src/api/request.js | 1 + src/components/AuthBox/AuthBox.jsx | 11 +- src/components/Calendar/Calendar.jsx | 10 +- src/components/Calendar/CalendarComponent.jsx | 12 +- src/components/Candidate/Candidate.jsx | 29 +-- .../CandidateSidebar/CandidateSidebar.jsx | 6 +- src/components/CardControl/CardControl.jsx | 46 ++-- src/components/Common/Footer/Footer.jsx | 6 +- src/components/Description/Description.jsx | 6 +- src/components/Form/Form.jsx | 11 +- .../FreeDevelopers/FreeDevelopers.jsx | 6 +- .../FrequentlyAskedQuestionsItem.jsx | 60 ++--- src/components/LogoutButton/LogoutButton.jsx | 6 +- .../Modal/ModalAspirant/ModalAspirant.jsx | 6 +- .../Modal/ModalErrorLogin/ModalErrorLogin.jsx | 2 +- .../ModalRegistration/ModalRegistration.jsx | 6 +- .../Modal/Tracker/ModalTicket/ModalTicket.jsx | 30 +-- .../TicketFullScreen/TicketFullScreen.jsx | 52 ++-- .../Modal/TrackerModal/TrackerModal.jsx | 18 +- src/components/Navigation/Navigation.jsx | 218 ++++++++-------- src/components/Outstaffing/Outstaffing.jsx | 16 +- .../OutstaffingBlock/OutstaffingBlock.jsx | 3 +- .../ProfileCalendar/ProfileCalendar.jsx | 22 +- .../ProfileCalendarComponent.jsx | 13 +- .../ProfileHeader/ProfileHeader.jsx | 8 +- src/components/ProjectTiket/ProjectTiket.jsx | 5 +- .../ProtectedRoute/ProtectedRoute.js | 2 +- src/components/ReportForm/ReportForm.jsx | 42 ++-- src/components/Select/TagSelect.jsx | 12 +- src/components/ShortReport/ShortReport.jsx | 14 +- .../SliderWorkers/SliderWorkers.jsx | 6 +- src/components/StarRating/StarRating.js | 172 ++++++------- .../features/Candidate-lk/HeadBottom.js | 32 +-- src/components/features/quiz/AlertResult.js | 66 ++--- .../features/quiz/BlockCompletedTest.js | 62 ++--- .../features/quiz/Card-introduction.js | 38 +-- .../features/quiz/CardAviableTest.js | 78 +++--- .../features/quiz/HeaderPageTests.js | 5 +- src/components/features/quiz/HeaderQuiz.js | 4 +- src/components/features/quiz/Instructions.js | 5 +- src/components/features/quiz/MyTestsQuiz.js | 3 +- .../features/quiz/Quiz-passing-information.js | 183 +++++++------- src/components/features/quiz/QuizReport.js | 70 +++--- src/components/features/quiz/Results.js | 71 +++--- .../features/quiz/SelectedCategory.js | 58 ++--- src/components/features/quiz/Task.js | 20 +- src/hoc/ErrorBoundary.js | 6 +- src/hooks/useLogout.js | 15 +- src/index.js | 23 +- src/pages/Article/Article.jsx | 10 +- .../AuthForCandidate/AuthForCandidate.jsx | 33 +-- .../AuthForDevelopers/AuthForDevelopers.jsx | 13 +- src/pages/AuthForPartners/AuthForPartners.jsx | 13 +- src/pages/Blog/Blog.jsx | 10 +- src/pages/Bookkeeping.js | 3 +- src/pages/FormPage/FormPage.jsx | 14 +- .../FrequentlyAskedQuestion.jsx | 124 +++++----- .../FrequentlyAskedQuestions.jsx | 234 +++++++++--------- src/pages/Home/Home.jsx | 13 +- .../PartnerAddRequest/PartnerAddRequest.js | 9 +- src/pages/PartnerBid/PartnerBid.jsx | 15 +- .../PartnerEmployees/PartnerEmployees.js | 9 +- src/pages/PartnerRequests/PartnerRequests.jsx | 16 +- src/pages/PartnerSettings/PartnerSettings.jsx | 6 +- src/pages/PartnerTreaties/PartnerTreaties.js | 12 +- .../PartnerСategories/PartnerСategories.jsx | 30 +-- src/pages/Payouts/Payouts.js | 2 +- src/pages/Profile/Profile.js | 13 +- .../ProfileCandidate/ProfileCandidate.js | 216 ++++++++-------- src/pages/ProjectTracker/ProjectTracker.js | 36 +-- .../RegistrationForCandidate.js | 4 +- .../SingleReportPage/SingleReportPage.js | 6 +- src/pages/Summary/Summary.js | 12 +- src/pages/Tracker/Tracker.js | 22 +- src/pages/ViewReport/ViewReport.jsx | 14 +- src/pages/quiz/PassingTests.js | 215 ++++++++-------- src/pages/quiz/QuizPage.js | 22 +- src/pages/quiz/QuizReportPage.js | 92 +++---- src/redux/loaderSlice.js | 4 +- src/redux/outstaffingSlice.js | 52 ++-- src/redux/projectsTrackerSlice.js | 21 +- src/redux/quizSlice.js | 155 ++++++------ src/redux/roleSlice.js | 4 +- src/store/store.js | 9 +- src/utils/constants.js | 20 +- 91 files changed, 1712 insertions(+), 1509 deletions(-) create mode 100644 .prettierignore diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..f7e1244f --- /dev/null +++ b/.prettierignore @@ -0,0 +1,7 @@ +node_modules +config +public + +*-lock.json + +App.js diff --git a/.prettierrc b/.prettierrc index ebf57913..6278c0b7 100644 --- a/.prettierrc +++ b/.prettierrc @@ -2,5 +2,18 @@ "tabWidth": 2, "semi": true, "printWidth": 80, - "useTabs": false + "useTabs": false, + "importOrder": [ + "^@react/(.*)$", + "^@redux/(.*)$", + "^@utils/(.*)$", + "^@api/(.*)$", + "^@hooks/(.*)$", + "^@pages/(.*)$", + "^@components/(.*)$", + "^assets/(.*)$", + "^[./]" + ], + "importOrderSeparation": true, + "importOrderSortSpecifiers": true } diff --git a/package-lock.json b/package-lock.json index 6ff4ed7b..1565b33d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -53,6 +53,7 @@ "@babel/core": "^7.20.12", "@babel/preset-env": "^7.20.2", "@pmmmwh/react-refresh-webpack-plugin": "^0.5.10", + "@trivago/prettier-plugin-sort-imports": "^4.1.1", "babel-loader": "^9.1.2", "copy-webpack-plugin": "^10.2.0", "cross-env": "^7.0.3", @@ -5044,6 +5045,86 @@ "node": ">= 10" } }, + "node_modules/@trivago/prettier-plugin-sort-imports": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/@trivago/prettier-plugin-sort-imports/-/prettier-plugin-sort-imports-4.1.1.tgz", + "integrity": "sha512-dQ2r2uzNr1x6pJsuh/8x0IRA3CBUB+pWEW3J/7N98axqt7SQSm+2fy0FLNXvXGg77xEDC7KHxJlHfLYyi7PDcw==", + "dev": true, + "dependencies": { + "@babel/generator": "7.17.7", + "@babel/parser": "^7.20.5", + "@babel/traverse": "7.17.3", + "@babel/types": "7.17.0", + "javascript-natural-sort": "0.7.1", + "lodash": "^4.17.21" + }, + "peerDependencies": { + "@vue/compiler-sfc": "3.x", + "prettier": "2.x" + }, + "peerDependenciesMeta": { + "@vue/compiler-sfc": { + "optional": true + } + } + }, + "node_modules/@trivago/prettier-plugin-sort-imports/node_modules/@babel/generator": { + "version": "7.17.7", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.7.tgz", + "integrity": "sha512-oLcVCTeIFadUoArDTwpluncplrYBmTCCZZgXCbgNGvOBBiSDDK3eWO4b/+eOTli5tKv1lg+a5/NAXg+nTcei1w==", + "dev": true, + "dependencies": { + "@babel/types": "^7.17.0", + "jsesc": "^2.5.1", + "source-map": "^0.5.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@trivago/prettier-plugin-sort-imports/node_modules/@babel/traverse": { + "version": "7.17.3", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.17.3.tgz", + "integrity": "sha512-5irClVky7TxRWIRtxlh2WPUUOLhcPN06AGgaQSB8AEwuyEBgJVuJ5imdHm5zxk8w0QS5T+tDfnDxAlhWjpb7cw==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.16.7", + "@babel/generator": "^7.17.3", + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-function-name": "^7.16.7", + "@babel/helper-hoist-variables": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7", + "@babel/parser": "^7.17.3", + "@babel/types": "^7.17.0", + "debug": "^4.1.0", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@trivago/prettier-plugin-sort-imports/node_modules/@babel/types": { + "version": "7.17.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.17.0.tgz", + "integrity": "sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.16.7", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@trivago/prettier-plugin-sort-imports/node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/@trysound/sax": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/@trysound/sax/-/sax-0.2.0.tgz", @@ -12844,6 +12925,12 @@ "node": ">=8" } }, + "node_modules/javascript-natural-sort": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/javascript-natural-sort/-/javascript-natural-sort-0.7.1.tgz", + "integrity": "sha512-nO6jcEfZWQXDhOiBtG2KvKyEptz7RVbpGP4vTD2hLBdmNQSsCiicO2Ioinv6UI4y9ukqnBpy+XZ9H6uLNgJTlw==", + "dev": true + }, "node_modules/jest": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/jest/-/jest-27.5.1.tgz", @@ -19727,6 +19814,22 @@ "node": ">= 0.8.0" } }, + "node_modules/prettier": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "dev": true, + "peer": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, "node_modules/pretty-bytes": { "version": "5.6.0", "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz", diff --git a/package.json b/package.json index 4e4ccbad..993d62fe 100644 --- a/package.json +++ b/package.json @@ -49,6 +49,7 @@ "@babel/core": "^7.20.12", "@babel/preset-env": "^7.20.2", "@pmmmwh/react-refresh-webpack-plugin": "^0.5.10", + "@trivago/prettier-plugin-sort-imports": "^4.1.1", "babel-loader": "^9.1.2", "copy-webpack-plugin": "^10.2.0", "cross-env": "^7.0.3", @@ -76,7 +77,8 @@ "scripts": { "build": "cross-env SERVE=true webpack -c config/webpack/prod.js", "start": "webpack serve -c config/webpack/dev.js", - "analyze": "webpack --analyze -c config/webpack/analyze.js" + "analyze": "webpack --analyze -c config/webpack/analyze.js", + "format": "prettier --write \"./**/*.{js,jsx}\"" }, "eslintConfig": { "extends": [ diff --git a/postcss.config.js b/postcss.config.js index 1dfe9dcc..a2b67714 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -1,6 +1,5 @@ module.exports = { - 'postcss-preset-env': { - browsers: 'last 2 versions', + "postcss-preset-env": { + browsers: "last 2 versions", }, - -}; \ No newline at end of file +}; diff --git a/src/api/index.js b/src/api/index.js index 9f6886d7..df13d196 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -1,5 +1,5 @@ -import axios from 'axios'; +import axios from "axios"; export default axios.create({ - baseURL: process.env.REACT_APP_API_URL -}); \ No newline at end of file + baseURL: process.env.REACT_APP_API_URL, +}); diff --git a/src/api/request.js b/src/api/request.js index 9d4ed184..28ceaa74 100644 --- a/src/api/request.js +++ b/src/api/request.js @@ -1,4 +1,5 @@ import axios from "axios"; + import { getToken, urlHasParams } from "@utils/helper"; const instance = axios.create({ diff --git a/src/components/AuthBox/AuthBox.jsx b/src/components/AuthBox/AuthBox.jsx index 0dd8af66..c4275b36 100644 --- a/src/components/AuthBox/AuthBox.jsx +++ b/src/components/AuthBox/AuthBox.jsx @@ -1,16 +1,17 @@ import React, { useEffect, useRef, useState } from "react"; -import { useNavigate } from "react-router-dom"; import { useDispatch, useSelector } from "react-redux"; +import { useNavigate } from "react-router-dom"; -import { auth, selectAuth, setUserInfo } from "@redux/outstaffingSlice"; import { loading, selectIsLoading } from "@redux/loaderSlice"; +import { auth, selectAuth, setUserInfo } from "@redux/outstaffingSlice"; import { setRole } from "@redux/roleSlice"; -import ModalRegistration from "@components/Modal/ModalRegistration/ModalRegistration"; -import ModalErrorLogin from "@components/Modal/ModalErrorLogin/ModalErrorLogin"; -import { Loader } from "@components/Common/Loader/Loader"; import { apiRequest } from "@api/request"; +import { Loader } from "@components/Common/Loader/Loader"; +import ModalErrorLogin from "@components/Modal/ModalErrorLogin/ModalErrorLogin"; +import ModalRegistration from "@components/Modal/ModalRegistration/ModalRegistration"; + import ellipse from "assets/icons/ellipse.png"; import "./authBox.scss"; diff --git a/src/components/Calendar/Calendar.jsx b/src/components/Calendar/Calendar.jsx index 8b28333f..b58273a6 100644 --- a/src/components/Calendar/Calendar.jsx +++ b/src/components/Calendar/Calendar.jsx @@ -2,16 +2,18 @@ import React, { useEffect, useState } from "react"; import { useSelector } from "react-redux"; import { Link, Navigate, useNavigate } from "react-router-dom"; -import CalendarComponent from "./CalendarComponent"; -import { currentMonth } from "./calendarHelper"; +import { selectCurrentCandidate } from "@redux/outstaffingSlice"; + +import { urlForLocal } from "@utils/helper"; + import { Footer } from "@components/Common/Footer/Footer"; import { LogoutButton } from "@components/LogoutButton/LogoutButton"; -import { urlForLocal } from "@utils/helper"; -import { selectCurrentCandidate } from "@redux/outstaffingSlice"; import rectangle from "assets/images/rectangle_secondPage.png"; +import CalendarComponent from "./CalendarComponent"; import "./calendar.scss"; +import { currentMonth } from "./calendarHelper"; const Calendar = () => { if (localStorage.getItem("role_status") !== "18") { diff --git a/src/components/Calendar/CalendarComponent.jsx b/src/components/Calendar/CalendarComponent.jsx index 9694cb73..18943d90 100644 --- a/src/components/Calendar/CalendarComponent.jsx +++ b/src/components/Calendar/CalendarComponent.jsx @@ -1,15 +1,13 @@ -import React, { useState, useEffect } from "react"; -import { calendarHelper, currentMonthAndDay } from "./calendarHelper"; +import moment from "moment"; +import "moment/locale/ru"; +import React, { useEffect, useState } from "react"; +import calendarIcon from "assets/icons/calendar.svg"; import ellipse from "assets/icons/ellipse.png"; import rectangle from "assets/images/rectangle__calendar.png"; -import calendarIcon from "assets/icons/calendar.svg"; - -import moment from "moment"; - -import "moment/locale/ru"; import "./calendarComponent.scss"; +import { calendarHelper, currentMonthAndDay } from "./calendarHelper"; const CalendarComponent = ({ onSelect }) => { const [value, setValue] = useState(moment()); diff --git a/src/components/Candidate/Candidate.jsx b/src/components/Candidate/Candidate.jsx index 387915d4..9ec8fe06 100644 --- a/src/components/Candidate/Candidate.jsx +++ b/src/components/Candidate/Candidate.jsx @@ -1,29 +1,30 @@ import React, { useEffect, useState } from "react"; -import { useParams, Link, useNavigate, Navigate } from "react-router-dom"; -import { useSelector, useDispatch } from "react-redux"; - -import SkillSection from "@components/SkillSection/SkillSection"; -import Sidebar from "@components/CandidateSidebar/CandidateSidebar"; -import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; -import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; -import { Footer } from "@components/Common/Footer/Footer"; -import { Navigation } from "@components/Navigation/Navigation"; +import { useDispatch, useSelector } from "react-redux"; +import { Link, Navigate, useNavigate, useParams } from "react-router-dom"; import { currentCandidate, selectCurrentCandidate, } from "@redux/outstaffingSlice"; -import { apiRequest } from "@api/request"; -import { createMarkup } from "@utils/helper"; import { LEVELS, SKILLS } from "@utils/constants"; +import { createMarkup } from "@utils/helper"; +import { apiRequest } from "@api/request"; + +import Sidebar from "@components/CandidateSidebar/CandidateSidebar"; +import { Footer } from "@components/Common/Footer/Footer"; +import { Navigation } from "@components/Navigation/Navigation"; +import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; +import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; +import SkillSection from "@components/SkillSection/SkillSection"; + +import rightArrow from "assets/icons/arrows/arrowRight.svg"; import gitImgItem from "assets/icons/gitItemImg.svg"; -import rectangle from "assets/images/rectangle_secondPage.png"; -import front from "assets/images/partnerProfile/front-end.webp"; import back from "assets/images/partnerProfile/back-end.webp"; import design from "assets/images/partnerProfile/design.webp"; -import rightArrow from "assets/icons/arrows/arrowRight.svg"; +import front from "assets/images/partnerProfile/front-end.webp"; +import rectangle from "assets/images/rectangle_secondPage.png"; import "./candidate.scss"; diff --git a/src/components/CandidateSidebar/CandidateSidebar.jsx b/src/components/CandidateSidebar/CandidateSidebar.jsx index 574f18b2..6abb4e4e 100644 --- a/src/components/CandidateSidebar/CandidateSidebar.jsx +++ b/src/components/CandidateSidebar/CandidateSidebar.jsx @@ -1,11 +1,11 @@ import React, { useState } from "react"; +import { LEVELS, SKILLS } from "@utils/constants"; +import { urlForLocal } from "@utils/helper"; + import { Achievement } from "@components/Achievement/Achievement"; import ModalAspirant from "@components/Modal/ModalAspirant/ModalAspirant"; -import { urlForLocal } from "@utils/helper"; -import { LEVELS, SKILLS } from "@utils/constants"; - import "./candidateSidebar.scss"; const getYearsString = (years) => { diff --git a/src/components/CardControl/CardControl.jsx b/src/components/CardControl/CardControl.jsx index 7abaa411..ab017290 100644 --- a/src/components/CardControl/CardControl.jsx +++ b/src/components/CardControl/CardControl.jsx @@ -1,23 +1,23 @@ -import React from "react"; -import { Link } from "react-router-dom"; - -import rightArrow from "assets/icons/arrows/arrowRight.svg"; - -import "./CardControl.scss"; - -export const CardControl = ({ title, path, description, img }) => { - return ( - -
- itemImg -

{title}

-
-
-

-
- arrow -
-
- - ); -}; +import React from "react"; +import { Link } from "react-router-dom"; + +import rightArrow from "assets/icons/arrows/arrowRight.svg"; + +import "./CardControl.scss"; + +export const CardControl = ({ title, path, description, img }) => { + return ( + +
+ itemImg +

{title}

+
+
+

+
+ arrow +
+
+ + ); +}; diff --git a/src/components/Common/Footer/Footer.jsx b/src/components/Common/Footer/Footer.jsx index 24fc8e70..7140b21e 100644 --- a/src/components/Common/Footer/Footer.jsx +++ b/src/components/Common/Footer/Footer.jsx @@ -1,9 +1,9 @@ import React from "react"; -import logo from "assets/images/logo/LogoITguild.svg"; -import vk from "assets/icons/vkLogo.svg"; -import tg from "assets/icons/tgFooter.svg"; import email from "assets/icons/emailLogo.svg"; +import tg from "assets/icons/tgFooter.svg"; +import vk from "assets/icons/vkLogo.svg"; +import logo from "assets/images/logo/LogoITguild.svg"; import "./footer.scss"; diff --git a/src/components/Description/Description.jsx b/src/components/Description/Description.jsx index 3fdcef9b..9156d6b4 100644 --- a/src/components/Description/Description.jsx +++ b/src/components/Description/Description.jsx @@ -2,15 +2,15 @@ import React from "react"; import { useSelector } from "react-redux"; import { Link } from "react-router-dom"; -import ErrorBoundary from "../../hoc/ErrorBoundary"; +import { selectProfiles } from "@redux/outstaffingSlice"; import { LEVELS, SKILLS } from "@utils/constants"; import { urlForLocal } from "@utils/helper"; -import { selectProfiles } from "@redux/outstaffingSlice"; -import rectangle from "assets/images/rectangle_secondPage.png"; import cursorImg from "assets/icons/cursorImg.svg"; +import rectangle from "assets/images/rectangle_secondPage.png"; +import ErrorBoundary from "../../hoc/ErrorBoundary"; import "./description.scss"; const Description = ({ onLoadMore, isLoadingMore }) => { diff --git a/src/components/Form/Form.jsx b/src/components/Form/Form.jsx index b0d07445..c7f998f1 100644 --- a/src/components/Form/Form.jsx +++ b/src/components/Form/Form.jsx @@ -1,13 +1,14 @@ import React, { useEffect, useState } from "react"; -import { useParams, useNavigate } from "react-router-dom"; import PhoneInput from "react-phone-input-2"; - -import { apiRequest } from "@api/request"; -import { Loader } from "@components/Common/Loader/Loader"; +import "react-phone-input-2/lib/style.css"; +import { useNavigate, useParams } from "react-router-dom"; import Swal from "sweetalert2"; import withReactContent from "sweetalert2-react-content"; -import "react-phone-input-2/lib/style.css"; +import { apiRequest } from "@api/request"; + +import { Loader } from "@components/Common/Loader/Loader"; + import "./form.scss"; const SweetAlert = withReactContent(Swal); diff --git a/src/components/FreeDevelopers/FreeDevelopers.jsx b/src/components/FreeDevelopers/FreeDevelopers.jsx index 5b52026b..ceaf88a3 100644 --- a/src/components/FreeDevelopers/FreeDevelopers.jsx +++ b/src/components/FreeDevelopers/FreeDevelopers.jsx @@ -4,13 +4,13 @@ import { Link } from "react-router-dom"; import { scrollToForm } from "@utils/helper"; import AuthHeader from "@components/Common/AuthHeader/AuthHeader"; -import SideBar from "@components/SideBar/SideBar"; +import BaseButton from "@components/Common/BaseButton/BaseButton"; import { Footer } from "@components/Common/Footer/Footer"; import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; -import BaseButton from "@components/Common/BaseButton/BaseButton"; +import SideBar from "@components/SideBar/SideBar"; -import mockWorker from "assets/images/mock/mokPerson.png"; import arrow from "assets/icons/arrows/arrow_left.png"; +import mockWorker from "assets/images/mock/mokPerson.png"; import "./freeDevelopers.scss"; diff --git a/src/components/FrequentlyAskedQuestionsItem/FrequentlyAskedQuestionsItem.jsx b/src/components/FrequentlyAskedQuestionsItem/FrequentlyAskedQuestionsItem.jsx index 386ef6de..3da6ab91 100644 --- a/src/components/FrequentlyAskedQuestionsItem/FrequentlyAskedQuestionsItem.jsx +++ b/src/components/FrequentlyAskedQuestionsItem/FrequentlyAskedQuestionsItem.jsx @@ -1,30 +1,30 @@ -import React from "react"; -import { Link } from "react-router-dom"; - -import questionIcon from "assets/images/faq/question.svg"; - -import "./FrequentlyAskedQuestionsItem.scss"; - -export const FrequentlyAskedQuestionsItem = ({ rubric }) => { - return ( -
-
-
- -
-
- {rubric?.title} -
-
- {rubric?.questions?.map((question) => ( - -

{question.title}

- - ))} -
- ); -}; +import React from "react"; +import { Link } from "react-router-dom"; + +import questionIcon from "assets/images/faq/question.svg"; + +import "./FrequentlyAskedQuestionsItem.scss"; + +export const FrequentlyAskedQuestionsItem = ({ rubric }) => { + return ( +
+
+
+ +
+
+ {rubric?.title} +
+
+ {rubric?.questions?.map((question) => ( + +

{question.title}

+ + ))} +
+ ); +}; diff --git a/src/components/LogoutButton/LogoutButton.jsx b/src/components/LogoutButton/LogoutButton.jsx index 35438435..ad262aa8 100644 --- a/src/components/LogoutButton/LogoutButton.jsx +++ b/src/components/LogoutButton/LogoutButton.jsx @@ -1,10 +1,12 @@ import React, { useState } from "react"; -import { useNavigate } from "react-router-dom"; import { useSelector } from "react-redux"; +import { useNavigate } from "react-router-dom"; + +import { getRole } from "@redux/roleSlice"; import { useLogout } from "@hooks/useLogout"; + import { Loader } from "@components/Common/Loader/Loader"; -import { getRole } from "@redux/roleSlice"; import "./logoutButton.scss"; diff --git a/src/components/Modal/ModalAspirant/ModalAspirant.jsx b/src/components/Modal/ModalAspirant/ModalAspirant.jsx index 412b40c2..44be7619 100644 --- a/src/components/Modal/ModalAspirant/ModalAspirant.jsx +++ b/src/components/Modal/ModalAspirant/ModalAspirant.jsx @@ -1,13 +1,13 @@ import React, { useState } from "react"; import { Link } from "react-router-dom"; -import ModalLayout from "@components/Common/ModalLayout/ModalLayout"; import BaseButton from "@components/Common/BaseButton/BaseButton"; +import ModalLayout from "@components/Common/ModalLayout/ModalLayout"; -import avatar from "assets/images/mock/mokPerson.png"; -import logoTg from "assets/icons/tgLogo.svg"; import arrow from "assets/icons/arrows/left-arrow.png"; +import logoTg from "assets/icons/tgLogo.svg"; import interview from "assets/images/logo/interviewLogo.svg"; +import avatar from "assets/images/mock/mokPerson.png"; import "./modalAspirant.scss"; diff --git a/src/components/Modal/ModalErrorLogin/ModalErrorLogin.jsx b/src/components/Modal/ModalErrorLogin/ModalErrorLogin.jsx index 2f4ee9b9..3caf48f0 100644 --- a/src/components/Modal/ModalErrorLogin/ModalErrorLogin.jsx +++ b/src/components/Modal/ModalErrorLogin/ModalErrorLogin.jsx @@ -1,7 +1,7 @@ import React from "react"; -import ModalLayout from "@components/Common/ModalLayout/ModalLayout"; import BaseButton from "@components/Common/BaseButton/BaseButton"; +import ModalLayout from "@components/Common/ModalLayout/ModalLayout"; import "./modalErrorLogin.scss"; diff --git a/src/components/Modal/ModalRegistration/ModalRegistration.jsx b/src/components/Modal/ModalRegistration/ModalRegistration.jsx index 7804b058..33805aac 100644 --- a/src/components/Modal/ModalRegistration/ModalRegistration.jsx +++ b/src/components/Modal/ModalRegistration/ModalRegistration.jsx @@ -1,11 +1,11 @@ import React from "react"; -import ModalLayout from "@components/Common/ModalLayout/ModalLayout"; import BaseButton from "@components/Common/BaseButton/BaseButton"; +import ModalLayout from "@components/Common/ModalLayout/ModalLayout"; -import telegramLogo from "assets/icons/tgLogo.svg"; -import doc from "assets/icons/doc.svg"; import anyMoment from "assets/icons/anyMoment.svg"; +import doc from "assets/icons/doc.svg"; +import telegramLogo from "assets/icons/tgLogo.svg"; import "./modalRegistration.scss"; diff --git a/src/components/Modal/Tracker/ModalTicket/ModalTicket.jsx b/src/components/Modal/Tracker/ModalTicket/ModalTicket.jsx index 14a180b3..98b113b0 100644 --- a/src/components/Modal/Tracker/ModalTicket/ModalTicket.jsx +++ b/src/components/Modal/Tracker/ModalTicket/ModalTicket.jsx @@ -1,28 +1,30 @@ import React, { useEffect, useState } from "react"; -import { Link } from "react-router-dom"; import { useDispatch } from "react-redux"; +import { Link } from "react-router-dom"; + +import { modalToggle, setProjectBoardFetch } from "@redux/projectsTrackerSlice"; + +import { urlForLocal } from "@utils/helper"; import { apiRequest } from "@api/request"; -import { urlForLocal } from "@utils/helper"; -import { modalToggle, setProjectBoardFetch } from "@redux/projectsTrackerSlice"; + import { getCorrectDate } from "@components/Calendar/calendarHelper"; - -import TrackerModal from "@components/Modal/TrackerModal/TrackerModal"; -import ModalLayout from "@components/Common/ModalLayout/ModalLayout"; import BaseButton from "@components/Common/BaseButton/BaseButton"; +import ModalLayout from "@components/Common/ModalLayout/ModalLayout"; +import TrackerModal from "@components/Modal/TrackerModal/TrackerModal"; -import category from "assets/icons/category.svg"; -import watch from "assets/icons/watch.svg"; -import file from "assets/icons/fileModal.svg"; -import arrow from "assets/icons/arrows/arrowStart.png"; -import link from "assets/icons/link.svg"; import archive from "assets/icons/archive.svg"; +import arrow from "assets/icons/arrows/arrowStart.png"; +import fullScreen from "assets/icons/arrows/inFullScreen.svg"; +import category from "assets/icons/category.svg"; +import close from "assets/icons/closeProjectPersons.svg"; import del from "assets/icons/delete.svg"; import edit from "assets/icons/edit.svg"; -import send from "assets/icons/send.svg"; +import file from "assets/icons/fileModal.svg"; +import link from "assets/icons/link.svg"; import plus from "assets/icons/plus.svg"; -import fullScreen from "assets/icons/arrows/inFullScreen.svg"; -import close from "assets/icons/closeProjectPersons.svg"; +import send from "assets/icons/send.svg"; +import watch from "assets/icons/watch.svg"; import "./ModalTicket.scss"; diff --git a/src/components/Modal/Tracker/TicketFullScreen/TicketFullScreen.jsx b/src/components/Modal/Tracker/TicketFullScreen/TicketFullScreen.jsx index ca6d101a..7a31e7ae 100644 --- a/src/components/Modal/Tracker/TicketFullScreen/TicketFullScreen.jsx +++ b/src/components/Modal/Tracker/TicketFullScreen/TicketFullScreen.jsx @@ -1,42 +1,44 @@ import React, { useEffect, useState } from "react"; -import { Link, useParams, useNavigate } from "react-router-dom"; import { useDispatch, useSelector } from "react-redux"; - -import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; -import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; -import { Footer } from "@components/Common/Footer/Footer"; -import { getCorrectDate } from "@components/Calendar/calendarHelper"; -import BaseButton from "@components/Common/BaseButton/BaseButton"; -import TrackerModal from "@components/Modal/TrackerModal/TrackerModal"; -import { Navigation } from "@components/Navigation/Navigation"; -import { Loader } from "@components/Common/Loader/Loader"; +import { Link, useNavigate, useParams } from "react-router-dom"; import { deletePersonOnProject, + getBoarderLoader, + getProjectBoard, modalToggle, setProjectBoardFetch, setToggleTab, - getProjectBoard, - getBoarderLoader, } from "@redux/projectsTrackerSlice"; -import { apiRequest } from "@api/request"; + import { urlForLocal } from "@utils/helper"; -import project from "assets/icons/trackerProject.svg"; -import watch from "assets/icons/watch.svg"; -import file from "assets/icons/fileModal.svg"; -import send from "assets/icons/send.svg"; -import arrow2 from "assets/icons/arrows/arrowStart.png"; -import plus from "assets/icons/plus.svg"; -import tasks from "assets/icons/trackerTasks.svg"; -import archive from "assets/icons/archiveTracker.svg"; -import selectArrow from "assets/icons/arrows/select.svg"; -import arrow from "assets/icons/arrows/arrowCalendar.png"; -import link from "assets/icons/link.svg"; +import { apiRequest } from "@api/request"; + +import { getCorrectDate } from "@components/Calendar/calendarHelper"; +import BaseButton from "@components/Common/BaseButton/BaseButton"; +import { Footer } from "@components/Common/Footer/Footer"; +import { Loader } from "@components/Common/Loader/Loader"; +import TrackerModal from "@components/Modal/TrackerModal/TrackerModal"; +import { Navigation } from "@components/Navigation/Navigation"; +import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; +import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; + import archive2 from "assets/icons/archive.svg"; +import archive from "assets/icons/archiveTracker.svg"; +import arrow from "assets/icons/arrows/arrowCalendar.png"; +import arrow2 from "assets/icons/arrows/arrowStart.png"; +import selectArrow from "assets/icons/arrows/select.svg"; +import close from "assets/icons/closeProjectPersons.svg"; import del from "assets/icons/delete.svg"; import edit from "assets/icons/edit.svg"; -import close from "assets/icons/closeProjectPersons.svg"; +import file from "assets/icons/fileModal.svg"; +import link from "assets/icons/link.svg"; +import plus from "assets/icons/plus.svg"; +import send from "assets/icons/send.svg"; +import project from "assets/icons/trackerProject.svg"; +import tasks from "assets/icons/trackerTasks.svg"; +import watch from "assets/icons/watch.svg"; import "./ticketFullScreen.scss"; diff --git a/src/components/Modal/TrackerModal/TrackerModal.jsx b/src/components/Modal/TrackerModal/TrackerModal.jsx index e85bd65e..579d8134 100644 --- a/src/components/Modal/TrackerModal/TrackerModal.jsx +++ b/src/components/Modal/TrackerModal/TrackerModal.jsx @@ -1,21 +1,23 @@ import React, { useEffect, useState } from "react"; import { useDispatch, useSelector } from "react-redux"; -import { apiRequest } from "@api/request"; -import { urlForLocal } from "@utils/helper"; import { - setColumnName, + addPersonToProject, + editColumnName, + editProjectName, + getColumnId, + getColumnName, getProjectBoard, getValueModalType, + setColumnName, setProject, setProjectBoardFetch, - editProjectName, - editColumnName, - getColumnName, - getColumnId, - addPersonToProject, } from "@redux/projectsTrackerSlice"; +import { urlForLocal } from "@utils/helper"; + +import { apiRequest } from "@api/request"; + import arrowDown from "assets/icons/arrows/selectArrow.png"; import "./trackerModal.scss"; diff --git a/src/components/Navigation/Navigation.jsx b/src/components/Navigation/Navigation.jsx index c0ccfa4f..ba43bc79 100644 --- a/src/components/Navigation/Navigation.jsx +++ b/src/components/Navigation/Navigation.jsx @@ -1,108 +1,110 @@ -import React, { useEffect, useState } from "react"; -import { NavLink } from "react-router-dom"; -import { useDispatch, useSelector } from "react-redux"; - -import { urlForLocal } from "@utils/helper"; -import { apiRequest } from "@api/request"; -import { getProfileInfo, setProfileInfo } from "@redux/outstaffingSlice"; - -import avatarMok from "assets/images/avatarMok.png"; - -export const Navigation = () => { - const dispatch = useDispatch(); - - const profileInfo = useSelector(getProfileInfo); - const [user] = useState( - localStorage.getItem("role_status") === "18" ? "partner" : "developer" - ); - const [navInfo] = useState({ - developer: [ - { - path: "/summary", - name: "Резюме", - }, - { - path: "/calendar", - name: "Отчетность", - }, - { - path: "/tracker", - name: "Трекер", - }, - { - path: "/payouts", - name: "Выплаты", - }, - { - path: "/settings", - name: "Настройки", - }, - ], - partner: [ - { - path: "/catalog", - name: "Каталог", - }, - { - path: "/requests", - name: "Запросы", - }, - { - path: "/categories", - name: "Персонал", - }, - { - path: "/tracker", - name: "Трекер", - }, - { - path: "/treaties", - name: "Договора", - }, - { - path: "/settings", - name: "Настройки", - }, - ], - }); - - useEffect(() => { - if (localStorage.getItem("role_status") === "18") { - return; - } - apiRequest(`/profile/${localStorage.getItem("cardId")}`).then( - (profileInfo) => dispatch(setProfileInfo(profileInfo)) - ); - }, [dispatch]); - - return ( -
-
- - -
-

- {user === "developer" ? profileInfo?.fio : ""} -

- - avatar - -
-
-
- ); -}; +import React, { useEffect, useState } from "react"; +import { useDispatch, useSelector } from "react-redux"; +import { NavLink } from "react-router-dom"; + +import { getProfileInfo, setProfileInfo } from "@redux/outstaffingSlice"; + +import { urlForLocal } from "@utils/helper"; + +import { apiRequest } from "@api/request"; + +import avatarMok from "assets/images/avatarMok.png"; + +export const Navigation = () => { + const dispatch = useDispatch(); + + const profileInfo = useSelector(getProfileInfo); + const [user] = useState( + localStorage.getItem("role_status") === "18" ? "partner" : "developer" + ); + const [navInfo] = useState({ + developer: [ + { + path: "/summary", + name: "Резюме", + }, + { + path: "/calendar", + name: "Отчетность", + }, + { + path: "/tracker", + name: "Трекер", + }, + { + path: "/payouts", + name: "Выплаты", + }, + { + path: "/settings", + name: "Настройки", + }, + ], + partner: [ + { + path: "/catalog", + name: "Каталог", + }, + { + path: "/requests", + name: "Запросы", + }, + { + path: "/categories", + name: "Персонал", + }, + { + path: "/tracker", + name: "Трекер", + }, + { + path: "/treaties", + name: "Договора", + }, + { + path: "/settings", + name: "Настройки", + }, + ], + }); + + useEffect(() => { + if (localStorage.getItem("role_status") === "18") { + return; + } + apiRequest(`/profile/${localStorage.getItem("cardId")}`).then( + (profileInfo) => dispatch(setProfileInfo(profileInfo)) + ); + }, [dispatch]); + + return ( +
+
+ + +
+

+ {user === "developer" ? profileInfo?.fio : ""} +

+ + avatar + +
+
+
+ ); +}; diff --git a/src/components/Outstaffing/Outstaffing.jsx b/src/components/Outstaffing/Outstaffing.jsx index f7a7d533..4c45a5dd 100644 --- a/src/components/Outstaffing/Outstaffing.jsx +++ b/src/components/Outstaffing/Outstaffing.jsx @@ -1,18 +1,18 @@ import React from "react"; -import { useSelector, useDispatch } from "react-redux"; +import { useDispatch, useSelector } from "react-redux"; + +import { + getPositionId, + selectTags, + setPositionId, +} from "@redux/outstaffingSlice"; import OutstaffingBlock from "@components/OutstaffingBlock/OutstaffingBlock"; import TagSelect from "@components/Select/TagSelect"; -import { - selectTags, - getPositionId, - setPositionId, -} from "@redux/outstaffingSlice"; - -import front from "assets/images/partnerProfile/front-end.webp"; import back from "assets/images/partnerProfile/back-end.webp"; import design from "assets/images/partnerProfile/design.webp"; +import front from "assets/images/partnerProfile/front-end.webp"; import "./outstaffing.scss"; diff --git a/src/components/OutstaffingBlock/OutstaffingBlock.jsx b/src/components/OutstaffingBlock/OutstaffingBlock.jsx index 8d099f48..3e40242c 100644 --- a/src/components/OutstaffingBlock/OutstaffingBlock.jsx +++ b/src/components/OutstaffingBlock/OutstaffingBlock.jsx @@ -2,7 +2,8 @@ import React from "react"; import OutsideClickHandler from "react-outside-click-handler"; import { useDispatch, useSelector } from "react-redux"; -import { selectItems, selectedItems, profiles } from "@redux/outstaffingSlice"; +import { profiles, selectItems, selectedItems } from "@redux/outstaffingSlice"; + import { apiRequest } from "@api/request"; import "./outstaffingBlock.scss"; diff --git a/src/components/ProfileCalendar/ProfileCalendar.jsx b/src/components/ProfileCalendar/ProfileCalendar.jsx index e272205c..52a863ad 100644 --- a/src/components/ProfileCalendar/ProfileCalendar.jsx +++ b/src/components/ProfileCalendar/ProfileCalendar.jsx @@ -1,26 +1,28 @@ +import moment from "moment"; +import "moment/locale/ru"; import React, { useEffect, useState } from "react"; import { useDispatch, useSelector } from "react-redux"; import { Link, Navigate } from "react-router-dom"; -import { urlForLocal } from "@utils/helper"; -import { apiRequest } from "@api/request"; import { getProfileInfo } from "@redux/outstaffingSlice"; import { getRequestDates, setReportDate, setRequestDate, } from "@redux/reportSlice"; + +import { urlForLocal } from "@utils/helper"; + +import { apiRequest } from "@api/request"; + import { getReports } from "@components/Calendar/calendarHelper"; +import { Footer } from "@components/Common/Footer/Footer"; +import { Loader } from "@components/Common/Loader/Loader"; +import { Navigation } from "@components/Navigation/Navigation"; +import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; +import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; import { ProfileCalendarComponent } from "./ProfileCalendarComponent"; -import { Loader } from "@components/Common/Loader/Loader"; -import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; -import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; -import { Footer } from "@components/Common/Footer/Footer"; -import { Navigation } from "@components/Navigation/Navigation"; - -import moment from "moment"; -import "moment/locale/ru"; import "./profileCalendar.scss"; export const ProfileCalendar = () => { diff --git a/src/components/ProfileCalendar/ProfileCalendarComponent.jsx b/src/components/ProfileCalendar/ProfileCalendarComponent.jsx index b9fb9276..fee451bd 100644 --- a/src/components/ProfileCalendar/ProfileCalendarComponent.jsx +++ b/src/components/ProfileCalendar/ProfileCalendarComponent.jsx @@ -1,4 +1,6 @@ -import React, { useState, useEffect } from "react"; +import moment from "moment"; +import "moment/locale/ru"; +import React, { useEffect, useState } from "react"; import { useDispatch } from "react-redux"; import { Link } from "react-router-dom"; @@ -7,6 +9,8 @@ import { setRequestDate, setSendRequest, } from "@redux/reportSlice"; + +import "@components/Calendar/calendarComponent.scss"; import { calendarHelper, currentMonthAndDay, @@ -16,13 +20,8 @@ import { import ShortReport from "@components/ShortReport/ShortReport"; import arrow from "assets/icons/arrows/arrowCalendar.png"; -import rectangle from "assets/images/rectangle__calendar.png"; import calendarIcon from "assets/icons/calendar.svg"; - -import moment from "moment"; - -import "moment/locale/ru"; -import "@components/Calendar/calendarComponent.scss"; +import rectangle from "assets/images/rectangle__calendar.png"; export const ProfileCalendarComponent = React.memo( ({ value, setValueHandler, reports, totalHours }) => { diff --git a/src/components/ProfileHeader/ProfileHeader.jsx b/src/components/ProfileHeader/ProfileHeader.jsx index 179217da..eb592312 100644 --- a/src/components/ProfileHeader/ProfileHeader.jsx +++ b/src/components/ProfileHeader/ProfileHeader.jsx @@ -1,12 +1,14 @@ import React, { useEffect, useState } from "react"; -import { useNavigate, NavLink } from "react-router-dom"; import { useDispatch, useSelector } from "react-redux"; +import { NavLink, useNavigate } from "react-router-dom"; -import { Loader } from "@components/Common/Loader/Loader"; -import { apiRequest } from "@api/request"; import { auth, setProfileInfo } from "@redux/outstaffingSlice"; import { getRole } from "@redux/roleSlice"; +import { apiRequest } from "@api/request"; + +import { Loader } from "@components/Common/Loader/Loader"; + import "./profileHeader.scss"; export const ProfileHeader = () => { diff --git a/src/components/ProjectTiket/ProjectTiket.jsx b/src/components/ProjectTiket/ProjectTiket.jsx index 45156ac0..41fa1cb1 100644 --- a/src/components/ProjectTiket/ProjectTiket.jsx +++ b/src/components/ProjectTiket/ProjectTiket.jsx @@ -2,16 +2,17 @@ import React, { useEffect, useState } from "react"; import { useDispatch } from "react-redux"; import { Link } from "react-router-dom"; -import { apiRequest } from "@api/request"; import { deleteProject, modalToggle } from "@redux/projectsTrackerSlice"; +import { apiRequest } from "@api/request"; + import { ModalSelect } from "@components/Modal/ModalSelect/ModalSelect"; import TrackerModal from "@components/Modal/TrackerModal/TrackerModal"; -import link from "assets/icons/link.svg"; import archiveSet from "assets/icons/archive.svg"; import del from "assets/icons/delete.svg"; import edit from "assets/icons/edit.svg"; +import link from "assets/icons/link.svg"; import "./projectTiket.scss"; diff --git a/src/components/ProtectedRoute/ProtectedRoute.js b/src/components/ProtectedRoute/ProtectedRoute.js index 117c39b1..32f807e4 100644 --- a/src/components/ProtectedRoute/ProtectedRoute.js +++ b/src/components/ProtectedRoute/ProtectedRoute.js @@ -1,6 +1,6 @@ import React from "react"; import { useSelector } from "react-redux"; -import { Route, Redirect } from "react-router-dom"; +import { Redirect, Route } from "react-router-dom"; import { selectAuth } from "@redux/outstaffingSlice"; diff --git a/src/components/ReportForm/ReportForm.jsx b/src/components/ReportForm/ReportForm.jsx index 76e6b485..4ee38c58 100644 --- a/src/components/ReportForm/ReportForm.jsx +++ b/src/components/ReportForm/ReportForm.jsx @@ -1,31 +1,33 @@ -import React, { useState, useEffect } from "react"; +import ru from "date-fns/locale/ru"; +import React, { useEffect, useState } from "react"; +import DatePicker, { registerLocale } from "react-datepicker"; +import "react-datepicker/dist/react-datepicker.css"; import { useSelector } from "react-redux"; import { Link, Navigate, useNavigate } from "react-router-dom"; -import DatePicker, { registerLocale } from "react-datepicker"; + +import { getReportDate } from "@redux/reportSlice"; + +import { apiRequest } from "@api/request"; + +import { Footer } from "@components/Common/Footer/Footer"; +import { Loader } from "@components/Common/Loader/Loader"; +import { Navigation } from "@components/Navigation/Navigation"; +import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; +import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; + +import arrow from "assets/icons/arrows/left-arrow.png"; +import calendarIcon from "assets/icons/calendar.svg"; +import ellipse from "assets/icons/ellipse.png"; +import remove from "assets/icons/remove.svg"; + import { getCorrectDate, getCreatedDate, hourOfNum, } from "../Calendar/calendarHelper"; -import ru from "date-fns/locale/ru"; -registerLocale("ru", ru); - -import { Loader } from "@components/Common/Loader/Loader"; -import { Footer } from "@components/Common/Footer/Footer"; -import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; -import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; - -import { apiRequest } from "@api/request"; -import { Navigation } from "@components/Navigation/Navigation"; -import { getReportDate } from "@redux/reportSlice"; - -import calendarIcon from "assets/icons/calendar.svg"; -import ellipse from "assets/icons/ellipse.png"; -import remove from "assets/icons/remove.svg"; -import arrow from "assets/icons/arrows/left-arrow.png"; - import "./reportForm.scss"; -import "react-datepicker/dist/react-datepicker.css"; + +registerLocale("ru", ru); const ReportForm = () => { if (localStorage.getItem("role_status") === "18") { diff --git a/src/components/Select/TagSelect.jsx b/src/components/Select/TagSelect.jsx index 63a81b15..8b81a75e 100644 --- a/src/components/Select/TagSelect.jsx +++ b/src/components/Select/TagSelect.jsx @@ -1,17 +1,19 @@ import React, { useState } from "react"; -import { useSelector, useDispatch } from "react-redux"; +import { useDispatch, useSelector } from "react-redux"; import Select from "react-select"; -import { Loader } from "@components/Common/Loader/Loader"; -import { apiRequest } from "@api/request"; import { - selectedItems, + profiles, selectItems, selectTags, - profiles, + selectedItems, setPositionId, } from "@redux/outstaffingSlice"; +import { apiRequest } from "@api/request"; + +import { Loader } from "@components/Common/Loader/Loader"; + import "./tagSelect.scss"; const TagSelect = () => { diff --git a/src/components/ShortReport/ShortReport.jsx b/src/components/ShortReport/ShortReport.jsx index 558b739e..b7c08f99 100644 --- a/src/components/ShortReport/ShortReport.jsx +++ b/src/components/ShortReport/ShortReport.jsx @@ -2,17 +2,19 @@ import React, { useState } from "react"; import { useDispatch, useSelector } from "react-redux"; import { Link } from "react-router-dom"; -import { apiRequest } from "@api/request"; -import { - getCorrectDate, - getCreatedDate, - hourOfNum, -} from "@components/Calendar/calendarHelper"; import { getReportDate, getSendRequest, setSendRequest, } from "@redux/reportSlice"; + +import { apiRequest } from "@api/request"; + +import { + getCorrectDate, + getCreatedDate, + hourOfNum, +} from "@components/Calendar/calendarHelper"; import { Loader } from "@components/Common/Loader/Loader"; import "./shortReport.scss"; diff --git a/src/components/SliderWorkers/SliderWorkers.jsx b/src/components/SliderWorkers/SliderWorkers.jsx index e08d9a54..7167a8e7 100644 --- a/src/components/SliderWorkers/SliderWorkers.jsx +++ b/src/components/SliderWorkers/SliderWorkers.jsx @@ -1,14 +1,14 @@ import React, { useState } from "react"; -import Slider from "react-slick"; import { Link } from "react-router-dom"; +import Slider from "react-slick"; +import "slick-carousel/slick/slick-theme.css"; +import "slick-carousel/slick/slick.css"; import BaseButton from "@components/Common/BaseButton/BaseButton"; import mockWorker from "assets/images/mock/mokPerson.png"; import "./sliderWorkers.scss"; -import "slick-carousel/slick/slick.css"; -import "slick-carousel/slick/slick-theme.css"; export const SliderWorkers = ({ title, titleInfo, subTitle }) => { const [workers] = useState([ diff --git a/src/components/StarRating/StarRating.js b/src/components/StarRating/StarRating.js index 32be5fe3..02245b9d 100644 --- a/src/components/StarRating/StarRating.js +++ b/src/components/StarRating/StarRating.js @@ -1,86 +1,86 @@ -import React, { useEffect, useState } from "react"; - -import "./StarRating.scss"; - -const StarRating = ({ - countStars = 1, - countActiveStars = 1, - color = "#52B709", - size = 61, -}) => { - const [shadedStars, setShadedStars] = useState([]); - const [noShadedStars, setNoShadedStars] = useState([]); - const percent = - Math.abs(countActiveStars) >= countStars - ? 100 - : (countActiveStars * 100) / countStars; - useEffect(() => { - for (let index = 0; index < countStars; index++) { - setShadedStars((prev) => [...prev, "★"]); - setNoShadedStars((prev) => [...prev, "☆"]); - } - }, []); - - const ratingStyle = { - "--size": size + "px", - }; - const activeStyle = { - "--width": percent + "%", - "--color": color, - "--content": shadedStars.join(""), - }; - const bodyStyle = { - "--content": noShadedStars.join(""), - "--color": color, - }; - - return ( -
-
-
-
- - - - - -
-
-
- ); -}; - -export default React.memo(StarRating); +import React, { useEffect, useState } from "react"; + +import "./StarRating.scss"; + +const StarRating = ({ + countStars = 1, + countActiveStars = 1, + color = "#52B709", + size = 61, +}) => { + const [shadedStars, setShadedStars] = useState([]); + const [noShadedStars, setNoShadedStars] = useState([]); + const percent = + Math.abs(countActiveStars) >= countStars + ? 100 + : (countActiveStars * 100) / countStars; + useEffect(() => { + for (let index = 0; index < countStars; index++) { + setShadedStars((prev) => [...prev, "★"]); + setNoShadedStars((prev) => [...prev, "☆"]); + } + }, []); + + const ratingStyle = { + "--size": size + "px", + }; + const activeStyle = { + "--width": percent + "%", + "--color": color, + "--content": shadedStars.join(""), + }; + const bodyStyle = { + "--content": noShadedStars.join(""), + "--color": color, + }; + + return ( +
+
+
+
+ + + + + +
+
+
+ ); +}; + +export default React.memo(StarRating); diff --git a/src/components/features/Candidate-lk/HeadBottom.js b/src/components/features/Candidate-lk/HeadBottom.js index 04c628e5..768a36bf 100644 --- a/src/components/features/Candidate-lk/HeadBottom.js +++ b/src/components/features/Candidate-lk/HeadBottom.js @@ -1,16 +1,16 @@ -import React from "react"; - -import medium_male from "assets/images/medium_male.png"; - -export const HeadBottom = () => { - return ( -
-
-
Мои тесты
-
- -
-
-
- ); -}; +import React from "react"; + +import medium_male from "assets/images/medium_male.png"; + +export const HeadBottom = () => { + return ( +
+
+
Мои тесты
+
+ +
+
+
+ ); +}; diff --git a/src/components/features/quiz/AlertResult.js b/src/components/features/quiz/AlertResult.js index 5b2aa4dd..18bbe609 100644 --- a/src/components/features/quiz/AlertResult.js +++ b/src/components/features/quiz/AlertResult.js @@ -1,33 +1,33 @@ -import React from "react"; - -import suucessIcon from "assets/images/quiz/success.png"; - -export const AlertResult = () => { - const successTest = false; - - return ( -
-
- suucessIcon -
- Благодарим Вас за прохождение теста "Junior разработчик". Ваши - результаты проверены, готовы пригласить Вас в команду -
-
- {!successTest && ( -
- -
- )} -
- ); -}; +import React from "react"; + +import suucessIcon from "assets/images/quiz/success.png"; + +export const AlertResult = () => { + const successTest = false; + + return ( +
+
+ suucessIcon +
+ Благодарим Вас за прохождение теста "Junior разработчик". Ваши + результаты проверены, готовы пригласить Вас в команду +
+
+ {!successTest && ( +
+ +
+ )} +
+ ); +}; diff --git a/src/components/features/quiz/BlockCompletedTest.js b/src/components/features/quiz/BlockCompletedTest.js index 61afbee4..db28722b 100644 --- a/src/components/features/quiz/BlockCompletedTest.js +++ b/src/components/features/quiz/BlockCompletedTest.js @@ -1,31 +1,31 @@ -import React from "react"; -import { Link } from "react-router-dom"; - -import compltedImage from "assets/images/quiz/compltedImage.png"; - -export const BlockCompletedTest = () => { - const id = localStorage.getItem("id"); - return ( -
-
-
- -
-
- Спасибо!
- Ваши ответы получены -
-
- В течении дня в вашем кабинете будет отображены данные о прохождении - тестирования -
- - В кабинет - -
-
- ); -}; +import React from "react"; +import { Link } from "react-router-dom"; + +import compltedImage from "assets/images/quiz/compltedImage.png"; + +export const BlockCompletedTest = () => { + const id = localStorage.getItem("id"); + return ( +
+
+
+ +
+
+ Спасибо!
+ Ваши ответы получены +
+
+ В течении дня в вашем кабинете будет отображены данные о прохождении + тестирования +
+ + В кабинет + +
+
+ ); +}; diff --git a/src/components/features/quiz/Card-introduction.js b/src/components/features/quiz/Card-introduction.js index 5a0d84a2..af14b0aa 100644 --- a/src/components/features/quiz/Card-introduction.js +++ b/src/components/features/quiz/Card-introduction.js @@ -1,19 +1,19 @@ -import React from "react"; - -import questionIcon from "assets/images/question.png"; - -import "./quiz.scss"; - -export const CardIntroduction = ({ title, description }) => { - return ( -
-
{title}
-
-
- -
-
{description}
-
-
- ); -}; +import React from "react"; + +import questionIcon from "assets/images/question.png"; + +import "./quiz.scss"; + +export const CardIntroduction = ({ title, description }) => { + return ( +
+
{title}
+
+
+ +
+
{description}
+
+
+ ); +}; diff --git a/src/components/features/quiz/CardAviableTest.js b/src/components/features/quiz/CardAviableTest.js index 01c1d763..2f747792 100644 --- a/src/components/features/quiz/CardAviableTest.js +++ b/src/components/features/quiz/CardAviableTest.js @@ -1,39 +1,39 @@ -import React from "react"; -import { Link } from "react-router-dom"; - -import StarRating from "@components/StarRating/StarRating"; - -import rightArrow from "assets/icons/arrows/arrowRight.svg"; - -export const CardAvailableTest = ({ title, description, path, passedTest }) => { - return ( -
- -
- -

{title}

-
-
-

-
- arrow -
-
- - - {passedTest && ( -
-

Получить отчет по тестированию

- Отчет по тесту -
- )} -
- ); -}; +import React from "react"; +import { Link } from "react-router-dom"; + +import StarRating from "@components/StarRating/StarRating"; + +import rightArrow from "assets/icons/arrows/arrowRight.svg"; + +export const CardAvailableTest = ({ title, description, path, passedTest }) => { + return ( +
+ +
+ +

{title}

+
+
+

+
+ arrow +
+
+ + + {passedTest && ( +
+

Получить отчет по тестированию

+ Отчет по тесту +
+ )} +
+ ); +}; diff --git a/src/components/features/quiz/HeaderPageTests.js b/src/components/features/quiz/HeaderPageTests.js index 39347c2d..0d8d9f7c 100644 --- a/src/components/features/quiz/HeaderPageTests.js +++ b/src/components/features/quiz/HeaderPageTests.js @@ -1,7 +1,8 @@ -import { Link } from "react-router-dom"; import { useSelector } from "react-redux"; +import { Link } from "react-router-dom"; + +import { selectUserInfo, selectedTest } from "@redux/quizSlice"; -import { selectedTest, selectUserInfo } from "@redux/quizSlice"; import { urlForLocal } from "@utils/helper"; import "./quiz.scss"; diff --git a/src/components/features/quiz/HeaderQuiz.js b/src/components/features/quiz/HeaderQuiz.js index 2c254743..d5ea6260 100644 --- a/src/components/features/quiz/HeaderQuiz.js +++ b/src/components/features/quiz/HeaderQuiz.js @@ -2,9 +2,11 @@ import React, { useEffect } from "react"; import { useDispatch, useSelector } from "react-redux"; import { selectUserInfo, setUserInfo } from "@redux/quizSlice"; -import { apiRequest } from "@api/request"; + import { urlForLocal } from "@utils/helper"; +import { apiRequest } from "@api/request"; + import "./quiz.scss"; export const HeaderQuiz = ({ header }) => { diff --git a/src/components/features/quiz/Instructions.js b/src/components/features/quiz/Instructions.js index 40c16837..46f05379 100644 --- a/src/components/features/quiz/Instructions.js +++ b/src/components/features/quiz/Instructions.js @@ -1,9 +1,10 @@ -import { Link } from "react-router-dom"; import { useEffect, useState } from "react"; import { useSelector } from "react-redux"; +import { Link } from "react-router-dom"; + +import { selectedTest } from "@redux/quizSlice"; import { apiRequest } from "@api/request"; -import { selectedTest } from "@redux/quizSlice"; import comment from "assets/icons/comment.jpg"; diff --git a/src/components/features/quiz/MyTestsQuiz.js b/src/components/features/quiz/MyTestsQuiz.js index 4d48ba0f..c204f9a6 100644 --- a/src/components/features/quiz/MyTestsQuiz.js +++ b/src/components/features/quiz/MyTestsQuiz.js @@ -1,7 +1,8 @@ -import { Link } from "react-router-dom"; import { useDispatch } from "react-redux"; +import { Link } from "react-router-dom"; import { setSelectedTest } from "@redux/quizSlice"; + import { urlForLocal } from "@utils/helper"; import calendarImage from "assets/icons/calendar.svg"; diff --git a/src/components/features/quiz/Quiz-passing-information.js b/src/components/features/quiz/Quiz-passing-information.js index 0eb4ec19..073ef094 100644 --- a/src/components/features/quiz/Quiz-passing-information.js +++ b/src/components/features/quiz/Quiz-passing-information.js @@ -1,91 +1,92 @@ -import React, { useEffect } from "react"; -import { useSelector } from "react-redux"; -import { useTimer } from "react-timer-hook"; - -import StarRating from "@components/StarRating/StarRating"; -import { completedTestSelector } from "@redux/quizSlice"; - -import timer from "assets/images/quiz/timer.png"; -import accempt from "assets/images/quiz/accempt.png"; - -export const QuizPassingInformation = ({ expiryTimestamp, setStartTest }) => { - const { seconds, minutes, isRunning, start, pause, resume, restart } = - useTimer({ - expiryTimestamp, - autoStart: false, - onExpire: () => { - console.warn("onExpire called"); - }, - }); - const completedTest = useSelector(completedTestSelector); - - const startTesting = () => { - setStartTest(true); - start(); - }; - - useEffect(() => { - if (completedTest) { - const time = new Date(); - time.setSeconds(time.getSeconds() + 0); //600 - кол-во секунд для прохождения теста - restart(time, false); - } - }, [completedTest]); - - return ( -
-
-
-
- -
- Junior
- разработчик -
-
-
-
- -
-
- {completedTest ? "Время вышло" : "Время на прохождение теста:"}{" "} -
- - {minutes.toString().padStart(2, "0") + - ":" + - seconds.toString().padStart(2, "0")}{" "} - секунд - -
-
-
-
- -
-
- Попыток прохождения:
- 1 попытка -
-
-
- {!completedTest && !isRunning && ( - - )} -
-
- - {/* {isRunning && } */} -
-
- ); -}; +import React, { useEffect } from "react"; +import { useSelector } from "react-redux"; +import { useTimer } from "react-timer-hook"; + +import { completedTestSelector } from "@redux/quizSlice"; + +import StarRating from "@components/StarRating/StarRating"; + +import accempt from "assets/images/quiz/accempt.png"; +import timer from "assets/images/quiz/timer.png"; + +export const QuizPassingInformation = ({ expiryTimestamp, setStartTest }) => { + const { seconds, minutes, isRunning, start, pause, resume, restart } = + useTimer({ + expiryTimestamp, + autoStart: false, + onExpire: () => { + console.warn("onExpire called"); + }, + }); + const completedTest = useSelector(completedTestSelector); + + const startTesting = () => { + setStartTest(true); + start(); + }; + + useEffect(() => { + if (completedTest) { + const time = new Date(); + time.setSeconds(time.getSeconds() + 0); //600 - кол-во секунд для прохождения теста + restart(time, false); + } + }, [completedTest]); + + return ( +
+
+
+
+ +
+ Junior
+ разработчик +
+
+
+
+ +
+
+ {completedTest ? "Время вышло" : "Время на прохождение теста:"}{" "} +
+ + {minutes.toString().padStart(2, "0") + + ":" + + seconds.toString().padStart(2, "0")}{" "} + секунд + +
+
+
+
+ +
+
+ Попыток прохождения:
+ 1 попытка +
+
+
+ {!completedTest && !isRunning && ( + + )} +
+
+ + {/* {isRunning && } */} +
+
+ ); +}; diff --git a/src/components/features/quiz/QuizReport.js b/src/components/features/quiz/QuizReport.js index 41e22fe3..793290f2 100644 --- a/src/components/features/quiz/QuizReport.js +++ b/src/components/features/quiz/QuizReport.js @@ -1,35 +1,35 @@ -import React from "react"; - -import StarRating from "@components/StarRating/StarRating"; - -export const QuizReport = () => { - return ( -
-
-
- -
- Junior
разработчик -
-
-
-
22
-
Правильных ответов
-
-
-
02
-
Не правильных ответов
-
-
-
Статус:
-
Пройдено!
-
-
-
- ); -}; +import React from "react"; + +import StarRating from "@components/StarRating/StarRating"; + +export const QuizReport = () => { + return ( +
+
+
+ +
+ Junior
разработчик +
+
+
+
22
+
Правильных ответов
+
+
+
02
+
Не правильных ответов
+
+
+
Статус:
+
Пройдено!
+
+
+
+ ); +}; diff --git a/src/components/features/quiz/Results.js b/src/components/features/quiz/Results.js index dd273286..1180d4d9 100644 --- a/src/components/features/quiz/Results.js +++ b/src/components/features/quiz/Results.js @@ -1,35 +1,36 @@ -import React, { useEffect, useState } from "react"; -import { useDispatch, useSelector } from "react-redux"; - -import { fetchResultTest, selectedTest, selectResult } from "@redux/quizSlice"; -import { apiRequest } from "@api/request"; - -export const Results = () => { - const result = useSelector(selectResult); - const test = useSelector(selectedTest); - const [maxScore, setMaxScore] = useState(""); - const dispatch = useDispatch(); - - useEffect(() => { - dispatch(fetchResultTest(test.uuid)); - apiRequest( - `/user-questionnaire/get-points-number?user_questionnaire_uuid=${test.uuid}` - ).then((res) => setMaxScore(res.sum_point)); - }, [apiRequest, dispatch, test]); - - return ( -
- {!result ? ( -

Ожидайте результата...

- ) : ( -
-
Благодарим за прохождение теста
-
- Ваш Результат: {result.score}{" "} - из {maxScore}{" "} -
-
- )} -
- ); -}; +import React, { useEffect, useState } from "react"; +import { useDispatch, useSelector } from "react-redux"; + +import { fetchResultTest, selectResult, selectedTest } from "@redux/quizSlice"; + +import { apiRequest } from "@api/request"; + +export const Results = () => { + const result = useSelector(selectResult); + const test = useSelector(selectedTest); + const [maxScore, setMaxScore] = useState(""); + const dispatch = useDispatch(); + + useEffect(() => { + dispatch(fetchResultTest(test.uuid)); + apiRequest( + `/user-questionnaire/get-points-number?user_questionnaire_uuid=${test.uuid}` + ).then((res) => setMaxScore(res.sum_point)); + }, [apiRequest, dispatch, test]); + + return ( +
+ {!result ? ( +

Ожидайте результата...

+ ) : ( +
+
Благодарим за прохождение теста
+
+ Ваш Результат: {result.score}{" "} + из {maxScore}{" "} +
+
+ )} +
+ ); +}; diff --git a/src/components/features/quiz/SelectedCategory.js b/src/components/features/quiz/SelectedCategory.js index cf72f558..17bdcbfd 100644 --- a/src/components/features/quiz/SelectedCategory.js +++ b/src/components/features/quiz/SelectedCategory.js @@ -1,29 +1,29 @@ -import React from "react"; - -import iconSpecialization from "assets/images/partnerProfile/personalBackEnd.svg"; - -export const SelectedCategory = ({ setSelectedCategory }) => { - return ( -
-
-
- Ваша выбранная
категория -
-
-
- -
-
- Backend
разработчики -
-
- -
-
- ); -}; +import React from "react"; + +import iconSpecialization from "assets/images/partnerProfile/personalBackEnd.svg"; + +export const SelectedCategory = ({ setSelectedCategory }) => { + return ( +
+
+
+ Ваша выбранная
категория +
+
+
+ +
+
+ Backend
разработчики +
+
+ +
+
+ ); +}; diff --git a/src/components/features/quiz/Task.js b/src/components/features/quiz/Task.js index 58c9a3d7..77136fd4 100644 --- a/src/components/features/quiz/Task.js +++ b/src/components/features/quiz/Task.js @@ -1,25 +1,25 @@ import React, { useEffect, useState } from "react"; +import { useDispatch, useSelector } from "react-redux"; import { useNavigate } from "react-router-dom"; -import { useSelector, useDispatch } from "react-redux"; -import { apiRequest } from "@api/request"; -import { HeaderQuiz } from "./HeaderQuiz"; - -import { Progressbar } from "./ProgressbarQuiz"; -import { GetOptionTask } from "./GetOptionTask"; import { - fetchUserAnswersMany, - fetchUserAnswerOne, - fetchGetAnswers, answersSelector, - selectedTest, + fetchGetAnswers, + fetchUserAnswerOne, + fetchUserAnswersMany, questionsSelector, + selectedTest, setAnswers, setCompleteTest, } from "@redux/quizSlice"; +import { apiRequest } from "@api/request"; + import questionIcon from "assets/images/question.png"; +import { GetOptionTask } from "./GetOptionTask"; +import { HeaderQuiz } from "./HeaderQuiz"; +import { Progressbar } from "./ProgressbarQuiz"; import "./quiz.scss"; export const TaskQuiz = () => { diff --git a/src/hoc/ErrorBoundary.js b/src/hoc/ErrorBoundary.js index 6edbe298..0bb991e8 100644 --- a/src/hoc/ErrorBoundary.js +++ b/src/hoc/ErrorBoundary.js @@ -1,4 +1,4 @@ -import React, {Component} from "react"; +import React, { Component } from "react"; class ErrorBoundary extends Component { state = { @@ -6,7 +6,7 @@ class ErrorBoundary extends Component { }; static getDerivedStateFromError(error) { - return {error}; + return { error }; } render() { @@ -19,4 +19,4 @@ class ErrorBoundary extends Component { } } -export default ErrorBoundary \ No newline at end of file +export default ErrorBoundary; diff --git a/src/hooks/useLogout.js b/src/hooks/useLogout.js index 84fd7afe..0ad7c721 100644 --- a/src/hooks/useLogout.js +++ b/src/hooks/useLogout.js @@ -1,7 +1,8 @@ -import {useDispatch, useSelector} from "react-redux"; -import {getRole} from "../redux/roleSlice"; -import {useNavigate} from "react-router-dom"; -import {auth} from "../redux/outstaffingSlice"; +import { useDispatch, useSelector } from "react-redux"; +import { useNavigate } from "react-router-dom"; + +import { auth } from "../redux/outstaffingSlice"; +import { getRole } from "../redux/roleSlice"; export const useLogout = () => { const dispatch = useDispatch(); @@ -11,8 +12,8 @@ export const useLogout = () => { const logout = () => { localStorage.clear(); dispatch(auth(false)); - navigate(userRole === 'ROLE_DEV' ? '/authdev' : '/auth') + navigate(userRole === "ROLE_DEV" ? "/authdev" : "/auth"); }; - return {logout} -}; \ No newline at end of file + return { logout }; +}; diff --git a/src/index.js b/src/index.js index 4ca77d4c..d03a525d 100644 --- a/src/index.js +++ b/src/index.js @@ -1,14 +1,13 @@ -import React from 'react' -import ReactDOM from 'react-dom/client' -import {store} from './store/store' -import {Provider} from 'react-redux' -import App from './App' +import React from "react"; +import ReactDOM from "react-dom/client"; +import { Provider } from "react-redux"; -import './index.css' +import App from "./App"; +import "./index.css"; +import { store } from "./store/store"; -ReactDOM.createRoot(document.getElementById("root")) - .render( - - - , - ); +ReactDOM.createRoot(document.getElementById("root")).render( + + + +); diff --git a/src/pages/Article/Article.jsx b/src/pages/Article/Article.jsx index d95a8502..86e47b55 100644 --- a/src/pages/Article/Article.jsx +++ b/src/pages/Article/Article.jsx @@ -1,19 +1,19 @@ 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 SideBar from "@components/SideBar/SideBar"; import { Footer } from "@components/Common/Footer/Footer"; import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; -import CardArticle from "@components/CardArticle/CardArticle"; +import SideBar from "@components/SideBar/SideBar"; -import mockImgArticle from "assets/images/mock/mockImgArticle.png"; import rightArrow from "assets/icons/arrows/left-arrow.png"; -import yandexZen from "assets/icons/yandexZen.svg"; import cardCalendar from "assets/icons/cardCalendar.svg"; -import cardImg1 from "assets/images/mock/cardArticleItem.png"; +import yandexZen from "assets/icons/yandexZen.svg"; import cardImg2 from "assets/images/mock/cardArticleItem2.png"; import cardImg3 from "assets/images/mock/cardArticleItem3.png"; +import cardImg1 from "assets/images/mock/cardArticleItem.png"; +import mockImgArticle from "assets/images/mock/mockImgArticle.png"; import "./article.scss"; diff --git a/src/pages/AuthForCandidate/AuthForCandidate.jsx b/src/pages/AuthForCandidate/AuthForCandidate.jsx index 3b2fdab7..1e05d497 100644 --- a/src/pages/AuthForCandidate/AuthForCandidate.jsx +++ b/src/pages/AuthForCandidate/AuthForCandidate.jsx @@ -3,27 +3,28 @@ import { useDispatch, useSelector } from "react-redux"; import { useNavigate } from "react-router-dom"; import { loading, selectIsLoading } from "@redux/loaderSlice"; -import { apiRequest } from "@api/request"; import { auth, selectAuth, setUserInfo } from "@redux/outstaffingSlice"; import { setRole } from "@redux/roleSlice"; -import AuthHeader from "@components/Common/AuthHeader/AuthHeader"; -import SideBar from "@components/SideBar/SideBar"; -import CategoriesItem from "@components/CategoriesItem/CategoriesItem"; -import StepsForCandidate from "@components/StepsForCandidate/StepsForCandidate"; -import { Footer } from "@components/Common/Footer/Footer"; +import { apiRequest } from "@api/request"; + +import CategoriesItem from "@components/CategoriesItem/CategoriesItem"; +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"; -import BackEndImg from "assets/images/partnerProfile/personalBackEnd.svg"; -import FrontendImg from "assets/images/partnerProfile/PersonalFrontend.svg"; -import ArchitectureImg from "assets/images/partnerProfile/PersonalArchitecture.svg"; -import DesignImg from "assets/images/partnerProfile/PersonalDesign.svg"; -import TestImg from "assets/images/partnerProfile/PersonalTesters.svg"; -import AdminImg from "assets/images/partnerProfile/PersonalAdmin.svg"; -import ManageImg from "assets/images/partnerProfile/PersonalMng.svg"; -import CopyImg from "assets/images/partnerProfile/PersonalCopy.svg"; -import SmmImg from "assets/images/partnerProfile/PersonalSMM.svg"; -import authImg from "assets/images/partnerProfile/authCandidateFormImg.png"; import arrowBtn from "assets/icons/arrows/arrowRight.svg"; +import AdminImg from "assets/images/partnerProfile/PersonalAdmin.svg"; +import ArchitectureImg from "assets/images/partnerProfile/PersonalArchitecture.svg"; +import CopyImg from "assets/images/partnerProfile/PersonalCopy.svg"; +import DesignImg from "assets/images/partnerProfile/PersonalDesign.svg"; +import FrontendImg from "assets/images/partnerProfile/PersonalFrontend.svg"; +import ManageImg from "assets/images/partnerProfile/PersonalMng.svg"; +import SmmImg from "assets/images/partnerProfile/PersonalSMM.svg"; +import TestImg from "assets/images/partnerProfile/PersonalTesters.svg"; +import authImg from "assets/images/partnerProfile/authCandidateFormImg.png"; +import BackEndImg from "assets/images/partnerProfile/personalBackEnd.svg"; import "./authForCandidate.scss"; diff --git a/src/pages/AuthForDevelopers/AuthForDevelopers.jsx b/src/pages/AuthForDevelopers/AuthForDevelopers.jsx index de6ae380..7cb5da45 100644 --- a/src/pages/AuthForDevelopers/AuthForDevelopers.jsx +++ b/src/pages/AuthForDevelopers/AuthForDevelopers.jsx @@ -3,21 +3,22 @@ import { useSelector } from "react-redux"; import { Link, useNavigate } from "react-router-dom"; import { selectAuth } from "@redux/outstaffingSlice"; + import { scrollToForm } from "@utils/helper"; +import { AuthBox } from "@components/AuthBox/AuthBox"; +import AuthHeader from "@components/Common/AuthHeader/AuthHeader"; import { Footer } from "@components/Common/Footer/Footer"; import SideBar from "@components/SideBar/SideBar"; -import AuthHeader from "@components/Common/AuthHeader/AuthHeader"; import SliderWorkers from "@components/SliderWorkers/SliderWorkers"; -import { AuthBox } from "@components/AuthBox/AuthBox"; -import arrow from "assets/icons/arrows/arrow__login_page.png"; -import medium from "assets/images/medium_male_big.png"; -import cross from "assets/images/cross.png"; -import text from "assets/images/Body_Text.png"; import arrowBtn from "assets/icons/arrows/arrowRight.svg"; +import arrow from "assets/icons/arrows/arrow__login_page.png"; +import text from "assets/images/Body_Text.png"; import vector from "assets/images/Vector_Smart_Object.png"; import vectorBlack from "assets/images/Vector_Smart_Object_black.png"; +import cross from "assets/images/cross.png"; +import medium from "assets/images/medium_male_big.png"; import "./authForDevelopers.scss"; diff --git a/src/pages/AuthForPartners/AuthForPartners.jsx b/src/pages/AuthForPartners/AuthForPartners.jsx index c0b2615b..6dd080a5 100644 --- a/src/pages/AuthForPartners/AuthForPartners.jsx +++ b/src/pages/AuthForPartners/AuthForPartners.jsx @@ -3,21 +3,22 @@ import { useSelector } from "react-redux"; import { Link, useNavigate } from "react-router-dom"; import { selectAuth } from "@redux/outstaffingSlice"; + import { scrollToForm } from "@utils/helper"; -import { Footer } from "@components/Common/Footer/Footer"; import { AuthBox } from "@components/AuthBox/AuthBox"; -import SideBar from "@components/SideBar/SideBar"; import AuthHeader from "@components/Common/AuthHeader/AuthHeader"; +import { Footer } from "@components/Common/Footer/Footer"; +import SideBar from "@components/SideBar/SideBar"; import SliderWorkers from "@components/SliderWorkers/SliderWorkers"; -import arrow from "assets/icons/arrows/arrow__login_page.png"; -import authImg from "assets/images/auth_img.png"; -import cross from "assets/images/cross.png"; -import text from "assets/images/Body_Text.png"; import arrowBtn from "assets/icons/arrows/arrowRight.svg"; +import arrow from "assets/icons/arrows/arrow__login_page.png"; +import text from "assets/images/Body_Text.png"; import vector from "assets/images/Vector_Smart_Object.png"; import vectorBlack from "assets/images/Vector_Smart_Object_black.png"; +import authImg from "assets/images/auth_img.png"; +import cross from "assets/images/cross.png"; import "./authForPartners.scss"; diff --git a/src/pages/Blog/Blog.jsx b/src/pages/Blog/Blog.jsx index c2e853e0..5d2b109e 100644 --- a/src/pages/Blog/Blog.jsx +++ b/src/pages/Blog/Blog.jsx @@ -1,18 +1,18 @@ import React, { useState } from "react"; -import AuthHeader from "@components/Common/AuthHeader/AuthHeader"; -import SideBar from "@components/SideBar/SideBar"; -import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; -import { Footer } from "@components/Common/Footer/Footer"; import CardArticle from "@components/CardArticle/CardArticle"; +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"; import blogArrow from "assets/icons/arrows/blogArrow.svg"; -import cardImg1 from "assets/images/mock/cardArticleItem.png"; import cardImg2 from "assets/images/mock/cardArticleItem2.png"; import cardImg3 from "assets/images/mock/cardArticleItem3.png"; import cardImg4 from "assets/images/mock/cardArticleItem4.png"; import cardImg5 from "assets/images/mock/cardArticleItem5.png"; import cardImg6 from "assets/images/mock/cardArticleItem6.png"; +import cardImg1 from "assets/images/mock/cardArticleItem.png"; import "./blog.scss"; diff --git a/src/pages/Bookkeeping.js b/src/pages/Bookkeeping.js index 992f96f6..3ed7a617 100644 --- a/src/pages/Bookkeeping.js +++ b/src/pages/Bookkeeping.js @@ -1,6 +1,7 @@ import React from "react"; -import { BookkeepingTemplete } from "@components/features/bookkeeping/BookkeepingTemplete/BookkeepingTemplete"; + import { BookkeepingContent } from "@components/features/bookkeeping/BookkeepingContent/BookkeepingContent"; +import { BookkeepingTemplete } from "@components/features/bookkeeping/BookkeepingTemplete/BookkeepingTemplete"; const Bookkeeping = () => { return ( diff --git a/src/pages/FormPage/FormPage.jsx b/src/pages/FormPage/FormPage.jsx index 064a0a32..6f2a6ed3 100644 --- a/src/pages/FormPage/FormPage.jsx +++ b/src/pages/FormPage/FormPage.jsx @@ -1,23 +1,25 @@ import React, { useEffect } from "react"; -import { useDispatch, useSelector } from "react-redux"; -import { useParams, useNavigate, Navigate } from "react-router-dom"; import SVG from "react-inlinesvg"; +import { useDispatch, useSelector } from "react-redux"; +import { Navigate, useNavigate, useParams } from "react-router-dom"; -import { LEVELS, SKILLS } from "@utils/constants"; import { currentCandidate, selectCurrentCandidate, } from "@redux/outstaffingSlice"; -import { apiRequest } from "@api/request"; + +import { LEVELS, SKILLS } from "@utils/constants"; import { urlForLocal } from "@utils/helper"; -import Form from "@components/Form/Form"; +import { apiRequest } from "@api/request"; + import { Footer } from "@components/Common/Footer/Footer"; +import Form from "@components/Form/Form"; import { LogoutButton } from "@components/LogoutButton/LogoutButton"; import arrow from "assets/icons/arrows/left-arrow.png"; -import rectangle from "assets/images/rectangle_secondPage.png"; import telegramIcon from "assets/icons/telegram-icon.svg"; +import rectangle from "assets/images/rectangle_secondPage.png"; import "./formPage.scss"; diff --git a/src/pages/FrequentlyAskedQuestion/FrequentlyAskedQuestion.jsx b/src/pages/FrequentlyAskedQuestion/FrequentlyAskedQuestion.jsx index 723fb495..06936ae5 100644 --- a/src/pages/FrequentlyAskedQuestion/FrequentlyAskedQuestion.jsx +++ b/src/pages/FrequentlyAskedQuestion/FrequentlyAskedQuestion.jsx @@ -1,62 +1,62 @@ -import { useEffect, useState } from "react"; -import { useNavigate, useParams } from "react-router"; - -import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; -import SideBar from "@components/SideBar/SideBar"; -import AuthHeader from "@components/Common/AuthHeader/AuthHeader"; -import { Footer } from "@components/Common/Footer/Footer"; - -import arrowBtn from "assets/icons/arrows/arrowRight.svg"; - -import "./FrequentlyAskedQuestion.scss"; - -export const FrequentlyAskedQuestion = () => { - const params = useParams(); - const navigate = useNavigate(); - const [question, setQuestion] = useState({ - id: params.id, - title: "Это фриланс-платформа?", - answer: - "Нет, мы работаем только с юридическими лицами и индивидуальными предпринимателями и тщательно проверяем своих партнеров. Партнерами являются агентства, которые специализируются на оказании услуг в формате аутстафф-модели и обладают глубокой экспертизой в разработке и внедрении ИТ-проектов.", - }); - - useEffect(() => { - //тут запрос - }, []); - - return ( -
- - -
- -
{question.title}
-
navigate(-1)} - > -
- -
-

вернуться к списку вопросов

-
-
-

{question.answer}

-
-
-
-
- ); -}; +import { useEffect, useState } from "react"; +import { useNavigate, useParams } from "react-router"; + +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"; + +import arrowBtn from "assets/icons/arrows/arrowRight.svg"; + +import "./FrequentlyAskedQuestion.scss"; + +export const FrequentlyAskedQuestion = () => { + const params = useParams(); + const navigate = useNavigate(); + const [question, setQuestion] = useState({ + id: params.id, + title: "Это фриланс-платформа?", + answer: + "Нет, мы работаем только с юридическими лицами и индивидуальными предпринимателями и тщательно проверяем своих партнеров. Партнерами являются агентства, которые специализируются на оказании услуг в формате аутстафф-модели и обладают глубокой экспертизой в разработке и внедрении ИТ-проектов.", + }); + + useEffect(() => { + //тут запрос + }, []); + + return ( +
+ + +
+ +
{question.title}
+
navigate(-1)} + > +
+ +
+

вернуться к списку вопросов

+
+
+

{question.answer}

+
+
+
+
+ ); +}; diff --git a/src/pages/FrequentlyAskedQuestions/FrequentlyAskedQuestions.jsx b/src/pages/FrequentlyAskedQuestions/FrequentlyAskedQuestions.jsx index 43ad03ec..dfb8813a 100644 --- a/src/pages/FrequentlyAskedQuestions/FrequentlyAskedQuestions.jsx +++ b/src/pages/FrequentlyAskedQuestions/FrequentlyAskedQuestions.jsx @@ -1,117 +1,117 @@ -import React from "react"; - -import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; -import { Footer } from "@components/Common/Footer/Footer"; -import { FrequentlyAskedQuestionsItem } from "@components/FrequentlyAskedQuestionsItem/FrequentlyAskedQuestionsItem"; -import AuthHeader from "@components/Common/AuthHeader/AuthHeader"; -import SideBar from "@components/SideBar/SideBar"; - -import arrow from "assets/images/faq/arrow.svg"; - -import "./FrequentlyAskedQuestions.scss"; - -export const FrequentlyAskedQuestions = () => { - const rubrics = [ - { - title: "Общие вопросы ", - questions: [ - { - id: 1, - title: "Это фриланс-платформа?", - }, - { - id: 2, - title: - "Чем вы отличаетесь от традиционного процесса выбора исполнителя?", - }, - { - id: 3, - title: "Это фриланс-платформа?", - }, - { - id: 4, - title: - "Чем вы отличаетесь от традиционного процесса выбора исполнителя?", - }, - ], - }, - { - title: "Поиск специалиста", - questions: [ - { - id: 11, - title: "Это фриланс-платформа?", - }, - { - id: 22, - title: - "Чем вы отличаетесь от традиционного процесса выбора исполнителя?", - }, - { - id: 33, - title: "Это фриланс-платформа?", - }, - { - id: 44, - title: - "Чем вы отличаетесь от традиционного процесса выбора исполнителя?", - }, - ], - }, - { - title: "Бронирование специалиста", - questions: [ - { - id: 11, - title: "Это фриланс-платформа?", - }, - ], - }, - { - title: "Работа с выбранным специалистом", - questions: [ - { - id: 11, - title: - "Чем вы отличаетесь от традиционного процесса выбора исполнителя?", - }, - ], - }, - ]; - - return ( -
- - - -
- -
-
FAQ
-
- arrow -
-
- База знаний, которая дает ответы на популярные вопросы, тем самым - помогая нашим клиентам разобраться в продукте, сервисе и вариантах - сотрудничества с нашей компанией. -
-
-
- {rubrics.map((rubric, index) => ( - - ))} -
-
-
-
- ); -}; +import React from "react"; + +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"; +import SideBar from "@components/SideBar/SideBar"; + +import arrow from "assets/images/faq/arrow.svg"; + +import "./FrequentlyAskedQuestions.scss"; + +export const FrequentlyAskedQuestions = () => { + const rubrics = [ + { + title: "Общие вопросы ", + questions: [ + { + id: 1, + title: "Это фриланс-платформа?", + }, + { + id: 2, + title: + "Чем вы отличаетесь от традиционного процесса выбора исполнителя?", + }, + { + id: 3, + title: "Это фриланс-платформа?", + }, + { + id: 4, + title: + "Чем вы отличаетесь от традиционного процесса выбора исполнителя?", + }, + ], + }, + { + title: "Поиск специалиста", + questions: [ + { + id: 11, + title: "Это фриланс-платформа?", + }, + { + id: 22, + title: + "Чем вы отличаетесь от традиционного процесса выбора исполнителя?", + }, + { + id: 33, + title: "Это фриланс-платформа?", + }, + { + id: 44, + title: + "Чем вы отличаетесь от традиционного процесса выбора исполнителя?", + }, + ], + }, + { + title: "Бронирование специалиста", + questions: [ + { + id: 11, + title: "Это фриланс-платформа?", + }, + ], + }, + { + title: "Работа с выбранным специалистом", + questions: [ + { + id: 11, + title: + "Чем вы отличаетесь от традиционного процесса выбора исполнителя?", + }, + ], + }, + ]; + + return ( +
+ + + +
+ +
+
FAQ
+
+ arrow +
+
+ База знаний, которая дает ответы на популярные вопросы, тем самым + помогая нашим клиентам разобраться в продукте, сервисе и вариантах + сотрудничества с нашей компанией. +
+
+
+ {rubrics.map((rubric, index) => ( + + ))} +
+
+
+
+ ); +}; diff --git a/src/pages/Home/Home.jsx b/src/pages/Home/Home.jsx index b0425df0..9f96970e 100644 --- a/src/pages/Home/Home.jsx +++ b/src/pages/Home/Home.jsx @@ -1,16 +1,17 @@ -import React, { useState, useEffect } from "react"; +import React, { useEffect, useState } from "react"; import { useDispatch } from "react-redux"; import { Navigate } from "react-router-dom"; -import { apiRequest } from "@api/request"; import { profiles, tags } from "@redux/outstaffingSlice"; -import Outstaffing from "@components/Outstaffing/Outstaffing"; -import Description from "@components/Description/Description"; +import { apiRequest } from "@api/request"; + import { Footer } from "@components/Common/Footer/Footer"; -import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; -import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; +import Description from "@components/Description/Description"; import { Navigation } from "@components/Navigation/Navigation"; +import Outstaffing from "@components/Outstaffing/Outstaffing"; +import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; +import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; const Home = () => { if (localStorage.getItem("role_status") !== "18") { diff --git a/src/pages/PartnerAddRequest/PartnerAddRequest.js b/src/pages/PartnerAddRequest/PartnerAddRequest.js index 9ab78be9..31b39d9f 100644 --- a/src/pages/PartnerAddRequest/PartnerAddRequest.js +++ b/src/pages/PartnerAddRequest/PartnerAddRequest.js @@ -2,19 +2,20 @@ import React, { useEffect, useState } from "react"; import { useSelector } from "react-redux"; import { Link, Navigate, useNavigate } from "react-router-dom"; -import { apiRequest } from "@api/request"; import { getPartnerRequestInfo } from "@redux/outstaffingSlice"; -import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; -import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; +import { apiRequest } from "@api/request"; + import { Footer } from "@components/Common/Footer/Footer"; import { Navigation } from "@components/Navigation/Navigation"; +import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; +import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; import arrowDown from "assets/icons/arrows/selectArrow.png"; +import deleteIcon from "assets/icons/close.png"; import processImg from "assets/images/partnerProfile/partnerAddRequestFirstImg.png"; import reportImg from "assets/images/partnerProfile/partnerAddRequestSecondImg.png"; import documentsImg from "assets/images/partnerProfile/partnerAddRequestThirdInfo.png"; -import deleteIcon from "assets/icons/close.png"; import "./partnerAddRequest.scss"; diff --git a/src/pages/PartnerBid/PartnerBid.jsx b/src/pages/PartnerBid/PartnerBid.jsx index 946e9788..0bdab683 100644 --- a/src/pages/PartnerBid/PartnerBid.jsx +++ b/src/pages/PartnerBid/PartnerBid.jsx @@ -1,22 +1,25 @@ import React, { useEffect, useState } from "react"; +import { useDispatch, useSelector } from "react-redux"; import { Link, Navigate, useNavigate } from "react-router-dom"; -import { useSelector, useDispatch } from "react-redux"; + import { getPartnerRequestId, getPartnerRequests, setPartnerRequestId, setPartnerRequestInfo, } from "@redux/outstaffingSlice"; -import { apiRequest } from "@api/request"; + import { urlForLocal } from "@utils/helper"; -import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; -import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; +import { apiRequest } from "@api/request"; + +import { getCorrectDate } from "@components/Calendar/calendarHelper"; import { Footer } from "@components/Common/Footer/Footer"; -import { Navigation } from "@components/Navigation/Navigation"; import { Loader } from "@components/Common/Loader/Loader"; import ModalLayout from "@components/Common/ModalLayout/ModalLayout"; -import { getCorrectDate } from "@components/Calendar/calendarHelper"; +import { Navigation } from "@components/Navigation/Navigation"; +import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; +import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; import arrowSwitchDate from "assets/icons/arrows/arrowViewReport.png"; import backEndImg from "assets/images/QualificationInfo.png"; diff --git a/src/pages/PartnerEmployees/PartnerEmployees.js b/src/pages/PartnerEmployees/PartnerEmployees.js index a59cfb71..83b88c58 100644 --- a/src/pages/PartnerEmployees/PartnerEmployees.js +++ b/src/pages/PartnerEmployees/PartnerEmployees.js @@ -1,15 +1,16 @@ import React from "react"; -import { Link, Navigate } from "react-router-dom"; import { useSelector } from "react-redux"; +import { Link, Navigate } from "react-router-dom"; + import { getPartnerEmployees } from "@redux/outstaffingSlice"; -import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; -import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; import { Footer } from "@components/Common/Footer/Footer"; import { Navigation } from "@components/Navigation/Navigation"; +import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; +import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; -import imgInfo from "assets/images/emplInfo.png"; import rightArrow from "assets/icons/arrows/arrowRight.svg"; +import imgInfo from "assets/images/emplInfo.png"; import "./partnerEmployees.scss"; diff --git a/src/pages/PartnerRequests/PartnerRequests.jsx b/src/pages/PartnerRequests/PartnerRequests.jsx index 88c5f2dd..f1510f26 100644 --- a/src/pages/PartnerRequests/PartnerRequests.jsx +++ b/src/pages/PartnerRequests/PartnerRequests.jsx @@ -1,19 +1,21 @@ import React, { useEffect, useState } from "react"; -import { Link, Navigate } from "react-router-dom"; import { useDispatch } from "react-redux"; +import { Link, Navigate } from "react-router-dom"; + import { setPartnerRequestId, setPartnerRequests, } from "@redux/outstaffingSlice"; + import { apiRequest } from "@api/request"; -import { Navigation } from "@components/Navigation/Navigation"; -import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; -import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; -import { SliderWorkers } from "@components/SliderWorkers/SliderWorkers"; -import { Loader } from "@components/Common/Loader/Loader"; -import { Footer } from "@components/Common/Footer/Footer"; import BaseButton from "@components/Common/BaseButton/BaseButton"; +import { Footer } from "@components/Common/Footer/Footer"; +import { Loader } from "@components/Common/Loader/Loader"; +import { Navigation } from "@components/Navigation/Navigation"; +import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; +import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; +import { SliderWorkers } from "@components/SliderWorkers/SliderWorkers"; import cursorImg from "assets/icons/cursorImg.svg"; diff --git a/src/pages/PartnerSettings/PartnerSettings.jsx b/src/pages/PartnerSettings/PartnerSettings.jsx index 3460e4e1..5e864b9e 100644 --- a/src/pages/PartnerSettings/PartnerSettings.jsx +++ b/src/pages/PartnerSettings/PartnerSettings.jsx @@ -1,13 +1,13 @@ import React from "react"; +import BaseButton from "@components/Common/BaseButton/BaseButton"; import { Footer } from "@components/Common/Footer/Footer"; +import { Navigation } from "@components/Navigation/Navigation"; import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; -import { Navigation } from "@components/Navigation/Navigation"; -import BaseButton from "@components/Common/BaseButton/BaseButton"; -import kontur from "assets/images/logo/konturLogo.png"; import astral from "assets/images/logo/astralLogo.png"; +import kontur from "assets/images/logo/konturLogo.png"; import "./partnerSettings.scss"; diff --git a/src/pages/PartnerTreaties/PartnerTreaties.js b/src/pages/PartnerTreaties/PartnerTreaties.js index 61bd0ea5..8b6235ad 100644 --- a/src/pages/PartnerTreaties/PartnerTreaties.js +++ b/src/pages/PartnerTreaties/PartnerTreaties.js @@ -1,19 +1,19 @@ import React, { useState } from "react"; -import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; -import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; import { Footer } from "@components/Common/Footer/Footer"; import { Navigation } from "@components/Navigation/Navigation"; +import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; +import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; -import mainTabImg from "assets/icons/mainTreaties.png"; import actImg from "assets/icons/actTreaties.png"; -import checkImg from "assets/icons/checkTreaties.png"; -import arrowDown from "assets/icons/arrows/arrowDown.png"; -import logoAstral from "assets/images/logo/astralLogo.png"; import arrowItem from "assets/icons/arrows/arrowCheck.png"; +import arrowDown from "assets/icons/arrows/arrowDown.png"; +import checkImg from "assets/icons/checkTreaties.png"; import lock from "assets/icons/lock.svg"; import lockDone from "assets/icons/lockDone.svg"; +import mainTabImg from "assets/icons/mainTreaties.png"; import avatarMok from "assets/images/avatarMok.png"; +import logoAstral from "assets/images/logo/astralLogo.png"; import "./partnerTreaties.scss"; diff --git a/src/pages/PartnerСategories/PartnerСategories.jsx b/src/pages/PartnerСategories/PartnerСategories.jsx index 5c5ceb24..87a8697d 100644 --- a/src/pages/PartnerСategories/PartnerСategories.jsx +++ b/src/pages/PartnerСategories/PartnerСategories.jsx @@ -1,28 +1,28 @@ import React, { useState } from "react"; +import { useDispatch } from "react-redux"; import { Link } from "react-router-dom"; import { Navigate } from "react-router-dom"; -import { useDispatch } from "react-redux"; - -import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; -import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; -import { Footer } from "@components/Common/Footer/Footer"; import { setPartnerEmployees } from "@redux/outstaffingSlice"; -import BackEndImg from "assets/images/partnerProfile/personalBackEnd.svg"; -import FrontendImg from "assets/images/partnerProfile/PersonalFrontend.svg"; -import ArchitectureImg from "assets/images/partnerProfile/PersonalArchitecture.svg"; -import DesignImg from "assets/images/partnerProfile/PersonalDesign.svg"; -import TestImg from "assets/images/partnerProfile/PersonalTesters.svg"; -import AdminImg from "assets/images/partnerProfile/PersonalAdmin.svg"; -import ManageImg from "assets/images/partnerProfile/PersonalMng.svg"; -import CopyImg from "assets/images/partnerProfile/PersonalCopy.svg"; -import SmmImg from "assets/images/partnerProfile/PersonalSMM.svg"; +import { Footer } from "@components/Common/Footer/Footer"; +import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; +import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; + import rightArrow from "assets/icons/arrows/arrowRight.svg"; import avatarImg from "assets/images/avatarMok.png"; +import AdminImg from "assets/images/partnerProfile/PersonalAdmin.svg"; +import ArchitectureImg from "assets/images/partnerProfile/PersonalArchitecture.svg"; +import CopyImg from "assets/images/partnerProfile/PersonalCopy.svg"; +import DesignImg from "assets/images/partnerProfile/PersonalDesign.svg"; +import FrontendImg from "assets/images/partnerProfile/PersonalFrontend.svg"; +import ManageImg from "assets/images/partnerProfile/PersonalMng.svg"; +import SmmImg from "assets/images/partnerProfile/PersonalSMM.svg"; +import TestImg from "assets/images/partnerProfile/PersonalTesters.svg"; +import BackEndImg from "assets/images/partnerProfile/personalBackEnd.svg"; -import "./partnerСategories.scss"; import { Navigation } from "../../components/Navigation/Navigation"; +import "./partnerСategories.scss"; export const PartnerCategories = () => { const dispatch = useDispatch(); diff --git a/src/pages/Payouts/Payouts.js b/src/pages/Payouts/Payouts.js index 08c1777b..2ab1afdd 100644 --- a/src/pages/Payouts/Payouts.js +++ b/src/pages/Payouts/Payouts.js @@ -1,7 +1,7 @@ import React from "react"; -import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; import { Navigation } from "@components/Navigation/Navigation"; +import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; export const Payouts = () => { return ( diff --git a/src/pages/Profile/Profile.js b/src/pages/Profile/Profile.js index 28fcdcc9..da2af30b 100644 --- a/src/pages/Profile/Profile.js +++ b/src/pages/Profile/Profile.js @@ -2,20 +2,21 @@ import React, { useState } from "react"; import { useSelector } from "react-redux"; import { getProfileInfo } from "@redux/outstaffingSlice"; + import { urlForLocal } from "@utils/helper"; -import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; -import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; -import { Footer } from "@components/Common/Footer/Footer"; import { CardControl } from "@components/CardControl/CardControl"; +import { Footer } from "@components/Common/Footer/Footer"; import { Navigation } from "@components/Navigation/Navigation"; +import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; +import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; -import reportsIcon from "assets/images/reports.png"; -import summaryIcon from "assets/icons/summaryIcon.png"; -import timerIcon from "assets/icons/timerIcon.png"; import paymentIcon from "assets/icons/paymentIcon.png"; import settingIcon from "assets/icons/settingIcon.png"; +import summaryIcon from "assets/icons/summaryIcon.png"; +import timerIcon from "assets/icons/timerIcon.png"; import avatarMok from "assets/images/avatarMok.png"; +import reportsIcon from "assets/images/reports.png"; import "./profile.scss"; diff --git a/src/pages/ProfileCandidate/ProfileCandidate.js b/src/pages/ProfileCandidate/ProfileCandidate.js index 13011ad1..8fca2cbd 100644 --- a/src/pages/ProfileCandidate/ProfileCandidate.js +++ b/src/pages/ProfileCandidate/ProfileCandidate.js @@ -1,108 +1,108 @@ -import React, { useState } from "react"; - -import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; -import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; -import { CardControl } from "@components/CardControl/CardControl"; -import { Footer } from "@components/Common/Footer/Footer"; -import { HeadBottom } from "@components/features/Candidate-lk/HeadBottom"; - -import settingIcon from "assets/icons/settingIcon.png"; -import reportsIcon from "assets/images/reports.png"; -import noteIcon from "assets/images/note.png"; -import questionIcon from "assets/images/question.png"; -import medium_male from "assets/images/medium_male.png"; - -import "./ProfileCandidate.scss"; - -export const ProfileCandidate = () => { - const [candidatsCardsControl] = useState([ - { - path: "quiz", - img: reportsIcon, - title: "Мои тесты", - description: "У вас 122 часа
отработанных в этом месяце", - }, - { - path: "profile/settings", - img: settingIcon, - title: "Настройки аккаунта", - description: "Перейдите чтобы начать редактирование", - }, - ]); - return ( -
- -
- -
-
- -
- Добрый день, Дмитрий -
-
-
-
-
- -
-
-
- Открыто {3} теста из {12} -
-
-
-
-
- {candidatsCardsControl.map((item, index) => ( - - ))} -
-
-
-
-
-
Интсрукция:
-
- -
- Для подтверждения своих знаний - пройдите тестирование во - вкладке - “Мои тесты” -
-
-
-
-
Зачем?
-
- -
- Тесты itguild предназначены для того, чтобы подтверждать - навыки, которые вы указали у себя. -
-
-
-
-
-
-
-
-
- ); -}; +import React, { useState } from "react"; + +import { CardControl } from "@components/CardControl/CardControl"; +import { Footer } from "@components/Common/Footer/Footer"; +import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; +import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; +import { HeadBottom } from "@components/features/Candidate-lk/HeadBottom"; + +import settingIcon from "assets/icons/settingIcon.png"; +import medium_male from "assets/images/medium_male.png"; +import noteIcon from "assets/images/note.png"; +import questionIcon from "assets/images/question.png"; +import reportsIcon from "assets/images/reports.png"; + +import "./ProfileCandidate.scss"; + +export const ProfileCandidate = () => { + const [candidatsCardsControl] = useState([ + { + path: "quiz", + img: reportsIcon, + title: "Мои тесты", + description: "У вас 122 часа
отработанных в этом месяце", + }, + { + path: "profile/settings", + img: settingIcon, + title: "Настройки аккаунта", + description: "Перейдите чтобы начать редактирование", + }, + ]); + return ( +
+ +
+ +
+
+ +
+ Добрый день, Дмитрий +
+
+
+
+
+ +
+
+
+ Открыто {3} теста из {12} +
+
+
+
+
+ {candidatsCardsControl.map((item, index) => ( + + ))} +
+
+
+
+
+
Интсрукция:
+
+ +
+ Для подтверждения своих знаний - пройдите тестирование во + вкладке + “Мои тесты” +
+
+
+
+
Зачем?
+
+ +
+ Тесты itguild предназначены для того, чтобы подтверждать + навыки, которые вы указали у себя. +
+
+
+
+
+
+
+
+
+ ); +}; diff --git a/src/pages/ProjectTracker/ProjectTracker.js b/src/pages/ProjectTracker/ProjectTracker.js index c22c64b4..55f36ac1 100644 --- a/src/pages/ProjectTracker/ProjectTracker.js +++ b/src/pages/ProjectTracker/ProjectTracker.js @@ -1,40 +1,42 @@ import React, { useEffect, useRef, useState } from "react"; +import { useDispatch, useSelector } from "react-redux"; import { Link, useParams } from "react-router-dom"; -import { urlForLocal } from "@utils/helper"; -import { useDispatch, useSelector } from "react-redux"; -import { apiRequest } from "@api/request"; import { - getProjectBoard, + activeLoader, + deletePersonOnProject, getBoarderLoader, + getProjectBoard, modalToggle, moveProjectTask, + setColumnId, + setColumnName, setProjectBoardFetch, setToggleTab, - activeLoader, - setColumnName, - setColumnId, - deletePersonOnProject, } from "@redux/projectsTrackerSlice"; -import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; -import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; +import { urlForLocal } from "@utils/helper"; + +import { apiRequest } from "@api/request"; + import { Footer } from "@components/Common/Footer/Footer"; -import { Navigation } from "@components/Navigation/Navigation"; import { Loader } from "@components/Common/Loader/Loader"; import ModalTicket from "@components/Modal/Tracker/ModalTicket/ModalTicket"; import TrackerModal from "@components/Modal/TrackerModal/TrackerModal"; +import { Navigation } from "@components/Navigation/Navigation"; +import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; +import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; -import project from "assets/icons/trackerProject.svg"; -import tasks from "assets/icons/trackerTasks.svg"; import archive from "assets/icons/archiveTracker.svg"; -import selectArrow from "assets/icons/arrows/select.svg"; -import commentsBoard from "assets/icons/commentsBoard.svg"; -import filesBoard from "assets/icons/filesBoard.svg"; import arrow from "assets/icons/arrows/arrowCalendar.png"; +import selectArrow from "assets/icons/arrows/select.svg"; +import close from "assets/icons/closeProjectPersons.svg"; +import commentsBoard from "assets/icons/commentsBoard.svg"; import del from "assets/icons/delete.svg"; import edit from "assets/icons/edit.svg"; -import close from "assets/icons/closeProjectPersons.svg"; +import filesBoard from "assets/icons/filesBoard.svg"; +import project from "assets/icons/trackerProject.svg"; +import tasks from "assets/icons/trackerTasks.svg"; export const ProjectTracker = () => { const dispatch = useDispatch(); diff --git a/src/pages/RegistrationForCandidate/RegistrationForCandidate.js b/src/pages/RegistrationForCandidate/RegistrationForCandidate.js index b7219c7b..1e609f0c 100644 --- a/src/pages/RegistrationForCandidate/RegistrationForCandidate.js +++ b/src/pages/RegistrationForCandidate/RegistrationForCandidate.js @@ -1,12 +1,12 @@ import React from "react"; 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"; -import { Footer } from "@components/Common/Footer/Footer"; -import BackEndImg from "assets/images/partnerProfile/personalBackEnd.svg"; import arrowBtn from "assets/icons/arrows/arrowRight.svg"; +import BackEndImg from "assets/images/partnerProfile/personalBackEnd.svg"; import "./registationForCandidate.scss"; diff --git a/src/pages/SingleReportPage/SingleReportPage.js b/src/pages/SingleReportPage/SingleReportPage.js index fea94347..21f3b05e 100644 --- a/src/pages/SingleReportPage/SingleReportPage.js +++ b/src/pages/SingleReportPage/SingleReportPage.js @@ -1,12 +1,12 @@ import React from "react"; -import { useNavigate } from "react-router"; import SVG from "react-inlinesvg"; +import { useNavigate } from "react-router"; -import { TaskItem } from "@components/TaskItem/TaskItem"; import { LogoutButton } from "@components/LogoutButton/LogoutButton"; +import { TaskItem } from "@components/TaskItem/TaskItem"; -import arrowLeft from "assets/icons/arrows/left-arrow.png"; import dateArrowIcon from "assets/icons/arrows/dateArrow.svg"; +import arrowLeft from "assets/icons/arrows/left-arrow.png"; import calendarIcon from "assets/icons/calendar.svg"; import "./singleReportPage.scss"; diff --git a/src/pages/Summary/Summary.js b/src/pages/Summary/Summary.js index 04778e14..5e00d31d 100644 --- a/src/pages/Summary/Summary.js +++ b/src/pages/Summary/Summary.js @@ -2,17 +2,19 @@ import React, { useEffect, useState } from "react"; import { useSelector } from "react-redux"; import { Navigate } from "react-router-dom"; -import { apiRequest } from "@api/request"; -import { urlForLocal } from "@utils/helper"; import { getProfileInfo } from "@redux/outstaffingSlice"; -import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; -import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; +import { urlForLocal } from "@utils/helper"; + +import { apiRequest } from "@api/request"; + import { Footer } from "@components/Common/Footer/Footer"; import { Navigation } from "@components/Navigation/Navigation"; +import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; +import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; -import arrow from "assets/icons/arrows/left-arrow.png"; import rightArrow from "assets/icons/arrows/arrowRight.svg"; +import arrow from "assets/icons/arrows/left-arrow.png"; import gitImgItem from "assets/icons/gitItemImg.svg"; import "./summary.scss"; diff --git a/src/pages/Tracker/Tracker.js b/src/pages/Tracker/Tracker.js index 80fff115..43701068 100644 --- a/src/pages/Tracker/Tracker.js +++ b/src/pages/Tracker/Tracker.js @@ -2,28 +2,30 @@ import React, { useEffect, useState } from "react"; import { useDispatch, useSelector } from "react-redux"; import { - setAllProjects, getProjects, - setToggleTab, getToggleTab, modalToggle, + setAllProjects, + setToggleTab, } from "@redux/projectsTrackerSlice"; + import { urlForLocal } from "@utils/helper"; + import { apiRequest } from "@api/request"; -import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; -import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; -import { Footer } from "@components/Common/Footer/Footer"; -import { Navigation } from "@components/Navigation/Navigation"; -import TrackerModal from "@components/Modal/TrackerModal/TrackerModal"; -import ProjectTiket from "@components/ProjectTiket/ProjectTiket"; import { getCorrectDate } from "@components/Calendar/calendarHelper"; +import { Footer } from "@components/Common/Footer/Footer"; import { Loader } from "@components/Common/Loader/Loader"; +import TrackerModal from "@components/Modal/TrackerModal/TrackerModal"; +import { Navigation } from "@components/Navigation/Navigation"; +import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; +import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; +import ProjectTiket from "@components/ProjectTiket/ProjectTiket"; -import project from "assets/icons/trackerProject.svg"; -import tasks from "assets/icons/trackerTasks.svg"; import archive from "assets/icons/archiveTracker.svg"; import search from "assets/icons/serchIcon.png"; +import project from "assets/icons/trackerProject.svg"; +import tasks from "assets/icons/trackerTasks.svg"; import noProjects from "assets/images/noProjects.png"; import "./tracker.scss"; diff --git a/src/pages/ViewReport/ViewReport.jsx b/src/pages/ViewReport/ViewReport.jsx index cb3864f3..b984f102 100644 --- a/src/pages/ViewReport/ViewReport.jsx +++ b/src/pages/ViewReport/ViewReport.jsx @@ -1,21 +1,21 @@ import React, { useEffect, useState } from "react"; import { Link, Navigate, useParams } from "react-router-dom"; -import { Loader } from "@components/Common/Loader/Loader"; -import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; -import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; -import { Footer } from "@components/Common/Footer/Footer"; -import { Navigation } from "@components/Navigation/Navigation"; - import { apiRequest } from "@api/request"; + import { getCorrectDate, getCreatedDate, hourOfNum, } from "@components/Calendar/calendarHelper"; +import { Footer } from "@components/Common/Footer/Footer"; +import { Loader } from "@components/Common/Loader/Loader"; +import { Navigation } from "@components/Navigation/Navigation"; +import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; +import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; -import arrow from "assets/icons/arrows/left-arrow.png"; import arrowSwitchDate from "assets/icons/arrows/arrowViewReport.png"; +import arrow from "assets/icons/arrows/left-arrow.png"; import "./viewReport.scss"; diff --git a/src/pages/quiz/PassingTests.js b/src/pages/quiz/PassingTests.js index 726c48b4..48ff4238 100644 --- a/src/pages/quiz/PassingTests.js +++ b/src/pages/quiz/PassingTests.js @@ -1,107 +1,108 @@ -import React, { useState } from "react"; -import { useSelector } from "react-redux"; -import { Link } from "react-router-dom"; -import { completedTestSelector, selectedTest } from "@redux/quizSlice"; - -import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; -import { HeadBottom } from "@components/features/Candidate-lk/HeadBottom"; -import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; -import { Footer } from "@components/Common/Footer/Footer"; -import { QuizPassingInformation } from "@components/features/quiz/Quiz-passing-information"; -import { CardIntroduction } from "@components/features/quiz/Card-introduction"; -import { TaskQuiz } from "@components/features/quiz/Task"; -import { BlockCompletedTest } from "@components/features/quiz/BlockCompletedTest"; - -export const PassingTests = () => { - //const selectedTest = useSelector(selectedTest) - - if ("") { - } - - const time = new Date(); - time.setSeconds(time.getSeconds() + 600); //600 - кол-во секунд для прохождения теста - - const [startTest, setStartTest] = useState(false); - const completedTest = useSelector(completedTestSelector); - - const introduction = [ - { - title: "Зачем?", - description: - "Тесты itguild предназначены для того, чтобы подтверждать навыки, которые вы указали у себя.", - }, - { - title: "Почему именно тестирование?", - description: - "Тесты itguild заменяют первое техническое собеседование по любой вакансии.", - }, - { - title: "Какие тесты нужно проходить?", - description: - "Здесь все довольно просто — следует проходить тесты по инструментам и навыкам, которыми вы владеете.", - }, - ]; - - return ( -
- - -
- -
- Тестирование в позиции Junior разработчик{" "} -
-
- -
- - {!completedTest && ( - <> - {startTest && ( -
- Тестирование началось -
- )} - {startTest ? ( - - ) : ( -
- {introduction.map((item, i) => ( - - ))} -
- )} - {!startTest && ( -
- ИЛИ выполните тестове задание , без - прохождения тестов -
- )} - - )} - {completedTest && ( - <> -
- Тестирование завершено -
- - - )} -
-
-
- ); -}; +import React, { useState } from "react"; +import { useSelector } from "react-redux"; +import { Link } from "react-router-dom"; + +import { completedTestSelector, selectedTest } from "@redux/quizSlice"; + +import { Footer } from "@components/Common/Footer/Footer"; +import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; +import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; +import { HeadBottom } from "@components/features/Candidate-lk/HeadBottom"; +import { BlockCompletedTest } from "@components/features/quiz/BlockCompletedTest"; +import { CardIntroduction } from "@components/features/quiz/Card-introduction"; +import { QuizPassingInformation } from "@components/features/quiz/Quiz-passing-information"; +import { TaskQuiz } from "@components/features/quiz/Task"; + +export const PassingTests = () => { + //const selectedTest = useSelector(selectedTest) + + if ("") { + } + + const time = new Date(); + time.setSeconds(time.getSeconds() + 600); //600 - кол-во секунд для прохождения теста + + const [startTest, setStartTest] = useState(false); + const completedTest = useSelector(completedTestSelector); + + const introduction = [ + { + title: "Зачем?", + description: + "Тесты itguild предназначены для того, чтобы подтверждать навыки, которые вы указали у себя.", + }, + { + title: "Почему именно тестирование?", + description: + "Тесты itguild заменяют первое техническое собеседование по любой вакансии.", + }, + { + title: "Какие тесты нужно проходить?", + description: + "Здесь все довольно просто — следует проходить тесты по инструментам и навыкам, которыми вы владеете.", + }, + ]; + + return ( +
+ + +
+ +
+ Тестирование в позиции Junior разработчик{" "} +
+
+ +
+ + {!completedTest && ( + <> + {startTest && ( +
+ Тестирование началось +
+ )} + {startTest ? ( + + ) : ( +
+ {introduction.map((item, i) => ( + + ))} +
+ )} + {!startTest && ( +
+ ИЛИ выполните тестове задание , без + прохождения тестов +
+ )} + + )} + {completedTest && ( + <> +
+ Тестирование завершено +
+ + + )} +
+
+
+ ); +}; diff --git a/src/pages/quiz/QuizPage.js b/src/pages/quiz/QuizPage.js index 7c3228f3..dac31b9f 100644 --- a/src/pages/quiz/QuizPage.js +++ b/src/pages/quiz/QuizPage.js @@ -1,26 +1,28 @@ import React, { useEffect, useState } from "react"; import { useDispatch, useSelector } from "react-redux"; import { Link } from "react-router-dom"; + import { questionnairesSelector, setQuestionnaires } from "@redux/quizSlice"; + import { apiRequest } from "@api/request"; +import CategoriesItem from "@components/CategoriesItem/CategoriesItem"; +import { Footer } from "@components/Common/Footer/Footer"; +import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; import { HeadBottom } from "@components/features/Candidate-lk/HeadBottom"; -import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; -import { SelectedCategory } from "@components/features/quiz/SelectedCategory"; -import { Footer } from "@components/Common/Footer/Footer"; import { CardAvailableTest } from "@components/features/quiz/CardAviableTest"; -import CategoriesItem from "@components/CategoriesItem/CategoriesItem"; +import { SelectedCategory } from "@components/features/quiz/SelectedCategory"; -import BackEndImg from "assets/images/partnerProfile/personalBackEnd.svg"; -import FrontendImg from "assets/images/partnerProfile/PersonalFrontend.svg"; -import ArchitectureImg from "assets/images/partnerProfile/PersonalArchitecture.svg"; -import DesignImg from "assets/images/partnerProfile/PersonalDesign.svg"; -import TestImg from "assets/images/partnerProfile/PersonalTesters.svg"; import AdminImg from "assets/images/partnerProfile/PersonalAdmin.svg"; -import ManageImg from "assets/images/partnerProfile/PersonalMng.svg"; +import ArchitectureImg from "assets/images/partnerProfile/PersonalArchitecture.svg"; import CopyImg from "assets/images/partnerProfile/PersonalCopy.svg"; +import DesignImg from "assets/images/partnerProfile/PersonalDesign.svg"; +import FrontendImg from "assets/images/partnerProfile/PersonalFrontend.svg"; +import ManageImg from "assets/images/partnerProfile/PersonalMng.svg"; import SmmImg from "assets/images/partnerProfile/PersonalSMM.svg"; +import TestImg from "assets/images/partnerProfile/PersonalTesters.svg"; +import BackEndImg from "assets/images/partnerProfile/personalBackEnd.svg"; import "./quiz-page.scss"; diff --git a/src/pages/quiz/QuizReportPage.js b/src/pages/quiz/QuizReportPage.js index 0f647ae4..4373462f 100644 --- a/src/pages/quiz/QuizReportPage.js +++ b/src/pages/quiz/QuizReportPage.js @@ -1,46 +1,46 @@ -import React from "react"; -import { useNavigate } from "react-router-dom"; -import { useSelector } from "react-redux"; - -import { selectedTest } from "@redux/quizSlice"; - -import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; -import { HeadBottom } from "@components/features/Candidate-lk/HeadBottom"; -import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; -import { QuizReport } from "@components/features/quiz/QuizReport"; -import { Footer } from "@components/Common/Footer/Footer"; -import { AlertResult } from "@components/features/quiz/AlertResult"; - -export const QuizReportPage = () => { - const test = useSelector(selectedTest); - - let navigate = useNavigate(); - if (!test) { - navigate("/quiz"); - } - - return ( -
- - -
- -
- Отчет по тестированию позиции Junior разработчик{" "} -
-
- -
- - -
-
-
- ); -}; +import React from "react"; +import { useSelector } from "react-redux"; +import { useNavigate } from "react-router-dom"; + +import { selectedTest } from "@redux/quizSlice"; + +import { Footer } from "@components/Common/Footer/Footer"; +import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; +import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; +import { HeadBottom } from "@components/features/Candidate-lk/HeadBottom"; +import { AlertResult } from "@components/features/quiz/AlertResult"; +import { QuizReport } from "@components/features/quiz/QuizReport"; + +export const QuizReportPage = () => { + const test = useSelector(selectedTest); + + let navigate = useNavigate(); + if (!test) { + navigate("/quiz"); + } + + return ( +
+ + +
+ +
+ Отчет по тестированию позиции Junior разработчик{" "} +
+
+ +
+ + +
+
+
+ ); +}; diff --git a/src/redux/loaderSlice.js b/src/redux/loaderSlice.js index 1b629307..8280010a 100644 --- a/src/redux/loaderSlice.js +++ b/src/redux/loaderSlice.js @@ -1,11 +1,11 @@ -import { createSlice } from '@reduxjs/toolkit'; +import { createSlice } from "@reduxjs/toolkit"; const initialState = { isLoading: false, }; export const loaderSlice = createSlice({ - name: 'loader', + name: "loader", initialState, reducers: { loading: (state, action) => { diff --git a/src/redux/outstaffingSlice.js b/src/redux/outstaffingSlice.js index 98043f61..f6f60f69 100644 --- a/src/redux/outstaffingSlice.js +++ b/src/redux/outstaffingSlice.js @@ -1,23 +1,23 @@ -import { createSlice } from '@reduxjs/toolkit'; +import { createSlice } from "@reduxjs/toolkit"; const initialState = { tags: [], profiles: [], - filteredCandidates:null, + filteredCandidates: null, selectedItems: [], currentCandidate: {}, auth: false, positionId: null, profileInfo: {}, - reportsDates: '', + reportsDates: "", partnerEmployees: [], partnerRequestId: null, partnerRequests: [], - partnerRequestInfo: {} + partnerRequestInfo: {}, }; export const outstaffingSlice = createSlice({ - name: 'outstaffing', + name: "outstaffing", initialState, reducers: { tags: (state, action) => { @@ -51,35 +51,55 @@ export const outstaffingSlice = createSlice({ state.reportsDates = action.payload; }, setPartnerEmployees: (state, action) => { - state.partnerEmployees = action.payload + state.partnerEmployees = action.payload; }, setPartnerRequestId: (state, action) => { - state.partnerRequestId = action.payload + state.partnerRequestId = action.payload; }, setPartnerRequests: (state, action) => { - state.partnerRequests = action.payload + state.partnerRequests = action.payload; }, setPartnerRequestInfo: (state, action) => { - state.partnerRequestInfo = action.payload - } + state.partnerRequestInfo = action.payload; + }, }, }); -export const { tags, profiles, selectedItems, auth, currentCandidate, filteredCandidates, setPositionId, setUserInfo, setProfileInfo, setReportsDates, setPartnerEmployees, setPartnerRequestId, setPartnerRequests, setPartnerRequestInfo } = outstaffingSlice.actions; +export const { + tags, + profiles, + selectedItems, + auth, + currentCandidate, + filteredCandidates, + setPositionId, + setUserInfo, + setProfileInfo, + setReportsDates, + setPartnerEmployees, + setPartnerRequestId, + setPartnerRequests, + setPartnerRequestInfo, +} = outstaffingSlice.actions; export const selectProfiles = (state) => state.outstaffing.profiles; export const selectTags = (state) => state.outstaffing.tags; -export const selectFilteredCandidates = (state) => state.outstaffing.filteredCandidates; +export const selectFilteredCandidates = (state) => + state.outstaffing.filteredCandidates; export const selectItems = (state) => state.outstaffing.selectedItems; -export const selectCurrentCandidate = (state) => state.outstaffing.currentCandidate; +export const selectCurrentCandidate = (state) => + state.outstaffing.currentCandidate; export const selectAuth = (state) => state.outstaffing.auth; export const getPositionId = (state) => state.outstaffing.positionId; export const getProfileInfo = (state) => state.outstaffing.profileInfo; -export const getPartnerRequestInfo = (state) => state.outstaffing.partnerRequestInfo; +export const getPartnerRequestInfo = (state) => + state.outstaffing.partnerRequestInfo; export const selectUserInfo = (state) => state.outstaffing.userInfo; export const getReportsDates = (state) => state.outstaffing.reportsDates; -export const getPartnerEmployees = (state) => state.outstaffing.partnerEmployees; -export const getPartnerRequestId = (state) => state.outstaffing.partnerRequestId; +export const getPartnerEmployees = (state) => + state.outstaffing.partnerEmployees; +export const getPartnerRequestId = (state) => + state.outstaffing.partnerRequestId; export const getPartnerRequests = (state) => state.outstaffing.partnerRequests; export default outstaffingSlice.reducer; diff --git a/src/redux/projectsTrackerSlice.js b/src/redux/projectsTrackerSlice.js index b4fe55fd..7d23a60c 100644 --- a/src/redux/projectsTrackerSlice.js +++ b/src/redux/projectsTrackerSlice.js @@ -1,4 +1,5 @@ import { createAsyncThunk, createSlice } from "@reduxjs/toolkit"; + import { apiRequest } from "../api/request"; const initialState = { @@ -8,7 +9,7 @@ const initialState = { modalType: "", boardLoader: false, columnName: "", - columnId: 0 + columnId: 0, }; export const setProjectBoardFetch = createAsyncThunk("userInfo", (id) => @@ -35,11 +36,13 @@ export const projectsTrackerSlice = createSlice({ } }); }, - deletePersonOnProject: (state,action) => { - state.projectBoard.projectUsers = state.projectBoard.projectUsers.filter((person) => person.user_id !== action.payload) + deletePersonOnProject: (state, action) => { + state.projectBoard.projectUsers = state.projectBoard.projectUsers.filter( + (person) => person.user_id !== action.payload + ); }, addPersonToProject: (state, action) => { - state.projectBoard.projectUsers.push(action.payload) + state.projectBoard.projectUsers.push(action.payload); }, activeLoader: (state) => { state.boardLoader = true; @@ -64,10 +67,10 @@ export const projectsTrackerSlice = createSlice({ }); }, setColumnName: (state, action) => { - state.columnName = action.payload + state.columnName = action.payload; }, setColumnId: (state, action) => { - state.columnId = action.payload + state.columnId = action.payload; }, editProjectName: (state, action) => { state.projects.forEach((project) => { @@ -79,9 +82,9 @@ export const projectsTrackerSlice = createSlice({ editColumnName: (state, action) => { state.projectBoard.columns.forEach((column) => { if (column.id === action.payload.id) { - column.title = action.payload.title + column.title = action.payload.title; } - }) + }); }, modalToggle: (state, action) => { state.modalType = action.payload; @@ -108,7 +111,7 @@ export const { editColumnName, setColumnId, deletePersonOnProject, - addPersonToProject + addPersonToProject, } = projectsTrackerSlice.actions; export const getProjects = (state) => state.tracker.projects; diff --git a/src/redux/quizSlice.js b/src/redux/quizSlice.js index 8175b7b8..845e14af 100644 --- a/src/redux/quizSlice.js +++ b/src/redux/quizSlice.js @@ -1,123 +1,125 @@ -import {createAsyncThunk, createSlice} from '@reduxjs/toolkit'; - -import {apiRequest} from "../api/request"; +import { createAsyncThunk, createSlice } from "@reduxjs/toolkit"; +import { apiRequest } from "../api/request"; const initialState = { answers: [ { - "id": "12", - "question_id": "7", - "answer_body": "Нsdf sfd fds sdf sf sfsdf sdfеск вsdffsdfsdf sf sdf sdfsdfsdfsdfdsjknsdkf dssdjf sdfbsdhf sd hjdsfv sdhjvар1 отв1 истина" + id: "12", + question_id: "7", + answer_body: + "Нsdf sfd fds sdf sf sfsdf sdfеск вsdffsdfsdf sf sdf sdfsdfsdfsdfdsjknsdkf dssdjf sdfbsdhf sd hjdsfv sdhjvар1 отв1 истина", }, { - "id": "23", - "question_id": "7", - "answer_body": "Неск вар1 отв1 истина" + id: "23", + question_id: "7", + answer_body: "Неск вар1 отв1 истина", }, { - "id": "233", - "question_id": "7", - "answer_body": "lorem sdfdsf dfs sdf " + id: "233", + question_id: "7", + answer_body: "lorem sdfdsf dfs sdf ", }, ], questionnaires: [], questions: [ { - "id": "4", - "question_type_id": "3", - "question_body": "Для чего в Python используется встроенная функция enumerate()?", - "question_priority": null, - "next_question": null, - "time_limit": "00:22:00" + id: "4", + question_type_id: "3", + question_body: + "Для чего в Python используется встроенная функция enumerate()?", + question_priority: null, + next_question: null, + time_limit: "00:22:00", }, { - "id": "24", - "question_type_id": "3", - "question_body": "Для чего в Python dfsf троенная функция enumerate()?", - "question_priority": null, - "next_question": null, - "time_limit": "00:22:00" + id: "24", + question_type_id: "3", + question_body: "Для чего в Python dfsf троенная функция enumerate()?", + question_priority: null, + next_question: null, + time_limit: "00:22:00", }, { - "id": "41", - "question_type_id": "3", - "question_body": "Для чегоsdfsdfя функция enumerate()?", - "question_priority": null, - "next_question": null, - "time_limit": "00:22:00" + id: "41", + question_type_id: "3", + question_body: "Для чегоsdfsdfя функция enumerate()?", + question_priority: null, + next_question: null, + time_limit: "00:22:00", }, { - "id": "5", - "question_type_id": '2', - "question_body": "Один ответ2", - "question_priority": null, - "next_question": null, - "time_limit": "00:22:00" - } + id: "5", + question_type_id: "2", + question_body: "Один ответ2", + question_priority: null, + next_question: null, + time_limit: "00:22:00", + }, ], - selectedTest: { - "user_id": 1, - "uuid": "d222f858-60fd-47fb-8731-dc9d5fc384c5", - "score": 11, - "status": 2, - "percent_correct_answers": 0.25, - "testing_date": "2022-03-17 11:14:22", - "questionnaire_title": "Кат1 Анкета 1 активна" + selectedTest: { + user_id: 1, + uuid: "d222f858-60fd-47fb-8731-dc9d5fc384c5", + score: 11, + status: 2, + percent_correct_answers: 0.25, + testing_date: "2022-03-17 11:14:22", + questionnaire_title: "Кат1 Анкета 1 активна", }, - selectedAnswers:{}, + selectedAnswers: {}, completedTest: false, result: null, isLoading: false, dataQuestionnairesOfUser: [], passedTests: [], - - userInfo: null, + userInfo: null, }; -export const setUserInfo = createAsyncThunk( - 'userInfo', - (id) => - apiRequest(`/profile/get-main-data?user_id=${id}`) +export const setUserInfo = createAsyncThunk("userInfo", (id) => + apiRequest(`/profile/get-main-data?user_id=${id}`) ); export const fetchUserAnswersMany = createAsyncThunk( - 'answersUserMany', - (checkedValues) => - apiRequest('/user-response/set-responses', {method: 'POST', data: {"userResponses": checkedValues}}) + "answersUserMany", + (checkedValues) => + apiRequest("/user-response/set-responses", { + method: "POST", + data: { userResponses: checkedValues }, + }) ); export const fetchUserAnswerOne = createAsyncThunk( - 'answersUserOne', - (checkedValues) => - apiRequest('/user-response/set-response', {method: 'POST', data: checkedValues[0]}) + "answersUserOne", + (checkedValues) => + apiRequest("/user-response/set-response", { + method: "POST", + data: checkedValues[0], + }) ); -export const fetchGetAnswers = createAsyncThunk( - 'answers', - (question_id) => - apiRequest(`/answer/get-answers?question_id=${question_id}`) +export const fetchGetAnswers = createAsyncThunk("answers", (question_id) => + apiRequest(`/answer/get-answers?question_id=${question_id}`) ); -export const fetchResultTest = createAsyncThunk( - 'result', - (uuid) => - apiRequest(`/user-questionnaire/questionnaire-completed?user_questionnaire_uuid=${uuid}`) +export const fetchResultTest = createAsyncThunk("result", (uuid) => + apiRequest( + `/user-questionnaire/questionnaire-completed?user_questionnaire_uuid=${uuid}` + ) ); export const quizSlice = createSlice({ - name: 'quiz', + name: "quiz", initialState, reducers: { setQuestionnaires: (state, action) => { state.questionnaires = action.payload; }, setSelectedTest: (state, action) => { - state.selectedTest = action.payload + state.selectedTest = action.payload; }, setCompleteTest: (state, action) => { - state.completedTest = true - } + state.completedTest = true; + }, }, extraReducers: { [setUserInfo.fulfilled]: (state, action) => { @@ -132,21 +134,18 @@ export const quizSlice = createSlice({ }, }); -export const {setQuestionnaires, setSelectedTest, setCompleteTest} = quizSlice.actions; - +export const { setQuestionnaires, setSelectedTest, setCompleteTest } = + quizSlice.actions; export const answersSelector = (state) => state.quiz.answers; export const questionnairesSelector = (state) => state.quiz.questionnaires; -export const selectedAnswersSelector = (state) => state.quiz.selectedAnswers -export const questionsSelector = (state) => state.quiz.questions -export const completedTestSelector = (state) => state.quiz.completedTest +export const selectedAnswersSelector = (state) => state.quiz.selectedAnswers; +export const questionsSelector = (state) => state.quiz.questions; +export const completedTestSelector = (state) => state.quiz.completedTest; export const selectResult = (state) => state.quiz.result; export const selectedTest = (state) => state.quiz.selectedTest; export const selectPassedTests = (state) => state.quiz.passedTests; export const selectUserInfo = (state) => state.quiz.userInfo; - - export default quizSlice.reducer; - diff --git a/src/redux/roleSlice.js b/src/redux/roleSlice.js index e3354344..89713900 100644 --- a/src/redux/roleSlice.js +++ b/src/redux/roleSlice.js @@ -1,11 +1,11 @@ -import { createSlice } from '@reduxjs/toolkit'; +import { createSlice } from "@reduxjs/toolkit"; const initialState = { role: null, }; export const roleSlice = createSlice({ - name: 'role', + name: "role", initialState, reducers: { setRole: (state, action) => { diff --git a/src/store/store.js b/src/store/store.js index f9067e1b..da9daa3e 100644 --- a/src/store/store.js +++ b/src/store/store.js @@ -1,10 +1,11 @@ import { configureStore } from "@reduxjs/toolkit"; -import outstaffingReducer from "../redux/outstaffingSlice"; + import loaderReducer from "../redux/loaderSlice"; -import roleReducer from "../redux/roleSlice"; -import reportReducer from "../redux/reportSlice"; -import quizSlice from "../redux/quizSlice"; +import outstaffingReducer from "../redux/outstaffingSlice"; import projectsTrackerSlice from "../redux/projectsTrackerSlice"; +import quizSlice from "../redux/quizSlice"; +import reportReducer from "../redux/reportSlice"; +import roleReducer from "../redux/roleSlice"; export const store = configureStore({ reducer: { diff --git a/src/utils/constants.js b/src/utils/constants.js index e8918c47..9520b7a9 100644 --- a/src/utils/constants.js +++ b/src/utils/constants.js @@ -1,15 +1,15 @@ export const LEVELS = { - 1: 'Junior', - 2: 'Middle', - 3: 'Middle+', - 4: 'Senior', + 1: "Junior", + 2: "Middle", + 3: "Middle+", + 4: "Senior", }; export const SKILLS = { - 1: 'Back end - разработчик', - 2: 'Front end - разработчик', - 3: 'Маркетолог', - 4: 'Smm - специалист', - 5: 'Дизайнер', - 6: 'Копирайтер', + 1: "Back end - разработчик", + 2: "Front end - разработчик", + 3: "Маркетолог", + 4: "Smm - специалист", + 5: "Дизайнер", + 6: "Копирайтер", }; From 9e242ddf5d81a7a20e22cc4addca023205ccc379 Mon Sep 17 00:00:00 2001 From: MaxOvs19 Date: Wed, 31 May 2023 11:24:46 +0300 Subject: [PATCH 2/3] Added eslint --- .eslintrc.json | 21 + package-lock.json | 606 ++++-------------- package.json | 5 +- .../Common/AuthHeader/AuthHeader.jsx | 2 +- src/components/Description/Description.jsx | 2 +- src/components/Form/Form.jsx | 2 + .../FreeDevelopers/FreeDevelopers.jsx | 2 +- .../Modal/Tracker/ModalTicket/ModalTicket.jsx | 12 +- .../TicketFullScreen/TicketFullScreen.jsx | 12 +- .../Modal/TrackerModal/TrackerModal.jsx | 8 +- .../ProfileCalendarComponent.jsx | 1 + src/components/ProjectTiket/ProjectTiket.jsx | 2 +- .../ProtectedRoute/ProtectedRoute.js | 3 +- src/components/ReportForm/ReportForm.jsx | 2 +- src/components/ShortReport/ShortReport.jsx | 2 +- .../quiz/{AlertResult.js => AlertResult.jsx} | 0 ...ompletedTest.js => BlockCompletedTest.jsx} | 0 ...-introduction.js => Card-introduction.jsx} | 0 ...CardAviableTest.js => CardAviableTest.jsx} | 0 .../{GetOptionTask.js => GetOptionTask.jsx} | 6 - ...HeaderPageTests.js => HeaderPageTests.jsx} | 0 .../quiz/{HeaderQuiz.js => HeaderQuiz.jsx} | 3 +- .../{Instructions.js => Instructions.jsx} | 0 .../quiz/{MyTestsQuiz.js => MyTestsQuiz.jsx} | 0 ...ProgressbarQuiz.js => ProgressbarQuiz.jsx} | 0 ...mation.js => Quiz-passing-information.jsx} | 15 +- .../quiz/{QuizReport.js => QuizReport.jsx} | 0 .../features/quiz/{Results.js => Results.jsx} | 0 ...lectedCategory.js => SelectedCategory.jsx} | 0 src/components/features/quiz/Task.js | 15 +- src/pages/Article/Article.jsx | 2 +- src/pages/Blog/Blog.jsx | 2 +- .../FrequentlyAskedQuestion.jsx | 2 +- .../PartnerAddRequest/PartnerAddRequest.js | 6 +- src/pages/PartnerBid/PartnerBid.jsx | 2 +- src/pages/ProjectTracker/ProjectTracker.js | 10 +- .../SingleReportPage/SingleReportPage.js | 4 +- src/pages/quiz/PassingTests.js | 7 +- src/redux/projectsTrackerSlice.js | 2 +- src/redux/quizSlice.js | 2 +- 40 files changed, 224 insertions(+), 536 deletions(-) create mode 100644 .eslintrc.json rename src/components/features/quiz/{AlertResult.js => AlertResult.jsx} (100%) rename src/components/features/quiz/{BlockCompletedTest.js => BlockCompletedTest.jsx} (100%) rename src/components/features/quiz/{Card-introduction.js => Card-introduction.jsx} (100%) rename src/components/features/quiz/{CardAviableTest.js => CardAviableTest.jsx} (100%) rename src/components/features/quiz/{GetOptionTask.js => GetOptionTask.jsx} (86%) rename src/components/features/quiz/{HeaderPageTests.js => HeaderPageTests.jsx} (100%) rename src/components/features/quiz/{HeaderQuiz.js => HeaderQuiz.jsx} (97%) rename src/components/features/quiz/{Instructions.js => Instructions.jsx} (100%) rename src/components/features/quiz/{MyTestsQuiz.js => MyTestsQuiz.jsx} (100%) rename src/components/features/quiz/{ProgressbarQuiz.js => ProgressbarQuiz.jsx} (100%) rename src/components/features/quiz/{Quiz-passing-information.js => Quiz-passing-information.jsx} (93%) rename src/components/features/quiz/{QuizReport.js => QuizReport.jsx} (100%) rename src/components/features/quiz/{Results.js => Results.jsx} (100%) rename src/components/features/quiz/{SelectedCategory.js => SelectedCategory.jsx} (100%) diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 00000000..df60b6dd --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,21 @@ +{ + "env": { + "browser": true, + "es2021": true + }, + "extends": ["eslint:recommended", "plugin:react/recommended"], + "overrides": [], + "parserOptions": { + "ecmaVersion": "latest", + "sourceType": "module" + }, + "plugins": ["react"], + "rules": { + "no-console": "warn", + "react/prop-types": 0, + "no-undef": "warn", + "react/no-unescaped-entities": 0, + "no-extra-boolean-cast": "warn", + "react/react-in-jsx-scope": 0 + } +} diff --git a/package-lock.json b/package-lock.json index 1565b33d..b968f79e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -59,6 +59,8 @@ "cross-env": "^7.0.3", "css-loader": "6.7.3", "dotenv-webpack": "^7.0.3", + "eslint": "^8.41.0", + "eslint-plugin-react": "^7.32.2", "html-webpack-plugin": "5.5.0", "mini-css-extract-plugin": "^2.7.2", "node-sass": "8.0.0", @@ -2469,7 +2471,6 @@ "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", - "dev": true, "dependencies": { "eslint-visitor-keys": "^3.3.0" }, @@ -2484,7 +2485,6 @@ "version": "3.4.1", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz", "integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==", - "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, @@ -2496,36 +2496,41 @@ "version": "4.5.1", "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.5.1.tgz", "integrity": "sha512-Z5ba73P98O1KUYCCJTUeVpja9RcGoMdncZ6T49FCUl2lN38JtCJ+3WgIDBv0AuY4WChU5PmtJmOCTlN6FZTFKQ==", - "dev": true, "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, "node_modules/@eslint/eslintrc": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz", - "integrity": "sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==", - "peer": true, + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.3.tgz", + "integrity": "sha512-+5gy6OQfk+xx3q0d6jGZZC3f3KzAkXc/IanVxd1is/VIIziRqqt3ongQz0FiTUXqTk0c7aDB3OaFuKnuSoJicQ==", "dependencies": { "ajv": "^6.12.4", - "debug": "^4.1.1", - "espree": "^7.3.0", - "globals": "^13.9.0", - "ignore": "^4.0.6", + "debug": "^4.3.2", + "espree": "^9.5.2", + "globals": "^13.19.0", + "ignore": "^5.2.0", "import-fresh": "^3.2.1", - "js-yaml": "^3.13.1", - "minimatch": "^3.0.4", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", "strip-json-comments": "^3.1.1" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, + "node_modules/@eslint/eslintrc/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + }, "node_modules/@eslint/eslintrc/node_modules/globals": { "version": "13.20.0", "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", - "peer": true, "dependencies": { "type-fest": "^0.20.2" }, @@ -2536,20 +2541,21 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@eslint/eslintrc/node_modules/ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "peer": true, - "engines": { - "node": ">= 4" + "node_modules/@eslint/eslintrc/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" } }, "node_modules/@eslint/eslintrc/node_modules/type-fest": { "version": "0.20.2", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "peer": true, "engines": { "node": ">=10" }, @@ -2561,7 +2567,6 @@ "version": "8.41.0", "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.41.0.tgz", "integrity": "sha512-LxcyMGxwmTh2lY9FwHPGWOHmYFCZvbrFCBZL4FzSSsxsRPuhrYUg/49/0KDfW8tnIEaEHtfmn6+NPN+1DqaNmA==", - "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } @@ -2586,14 +2591,13 @@ "dev": true }, "node_modules/@humanwhocodes/config-array": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.5.0.tgz", - "integrity": "sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg==", - "peer": true, + "version": "0.11.8", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", + "integrity": "sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==", "dependencies": { - "@humanwhocodes/object-schema": "^1.2.0", + "@humanwhocodes/object-schema": "^1.2.1", "debug": "^4.1.1", - "minimatch": "^3.0.4" + "minimatch": "^3.0.5" }, "engines": { "node": ">=10.10.0" @@ -2603,7 +2607,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", - "dev": true, "engines": { "node": ">=12.22" }, @@ -6436,15 +6439,6 @@ "ajv": "^6.9.1" } }, - "node_modules/ansi-colors": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", - "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", - "peer": true, - "engines": { - "node": ">=6" - } - }, "node_modules/ansi-escapes": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", @@ -6544,6 +6538,7 @@ "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, "dependencies": { "sprintf-js": "~1.0.2" } @@ -6718,15 +6713,6 @@ "integrity": "sha512-eBvWn1lvIApYMhzQMsu9ciLfkBY499mFZlNqG+/9WR7PVlroQw0vG30cOQQbaKz3sCEc44TAOu2ykzqXSNnwag==", "dev": true }, - "node_modules/astral-regex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", - "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", - "peer": true, - "engines": { - "node": ">=8" - } - }, "node_modules/async": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz", @@ -9441,18 +9427,6 @@ "resolved": "https://registry.npmjs.org/enquire.js/-/enquire.js-2.1.6.tgz", "integrity": "sha512-/KujNpO+PT63F7Hlpu4h3pE3TokKRHN26JYmQpPyjkRD/N57R7bPDNojMXdi7uveAKjYB7yQnartCxZnFWr0Xw==" }, - "node_modules/enquirer": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", - "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", - "peer": true, - "dependencies": { - "ansi-colors": "^4.1.1" - }, - "engines": { - "node": ">=8.6" - } - }, "node_modules/entities": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", @@ -9758,57 +9732,55 @@ } }, "node_modules/eslint": { - "version": "7.32.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.32.0.tgz", - "integrity": "sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==", - "peer": true, + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.41.0.tgz", + "integrity": "sha512-WQDQpzGBOP5IrXPo4Hc0814r4/v2rrIsB0rhT7jtunIalgg6gYXWhRMOejVO8yH21T/FGaxjmFjBMNqcIlmH1Q==", "dependencies": { - "@babel/code-frame": "7.12.11", - "@eslint/eslintrc": "^0.4.3", - "@humanwhocodes/config-array": "^0.5.0", + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.4.0", + "@eslint/eslintrc": "^2.0.3", + "@eslint/js": "8.41.0", + "@humanwhocodes/config-array": "^0.11.8", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", - "debug": "^4.0.1", + "debug": "^4.3.2", "doctrine": "^3.0.0", - "enquirer": "^2.3.5", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^2.1.0", - "eslint-visitor-keys": "^2.0.0", - "espree": "^7.3.1", - "esquery": "^1.4.0", + "eslint-scope": "^7.2.0", + "eslint-visitor-keys": "^3.4.1", + "espree": "^9.5.2", + "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.1.2", - "globals": "^13.6.0", - "ignore": "^4.0.6", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "js-yaml": "^3.13.1", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", "lodash.merge": "^4.6.2", - "minimatch": "^3.0.4", + "minimatch": "^3.1.2", "natural-compare": "^1.4.0", "optionator": "^0.9.1", - "progress": "^2.0.0", - "regexpp": "^3.1.0", - "semver": "^7.2.1", - "strip-ansi": "^6.0.0", + "strip-ansi": "^6.0.1", "strip-json-comments": "^3.1.0", - "table": "^6.0.9", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" + "text-table": "^0.2.0" }, "bin": { "eslint": "bin/eslint.js" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -10231,20 +10203,10 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "node_modules/eslint/node_modules/@babel/code-frame": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", - "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", - "peer": true, - "dependencies": { - "@babel/highlight": "^7.10.4" - } - }, "node_modules/eslint/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "peer": true, "dependencies": { "color-convert": "^2.0.1" }, @@ -10255,11 +10217,15 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/eslint/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + }, "node_modules/eslint/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "peer": true, "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -10275,7 +10241,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "peer": true, "dependencies": { "color-name": "~1.1.4" }, @@ -10286,14 +10251,12 @@ "node_modules/eslint/node_modules/color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "peer": true + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, "node_modules/eslint/node_modules/escape-string-regexp": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "peer": true, "engines": { "node": ">=10" }, @@ -10301,47 +10264,36 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/eslint/node_modules/eslint-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", - "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", - "peer": true, + "node_modules/eslint/node_modules/eslint-scope": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.0.tgz", + "integrity": "sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw==", "dependencies": { - "eslint-visitor-keys": "^1.1.0" + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" }, "engines": { - "node": ">=6" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { - "url": "https://github.com/sponsors/mysticatea" + "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "peer": true, + "node_modules/eslint/node_modules/eslint-visitor-keys": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz", + "integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==", "engines": { - "node": ">=4" - } - }, - "node_modules/eslint/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "peer": true, - "dependencies": { - "is-glob": "^4.0.1" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, - "engines": { - "node": ">= 6" + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/eslint/node_modules/globals": { "version": "13.20.0", "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", - "peer": true, "dependencies": { "type-fest": "^0.20.2" }, @@ -10356,25 +10308,25 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "peer": true, "engines": { "node": ">=8" } }, - "node_modules/eslint/node_modules/ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "peer": true, - "engines": { - "node": ">= 4" + "node_modules/eslint/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" } }, "node_modules/eslint/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "peer": true, "dependencies": { "has-flag": "^4.0.0" }, @@ -10386,7 +10338,6 @@ "version": "0.20.2", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "peer": true, "engines": { "node": ">=10" }, @@ -10395,32 +10346,48 @@ } }, "node_modules/espree": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", - "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", - "peer": true, + "version": "9.5.2", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.2.tgz", + "integrity": "sha512-7OASN1Wma5fum5SrNhFMAMJxOUAbhyfQ8dQ//PJaJbNw0URTPWqIghHWt1MmAANKhHZIYOHruW4Kw4ruUWOdGw==", "dependencies": { - "acorn": "^7.4.0", - "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^1.3.0" + "acorn": "^8.8.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree/node_modules/acorn": { + "version": "8.8.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", + "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" } }, "node_modules/espree/node_modules/eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "peer": true, + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz", + "integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==", "engines": { - "node": ">=4" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, "bin": { "esparse": "bin/esparse.js", "esvalidate": "bin/esvalidate.js" @@ -11382,7 +11349,6 @@ "version": "6.0.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, "dependencies": { "is-glob": "^4.0.3" }, @@ -11543,8 +11509,7 @@ "node_modules/graphemer": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "dev": true + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==" }, "node_modules/gzip-size": { "version": "6.0.0", @@ -12417,6 +12382,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, "engines": { "node": ">=8" } @@ -12516,7 +12482,6 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true, "engines": { "node": ">=8" } @@ -16450,6 +16415,7 @@ "version": "3.14.1", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, "dependencies": { "argparse": "^1.0.7", "esprima": "^4.0.0" @@ -16817,12 +16783,6 @@ "resolved": "https://registry.npmjs.org/lodash.startswith/-/lodash.startswith-4.2.1.tgz", "integrity": "sha512-XClYR1h4/fJ7H+mmCKppbiBmljN/nGs73iq2SjCT9SF4CBPoUHzLvWmH1GtZMhMBZSiRkHXfeA2RY1eIlJ75ww==" }, - "node_modules/lodash.truncate": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", - "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==", - "peer": true - }, "node_modules/lodash.uniq": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", @@ -19890,15 +19850,6 @@ "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", "dev": true }, - "node_modules/progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "peer": true, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/promise": { "version": "8.3.0", "resolved": "https://registry.npmjs.org/promise/-/promise-8.3.0.tgz", @@ -20655,43 +20606,6 @@ } } }, - "node_modules/react-scripts/node_modules/@eslint/eslintrc": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.3.tgz", - "integrity": "sha512-+5gy6OQfk+xx3q0d6jGZZC3f3KzAkXc/IanVxd1is/VIIziRqqt3ongQz0FiTUXqTk0c7aDB3OaFuKnuSoJicQ==", - "dev": true, - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.5.2", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/react-scripts/node_modules/@humanwhocodes/config-array": { - "version": "0.11.8", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", - "integrity": "sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==", - "dev": true, - "dependencies": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", - "minimatch": "^3.0.5" - }, - "engines": { - "node": ">=10.10.0" - } - }, "node_modules/react-scripts/node_modules/@typescript-eslint/eslint-plugin": { "version": "5.54.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.54.0.tgz", @@ -20846,18 +20760,6 @@ "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/react-scripts/node_modules/acorn": { - "version": "8.8.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", - "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/react-scripts/node_modules/adjust-sourcemap-loader": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/adjust-sourcemap-loader/-/adjust-sourcemap-loader-4.0.0.tgz", @@ -20876,6 +20778,8 @@ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "color-convert": "^2.0.1" }, @@ -20901,12 +20805,6 @@ "node": ">=10" } }, - "node_modules/react-scripts/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, "node_modules/react-scripts/node_modules/babel-loader": { "version": "8.3.0", "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.3.0.tgz", @@ -20931,6 +20829,8 @@ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -20947,6 +20847,8 @@ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "color-name": "~1.1.4" }, @@ -20958,7 +20860,9 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "dev": true, + "optional": true, + "peer": true }, "node_modules/react-scripts/node_modules/dotenv": { "version": "10.0.0", @@ -20969,74 +20873,6 @@ "node": ">=10" } }, - "node_modules/react-scripts/node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/react-scripts/node_modules/eslint": { - "version": "8.41.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.41.0.tgz", - "integrity": "sha512-WQDQpzGBOP5IrXPo4Hc0814r4/v2rrIsB0rhT7jtunIalgg6gYXWhRMOejVO8yH21T/FGaxjmFjBMNqcIlmH1Q==", - "dev": true, - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.4.0", - "@eslint/eslintrc": "^2.0.3", - "@eslint/js": "8.41.0", - "@humanwhocodes/config-array": "^0.11.8", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "ajv": "^6.10.0", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.0", - "eslint-visitor-keys": "^3.4.1", - "espree": "^9.5.2", - "esquery": "^1.4.2", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", - "ignore": "^5.2.0", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "strip-ansi": "^6.0.1", - "strip-json-comments": "^3.1.0", - "text-table": "^0.2.0" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, "node_modules/react-scripts/node_modules/eslint-config-react-app": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/eslint-config-react-app/-/eslint-config-react-app-7.0.1.tgz", @@ -21123,22 +20959,6 @@ "eslint": "^7.5.0 || ^8.0.0" } }, - "node_modules/react-scripts/node_modules/eslint-scope": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.0.tgz", - "integrity": "sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw==", - "dev": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, "node_modules/react-scripts/node_modules/eslint-visitor-keys": { "version": "3.4.1", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz", @@ -21151,23 +20971,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/react-scripts/node_modules/espree": { - "version": "9.5.2", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.2.tgz", - "integrity": "sha512-7OASN1Wma5fum5SrNhFMAMJxOUAbhyfQ8dQ//PJaJbNw0URTPWqIghHWt1MmAANKhHZIYOHruW4Kw4ruUWOdGw==", - "dev": true, - "dependencies": { - "acorn": "^8.8.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, "node_modules/react-scripts/node_modules/fs-extra": { "version": "10.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", @@ -21204,42 +21007,17 @@ "node": ">=10" } }, - "node_modules/react-scripts/node_modules/globals": { - "version": "13.20.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", - "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", - "dev": true, - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/react-scripts/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, + "optional": true, + "peer": true, "engines": { "node": ">=8" } }, - "node_modules/react-scripts/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, "node_modules/react-scripts/node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -21490,6 +21268,8 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "has-flag": "^4.0.0" }, @@ -21508,18 +21288,6 @@ "glob": "^7.1.2" } }, - "node_modules/react-scripts/node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/react-scripts/node_modules/yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", @@ -22102,6 +21870,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true, "engines": { "node": ">=0.10.0" } @@ -22910,56 +22679,6 @@ "node": ">=8" } }, - "node_modules/slice-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", - "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", - "peer": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/slice-ansi?sponsor=1" - } - }, - "node_modules/slice-ansi/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "peer": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/slice-ansi/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "peer": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/slice-ansi/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "peer": true - }, "node_modules/slick-carousel": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/slick-carousel/-/slick-carousel-1.8.1.tgz", @@ -23179,7 +22898,8 @@ "node_modules/sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true }, "node_modules/sshpk": { "version": "1.17.0", @@ -23354,6 +23074,7 @@ "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -23366,7 +23087,8 @@ "node_modules/string-width/node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true }, "node_modules/string.prototype.matchall": { "version": "4.0.8", @@ -23711,44 +23433,6 @@ "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", "dev": true }, - "node_modules/table": { - "version": "6.8.1", - "resolved": "https://registry.npmjs.org/table/-/table-6.8.1.tgz", - "integrity": "sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA==", - "peer": true, - "dependencies": { - "ajv": "^8.0.1", - "lodash.truncate": "^4.4.2", - "slice-ansi": "^4.0.0", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/table/node_modules/ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", - "peer": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/table/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "peer": true - }, "node_modules/tailwindcss": { "version": "3.2.7", "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.2.7.tgz", @@ -24647,12 +24331,6 @@ "uuid": "dist/bin/uuid" } }, - "node_modules/v8-compile-cache": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", - "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", - "peer": true - }, "node_modules/v8-to-istanbul": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-8.1.1.tgz", diff --git a/package.json b/package.json index 993d62fe..318384fa 100644 --- a/package.json +++ b/package.json @@ -55,6 +55,8 @@ "cross-env": "^7.0.3", "css-loader": "6.7.3", "dotenv-webpack": "^7.0.3", + "eslint": "^8.41.0", + "eslint-plugin-react": "^7.32.2", "html-webpack-plugin": "5.5.0", "mini-css-extract-plugin": "^2.7.2", "node-sass": "8.0.0", @@ -78,7 +80,8 @@ "build": "cross-env SERVE=true webpack -c config/webpack/prod.js", "start": "webpack serve -c config/webpack/dev.js", "analyze": "webpack --analyze -c config/webpack/analyze.js", - "format": "prettier --write \"./**/*.{js,jsx}\"" + "format": "prettier --write \"./**/*.{js,jsx}\"", + "lint": "npx eslint 'src/**/*.{js,jsx,ts,tsx}'" }, "eslintConfig": { "extends": [ diff --git a/src/components/Common/AuthHeader/AuthHeader.jsx b/src/components/Common/AuthHeader/AuthHeader.jsx index 7a87abb6..7ebe2613 100644 --- a/src/components/Common/AuthHeader/AuthHeader.jsx +++ b/src/components/Common/AuthHeader/AuthHeader.jsx @@ -7,7 +7,7 @@ import userIcon from "assets/icons/userIcon.svg"; import "./authHeader.scss"; -export const AuthHeader = ({}) => { +export const AuthHeader = () => { return (
diff --git a/src/components/Description/Description.jsx b/src/components/Description/Description.jsx index 9156d6b4..ef39d002 100644 --- a/src/components/Description/Description.jsx +++ b/src/components/Description/Description.jsx @@ -13,7 +13,7 @@ import rectangle from "assets/images/rectangle_secondPage.png"; import ErrorBoundary from "../../hoc/ErrorBoundary"; import "./description.scss"; -const Description = ({ onLoadMore, isLoadingMore }) => { +const Description = ({ onLoadMore }) => { const candidatesListArr = useSelector(selectProfiles); return ( diff --git a/src/components/Form/Form.jsx b/src/components/Form/Form.jsx index c7f998f1..b3bc2524 100644 --- a/src/components/Form/Form.jsx +++ b/src/components/Form/Form.jsx @@ -29,8 +29,10 @@ const Form = () => { const handleModal = (status) => { SweetAlert.fire({ text: + // eslint-disable-next-line no-constant-condition status !== 200 || 201 ? "Какие-то неполадки =(" : "Форма отправлена", preConfirm: () => + // eslint-disable-next-line no-constant-condition status !== 200 || 201 ? () => { setStatus(null); diff --git a/src/components/FreeDevelopers/FreeDevelopers.jsx b/src/components/FreeDevelopers/FreeDevelopers.jsx index ceaf88a3..34798e78 100644 --- a/src/components/FreeDevelopers/FreeDevelopers.jsx +++ b/src/components/FreeDevelopers/FreeDevelopers.jsx @@ -14,7 +14,7 @@ import mockWorker from "assets/images/mock/mokPerson.png"; import "./freeDevelopers.scss"; -export const FreeDevelopers = ({}) => { +export const FreeDevelopers = () => { return (
diff --git a/src/components/Modal/Tracker/ModalTicket/ModalTicket.jsx b/src/components/Modal/Tracker/ModalTicket/ModalTicket.jsx index 98b113b0..1b5da0b5 100644 --- a/src/components/Modal/Tracker/ModalTicket/ModalTicket.jsx +++ b/src/components/Modal/Tracker/ModalTicket/ModalTicket.jsx @@ -60,7 +60,7 @@ export const ModalTiсket = ({ task_id: task.id, status: 0, }, - }).then((res) => { + }).then(() => { setActive(false); dispatch(setProjectBoardFetch(projectId)); }); @@ -74,7 +74,7 @@ export const ModalTiсket = ({ title: inputsValue.title, description: inputsValue.description, }, - }).then((res) => { + }).then(() => { dispatch(setProjectBoardFetch(projectId)); }); } @@ -106,7 +106,7 @@ export const ModalTiсket = ({ comment_id: commentId, status: 0, }, - }).then((res) => { + }).then(() => { setComments((prevValue) => prevValue.filter((item) => item.id !== commentId) ); @@ -120,7 +120,7 @@ export const ModalTiсket = ({ comment_id: commentId, text: commentsEditText[commentId], }, - }).then((res) => {}); + }).then(() => {}); } function taskExecutor(person) { @@ -143,7 +143,7 @@ export const ModalTiсket = ({ task_id: task.id, executor_id: 0, }, - }).then((res) => { + }).then(() => { setExecutor(null); }); } @@ -168,7 +168,7 @@ export const ModalTiсket = ({ task_id: task.id, user_id: person.user_id, }, - }).then((res) => { + }).then(() => { setMembers(members.filter((item) => item.user_id !== person.user_id)); }); } diff --git a/src/components/Modal/Tracker/TicketFullScreen/TicketFullScreen.jsx b/src/components/Modal/Tracker/TicketFullScreen/TicketFullScreen.jsx index 7a31e7ae..8f1a3f8b 100644 --- a/src/components/Modal/Tracker/TicketFullScreen/TicketFullScreen.jsx +++ b/src/components/Modal/Tracker/TicketFullScreen/TicketFullScreen.jsx @@ -42,7 +42,7 @@ import watch from "assets/icons/watch.svg"; import "./ticketFullScreen.scss"; -export const TicketFullScreen = ({}) => { +export const TicketFullScreen = () => { const [modalAddWorker, setModalAddWorker] = useState(false); const ticketId = useParams(); const dispatch = useDispatch(); @@ -93,7 +93,7 @@ export const TicketFullScreen = ({}) => { task_id: ticketId.id, status: 0, }, - }).then((res) => { + }).then(() => { navigate(`/tracker/project/${taskInfo.project_id}`); }); } @@ -106,7 +106,7 @@ export const TicketFullScreen = ({}) => { title: inputsValue.title, description: inputsValue.description, }, - }).then((res) => {}); + }).then(() => {}); } function createComment() { @@ -137,7 +137,7 @@ export const TicketFullScreen = ({}) => { comment_id: commentId, status: 0, }, - }).then((res) => { + }).then(() => { setComments((prevValue) => prevValue.filter((item) => item.id !== commentId) ); @@ -151,7 +151,7 @@ export const TicketFullScreen = ({}) => { comment_id: commentId, text: commentsEditText[commentId], }, - }).then((res) => {}); + }).then(() => {}); } function deletePerson(userId) { @@ -161,7 +161,7 @@ export const TicketFullScreen = ({}) => { project_id: projectBoard.id, user_id: userId, }, - }).then((res) => { + }).then(() => { dispatch(deletePersonOnProject(userId)); }); } diff --git a/src/components/Modal/TrackerModal/TrackerModal.jsx b/src/components/Modal/TrackerModal/TrackerModal.jsx index 579d8134..12face24 100644 --- a/src/components/Modal/TrackerModal/TrackerModal.jsx +++ b/src/components/Modal/TrackerModal/TrackerModal.jsx @@ -57,7 +57,7 @@ export const TrackerModal = ({ project_id: projectBoard.id, title: valueColumn, }, - }).then((res) => { + }).then(() => { dispatch(setProjectBoardFetch(projectBoard.id)); }); setValueColumn(""); @@ -80,7 +80,7 @@ export const TrackerModal = ({ column_id: selectedTab, priority: priorityTask, }, - }).then((res) => { + }).then(() => { dispatch(setProjectBoardFetch(projectBoard.id)); }); @@ -96,7 +96,7 @@ export const TrackerModal = ({ project_id: projectId, name: projectName, }, - }).then((res) => { + }).then(() => { setActive(false); dispatch(editProjectName({ id: projectId, name: projectName })); }); @@ -109,7 +109,7 @@ export const TrackerModal = ({ column_id: columnId, title: columnName, }, - }).then((res) => { + }).then(() => { setActive(false); dispatch(editColumnName({ id: columnId, title: columnName })); }); diff --git a/src/components/ProfileCalendar/ProfileCalendarComponent.jsx b/src/components/ProfileCalendar/ProfileCalendarComponent.jsx index fee451bd..beb61052 100644 --- a/src/components/ProfileCalendar/ProfileCalendarComponent.jsx +++ b/src/components/ProfileCalendar/ProfileCalendarComponent.jsx @@ -23,6 +23,7 @@ import arrow from "assets/icons/arrows/arrowCalendar.png"; import calendarIcon from "assets/icons/calendar.svg"; import rectangle from "assets/images/rectangle__calendar.png"; +// eslint-disable-next-line react/display-name export const ProfileCalendarComponent = React.memo( ({ value, setValueHandler, reports, totalHours }) => { const dispatch = useDispatch(); diff --git a/src/components/ProjectTiket/ProjectTiket.jsx b/src/components/ProjectTiket/ProjectTiket.jsx index 41fa1cb1..6d565cd3 100644 --- a/src/components/ProjectTiket/ProjectTiket.jsx +++ b/src/components/ProjectTiket/ProjectTiket.jsx @@ -47,7 +47,7 @@ export const ProjectTiket = ({ project, index }) => { project_id: project.id, status: 10, }, - }).then((res) => { + }).then(() => { dispatch(deleteProject(project)); }); } diff --git a/src/components/ProtectedRoute/ProtectedRoute.js b/src/components/ProtectedRoute/ProtectedRoute.js index 32f807e4..1febac53 100644 --- a/src/components/ProtectedRoute/ProtectedRoute.js +++ b/src/components/ProtectedRoute/ProtectedRoute.js @@ -1,6 +1,6 @@ import React from "react"; import { useSelector } from "react-redux"; -import { Redirect, Route } from "react-router-dom"; +import { Route } from "react-router-dom"; import { selectAuth } from "@redux/outstaffingSlice"; @@ -9,6 +9,7 @@ export const ProtectedRoute = ({ component: Component, ...rest }) => { const existingToken = localStorage.getItem("auth_token"); const expiresAt = localStorage.getItem("access_token_expired_at"); + // eslint-disable-next-line no-unused-vars const isTokenAlive = !isAuth && existingToken && diff --git a/src/components/ReportForm/ReportForm.jsx b/src/components/ReportForm/ReportForm.jsx index 4ee38c58..205550c4 100644 --- a/src/components/ReportForm/ReportForm.jsx +++ b/src/components/ReportForm/ReportForm.jsx @@ -103,7 +103,7 @@ const ReportForm = () => { created_at: getCreatedDate(startDate), status: 1, }, - }).then((res) => { + }).then(() => { setReportSuccess("Отчет отправлен"); setTimeout(() => { setReportSuccess(""); diff --git a/src/components/ShortReport/ShortReport.jsx b/src/components/ShortReport/ShortReport.jsx index b7c08f99..7b45da0c 100644 --- a/src/components/ShortReport/ShortReport.jsx +++ b/src/components/ShortReport/ShortReport.jsx @@ -19,7 +19,7 @@ import { Loader } from "@components/Common/Loader/Loader"; import "./shortReport.scss"; -export const ShortReport = ({}) => { +export const ShortReport = () => { const reportDate = useSelector(getReportDate); const sendReport = useSelector(getSendRequest); diff --git a/src/components/features/quiz/AlertResult.js b/src/components/features/quiz/AlertResult.jsx similarity index 100% rename from src/components/features/quiz/AlertResult.js rename to src/components/features/quiz/AlertResult.jsx diff --git a/src/components/features/quiz/BlockCompletedTest.js b/src/components/features/quiz/BlockCompletedTest.jsx similarity index 100% rename from src/components/features/quiz/BlockCompletedTest.js rename to src/components/features/quiz/BlockCompletedTest.jsx diff --git a/src/components/features/quiz/Card-introduction.js b/src/components/features/quiz/Card-introduction.jsx similarity index 100% rename from src/components/features/quiz/Card-introduction.js rename to src/components/features/quiz/Card-introduction.jsx diff --git a/src/components/features/quiz/CardAviableTest.js b/src/components/features/quiz/CardAviableTest.jsx similarity index 100% rename from src/components/features/quiz/CardAviableTest.js rename to src/components/features/quiz/CardAviableTest.jsx diff --git a/src/components/features/quiz/GetOptionTask.js b/src/components/features/quiz/GetOptionTask.jsx similarity index 86% rename from src/components/features/quiz/GetOptionTask.js rename to src/components/features/quiz/GetOptionTask.jsx index f56dab9b..52cd39c9 100644 --- a/src/components/features/quiz/GetOptionTask.js +++ b/src/components/features/quiz/GetOptionTask.jsx @@ -1,12 +1,6 @@ import React from "react"; -import { useSelector } from "react-redux"; - -import { selectedTest } from "@redux/quizSlice"; export const GetOptionTask = ({ type, answer, handleChange, inputValue }) => { - const id = localStorage.getItem("id"); - const dataTest = useSelector(selectedTest); - switch (type) { case "1": return ( diff --git a/src/components/features/quiz/HeaderPageTests.js b/src/components/features/quiz/HeaderPageTests.jsx similarity index 100% rename from src/components/features/quiz/HeaderPageTests.js rename to src/components/features/quiz/HeaderPageTests.jsx diff --git a/src/components/features/quiz/HeaderQuiz.js b/src/components/features/quiz/HeaderQuiz.jsx similarity index 97% rename from src/components/features/quiz/HeaderQuiz.js rename to src/components/features/quiz/HeaderQuiz.jsx index d5ea6260..bde6f469 100644 --- a/src/components/features/quiz/HeaderQuiz.js +++ b/src/components/features/quiz/HeaderQuiz.jsx @@ -5,8 +5,7 @@ import { selectUserInfo, setUserInfo } from "@redux/quizSlice"; import { urlForLocal } from "@utils/helper"; -import { apiRequest } from "@api/request"; - +// import { apiRequest } from "@api/request"; import "./quiz.scss"; export const HeaderQuiz = ({ header }) => { diff --git a/src/components/features/quiz/Instructions.js b/src/components/features/quiz/Instructions.jsx similarity index 100% rename from src/components/features/quiz/Instructions.js rename to src/components/features/quiz/Instructions.jsx diff --git a/src/components/features/quiz/MyTestsQuiz.js b/src/components/features/quiz/MyTestsQuiz.jsx similarity index 100% rename from src/components/features/quiz/MyTestsQuiz.js rename to src/components/features/quiz/MyTestsQuiz.jsx diff --git a/src/components/features/quiz/ProgressbarQuiz.js b/src/components/features/quiz/ProgressbarQuiz.jsx similarity index 100% rename from src/components/features/quiz/ProgressbarQuiz.js rename to src/components/features/quiz/ProgressbarQuiz.jsx diff --git a/src/components/features/quiz/Quiz-passing-information.js b/src/components/features/quiz/Quiz-passing-information.jsx similarity index 93% rename from src/components/features/quiz/Quiz-passing-information.js rename to src/components/features/quiz/Quiz-passing-information.jsx index 073ef094..dca28127 100644 --- a/src/components/features/quiz/Quiz-passing-information.js +++ b/src/components/features/quiz/Quiz-passing-information.jsx @@ -10,14 +10,13 @@ import accempt from "assets/images/quiz/accempt.png"; import timer from "assets/images/quiz/timer.png"; export const QuizPassingInformation = ({ expiryTimestamp, setStartTest }) => { - const { seconds, minutes, isRunning, start, pause, resume, restart } = - useTimer({ - expiryTimestamp, - autoStart: false, - onExpire: () => { - console.warn("onExpire called"); - }, - }); + const { seconds, minutes, isRunning, start, restart } = useTimer({ + expiryTimestamp, + autoStart: false, + onExpire: () => { + console.warn("onExpire called"); + }, + }); const completedTest = useSelector(completedTestSelector); const startTesting = () => { diff --git a/src/components/features/quiz/QuizReport.js b/src/components/features/quiz/QuizReport.jsx similarity index 100% rename from src/components/features/quiz/QuizReport.js rename to src/components/features/quiz/QuizReport.jsx diff --git a/src/components/features/quiz/Results.js b/src/components/features/quiz/Results.jsx similarity index 100% rename from src/components/features/quiz/Results.js rename to src/components/features/quiz/Results.jsx diff --git a/src/components/features/quiz/SelectedCategory.js b/src/components/features/quiz/SelectedCategory.jsx similarity index 100% rename from src/components/features/quiz/SelectedCategory.js rename to src/components/features/quiz/SelectedCategory.jsx diff --git a/src/components/features/quiz/Task.js b/src/components/features/quiz/Task.js index 77136fd4..a07faa65 100644 --- a/src/components/features/quiz/Task.js +++ b/src/components/features/quiz/Task.js @@ -1,15 +1,12 @@ import React, { useEffect, useState } from "react"; import { useDispatch, useSelector } from "react-redux"; -import { useNavigate } from "react-router-dom"; import { answersSelector, - fetchGetAnswers, - fetchUserAnswerOne, - fetchUserAnswersMany, + fetchGetAnswers, // fetchUserAnswerOne, + // fetchUserAnswersMany, questionsSelector, - selectedTest, - setAnswers, + selectedTest, // setAnswers, setCompleteTest, } from "@redux/quizSlice"; @@ -18,12 +15,11 @@ import { apiRequest } from "@api/request"; import questionIcon from "assets/images/question.png"; import { GetOptionTask } from "./GetOptionTask"; -import { HeaderQuiz } from "./HeaderQuiz"; -import { Progressbar } from "./ProgressbarQuiz"; +// import { HeaderQuiz } from "./HeaderQuiz"; +// import { Progressbar } from "./ProgressbarQuiz"; import "./quiz.scss"; export const TaskQuiz = () => { - const navigate = useNavigate(); const dispatch = useDispatch(); const answers = useSelector(answersSelector); @@ -42,7 +38,6 @@ export const TaskQuiz = () => { // .then(json => console.log(json)) apiRequest(`/question/get-questions?uuid=${dataTest.uuid}`).then( (response) => { - console.log(response); dispatch(fetchGetAnswers(response[0].id)); setStripValue(((+index + 1) * 100) / response.length); } diff --git a/src/pages/Article/Article.jsx b/src/pages/Article/Article.jsx index 86e47b55..7d61aa59 100644 --- a/src/pages/Article/Article.jsx +++ b/src/pages/Article/Article.jsx @@ -17,7 +17,7 @@ import mockImgArticle from "assets/images/mock/mockImgArticle.png"; import "./article.scss"; -export const Article = ({}) => { +export const Article = () => { const [article] = useState([ { image: cardImg1, diff --git a/src/pages/Blog/Blog.jsx b/src/pages/Blog/Blog.jsx index 5d2b109e..dde9ae6e 100644 --- a/src/pages/Blog/Blog.jsx +++ b/src/pages/Blog/Blog.jsx @@ -16,7 +16,7 @@ import cardImg1 from "assets/images/mock/cardArticleItem.png"; import "./blog.scss"; -export const Blog = ({}) => { +export const Blog = () => { const [article] = useState([ { image: cardImg1, diff --git a/src/pages/FrequentlyAskedQuestion/FrequentlyAskedQuestion.jsx b/src/pages/FrequentlyAskedQuestion/FrequentlyAskedQuestion.jsx index 06936ae5..9ddf06fc 100644 --- a/src/pages/FrequentlyAskedQuestion/FrequentlyAskedQuestion.jsx +++ b/src/pages/FrequentlyAskedQuestion/FrequentlyAskedQuestion.jsx @@ -13,7 +13,7 @@ import "./FrequentlyAskedQuestion.scss"; export const FrequentlyAskedQuestion = () => { const params = useParams(); const navigate = useNavigate(); - const [question, setQuestion] = useState({ + const [question] = useState({ id: params.id, title: "Это фриланс-платформа?", answer: diff --git a/src/pages/PartnerAddRequest/PartnerAddRequest.js b/src/pages/PartnerAddRequest/PartnerAddRequest.js index 31b39d9f..a023cb85 100644 --- a/src/pages/PartnerAddRequest/PartnerAddRequest.js +++ b/src/pages/PartnerAddRequest/PartnerAddRequest.js @@ -117,7 +117,7 @@ export const PartnerAddRequest = () => { return skill.id; }), }, - }).then((res) => { + }).then(() => { navigate("/profile/requests"); }); } else { @@ -135,7 +135,7 @@ export const PartnerAddRequest = () => { return skill.id; }), }, - }).then((res) => { + }).then(() => { navigate("/profile/requests"); }); } @@ -206,7 +206,7 @@ export const PartnerAddRequest = () => { {openSpecializationList && Boolean(specializationList.length) && (
- {specializationList.map((specialization, index) => { + {specializationList.map((specialization) => { return (

{ request_id: requestId, status: 0, }, - }).then((res) => { + }).then(() => { navigate("/profile/requests"); }); }; diff --git a/src/pages/ProjectTracker/ProjectTracker.js b/src/pages/ProjectTracker/ProjectTracker.js index 55f36ac1..78a48ae8 100644 --- a/src/pages/ProjectTracker/ProjectTracker.js +++ b/src/pages/ProjectTracker/ProjectTracker.js @@ -152,7 +152,7 @@ export const ProjectTracker = () => { project_id: projectBoard.id, status: 0, }, - }).then((res) => { + }).then(() => { dispatch(setProjectBoardFetch(projectBoard.id)); }); } @@ -164,7 +164,7 @@ export const ProjectTracker = () => { project_id: projectBoard.id, user_id: userId, }, - }).then((res) => { + }).then(() => { dispatch(deletePersonOnProject(userId)); }); } @@ -338,7 +338,7 @@ export const ProjectTracker = () => {

dragOverHandler(e)} - onDragEnter={(e) => dragEnterHandler(column.id)} + onDragEnter={() => dragEnterHandler(column.id)} onDrop={(e) => dragDropHandler(e, column.id)} className={`tasks__board ${ column.tasks.length >= 3 ? "tasks__board__more" : "" @@ -398,7 +398,7 @@ export const ProjectTracker = () => {
)} - {column.tasks.map((task, index) => { + {column.tasks.map((task) => { // if (index > 2) { // if (!column.open) { // return; @@ -454,7 +454,7 @@ export const ProjectTracker = () => { ); })} {Boolean(projectBoard?.columns) && - !Boolean(projectBoard.columns.length) && ( + !projectBoard.columns.length && (
В проекте нет задач.
diff --git a/src/pages/SingleReportPage/SingleReportPage.js b/src/pages/SingleReportPage/SingleReportPage.js index 21f3b05e..455aefed 100644 --- a/src/pages/SingleReportPage/SingleReportPage.js +++ b/src/pages/SingleReportPage/SingleReportPage.js @@ -66,9 +66,9 @@ const SingleReportPage = () => {

Какие задачи были выполнены?

- {tasks.map((task) => { + {tasks.map((task, index) => { return ( -
+
); diff --git a/src/pages/quiz/PassingTests.js b/src/pages/quiz/PassingTests.js index 48ff4238..a5cfc43a 100644 --- a/src/pages/quiz/PassingTests.js +++ b/src/pages/quiz/PassingTests.js @@ -2,7 +2,7 @@ import React, { useState } from "react"; import { useSelector } from "react-redux"; import { Link } from "react-router-dom"; -import { completedTestSelector, selectedTest } from "@redux/quizSlice"; +import { completedTestSelector } from "@redux/quizSlice"; import { Footer } from "@components/Common/Footer/Footer"; import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; @@ -14,11 +14,6 @@ import { QuizPassingInformation } from "@components/features/quiz/Quiz-passing-i import { TaskQuiz } from "@components/features/quiz/Task"; export const PassingTests = () => { - //const selectedTest = useSelector(selectedTest) - - if ("") { - } - const time = new Date(); time.setSeconds(time.getSeconds() + 600); //600 - кол-во секунд для прохождения теста diff --git a/src/redux/projectsTrackerSlice.js b/src/redux/projectsTrackerSlice.js index 7d23a60c..eb1937d6 100644 --- a/src/redux/projectsTrackerSlice.js +++ b/src/redux/projectsTrackerSlice.js @@ -57,7 +57,7 @@ export const projectsTrackerSlice = createSlice({ task_id: action.payload.startWrapperIndex.task.id, column_id: column.id, }, - }).then((res) => {}); + }).then(() => {}); } if (column.id === action.payload.startWrapperIndex.index) { state.projectBoard.columns[index].tasks = column.tasks.filter( diff --git a/src/redux/quizSlice.js b/src/redux/quizSlice.js index 845e14af..79264f9b 100644 --- a/src/redux/quizSlice.js +++ b/src/redux/quizSlice.js @@ -117,7 +117,7 @@ export const quizSlice = createSlice({ setSelectedTest: (state, action) => { state.selectedTest = action.payload; }, - setCompleteTest: (state, action) => { + setCompleteTest: (state) => { state.completedTest = true; }, }, From 2c7c5c7d5cd7828fd282d9968b24e0a7d714bb77 Mon Sep 17 00:00:00 2001 From: MaxOvs19 Date: Wed, 31 May 2023 11:32:36 +0300 Subject: [PATCH 3/3] Added husky --- .husky/pre-commit | 5 +++++ package.json | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100755 .husky/pre-commit diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 00000000..ba500687 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,5 @@ +#!/usr/bin/env sh +. "$(dirname -- "$0")/_/husky.sh" + +npm run format +npm run lint diff --git a/package.json b/package.json index 318384fa..30b9aa4d 100644 --- a/package.json +++ b/package.json @@ -74,14 +74,16 @@ "webpack-bundle-analyzer": "4.7.0", "webpack-cli": "^5.0.1", "webpack-dev-server": "4.11.1", - "webpack-merge": "5.8.0" + "webpack-merge": "5.8.0", + "husky": "^8.0.0" }, "scripts": { "build": "cross-env SERVE=true webpack -c config/webpack/prod.js", "start": "webpack serve -c config/webpack/dev.js", "analyze": "webpack --analyze -c config/webpack/analyze.js", "format": "prettier --write \"./**/*.{js,jsx}\"", - "lint": "npx eslint 'src/**/*.{js,jsx,ts,tsx}'" + "lint": "npx eslint 'src/**/*.{js,jsx,ts,tsx}'", + "prepare": "husky install" }, "eslintConfig": { "extends": [