diff --git a/src/App.js b/src/App.js index 88965023..84bf489b 100644 --- a/src/App.js +++ b/src/App.js @@ -22,6 +22,8 @@ import {ViewReport} from './pages/ViewReport/ViewReport' import {Tracker} from './pages/Tracker/Tracker' import {Payouts} from './pages/Payouts/Payouts' import {Settings} from './pages/Settings/Settings' +import {PartnerRequests} from './pages/PartnerRequests/PartnerRequests' +import {PartnerAddRequest} from './pages/PartnerAddRequest/PartnerAddRequest' import './fonts/stylesheet.css' import 'bootstrap/dist/css/bootstrap.min.css' @@ -64,6 +66,8 @@ const App = () => { }/> }/> }/> + }/> + }/> }/> diff --git a/src/components/Calendar/calendar.scss b/src/components/Calendar/calendar.scss index 23bb98ef..07dbf74e 100644 --- a/src/components/Calendar/calendar.scss +++ b/src/components/Calendar/calendar.scss @@ -96,6 +96,12 @@ transform: scale(1.02); } + @media (max-width: 950px) { + width: 200px; + font-size: 15px; + height: 50px; + } + @media (max-width: 800px) { width: auto; height: auto; diff --git a/src/components/Calendar/calendarComponent.scss b/src/components/Calendar/calendarComponent.scss index 176fa833..ba69a3c7 100644 --- a/src/components/Calendar/calendarComponent.scss +++ b/src/components/Calendar/calendarComponent.scss @@ -29,11 +29,18 @@ &-box { display: flex; align-items: center; - margin-left: 40px; + margin-left: 20px; + cursor: pointer; img { - width: 6px; - height: 6px; + margin: 0px 10px; + width: 12px; + height: 12px; + + &:first-child { + transform: rotate(180deg); + margin: 0; + } } span { diff --git a/src/components/Calendar/calendarHelper.js b/src/components/Calendar/calendarHelper.js index 62cad531..30d8c7c7 100644 --- a/src/components/Calendar/calendarHelper.js +++ b/src/components/Calendar/calendarHelper.js @@ -53,7 +53,8 @@ export function currentMonthAndDay(day) { } export function getCorrectDate(day) { - return `${new Date(day).getDate()}-${new Date(day).getMonth() + 1}-${new Date(day).getFullYear()}` + const months = ['января', 'февраля', 'марта', 'апреля', 'мая', 'июня', 'июля', 'августа', 'сентября', 'октября', 'ноября', 'декабря'] + return `${new Date(day).getDate()} ${months[new Date(day).getMonth()]} ${new Date(day).getFullYear()} года` }; export function currentMonthAndDayReportPage() { diff --git a/src/components/ProfileCalendar/ProfileCalendarComponent.js b/src/components/ProfileCalendar/ProfileCalendarComponent.js index 5b438284..ef20a698 100644 --- a/src/components/ProfileCalendar/ProfileCalendarComponent.js +++ b/src/components/ProfileCalendar/ProfileCalendarComponent.js @@ -1,5 +1,5 @@ import React, { useState, useEffect } from 'react' -import ellipse from '../../images/ellipse.png' +import arrow from '../../images/arrowCalendar.png' import rectangle from '../../images/rectangle__calendar.png' import calendarIcon from '../../images/calendar_icon.png' import moment from 'moment' @@ -68,27 +68,27 @@ export const ProfileCalendarComponent = React.memo(({value, setValueHandler, rep

Мои отчеты

-
- - { - setValueHandler(prevMonth()) - dispatch(setRequestDate(getReports(prevMonth()))) - }}> +
{ + setValueHandler(prevMonth()) + dispatch(setRequestDate(getReports(prevMonth()))) + }}> + + {prevMonth().format('MMMM')}
{value.format('YYYY')}
-
- - { - setValueHandler(nextMonth()) - dispatch(setRequestDate(getReports(nextMonth()))) +
{ + setValueHandler(nextMonth()) + dispatch(setRequestDate(getReports(nextMonth()))) - }}> + }}> + {nextMonth().format('MMMM')} +
diff --git a/src/components/ProfileCalendar/profileCalendar.scss b/src/components/ProfileCalendar/profileCalendar.scss index 59fe1f93..36d8c739 100644 --- a/src/components/ProfileCalendar/profileCalendar.scss +++ b/src/components/ProfileCalendar/profileCalendar.scss @@ -53,4 +53,22 @@ transform: scale(1.02); } } + + .summary__info { + @media (max-width: 800px) { + .summary__name { + margin: 0; + max-width: 220px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } + } + + @media (max-width: 500px) { + .summary__name { + max-width: 150px; + } + } + } } diff --git a/src/components/ProfileHeader/ProfileHeader.js b/src/components/ProfileHeader/ProfileHeader.js index adc6055c..d63aae34 100644 --- a/src/components/ProfileHeader/ProfileHeader.js +++ b/src/components/ProfileHeader/ProfileHeader.js @@ -21,6 +21,45 @@ export const ProfileHeader = () => { const userRole = useSelector(getRole); const profileInfo = useSelector(getProfileInfo); + const [user] = useState('developer') + const [navInfo] = useState({ + developer: [ + { + path: '/summary', + name: 'Резюме' + }, + { + path: '/calendar', + name: 'Отчетность' + }, + { + path: '/tracker', + name: 'Трекер' + }, + { + path: '/payouts', + name: 'Выплаты' + }, + { + path: '/settings', + name: 'Настройки' + }, + ], + partner: [ + { + path: '/employees', + name: 'Сотрудники' + }, + { + path: '', + name: 'Отчетность' + }, + { + path: '/requests', + name: 'Запросы' + }, + ] + }) const [isLoggingOut, setIsLoggingOut] = useState(false); @@ -44,7 +83,14 @@ export const ProfileHeader = () => {
-

itguild.для разработчиков

+

itguild. + + {user === 'developer' ? + 'для разработчиков' : + 'для партнеров' + } + +

@@ -53,15 +99,20 @@ export const ProfileHeader = () => {
-

{profileInfo?.fio}

+

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

avatar diff --git a/src/components/ReportForm/ReportForm.js b/src/components/ReportForm/ReportForm.js index 7a579863..77163999 100644 --- a/src/components/ReportForm/ReportForm.js +++ b/src/components/ReportForm/ReportForm.js @@ -60,13 +60,11 @@ const ReportForm = () => { const totalHours = inputs.reduce((a, b) => a + b.hours_spent, 0); const deleteInput = (indexRemove) => { - if (indexRemove !== 0) { - setInputs((prev) => prev.filter((el, index) => index !== indexRemove)) - } + setInputs((prev) => prev.filter((el, index) => index !== indexRemove)) }; const handler = () => { - if(!inputs[0].task) { + if(!inputs[0].task || !inputs[0].hours_spent) { setReportSuccess('Заполните задачи'); setTimeout(() => setReportSuccess(''), 1000) return diff --git a/src/helper.js b/src/helper.js index 078e987e..46cfd13b 100644 --- a/src/helper.js +++ b/src/helper.js @@ -3,7 +3,7 @@ export function createMarkup(text) { } export function transformHtml(text) { - let startHtml = {__html: text.split('

||

||

||

').join('

').split('
')}; + let startHtml = {__html: text.split('

||

').join('

').split('
')}; startHtml = startHtml.__html.filter((el) => el !== null && el !== "" || el === 0 ); diff --git a/src/images/arrowCalendar.png b/src/images/arrowCalendar.png new file mode 100644 index 00000000..47d2e357 Binary files /dev/null and b/src/images/arrowCalendar.png differ diff --git a/src/images/arrowSelect.png b/src/images/arrowSelect.png new file mode 100644 index 00000000..04cc712f Binary files /dev/null and b/src/images/arrowSelect.png differ diff --git a/src/images/selectArrow.png b/src/images/selectArrow.png new file mode 100644 index 00000000..b610b0e9 Binary files /dev/null and b/src/images/selectArrow.png differ diff --git a/src/pages/PartnerAddRequest/PartnerAddRequest.js b/src/pages/PartnerAddRequest/PartnerAddRequest.js new file mode 100644 index 00000000..3ea3ad4a --- /dev/null +++ b/src/pages/PartnerAddRequest/PartnerAddRequest.js @@ -0,0 +1,98 @@ +import React from 'react'; + +import {ProfileHeader} from "../../components/ProfileHeader/ProfileHeader"; +import {Footer} from "../../components/Footer/Footer"; + +import arrowDown from "../../images/selectArrow.png" + +import './partnerAddRequest.scss' + +export const PartnerAddRequest = () => { + return ( +
+ +
+

Страница добавления заявки

+
+
+
+

Данные открытой позиции

+
+

Название вакансии

+
+ +
+
+
+

Выберите специализацию

+
+
+ Разработка + +
+
+ Backend Developer + +
+
+
+
+
+

Квалификация

+
+

Выберите уровень знаний

+
+ Разработка + +
+
+
+

Введите необходимое описание

+