diff --git a/config/webpack/common.js b/config/webpack/common.js index dc5ebf52..35abe6d5 100644 --- a/config/webpack/common.js +++ b/config/webpack/common.js @@ -54,6 +54,7 @@ module.exports = { "@": `${paths.src}/modules`, assets: `${paths.src}/assets`, "@components": `${paths.src}/components`, + "@utils": `${paths.src}/utils`, "@pages": `${paths.src}/pages`, "@redux": `${paths.src}/redux`, "@store": `${paths.src}/store`, diff --git a/jsconfig.json b/jsconfig.json index 096a4df3..3371db77 100644 --- a/jsconfig.json +++ b/jsconfig.json @@ -4,11 +4,12 @@ "paths": { "assets/*": ["./assets/*"], "@components/*": ["./components/*"], + "@utils/*": ["./utils/*"], "@pages/*": ["./pages/*"], "@redux/*": ["./redux/*"], "@store/*": ["./store/*"], "@api/*": ["./api/*"], - "@hooks/*": ["./api/*"] + "@hooks/*": ["./hooks/*"] } } } diff --git a/src/api/request.js b/src/api/request.js index 4b40d8b1..316dd5a3 100644 --- a/src/api/request.js +++ b/src/api/request.js @@ -1,7 +1,5 @@ -import axios from 'axios'; -import {getToken, urlHasParams} from "../helper"; - - +import axios from "axios"; +import { getToken, urlHasParams } from "../utils/helper"; const instance = axios.create({ baseURL: process.env.REACT_APP_API_URL, @@ -10,40 +8,47 @@ const instance = axios.create({ }, }); -export const apiRequest = (url, { - method = 'get', params, data, - headers = { - 'Access-Control-Allow-Origin': '*', - 'Content-Type': 'application/json' - }, -} = {}) => { - const fullHeaders = {...headers, ...getToken()}; +export const apiRequest = ( + url, + { + method = "get", + params, + data, + headers = { + "Access-Control-Allow-Origin": "*", + "Content-Type": "application/json", + }, + } = {} +) => { + const fullHeaders = { ...headers, ...getToken() }; let urWithParams = urlHasParams(url); - return instance - .request({ - url: urWithParams, - method, - params, - data, - headers: {...fullHeaders}, - }) - .then(response => new Promise(resolve => { - if (response.data.redirect || response.status === 401) { - window.location.replace('/auth'); - localStorage.clear(); - // dispatch(auth(false)); - } - return resolve(response) - })) - .then(response => new Promise(resolve => resolve(response.data))) + .request({ + url: urWithParams, + method, + params, + data, + headers: { ...fullHeaders }, + }) + .then( + (response) => + new Promise((resolve) => { + if (response.data.redirect || response.status === 401) { + window.location.replace("/auth"); + localStorage.clear(); + // dispatch(auth(false)); + } + return resolve(response); + }) + ) + .then((response) => new Promise((resolve) => resolve(response.data))); }; const RequestError = (code, msg, data) => { - const description = msg ? `- ${msg}` : ''; + const description = msg ? `- ${msg}` : ""; - this.name = 'RequestError'; + this.name = "RequestError"; this.message = `API returned: ${code}${description}.`; this.code = code; this.description = msg; diff --git a/src/components/AuthBox/AuthBox.jsx b/src/components/AuthBox/AuthBox.jsx index 152e62cb..17c7e752 100644 --- a/src/components/AuthBox/AuthBox.jsx +++ b/src/components/AuthBox/AuthBox.jsx @@ -1,18 +1,17 @@ import React, { useEffect, useRef, useState } from "react"; import { useNavigate } from "react-router-dom"; - import { useDispatch, useSelector } from "react-redux"; -import { auth, selectAuth, setUserInfo } from "../../redux/outstaffingSlice"; -import { loading } from "../../redux/loaderSlice"; -import { setRole } from "../../redux/roleSlice"; -import { selectIsLoading } from "../../redux/loaderSlice"; -import ModalRegistration from "../Modal/ModalRegistration/ModalRegistration"; -import ModalErrorLogin from "../Modal/ModalErrorLogin/ModalErrorLogin"; -import { Loader } from "../Loader/Loader"; -import { apiRequest } from "../../api/request"; +import { auth, selectAuth, setUserInfo } from "@redux/outstaffingSlice"; +import { loading, selectIsLoading } from "@redux/loaderSlice"; +import { setRole } from "@redux/roleSlice"; -import ellipse from "../../assets/icons/ellipse.png"; +import ModalRegistration from "@components/Modal/ModalRegistration/ModalRegistration"; +import ModalErrorLogin from "@components/Modal/ModalErrorLogin/ModalErrorLogin"; +import { Loader } from "@components/Loader/Loader"; +import { apiRequest } from "@api/request"; + +import ellipse from "assets/icons/ellipse.png"; import "./authBox.scss"; diff --git a/src/components/AuthHeader/AuthHeader.jsx b/src/components/AuthHeader/AuthHeader.jsx index 9f8416e5..7a87abb6 100644 --- a/src/components/AuthHeader/AuthHeader.jsx +++ b/src/components/AuthHeader/AuthHeader.jsx @@ -1,8 +1,9 @@ import React from "react"; import { NavLink } from "react-router-dom"; -import { scrollToForm } from "../../helper"; -import userIcon from "../../assets/icons/userIcon.svg"; +import { scrollToForm } from "@utils/helper"; + +import userIcon from "assets/icons/userIcon.svg"; import "./authHeader.scss"; diff --git a/src/components/Calendar/Calendar.jsx b/src/components/Calendar/Calendar.jsx index e230189e..06d8bd9a 100644 --- a/src/components/Calendar/Calendar.jsx +++ b/src/components/Calendar/Calendar.jsx @@ -4,12 +4,12 @@ import { Link, Navigate, useNavigate } from "react-router-dom"; import CalendarComponent from "./CalendarComponent"; import { currentMonth } from "./calendarHelper"; -import { Footer } from "../Footer/Footer"; -import { LogoutButton } from "../LogoutButton/LogoutButton"; -import { urlForLocal } from "../../helper"; -import { selectCurrentCandidate } from "../../redux/outstaffingSlice"; +import { Footer } from "@components/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 rectangle from "assets/images/rectangle_secondPage.png"; import "./calendar.scss"; diff --git a/src/components/Calendar/CalendarComponent.jsx b/src/components/Calendar/CalendarComponent.jsx index be5ad967..9694cb73 100644 --- a/src/components/Calendar/CalendarComponent.jsx +++ b/src/components/Calendar/CalendarComponent.jsx @@ -1,11 +1,12 @@ import React, { useState, useEffect } from "react"; import { calendarHelper, currentMonthAndDay } from "./calendarHelper"; -import ellipse from "../../assets/icons/ellipse.png"; -import rectangle from "../../assets/images/rectangle__calendar.png"; -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"; diff --git a/src/components/Candidate/Candidate.jsx b/src/components/Candidate/Candidate.jsx index 73203a45..d91bb92f 100644 --- a/src/components/Candidate/Candidate.jsx +++ b/src/components/Candidate/Candidate.jsx @@ -2,29 +2,28 @@ import React, { useEffect, useState } from "react"; import { useParams, Link, useNavigate, Navigate } from "react-router-dom"; import { useSelector, useDispatch } from "react-redux"; -import SkillSection from "../SkillSection/SkillSection"; -import Sidebar from "../CandidateSidebar/CandidateSidebar"; -import { ProfileHeader } from "../ProfileHeader/ProfileHeader"; -import { ProfileBreadcrumbs } from "../ProfileBreadcrumbs/ProfileBreadcrumbs"; -import { Footer } from "../Footer/Footer"; -import { Navigation } from "../Navigation/Navigation"; +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/Footer/Footer"; +import { Navigation } from "@components/Navigation/Navigation"; import { currentCandidate, selectCurrentCandidate, -} from "../../redux/outstaffingSlice"; +} from "@redux/outstaffingSlice"; -import { apiRequest } from "../../api/request"; -import { createMarkup } from "../../helper"; +import { apiRequest } from "@api/request"; +import { createMarkup } from "@utils/helper"; +import { LEVELS, SKILLS } from "@utils/constants"; -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 { LEVELS, SKILLS } from "../../constants/constants"; +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 "./candidate.scss"; diff --git a/src/components/CandidateSidebar/CandidateSidebar.jsx b/src/components/CandidateSidebar/CandidateSidebar.jsx index 5e1014db..574f18b2 100644 --- a/src/components/CandidateSidebar/CandidateSidebar.jsx +++ b/src/components/CandidateSidebar/CandidateSidebar.jsx @@ -1,10 +1,10 @@ import React, { useState } from "react"; -import { Achievement } from "../Achievement/Achievement"; -import ModalAspirant from "../Modal/ModalAspirant/ModalAspirant"; +import { Achievement } from "@components/Achievement/Achievement"; +import ModalAspirant from "@components/Modal/ModalAspirant/ModalAspirant"; -import { urlForLocal } from "../../helper"; -import { LEVELS, SKILLS } from "../../constants/constants"; +import { urlForLocal } from "@utils/helper"; +import { LEVELS, SKILLS } from "@utils/constants"; import "./candidateSidebar.scss"; diff --git a/src/components/CardControl/CardControl.jsx b/src/components/CardControl/CardControl.jsx index ac2948d4..7abaa411 100644 --- a/src/components/CardControl/CardControl.jsx +++ b/src/components/CardControl/CardControl.jsx @@ -1,7 +1,7 @@ import React from "react"; import { Link } from "react-router-dom"; -import rightArrow from "../../assets/icons/arrows/arrowRight.svg"; +import rightArrow from "assets/icons/arrows/arrowRight.svg"; import "./CardControl.scss"; diff --git a/src/components/CategoriesItem/CategoriesItem.jsx b/src/components/CategoriesItem/CategoriesItem.jsx index 375031a9..a91eeccc 100644 --- a/src/components/CategoriesItem/CategoriesItem.jsx +++ b/src/components/CategoriesItem/CategoriesItem.jsx @@ -1,7 +1,7 @@ import React from "react"; import { Link } from "react-router-dom"; -import rightArrow from "../../assets/icons/arrows/arrowRight.svg"; +import rightArrow from "assets/icons/arrows/arrowRight.svg"; import "./categoriesItem.scss"; diff --git a/src/components/Description/Description.jsx b/src/components/Description/Description.jsx index 589f07da..3fdcef9b 100644 --- a/src/components/Description/Description.jsx +++ b/src/components/Description/Description.jsx @@ -4,13 +4,12 @@ import { Link } from "react-router-dom"; import ErrorBoundary from "../../hoc/ErrorBoundary"; -import { LEVELS, SKILLS } from "../../constants/constants"; -import { selectProfiles } from "../../redux/outstaffingSlice"; +import { LEVELS, SKILLS } from "@utils/constants"; +import { urlForLocal } from "@utils/helper"; +import { selectProfiles } from "@redux/outstaffingSlice"; -import { urlForLocal } from "../../helper"; - -import rectangle from "../../assets/images/rectangle_secondPage.png"; -import cursorImg from "../../assets/icons/cursorImg.svg"; +import rectangle from "assets/images/rectangle_secondPage.png"; +import cursorImg from "assets/icons/cursorImg.svg"; import "./description.scss"; diff --git a/src/components/Footer/Footer.jsx b/src/components/Footer/Footer.jsx index bc515722..24fc8e70 100644 --- a/src/components/Footer/Footer.jsx +++ b/src/components/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 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 "./footer.scss"; diff --git a/src/components/Form/Form.jsx b/src/components/Form/Form.jsx index 0c1c1231..69e10625 100644 --- a/src/components/Form/Form.jsx +++ b/src/components/Form/Form.jsx @@ -2,8 +2,8 @@ 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 "../Loader/Loader"; +import { apiRequest } from "@api/request"; +import { Loader } from "@components/Loader/Loader"; import Swal from "sweetalert2"; import withReactContent from "sweetalert2-react-content"; diff --git a/src/components/FreeDevelopers/FreeDevelopers.jsx b/src/components/FreeDevelopers/FreeDevelopers.jsx index 9d7a26b0..3e3ab98f 100644 --- a/src/components/FreeDevelopers/FreeDevelopers.jsx +++ b/src/components/FreeDevelopers/FreeDevelopers.jsx @@ -1,15 +1,16 @@ import React from "react"; import { Link } from "react-router-dom"; -import AuthHeader from "../AuthHeader/AuthHeader"; -import SideBar from "../SideBar/SideBar"; -import { Footer } from "../Footer/Footer"; -import { scrollToForm } from "../../helper"; -import { ProfileBreadcrumbs } from "../ProfileBreadcrumbs/ProfileBreadcrumbs"; -import BaseButton from "../Common/BaseButton/BaseButton"; +import { scrollToForm } from "@utils/helper"; -import mockWorker from "../../assets/images/mock/mokPerson.png"; -import arrow from "../../assets/icons/arrows/arrow_left.png"; +import AuthHeader from "@components/AuthHeader/AuthHeader"; +import SideBar from "@components/SideBar/SideBar"; +import { Footer } from "@components/Footer/Footer"; +import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; +import BaseButton from "@components/Common/BaseButton/BaseButton"; + +import mockWorker from "assets/images/mock/mokPerson.png"; +import arrow from "assets/icons/arrows/arrow_left.png"; import "./freeDevelopers.scss"; diff --git a/src/components/FrequentlyAskedQuestionsItem/FrequentlyAskedQuestionsItem.jsx b/src/components/FrequentlyAskedQuestionsItem/FrequentlyAskedQuestionsItem.jsx index 741740f7..386ef6de 100644 --- a/src/components/FrequentlyAskedQuestionsItem/FrequentlyAskedQuestionsItem.jsx +++ b/src/components/FrequentlyAskedQuestionsItem/FrequentlyAskedQuestionsItem.jsx @@ -1,7 +1,7 @@ import React from "react"; import { Link } from "react-router-dom"; -import questionIcon from "./../../assets/images/faq/question.svg"; +import questionIcon from "assets/images/faq/question.svg"; import "./FrequentlyAskedQuestionsItem.scss"; diff --git a/src/components/Header/Header.jsx b/src/components/Header/Header.jsx index b8202c0a..4bc82908 100644 --- a/src/components/Header/Header.jsx +++ b/src/components/Header/Header.jsx @@ -1,6 +1,6 @@ import React from "react"; -import { LogoutButton } from "../LogoutButton/LogoutButton"; +import { LogoutButton } from "@components/LogoutButton/LogoutButton"; import "./header.scss"; diff --git a/src/components/LogoutButton/LogoutButton.jsx b/src/components/LogoutButton/LogoutButton.jsx index 7f52adf8..991a2f67 100644 --- a/src/components/LogoutButton/LogoutButton.jsx +++ b/src/components/LogoutButton/LogoutButton.jsx @@ -2,9 +2,9 @@ import React, { useState } from "react"; import { useNavigate } from "react-router-dom"; import { useSelector } from "react-redux"; -import { useLogout } from "../../hooks/useLogout"; -import { Loader } from "../Loader/Loader"; -import { getRole } from "../../redux/roleSlice"; +import { useLogout } from "@hooks/useLogout"; +import { Loader } from "@components/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 ddc99615..412b40c2 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 "../../Common/ModalLayout/ModalLayout"; -import BaseButton from "../../Common/BaseButton/BaseButton"; -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 interview from "../../../assets/images/logo/interviewLogo.svg"; +import ModalLayout from "@components/Common/ModalLayout/ModalLayout"; +import BaseButton from "@components/Common/BaseButton/BaseButton"; + +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 interview from "assets/images/logo/interviewLogo.svg"; import "./modalAspirant.scss"; diff --git a/src/components/Modal/ModalErrorLogin/ModalErrorLogin.jsx b/src/components/Modal/ModalErrorLogin/ModalErrorLogin.jsx index 06419a0b..2f4ee9b9 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 "../../Common/ModalLayout/ModalLayout"; -import BaseButton from "../../Common/BaseButton/BaseButton"; +import ModalLayout from "@components/Common/ModalLayout/ModalLayout"; +import BaseButton from "@components/Common/BaseButton/BaseButton"; import "./modalErrorLogin.scss"; diff --git a/src/components/Modal/ModalRegistration/ModalRegistration.jsx b/src/components/Modal/ModalRegistration/ModalRegistration.jsx index ce454363..7804b058 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 "../../Common/ModalLayout/ModalLayout"; -import BaseButton from "../../Common/BaseButton/BaseButton"; +import ModalLayout from "@components/Common/ModalLayout/ModalLayout"; +import BaseButton from "@components/Common/BaseButton/BaseButton"; -import telegramLogo from "../../../assets/icons/tgLogo.svg"; -import doc from "../../../assets/icons/doc.svg"; -import anyMoment from "../../../assets/icons/anyMoment.svg"; +import telegramLogo from "assets/icons/tgLogo.svg"; +import doc from "assets/icons/doc.svg"; +import anyMoment from "assets/icons/anyMoment.svg"; import "./modalRegistration.scss"; diff --git a/src/components/Modal/Tracker/ModalTicket/ModalTicket.jsx b/src/components/Modal/Tracker/ModalTicket/ModalTicket.jsx index d6efa834..494f2954 100644 --- a/src/components/Modal/Tracker/ModalTicket/ModalTicket.jsx +++ b/src/components/Modal/Tracker/ModalTicket/ModalTicket.jsx @@ -1,31 +1,28 @@ import React, { useEffect, useState } from "react"; import { Link } from "react-router-dom"; - -import { apiRequest } from "../../../../api/request"; import { useDispatch } from "react-redux"; -import { urlForLocal } from "../../../../helper"; -import { - modalToggle, - setProjectBoardFetch, -} from "../../../../redux/projectsTrackerSlice"; -import { getCorrectDate } from "../../../../components/Calendar/calendarHelper"; -import TrackerModal from "../../../UI/TrackerModal/TrackerModal"; -import ModalLayout from "../../../Common/ModalLayout/ModalLayout"; -import BaseButton from "../../../Common/BaseButton/BaseButton"; +import { apiRequest } from "@api/request"; +import { urlForLocal } from "@utils/helper"; +import { modalToggle, setProjectBoardFetch } from "@redux/projectsTrackerSlice"; +import { getCorrectDate } from "@components/Calendar/calendarHelper"; -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 del from "../../../../assets/icons/delete.svg"; -import edit from "../../../../assets/icons/edit.svg"; -import send from "../../../../assets/icons/send.svg"; -import plus from "../../../../assets/icons/plus.svg"; -import fullScreen from "../../../../assets/icons/arrows/inFullScreen.svg"; -import close from "../../../../assets/icons/closeProjectPersons.svg"; +import TrackerModal from "@components/UI/TrackerModal/TrackerModal"; +import ModalLayout from "@components/Common/ModalLayout/ModalLayout"; +import BaseButton from "@components/Common/BaseButton/BaseButton"; + +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 del from "assets/icons/delete.svg"; +import edit from "assets/icons/edit.svg"; +import send from "assets/icons/send.svg"; +import plus from "assets/icons/plus.svg"; +import fullScreen from "assets/icons/arrows/inFullScreen.svg"; +import close from "assets/icons/closeProjectPersons.svg"; import "./ModalTicket.scss"; diff --git a/src/components/Modal/Tracker/TicketFullScreen/TicketFullScreen.jsx b/src/components/Modal/Tracker/TicketFullScreen/TicketFullScreen.jsx index cf0af068..d13a8d33 100644 --- a/src/components/Modal/Tracker/TicketFullScreen/TicketFullScreen.jsx +++ b/src/components/Modal/Tracker/TicketFullScreen/TicketFullScreen.jsx @@ -1,14 +1,16 @@ import React, { useEffect, useState } from "react"; - -import { ProfileHeader } from "../../../ProfileHeader/ProfileHeader"; -import { ProfileBreadcrumbs } from "../../../ProfileBreadcrumbs/ProfileBreadcrumbs"; -import { Footer } from "../../../Footer/Footer"; import { Link, useParams, useNavigate } from "react-router-dom"; -import TrackerModal from "../../../UI/TrackerModal/TrackerModal"; -import { Navigation } from "../../../Navigation/Navigation"; -import { Loader } from "../../../Loader/Loader"; - import { useDispatch, useSelector } from "react-redux"; + +import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; +import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; +import { Footer } from "@components/Footer/Footer"; +import { getCorrectDate } from "@components/Calendar/calendarHelper"; +import BaseButton from "@components/Common/BaseButton/BaseButton"; +import TrackerModal from "@components/UI/TrackerModal/TrackerModal"; +import { Navigation } from "@components/Navigation/Navigation"; +import { Loader } from "@components/Loader/Loader"; + import { deletePersonOnProject, modalToggle, @@ -16,27 +18,25 @@ import { setToggleTab, getProjectBoard, getBoarderLoader, -} from "../../../../redux/projectsTrackerSlice"; -import { apiRequest } from "../../../../api/request"; -import { urlForLocal } from "../../../../helper"; -import { getCorrectDate } from "../../../Calendar/calendarHelper"; -import BaseButton from "../../../Common/BaseButton/BaseButton"; +} 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 archive2 from "../../../../assets/icons/archive.svg"; -import del from "../../../../assets/icons/delete.svg"; -import edit from "../../../../assets/icons/edit.svg"; -import close from "../../../../assets/icons/closeProjectPersons.svg"; +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 archive2 from "assets/icons/archive.svg"; +import del from "assets/icons/delete.svg"; +import edit from "assets/icons/edit.svg"; +import close from "assets/icons/closeProjectPersons.svg"; import "./ticketFullScreen.scss"; diff --git a/src/components/Navigation/Navigation.jsx b/src/components/Navigation/Navigation.jsx index 674a91f7..c0ccfa4f 100644 --- a/src/components/Navigation/Navigation.jsx +++ b/src/components/Navigation/Navigation.jsx @@ -1,11 +1,12 @@ import React, { useEffect, useState } from "react"; import { NavLink } from "react-router-dom"; -import { urlForLocal } from "../../helper"; -import { apiRequest } from "../../api/request"; import { useDispatch, useSelector } from "react-redux"; -import { getProfileInfo, setProfileInfo } from "../../redux/outstaffingSlice"; -import avatarMok from "../../assets/images/avatarMok.png"; +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(); diff --git a/src/components/Outstaffing/Outstaffing.jsx b/src/components/Outstaffing/Outstaffing.jsx index 4bb47901..f7a7d533 100644 --- a/src/components/Outstaffing/Outstaffing.jsx +++ b/src/components/Outstaffing/Outstaffing.jsx @@ -1,17 +1,18 @@ import React from "react"; import { useSelector, useDispatch } from "react-redux"; -import OutstaffingBlock from "../OutstaffingBlock/OutstaffingBlock"; -import TagSelect from "../Select/TagSelect"; +import OutstaffingBlock from "@components/OutstaffingBlock/OutstaffingBlock"; +import TagSelect from "@components/Select/TagSelect"; + import { selectTags, getPositionId, setPositionId, -} from "../../redux/outstaffingSlice"; +} 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 back from "assets/images/partnerProfile/back-end.webp"; +import design from "assets/images/partnerProfile/design.webp"; import "./outstaffing.scss"; diff --git a/src/components/OutstaffingBlock/OutstaffingBlock.jsx b/src/components/OutstaffingBlock/OutstaffingBlock.jsx index 65ee2429..8d099f48 100644 --- a/src/components/OutstaffingBlock/OutstaffingBlock.jsx +++ b/src/components/OutstaffingBlock/OutstaffingBlock.jsx @@ -1,13 +1,9 @@ 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 { apiRequest } from "../../api/request"; +import { selectItems, selectedItems, profiles } 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 39d71645..7fa70b5d 100644 --- a/src/components/ProfileCalendar/ProfileCalendar.jsx +++ b/src/components/ProfileCalendar/ProfileCalendar.jsx @@ -2,23 +2,24 @@ import React, { useEffect, useState } from "react"; import { useDispatch, useSelector } from "react-redux"; import { Link, Navigate } from "react-router-dom"; -import { getReports } from "../Calendar/calendarHelper"; -import moment from "moment"; -import { ProfileCalendarComponent } from "./ProfileCalendarComponent"; -import { Loader } from "../Loader/Loader"; -import { ProfileHeader } from "../ProfileHeader/ProfileHeader"; -import { ProfileBreadcrumbs } from "../ProfileBreadcrumbs/ProfileBreadcrumbs"; -import { Footer } from "../Footer/Footer"; -import { Navigation } from "../Navigation/Navigation"; -import { urlForLocal } from "../../helper"; -import { apiRequest } from "../../api/request"; -import { getProfileInfo } from "../../redux/outstaffingSlice"; +import { urlForLocal } from "@utils/helper"; +import { apiRequest } from "@api/request"; +import { getProfileInfo } from "@redux/outstaffingSlice"; import { getRequestDates, setReportDate, setRequestDate, -} from "../../redux/reportSlice"; +} from "@redux/reportSlice"; +import { getReports } from "@components/Calendar/calendarHelper"; +import { ProfileCalendarComponent } from "./ProfileCalendarComponent"; +import { Loader } from "@components/Loader/Loader"; +import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; +import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; +import { Footer } from "@components/Footer/Footer"; +import { Navigation } from "@components/Navigation/Navigation"; + +import moment from "moment"; import "moment/locale/ru"; import "./profileCalendar.scss"; diff --git a/src/components/ProfileCalendar/ProfileCalendarComponent.jsx b/src/components/ProfileCalendar/ProfileCalendarComponent.jsx index 03bf0498..b9fb9276 100644 --- a/src/components/ProfileCalendar/ProfileCalendarComponent.jsx +++ b/src/components/ProfileCalendar/ProfileCalendarComponent.jsx @@ -6,23 +6,23 @@ import { setReportDate, setRequestDate, setSendRequest, -} from "../../redux/reportSlice"; +} from "@redux/reportSlice"; import { calendarHelper, currentMonthAndDay, getReports, hourOfNum, -} from "../Calendar/calendarHelper"; -import ShortReport from "../ShortReport/ShortReport"; +} from "@components/Calendar/calendarHelper"; +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 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 "./../Calendar/calendarComponent.scss"; +import "@components/Calendar/calendarComponent.scss"; export const ProfileCalendarComponent = React.memo( ({ value, setValueHandler, reports, totalHours }) => { diff --git a/src/components/ProfileHeader/ProfileHeader.jsx b/src/components/ProfileHeader/ProfileHeader.jsx index f0fc4bf8..f842db27 100644 --- a/src/components/ProfileHeader/ProfileHeader.jsx +++ b/src/components/ProfileHeader/ProfileHeader.jsx @@ -2,10 +2,10 @@ import React, { useEffect, useState } from "react"; import { useNavigate, NavLink } from "react-router-dom"; import { useDispatch, useSelector } from "react-redux"; -import { Loader } from "../Loader/Loader"; -import { apiRequest } from "../../api/request"; -import { auth, setProfileInfo } from "../../redux/outstaffingSlice"; -import { getRole } from "../../redux/roleSlice"; +import { Loader } from "@components/Loader/Loader"; +import { apiRequest } from "@api/request"; +import { auth, setProfileInfo } from "@redux/outstaffingSlice"; +import { getRole } from "@redux/roleSlice"; import "./profileHeader.scss"; diff --git a/src/components/ProjectTiket/ProjectTiket.jsx b/src/components/ProjectTiket/ProjectTiket.jsx index 7a109312..1aeaa07f 100644 --- a/src/components/ProjectTiket/ProjectTiket.jsx +++ b/src/components/ProjectTiket/ProjectTiket.jsx @@ -1,16 +1,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 { ModalSelect } from "../UI/ModalSelect/ModalSelect"; -import TrackerModal from "../UI/TrackerModal/TrackerModal"; +import { apiRequest } from "@api/request"; +import { deleteProject, modalToggle } from "@redux/projectsTrackerSlice"; -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 { ModalSelect } from "@components/UI/ModalSelect/ModalSelect"; +import TrackerModal from "@components/UI/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 "./projectTiket.scss"; diff --git a/src/components/ProtectedRoute/ProtectedRoute.js b/src/components/ProtectedRoute/ProtectedRoute.js index f58db84f..117c39b1 100644 --- a/src/components/ProtectedRoute/ProtectedRoute.js +++ b/src/components/ProtectedRoute/ProtectedRoute.js @@ -2,7 +2,7 @@ import React from "react"; import { useSelector } from "react-redux"; import { Route, Redirect } from "react-router-dom"; -import { selectAuth } from "../../redux/outstaffingSlice"; +import { selectAuth } from "@redux/outstaffingSlice"; export const ProtectedRoute = ({ component: Component, ...rest }) => { const isAuth = useSelector(selectAuth); diff --git a/src/components/ReportForm/ReportForm.jsx b/src/components/ReportForm/ReportForm.jsx index 4c886644..92c6713a 100644 --- a/src/components/ReportForm/ReportForm.jsx +++ b/src/components/ReportForm/ReportForm.jsx @@ -10,19 +10,19 @@ import { import ru from "date-fns/locale/ru"; registerLocale("ru", ru); -import { Loader } from "../Loader/Loader"; -import { Footer } from "../Footer/Footer"; -import { ProfileHeader } from "../ProfileHeader/ProfileHeader"; -import { ProfileBreadcrumbs } from "../ProfileBreadcrumbs/ProfileBreadcrumbs"; +import { Loader } from "@components/Loader/Loader"; +import { Footer } from "@components/Footer/Footer"; +import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; +import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; -import { apiRequest } from "../../api/request"; -import { Navigation } from "../Navigation/Navigation"; -import { getReportDate } from "../../redux/reportSlice"; +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 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"; diff --git a/src/components/Select/TagSelect.jsx b/src/components/Select/TagSelect.jsx index 9e886956..8436b9b0 100644 --- a/src/components/Select/TagSelect.jsx +++ b/src/components/Select/TagSelect.jsx @@ -2,15 +2,15 @@ import React, { useState } from "react"; import { useSelector, useDispatch } from "react-redux"; import Select from "react-select"; -import { Loader } from "../Loader/Loader"; -import { apiRequest } from "../../api/request"; +import { Loader } from "@components/Loader/Loader"; +import { apiRequest } from "@api/request"; import { selectedItems, selectItems, selectTags, profiles, setPositionId, -} from "../../redux/outstaffingSlice"; +} from "@redux/outstaffingSlice"; import "./tagSelect.scss"; diff --git a/src/components/ShortReport/ShortReport.jsx b/src/components/ShortReport/ShortReport.jsx index 14e4333a..eaf99899 100644 --- a/src/components/ShortReport/ShortReport.jsx +++ b/src/components/ShortReport/ShortReport.jsx @@ -2,18 +2,18 @@ import React, { useState } from "react"; import { useDispatch, useSelector } from "react-redux"; import { Link } from "react-router-dom"; -import { apiRequest } from "../../api/request"; +import { apiRequest } from "@api/request"; import { getCorrectDate, getCreatedDate, hourOfNum, -} from "../../components/Calendar/calendarHelper"; +} from "@components/Calendar/calendarHelper"; import { getReportDate, getSendRequest, setSendRequest, -} from "../../redux/reportSlice"; -import { Loader } from "../Loader/Loader"; +} from "@redux/reportSlice"; +import { Loader } from "@components/Loader/Loader"; import "./shortReport.scss"; diff --git a/src/components/SideBar/SideBar.jsx b/src/components/SideBar/SideBar.jsx index b0ba62ca..8e2e4c72 100644 --- a/src/components/SideBar/SideBar.jsx +++ b/src/components/SideBar/SideBar.jsx @@ -1,8 +1,8 @@ import React, { useState } from "react"; import { Link } from "react-router-dom"; -import arrow from "../../assets/icons/sideBarArrow.svg"; -import LogoITguild from "../../assets/images/logo/LogoITguild.svg"; +import arrow from "assets/icons/sideBarArrow.svg"; +import LogoITguild from "assets/images/logo/LogoITguild.svg"; import "./sidebar.scss"; diff --git a/src/components/SliderWorkers/SliderWorkers.jsx b/src/components/SliderWorkers/SliderWorkers.jsx index 4e55298b..e08d9a54 100644 --- a/src/components/SliderWorkers/SliderWorkers.jsx +++ b/src/components/SliderWorkers/SliderWorkers.jsx @@ -2,9 +2,9 @@ import React, { useState } from "react"; import Slider from "react-slick"; import { Link } from "react-router-dom"; -import BaseButton from "../Common/BaseButton/BaseButton"; +import BaseButton from "@components/Common/BaseButton/BaseButton"; -import mockWorker from "../../assets/images/mock/mokPerson.png"; +import mockWorker from "assets/images/mock/mokPerson.png"; import "./sliderWorkers.scss"; import "slick-carousel/slick/slick.css"; diff --git a/src/components/UI/CardArticle/CardArticle.jsx b/src/components/UI/CardArticle/CardArticle.jsx index d7867bf6..2bd52b99 100644 --- a/src/components/UI/CardArticle/CardArticle.jsx +++ b/src/components/UI/CardArticle/CardArticle.jsx @@ -1,7 +1,7 @@ import React from "react"; import { Link } from "react-router-dom"; -import cardCalendar from "../../../assets/icons/cardCalendar.svg"; +import cardCalendar from "assets/icons/cardCalendar.svg"; import "./cardArticle.scss"; diff --git a/src/components/UI/TrackerModal/TrackerModal.jsx b/src/components/UI/TrackerModal/TrackerModal.jsx index a93be42b..e85bd65e 100644 --- a/src/components/UI/TrackerModal/TrackerModal.jsx +++ b/src/components/UI/TrackerModal/TrackerModal.jsx @@ -1,8 +1,8 @@ import React, { useEffect, useState } from "react"; - import { useDispatch, useSelector } from "react-redux"; -import { apiRequest } from "../../../api/request"; -import { urlForLocal } from "../../../helper"; + +import { apiRequest } from "@api/request"; +import { urlForLocal } from "@utils/helper"; import { setColumnName, getProjectBoard, @@ -14,9 +14,9 @@ import { getColumnName, getColumnId, addPersonToProject, -} from "../../../redux/projectsTrackerSlice"; +} from "@redux/projectsTrackerSlice"; -import arrowDown from "../../../assets/icons/arrows/selectArrow.png"; +import arrowDown from "assets/icons/arrows/selectArrow.png"; import "./trackerModal.scss"; diff --git a/src/components/features/Candidate-lk/HeadBottom.js b/src/components/features/Candidate-lk/HeadBottom.js index d1997fa2..04c628e5 100644 --- a/src/components/features/Candidate-lk/HeadBottom.js +++ b/src/components/features/Candidate-lk/HeadBottom.js @@ -1,6 +1,6 @@ import React from "react"; -import medium_male from "../../../assets/images/medium_male.png"; +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 01139380..5b2aa4dd 100644 --- a/src/components/features/quiz/AlertResult.js +++ b/src/components/features/quiz/AlertResult.js @@ -1,6 +1,6 @@ import React from "react"; -import suucessIcon from "../../../assets/images/quiz/success.png"; +import suucessIcon from "assets/images/quiz/success.png"; export const AlertResult = () => { const successTest = false; diff --git a/src/components/features/quiz/BlockCompletedTest.js b/src/components/features/quiz/BlockCompletedTest.js index 743b1c9a..61afbee4 100644 --- a/src/components/features/quiz/BlockCompletedTest.js +++ b/src/components/features/quiz/BlockCompletedTest.js @@ -1,7 +1,7 @@ import React from "react"; import { Link } from "react-router-dom"; -import compltedImage from "../../../assets/images/quiz/compltedImage.png"; +import compltedImage from "assets/images/quiz/compltedImage.png"; export const BlockCompletedTest = () => { const id = localStorage.getItem("id"); diff --git a/src/components/features/quiz/Card-introduction.js b/src/components/features/quiz/Card-introduction.js index 1c82db49..5a0d84a2 100644 --- a/src/components/features/quiz/Card-introduction.js +++ b/src/components/features/quiz/Card-introduction.js @@ -1,6 +1,6 @@ import React from "react"; -import questionIcon from "../../../assets/images/question.png"; +import questionIcon from "assets/images/question.png"; import "./quiz.scss"; diff --git a/src/components/features/quiz/CardAviableTest.js b/src/components/features/quiz/CardAviableTest.js index cfb0e23a..01c1d763 100644 --- a/src/components/features/quiz/CardAviableTest.js +++ b/src/components/features/quiz/CardAviableTest.js @@ -1,8 +1,9 @@ import React from "react"; import { Link } from "react-router-dom"; -import rightArrow from "../../../assets/icons/arrows/arrowRight.svg"; -import StarRating from "../../StarRating/StarRating"; +import StarRating from "@components/StarRating/StarRating"; + +import rightArrow from "assets/icons/arrows/arrowRight.svg"; export const CardAvailableTest = ({ title, description, path, passedTest }) => { return ( diff --git a/src/components/features/quiz/GetOptionTask.js b/src/components/features/quiz/GetOptionTask.js index 1f28627c..f56dab9b 100644 --- a/src/components/features/quiz/GetOptionTask.js +++ b/src/components/features/quiz/GetOptionTask.js @@ -1,6 +1,7 @@ import React from "react"; import { useSelector } from "react-redux"; -import { selectedTest } from "../../../redux/quizSlice"; + +import { selectedTest } from "@redux/quizSlice"; export const GetOptionTask = ({ type, answer, handleChange, inputValue }) => { const id = localStorage.getItem("id"); diff --git a/src/components/features/quiz/HeaderPageTests.js b/src/components/features/quiz/HeaderPageTests.js index 0c7d3a1b..39347c2d 100644 --- a/src/components/features/quiz/HeaderPageTests.js +++ b/src/components/features/quiz/HeaderPageTests.js @@ -1,8 +1,8 @@ import { Link } from "react-router-dom"; import { useSelector } from "react-redux"; -import { selectedTest, selectUserInfo } from "../../../redux/quizSlice"; -import { urlForLocal } from "../../../helper"; +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 f515a844..2c254743 100644 --- a/src/components/features/quiz/HeaderQuiz.js +++ b/src/components/features/quiz/HeaderQuiz.js @@ -1,9 +1,9 @@ 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 "../../../helper"; +import { selectUserInfo, setUserInfo } from "@redux/quizSlice"; +import { apiRequest } from "@api/request"; +import { urlForLocal } from "@utils/helper"; import "./quiz.scss"; diff --git a/src/components/features/quiz/Instructions.js b/src/components/features/quiz/Instructions.js index 4f435d40..40c16837 100644 --- a/src/components/features/quiz/Instructions.js +++ b/src/components/features/quiz/Instructions.js @@ -1,11 +1,11 @@ import { Link } from "react-router-dom"; -import { apiRequest } from "../../../api/request"; - import { useEffect, useState } from "react"; import { useSelector } from "react-redux"; -import { selectedTest } from "../../../redux/quizSlice"; -import comment from "./../../../assets/icons/comment.jpg"; +import { apiRequest } from "@api/request"; +import { selectedTest } from "@redux/quizSlice"; + +import comment from "assets/icons/comment.jpg"; import "./quiz.scss"; diff --git a/src/components/features/quiz/MyTestsQuiz.js b/src/components/features/quiz/MyTestsQuiz.js index 4c49db59..4d48ba0f 100644 --- a/src/components/features/quiz/MyTestsQuiz.js +++ b/src/components/features/quiz/MyTestsQuiz.js @@ -1,10 +1,10 @@ import { Link } from "react-router-dom"; import { useDispatch } from "react-redux"; -import { setSelectedTest } from "../../../redux/quizSlice"; -import { urlForLocal } from "../../../helper"; +import { setSelectedTest } from "@redux/quizSlice"; +import { urlForLocal } from "@utils/helper"; -import calendarImage from "./../../../assets/icons/calendar.svg"; +import calendarImage from "assets/icons/calendar.svg"; import "./quiz.scss"; diff --git a/src/components/features/quiz/Quiz-passing-information.js b/src/components/features/quiz/Quiz-passing-information.js index 390baa98..0eb4ec19 100644 --- a/src/components/features/quiz/Quiz-passing-information.js +++ b/src/components/features/quiz/Quiz-passing-information.js @@ -2,11 +2,11 @@ import React, { useEffect } from "react"; import { useSelector } from "react-redux"; import { useTimer } from "react-timer-hook"; -import StarRating from "../../StarRating/StarRating"; -import { completedTestSelector } from "../../../redux/quizSlice"; +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"; +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 } = diff --git a/src/components/features/quiz/QuizReport.js b/src/components/features/quiz/QuizReport.js index d2d60637..41e22fe3 100644 --- a/src/components/features/quiz/QuizReport.js +++ b/src/components/features/quiz/QuizReport.js @@ -1,6 +1,6 @@ import React from "react"; -import StarRating from "../../StarRating/StarRating"; +import StarRating from "@components/StarRating/StarRating"; export const QuizReport = () => { return ( diff --git a/src/components/features/quiz/Results.js b/src/components/features/quiz/Results.js index aedf0d4f..dd273286 100644 --- a/src/components/features/quiz/Results.js +++ b/src/components/features/quiz/Results.js @@ -1,12 +1,8 @@ import React, { useEffect, useState } from "react"; import { useDispatch, useSelector } from "react-redux"; -import { - fetchResultTest, - selectedTest, - selectResult, -} from "../../../redux/quizSlice"; -import { apiRequest } from "../../../api/request"; +import { fetchResultTest, selectedTest, selectResult } from "@redux/quizSlice"; +import { apiRequest } from "@api/request"; export const Results = () => { const result = useSelector(selectResult); diff --git a/src/components/features/quiz/SelectedCategory.js b/src/components/features/quiz/SelectedCategory.js index 48d1903f..cf72f558 100644 --- a/src/components/features/quiz/SelectedCategory.js +++ b/src/components/features/quiz/SelectedCategory.js @@ -1,6 +1,6 @@ import React from "react"; -import iconSpecialization from "../../../assets/images/partnerProfile/personalBackEnd.svg"; +import iconSpecialization from "assets/images/partnerProfile/personalBackEnd.svg"; export const SelectedCategory = ({ setSelectedCategory }) => { return ( diff --git a/src/components/features/quiz/Task.js b/src/components/features/quiz/Task.js index 1788ca20..58c9a3d7 100644 --- a/src/components/features/quiz/Task.js +++ b/src/components/features/quiz/Task.js @@ -2,7 +2,7 @@ import React, { useEffect, useState } from "react"; import { useNavigate } from "react-router-dom"; import { useSelector, useDispatch } from "react-redux"; -import { apiRequest } from "../../../api/request"; +import { apiRequest } from "@api/request"; import { HeaderQuiz } from "./HeaderQuiz"; import { Progressbar } from "./ProgressbarQuiz"; @@ -16,9 +16,9 @@ import { questionsSelector, setAnswers, setCompleteTest, -} from "./../../../redux/quizSlice"; +} from "@redux/quizSlice"; -import questionIcon from "../../../assets/images/question.png"; +import questionIcon from "assets/images/question.png"; import "./quiz.scss"; diff --git a/src/pages/AuthForDevelopers/AuthForDevelopers.jsx b/src/pages/AuthForDevelopers/AuthForDevelopers.jsx index 87496f46..6e4b18e8 100644 --- a/src/pages/AuthForDevelopers/AuthForDevelopers.jsx +++ b/src/pages/AuthForDevelopers/AuthForDevelopers.jsx @@ -8,7 +8,7 @@ import SliderWorkers from "../../components/SliderWorkers/SliderWorkers"; import { AuthBox } from "../../components/AuthBox/AuthBox"; import { selectAuth } from "../../redux/outstaffingSlice"; import { Link, useNavigate } from "react-router-dom"; -import { scrollToForm } from "../../helper"; +import { scrollToForm } from "../../utils/helper"; import arrow from "../../assets/icons/arrows/arrow__login_page.png"; import medium from "../../assets/images/medium_male_big.png"; diff --git a/src/pages/AuthForPartners/AuthForPartners.jsx b/src/pages/AuthForPartners/AuthForPartners.jsx index c1f73e59..b50ca90a 100644 --- a/src/pages/AuthForPartners/AuthForPartners.jsx +++ b/src/pages/AuthForPartners/AuthForPartners.jsx @@ -9,7 +9,7 @@ import SliderWorkers from "../../components/SliderWorkers/SliderWorkers"; import { useSelector } from "react-redux"; import { selectAuth } from "../../redux/outstaffingSlice"; import { Link, useNavigate } from "react-router-dom"; -import { scrollToForm } from "../../helper"; +import { scrollToForm } from "../../utils/helper"; import arrow from "../../assets/icons/arrows/arrow__login_page.png"; import authImg from "../../assets/images/auth_img.png"; diff --git a/src/pages/FormPage/FormPage.jsx b/src/pages/FormPage/FormPage.jsx index 92091e00..0f29db3a 100644 --- a/src/pages/FormPage/FormPage.jsx +++ b/src/pages/FormPage/FormPage.jsx @@ -3,13 +3,13 @@ import { useDispatch, useSelector } from "react-redux"; import { useParams, useNavigate, Navigate } from "react-router-dom"; import SVG from "react-inlinesvg"; -import { LEVELS, SKILLS } from "../../constants/constants"; +import { LEVELS, SKILLS } from "../../utils/constants"; import { currentCandidate, selectCurrentCandidate, } from "../../redux/outstaffingSlice"; import { apiRequest } from "../../api/request"; -import { urlForLocal } from "../../helper"; +import { urlForLocal } from "../../utils/helper"; import Form from "../../components/Form/Form"; import { Footer } from "../../components/Footer/Footer"; diff --git a/src/pages/PartnerBid/PartnerBid.jsx b/src/pages/PartnerBid/PartnerBid.jsx index 9a13a3ea..08414cbd 100644 --- a/src/pages/PartnerBid/PartnerBid.jsx +++ b/src/pages/PartnerBid/PartnerBid.jsx @@ -17,7 +17,7 @@ import ModalLayout from "../../components/Common/ModalLayout/ModalLayout"; import { getCorrectDate } from "../../components/Calendar/calendarHelper"; import { apiRequest } from "../../api/request"; -import { urlForLocal } from "../../helper"; +import { urlForLocal } from "../../utils/helper"; import arrowSwitchDate from "../../assets/icons/arrows/arrowViewReport.png"; import backEndImg from "../../assets/images/QualificationInfo.png"; diff --git a/src/pages/Profile/Profile.js b/src/pages/Profile/Profile.js index 36d0cd28..5a71d350 100644 --- a/src/pages/Profile/Profile.js +++ b/src/pages/Profile/Profile.js @@ -2,7 +2,7 @@ import React, { useState } from "react"; import { useSelector } from "react-redux"; import { getProfileInfo } from "../../redux/outstaffingSlice"; -import { urlForLocal } from "../../helper"; +import { urlForLocal } from "../../utils/helper"; import { ProfileHeader } from "../../components/ProfileHeader/ProfileHeader"; import { ProfileBreadcrumbs } from "../../components/ProfileBreadcrumbs/ProfileBreadcrumbs"; diff --git a/src/pages/ProjectTracker/ProjectTracker.js b/src/pages/ProjectTracker/ProjectTracker.js index 03bf0a57..f2aa550d 100644 --- a/src/pages/ProjectTracker/ProjectTracker.js +++ b/src/pages/ProjectTracker/ProjectTracker.js @@ -5,7 +5,7 @@ import { ProfileBreadcrumbs } from "../../components/ProfileBreadcrumbs/ProfileB import { Footer } from "../../components/Footer/Footer"; import { Navigation } from "../../components/Navigation/Navigation"; import { Loader } from "../../components/Loader/Loader"; -import { urlForLocal } from "../../helper"; +import { urlForLocal } from "../../utils/helper"; import { useDispatch, useSelector } from "react-redux"; import { apiRequest } from "../../api/request"; diff --git a/src/pages/Summary/Summary.js b/src/pages/Summary/Summary.js index 7d2ee474..499caa40 100644 --- a/src/pages/Summary/Summary.js +++ b/src/pages/Summary/Summary.js @@ -6,7 +6,7 @@ import { ProfileHeader } from "../../components/ProfileHeader/ProfileHeader"; import { getProfileInfo } from "../../redux/outstaffingSlice"; import { ProfileBreadcrumbs } from "../../components/ProfileBreadcrumbs/ProfileBreadcrumbs"; import { Footer } from "../../components/Footer/Footer"; -import { urlForLocal } from "../../helper"; +import { urlForLocal } from "../../utils/helper"; import { apiRequest } from "../../api/request"; import { Navigation } from "../../components/Navigation/Navigation"; diff --git a/src/pages/Tracker/Tracker.js b/src/pages/Tracker/Tracker.js index 436aace6..aaee8418 100644 --- a/src/pages/Tracker/Tracker.js +++ b/src/pages/Tracker/Tracker.js @@ -16,7 +16,7 @@ import { apiRequest } from "../../api/request"; import { Navigation } from "../../components/Navigation/Navigation"; import TrackerModal from "../../components/UI/TrackerModal/TrackerModal"; import ProjectTiket from "../../components/ProjectTiket/ProjectTiket"; -import { urlForLocal } from "../../helper"; +import { urlForLocal } from "../../utils/helper"; import { getCorrectDate } from "../../components/Calendar/calendarHelper"; import { Loader } from "../../components/Loader/Loader"; diff --git a/src/constants/constants.js b/src/utils/constants.js similarity index 100% rename from src/constants/constants.js rename to src/utils/constants.js diff --git a/src/helper.js b/src/utils/helper.js similarity index 100% rename from src/helper.js rename to src/utils/helper.js