fix report

This commit is contained in:
Николай Полтщук 2023-01-16 21:11:46 +03:00
parent 50ab182135
commit bcf89c01f5

View File

@ -1,5 +1,5 @@
import React, { useEffect, useState } from 'react'
import {useSelector} from 'react-redux'
import {useDispatch, useSelector} from 'react-redux'
import { Link } from 'react-router-dom'
import moment from "moment";
@ -11,9 +11,12 @@ import {ProfileHeader} from "../ProfileHeader/ProfileHeader";
import {useRequest} from "../../hooks/useRequest";
import { getProfileInfo } from '../../redux/outstaffingSlice'
import {setReportDate} from "../../redux/reportSlice";
import './profileCalendar.scss'
export const ProfileCalendar = () => {
const dispatch = useDispatch();
const profileInfo = useSelector(getProfileInfo);
const [month, setMonth] = useState('');
const [reports, setReports] = useState([]);
@ -58,7 +61,9 @@ export const ProfileCalendar = () => {
<p className='summary__name'>{profileInfo.fio} {profileInfo.specification}</p>
</div>
<Link to='/report'>
<button className="calendar__btn">Заполнить отчет за день</button>
<button className="calendar__btn" onClick={() => {
dispatch(setReportDate(''))
}}>Заполнить отчет за день</button>
</Link>
</div>
<div className='row'>