fixes styles and routes

This commit is contained in:
2023-01-16 20:38:33 +03:00
parent f75510b20c
commit 50ab182135
9 changed files with 343 additions and 440 deletions

View File

@ -57,7 +57,7 @@ export const ProfileCalendar = () => {
<img src={profileInfo.photo} className='summary__avatar' alt='avatar'/>
<p className='summary__name'>{profileInfo.fio} {profileInfo.specification}</p>
</div>
<Link to='/profile/report'>
<Link to='/report'>
<button className="calendar__btn">Заполнить отчет за день</button>
</Link>
</div>

View File

@ -49,10 +49,10 @@ export const ProfileCalendarComponent = ({reportsDates}) => {
function correctRoute(day) {
for (const date of reportsDates) {
if (`${new Date(day).getFullYear()}-${correctDay(new Date(day).getMonth() + 1)}-${correctDay(new Date(day).getDate())}` === date.date) {
return `/view/report`
return `../../view/report`
}
}
return '/profile/report'
return '../../report'
}
// function prevMonth() {
@ -104,7 +104,7 @@ export const ProfileCalendarComponent = ({reportsDates}) => {
name={day.format('dddd')}
id='btn'
>
<Link to={() => correctRoute(day)}>
<Link to={correctRoute(day)}>
<img className={'calendar__icon'} src={calendarIcon} alt='' />
{currentMonthAndDay(day)}
</Link>

View File

@ -53,11 +53,11 @@ export const ProfileHeader = () => {
<div className='profileHeader__info'>
<div className='profileHeader__container'>
<nav className='profileHeader__nav'>
<NavLink to={'/summary'}>Резюме</NavLink>
<NavLink to={'/profile'}>Отчетность</NavLink>
<NavLink to={'/profile'}>Трекер</NavLink>
<NavLink to={'/profile'}>Выплаты</NavLink>
<NavLink to={'/profile'}>Настройки</NavLink>
<NavLink end to={'/profile/summary'}>Резюме</NavLink>
<NavLink end to={'/profile'}>Отчетность</NavLink>
<NavLink end to={'/'}>Трекер</NavLink>
<NavLink end to={'/'}>Выплаты</NavLink>
<NavLink end to={'/'}>Настройки</NavLink>
</nav>
<div className='profileHeader__personalInfo'>

View File

@ -51,7 +51,7 @@
}
a {
text-decoration: none;
text-decoration: none !important;
cursor: pointer;
font-weight: 700;
font-size: 18px;

View File

@ -79,7 +79,7 @@ const ReportForm = () => {
<h2 className='summary__title'>Ваши отчеты - <span>добавить отчет</span></h2>
<div>
<div className='report__head'>
<Link className='calendar__back' to={`/profile/profilecalendar`}>
<Link className='calendar__back' to={`/profile/calendar`}>
<img src={arrow} alt=''/><p>Вернуться</p>
</Link>
</div>