remove debugger
This commit is contained in:
parent
aa6ddd7fe9
commit
9e32986969
@ -5,9 +5,10 @@ import { useDispatch, useSelector } from 'react-redux';
|
|||||||
import { usePositionTracker } from '../../hooks/usePositionTracker';
|
import { usePositionTracker } from '../../hooks/usePositionTracker';
|
||||||
import {markCurrentAttendance} from '../../slices/apiSlice/attendanceAllSlice';
|
import {markCurrentAttendance} from '../../slices/apiSlice/attendanceAllSlice';
|
||||||
import {cacheData, getCachedData} from '../../slices/apiDataManager';
|
import {cacheData, getCachedData} from '../../slices/apiDataManager';
|
||||||
|
import showToast from '../../services/toastService';
|
||||||
|
|
||||||
|
|
||||||
const RegularizationActions = ({attendanceData,handleRequest}) => {
|
const RegularizationActions = ({attendanceData,handleRequest,refresh}) => {
|
||||||
const [status,setStatus] = useState()
|
const [status,setStatus] = useState()
|
||||||
const [loadingApprove,setLoadingForApprove] = useState(false)
|
const [loadingApprove,setLoadingForApprove] = useState(false)
|
||||||
const [loadingReject,setLoadingForReject] = useState(false)
|
const [loadingReject,setLoadingForReject] = useState(false)
|
||||||
@ -17,7 +18,7 @@ const {latitude,longitude} = usePositionTracker();
|
|||||||
const dispatch = useDispatch()
|
const dispatch = useDispatch()
|
||||||
|
|
||||||
const handleRegularization =(request_attendance,IsReqularize)=>{
|
const handleRegularization =(request_attendance,IsReqularize)=>{
|
||||||
debugger
|
|
||||||
if(IsReqularize){
|
if(IsReqularize){
|
||||||
setLoadingForApprove(true)
|
setLoadingForApprove(true)
|
||||||
}else{
|
}else{
|
||||||
@ -46,8 +47,12 @@ const dispatch = useDispatch()
|
|||||||
|
|
||||||
cacheData("regularizedList",{data:updatedata,projectId:projectId})
|
cacheData("regularizedList",{data:updatedata,projectId:projectId})
|
||||||
setLoadingForApprove( false )
|
setLoadingForApprove( false )
|
||||||
setLoadingForReject(false)
|
setLoadingForReject( false )
|
||||||
})
|
refresh()
|
||||||
|
}).catch( ( error ) =>
|
||||||
|
{
|
||||||
|
showToast(error.message,"error")
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -67,7 +72,7 @@ const dispatch = useDispatch()
|
|||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="w-auto d-flex gap-2 align-items-center justify-content-between">
|
<div className="w-auto d-flex gap-2 align-items-center justify-content-end">
|
||||||
{attendanceData.activity == 2 && (
|
{attendanceData.activity == 2 && (
|
||||||
<>
|
<>
|
||||||
<button
|
<button
|
||||||
|
|||||||
@ -6,7 +6,7 @@ export const markCurrentAttendance = createAsyncThunk(
|
|||||||
'attendanceCurrentDate/markAttendance',
|
'attendanceCurrentDate/markAttendance',
|
||||||
async ( formData, {getState, dispatch, rejectWithValue} ) =>
|
async ( formData, {getState, dispatch, rejectWithValue} ) =>
|
||||||
{
|
{
|
||||||
debugger
|
|
||||||
const { projectId } = getState().localVariables
|
const { projectId } = getState().localVariables
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user