From fc8fc33733901e4ce9333ee7f7ade4213985d498 Mon Sep 17 00:00:00 2001 From: MaxOvs19 Date: Wed, 31 May 2023 08:36:15 +0300 Subject: [PATCH] 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: "Копирайтер", };