Update customer service
This commit is contained in:
@@ -23,14 +23,15 @@ export default function DialogConfirmation({requestLog, setOpenDialog, openDialo
|
||||
const navigate = useNavigate();
|
||||
const handleSubmit = () => {
|
||||
const formData = {
|
||||
status : approve
|
||||
status : approve,
|
||||
id: requestLog?.id
|
||||
}
|
||||
axios
|
||||
.put(`customer-service/request/${requestLog?.id}`, formData)
|
||||
.post(`customer-service/request/final-log`, formData)
|
||||
.then((response) => {
|
||||
enqueueSnackbar('Verification Request LOG Success', { variant: 'success' });
|
||||
enqueueSnackbar('Verification Final LOG Success', { variant: 'success' });
|
||||
setOpenDialog(false);
|
||||
navigate('/custormer-service/request')
|
||||
navigate('/custormer-service/final-log')
|
||||
})
|
||||
.catch(({ response }) => {
|
||||
enqueueSnackbar(response.data.message ?? 'Something went wrong!', { variant: 'error' });
|
||||
@@ -54,7 +55,7 @@ export default function DialogConfirmation({requestLog, setOpenDialog, openDialo
|
||||
|
||||
const getContent = () => (
|
||||
<Stack spacing={1} marginTop={2}>
|
||||
<Typography variant="subtitle2">Are you sure to {approve == 'approved' ? 'approve' : 'deciline'} this request ?</Typography>
|
||||
<Typography variant="subtitle2">Are you sure to {approve == 'approved' ? 'approve' : 'deciline'} this final log ?</Typography>
|
||||
<Grid item xs={12} md={12} marginTop={4}>
|
||||
<Card sx={{padding:2, marginTop:2}} >
|
||||
<Stack direction='row' spacing={2} sx={marginBottom1}>
|
||||
|
||||
Reference in New Issue
Block a user