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