fixs, Убрал стейты для формы авторизации, переписал на форм дату

This commit is contained in:
2023-01-25 16:50:36 +03:00
parent 50f33071bb
commit 5c8a8160bd
21 changed files with 107 additions and 209 deletions

View File

@ -4,7 +4,7 @@ import {useDispatch, useSelector} from 'react-redux'
import {
selectItems,
selectedItems,
filteredCandidates,
profiles,
} from '../../redux/outstaffingSlice'
import {apiRequest} from "../../api/request";
@ -22,9 +22,11 @@ const handlePositionClick = (
}) => {
if (isSelected) {
apiRequest('/profile', {
params: {limit: 1000},
params: {
limit: 1000
},
}).then((profileArr) => {
dispatch(filteredCandidates(profileArr));
dispatch(profiles(profileArr));
dispatch(selectedItems([]));
onSelect(positionId)
})
@ -32,9 +34,10 @@ const handlePositionClick = (
apiRequest('/profile', {
params: {
limit: '1000',
position_id: positionId},
}).then((el) => {
dispatch(filteredCandidates(el));
position_id: positionId
},
}).then((res) => {
dispatch(profiles(res));
dispatch(selectedItems([]));
onSelect(positionId)
})