diff --git a/src/hooks/useRequest.js b/src/hooks/useRequest.js deleted file mode 100644 index e69de29b..00000000 diff --git a/src/pages/CalendarPage.js b/src/pages/CalendarPage.js deleted file mode 100644 index 98c183ea..00000000 --- a/src/pages/CalendarPage.js +++ /dev/null @@ -1,11 +0,0 @@ -import React from 'react'; -import { useNavigate } from 'react-router-dom'; -import { WithLogout } from '../hoc/withLogout'; -import Calendar from '../components/Calendar/Calendar'; - -const CalendarPage = () => { - - return ; -}; - -export default CalendarPage; diff --git a/src/pages/FormPage/FormPage.js b/src/pages/FormPage/FormPage.js index cd4a676d..1598701f 100644 --- a/src/pages/FormPage/FormPage.js +++ b/src/pages/FormPage/FormPage.js @@ -18,6 +18,7 @@ import {currentCandidate, selectCurrentCandidate} from '../../redux/outstaffingS import './formPage.scss' import {apiRequest} from "../../api/request"; +import {LogoutButton} from "../../components/LogoutButton/LogoutButton"; @@ -42,7 +43,9 @@ const FormPage = () => { } return ( - + + + @@ -53,6 +56,7 @@ const FormPage = () => { Вернуться к кандидату + @@ -92,7 +96,7 @@ const FormPage = () => { - + ) }; diff --git a/src/pages/FormPage/formPage.scss b/src/pages/FormPage/formPage.scss index 4d7171c5..bab80318 100644 --- a/src/pages/FormPage/formPage.scss +++ b/src/pages/FormPage/formPage.scss @@ -1,176 +1,174 @@ .form-page { - &__arrow { - display: flex; - justify-content: flex-start; - align-items: center; - margin-top: 80px; - margin-left: -32px; - cursor: pointer; + font-family: "GT Eesti Pro Display", sans-serif; - &-img { - cursor: pointer; - } + &__arrow { + display: flex; + justify-content: flex-start; + align-items: center; + cursor: pointer; + + &-img { + cursor: pointer; + } + } + + &__candidate { + margin-top: 60px; + margin-left: 48px; + display: flex; + } + + &__back { + margin-top: 80px; + padding: 0 20px; + display: flex; + justify-content: space-between; + &-to-candidate { + margin-left: 40px; + margin-right: 120px; + font-size: 1.8em; + font-weight: 100; + line-height: 36px; + } + } + + + &__avatar { + img { + width: 61px; + height: 61px; } - &__candidate { - margin-top: 60px; - margin-left: 48px; - display: flex; + margin-right: 16px; + } + + &__position { + color: #000000; + font-size: 22px; + font-weight: 700; + line-height: 36px; + } + + &__selected { + span { + color: #000000; + font-size: 10px; + font-weight: 300; + line-height: 22.38px; } - &__back-to-candidate { - margin-left: 40px; - margin-right: 120px; - font-family: 'GT Eesti Pro Display'; - font-size: 1.8em; - font-weight: 100; - line-height: 36px; + img { + width: 152px; + margin-right: 18px; } + } - &__avatar { - img { - width: 61px; - height: 61px; - } - margin-right: 16px; - } - - &__position { - color: #000000; - font-family: "GT Eesti Pro Display"; - font-size: 22px; - font-weight: 700; - line-height: 36px; - } - - &__selected { - span { - color: #000000; - font-family: "GT Eesti Pro Display"; - font-size: 10px; - font-weight: 300; - line-height: 22.38px; - } - - img { - width: 152px; - margin-right: 18px; - } - } - - &__interview { - display: flex; - justify-content: center; - align-items: center; - } - - &__form { - width: 45%; - } - - &__separator { - width: 10%; - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; - } - - &__line { - width: 3px; - height: 135px; - background-color: #e4f1f6; - margin-bottom: 26px; - } - - &__option { - color: #000000; - font-family: "GT Eesti Pro Display"; - font-size: 18px; - font-weight: 400; - font-style: normal; - letter-spacing: normal; - line-height: 36px; - text-align: center; - font-style: normal; - letter-spacing: normal; - line-height: normal; - } - - &__telegram { - width: 35%; - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; - - &-text { - width: 225px; - color: #000000; - font-family: "GT Eesti Pro Display"; - font-size: 18px; - font-weight: 400; - font-style: normal; - letter-spacing: normal; - line-height: 33px; - text-align: center; - font-style: normal; - letter-spacing: normal; - margin-bottom: 29px; - } + &__interview { + display: flex; + justify-content: center; + align-items: center; + } + + &__form { + width: 45%; + } + + &__separator { + width: 10%; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + } + + &__line { + width: 3px; + height: 135px; + background-color: #e4f1f6; + margin-bottom: 26px; + } + + &__option { + color: #000000; + font-size: 18px; + font-weight: 400; + font-style: normal; + letter-spacing: normal; + text-align: center; + line-height: normal; + } + + &__telegram { + width: 35%; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + + &-text { + width: 225px; + color: #000000; + font-size: 18px; + font-weight: 400; + font-style: normal; + letter-spacing: normal; + line-height: 33px; + text-align: center; + margin-bottom: 29px; } + } } -.form-page + .logout-button{ - top: 0px !important; - right: 2.5rem; +.form-page + .logout-button { + top: 0 !important; + right: 2.5rem; } .form-page footer { - margin-top: 6rem !important; + margin-top: 6rem !important; } @media (max-width: 991px) { - .form-page { - &__separator { - width: 20% - } - - &__telegram { - width: 25%; - } + .form-page { + &__separator { + width: 20% } + + &__telegram { + width: 25%; + } + } } @media (max-width: 767px) { - .form-page { - &__interview { - flex-direction: column; + .form-page { + &__interview { + flex-direction: column; - form { - margin-top: 48px; - } - } - - &__separator { - display: none; - } - - &__telegram { - margin-top: 5rem; - margin-bottom: 2rem; - } - - &__arrow-img { - display: none; - } - - form label { - line-height: initial; - } - - &__selected img { - width: 100px; - } + form { + margin-top: 48px; + } } + + &__separator { + display: none; + } + + &__telegram { + margin-top: 5rem; + margin-bottom: 2rem; + } + + &__arrow-img { + display: none; + } + + form label { + line-height: initial; + } + + &__selected img { + width: 100px; + } + } } \ No newline at end of file diff --git a/src/pages/ViewReport/ViewReport.js b/src/pages/ViewReport/ViewReport.js index 7a601274..25d026f9 100644 --- a/src/pages/ViewReport/ViewReport.js +++ b/src/pages/ViewReport/ViewReport.js @@ -1,9 +1,8 @@ import React, {useEffect, useState} from 'react' import {Link} from "react-router-dom"; -import {useRequest} from "../../hooks/useRequest"; + import {useSelector} from "react-redux"; import {getReportDate} from "../../redux/reportSlice"; -import SVG from 'react-inlinesvg' import {Loader} from "../../components/Loader/Loader" import {ProfileHeader} from "../../components/ProfileHeader/ProfileHeader"; @@ -13,6 +12,7 @@ import arrow from "../../images/right-arrow.png"; import arrowSwitchDate from "../../images/arrowViewReport.png"; import './viewReport.scss' +import {apiRequest} from "../../api/request"; export const ViewReport = () => { const getCreatedDate = (day) => { @@ -26,25 +26,24 @@ export const ViewReport = () => { return `${yyyy}-${mm}-${dd}` } }; - const {apiRequest} = useRequest(); const reportDate = useSelector(getReportDate); const [taskText, setTaskText] = useState([]); - const [difficulties, setDifficulties] = useState([]) - const [tomorrowTask, setTomorrowTask] = useState([]) + const [difficulties, setDifficulties] = useState([]); + const [tomorrowTask, setTomorrowTask] = useState([]); const [totalHours, setTotalHours] = useState(0); - const [reportDay] = useState(new Date (getCreatedDate(reportDate))) - const [currentDay] = useState(new Date ()) - const [loader, setLoader] = useState(false) + const [reportDay] = useState(new Date (getCreatedDate(reportDate))); + const [currentDay] = useState(new Date ()); + const [loader, setLoader] = useState(false); function getReportFromDate(day) { - setLoader(true) - setTaskText([]) - setDifficulties([]) - setTomorrowTask([]) + setLoader(true); + setTaskText([]); + setDifficulties([]); + setTomorrowTask([]); apiRequest(`reports/find-by-date?user_card_id=${localStorage.getItem('cardId')}&date=${day}`) .then(res => { - let spendTime = 0 + let spendTime = 0; for (const item of res) { if(item.difficulties) { setDifficulties(prevArray => [...prevArray, item.difficulties]) @@ -57,14 +56,14 @@ export const ViewReport = () => { hours: task.hours_spent, task: task.task, id: task.id - } + }; if(task.hours_spent) { spendTime += Number(task.hours_spent) } setTaskText(prevArray => [...prevArray, taskInfo]) }) } - setTotalHours(spendTime) + setTotalHours(spendTime); setLoader(false) }) }