Переписываю спорные решения
Фикс отправки отчета, проверка на массив в map в Description.js
This commit is contained in:
@ -9,12 +9,15 @@ import {ProfileCalendarComponent} from "./ProfileCalendarComponent";
|
||||
import { Footer } from '../Footer/Footer'
|
||||
import {ProfileHeader} from "../ProfileHeader/ProfileHeader";
|
||||
|
||||
import {useRequest} from "../../hooks/useRequest";
|
||||
import {urlForLocal} from "../../helper";
|
||||
|
||||
import {apiRequest} from "../../api/request";
|
||||
import { getProfileInfo } from '../../redux/outstaffingSlice'
|
||||
import {setReportDate} from "../../redux/reportSlice";
|
||||
|
||||
import './profileCalendar.scss'
|
||||
|
||||
|
||||
export const ProfileCalendar = () => {
|
||||
const dispatch = useDispatch();
|
||||
const profileInfo = useSelector(getProfileInfo);
|
||||
@ -23,13 +26,12 @@ export const ProfileCalendar = () => {
|
||||
const [totalHours, setTotalHours] = useState(0);
|
||||
const [requestDates, setRequestDates] = useState('');
|
||||
|
||||
const {apiRequest} = useRequest();
|
||||
|
||||
useEffect(() => {
|
||||
setRequestDates(getReports(moment()))
|
||||
});
|
||||
},[]);
|
||||
|
||||
useEffect(async () => {
|
||||
useEffect( () => {
|
||||
if (!requestDates) {
|
||||
return
|
||||
}
|
||||
@ -57,7 +59,7 @@ export const ProfileCalendar = () => {
|
||||
<h2 className='summary__title'>Ваши отчеты</h2>
|
||||
<div className='summary__info'>
|
||||
<div className='summary__person'>
|
||||
<img src={profileInfo.photo} className='summary__avatar' alt='avatar'/>
|
||||
<img src={urlForLocal(profileInfo.photo)} className='summary__avatar' alt='avatar'/>
|
||||
<p className='summary__name'>{profileInfo.fio} {profileInfo.specification}</p>
|
||||
</div>
|
||||
<Link to='/report'>
|
||||
|
Reference in New Issue
Block a user