update cross origin
This commit is contained in:
@@ -287,16 +287,30 @@ export default function Detail() {
|
||||
|
||||
/* Handle For Approve Claim */
|
||||
const handleApproveClaim = (id: number|null, claim_id: number|null) =>{
|
||||
let data = {
|
||||
// let data = {
|
||||
// status: 1
|
||||
// }
|
||||
// axios.post(`/claims/carehistory/${id}/approval`, data);
|
||||
// setOpenDialogApproval(false)
|
||||
// enqueueSnackbar(
|
||||
// 'Claim Approve Successfully!',
|
||||
// { variant: 'success' }
|
||||
// );
|
||||
// window.location.reload();
|
||||
|
||||
const dataForm = {
|
||||
status: 1
|
||||
}
|
||||
axios.post(`/claims/carehistory/${id}/approval`, data);
|
||||
setOpenDialogApproval(false)
|
||||
enqueueSnackbar(
|
||||
'Claim Approve Successfully!',
|
||||
{ variant: 'success' }
|
||||
);
|
||||
window.location.reload();
|
||||
axios
|
||||
.post(`/claims/carehistory/${id}/approval`, dataForm)
|
||||
.then((response) => {
|
||||
enqueueSnackbar('Claim Approve Successfully!', { variant: 'success' });
|
||||
setOpenDialogApproval(false);
|
||||
window.location.reload();
|
||||
})
|
||||
.catch((error) => {
|
||||
enqueueSnackbar('Something Went Wrong', { variant: 'error' });
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user