penyesuiaan data claim
This commit is contained in:
@@ -6,6 +6,8 @@ import { Stack } from '@mui/material';
|
||||
import { enqueueSnackbar } from 'notistack';
|
||||
import React, { useState } from 'react';
|
||||
import FormHistoryPerawatan from './FormHistoryPerawatan';
|
||||
import { useDispatch } from 'react-redux';
|
||||
import { claimsHistoryAction } from '@/store/claimsHistorySlice';
|
||||
|
||||
type DialogHistoryPerawatanType = {
|
||||
openDialog: boolean;
|
||||
@@ -18,6 +20,7 @@ type DialogHistoryPerawatanType = {
|
||||
export default function DialogHistoryPerawatan({ openDialog, setOpenDialog, onSubmit, claim, encounter } : DialogHistoryPerawatanType) {
|
||||
|
||||
const isEdit = encounter?.id != null
|
||||
const dispatch = useDispatch()
|
||||
// const benefits = member?.current_plan?.benefits ?? [];
|
||||
// const [selectedBenefits, setSelectedBenefits] = useState([]);
|
||||
|
||||
@@ -38,6 +41,10 @@ export default function DialogHistoryPerawatan({ openDialog, setOpenDialog, onSu
|
||||
.then((res) => {
|
||||
enqueueSnackbar(res.data.message, {variant: 'success'})
|
||||
setOpenDialog(false);
|
||||
window.location.reload(); // tolong benerin ya
|
||||
// axios.get(`claims/${claim.id}`).then((res) => {
|
||||
// dispatch(claimsHistoryAction.setClaims(res.data.data.encounter))
|
||||
// })
|
||||
})
|
||||
.catch((err) => {
|
||||
enqueueSnackbar(err.message, {variant: 'error'})
|
||||
@@ -47,6 +54,10 @@ export default function DialogHistoryPerawatan({ openDialog, setOpenDialog, onSu
|
||||
.then((res) => {
|
||||
enqueueSnackbar(res.data.message, {variant: 'success'})
|
||||
setOpenDialog(false);
|
||||
window.location.reload(); // tolong benerin ya
|
||||
// axios.get(`claims/${claim.id}`).then((res) => {
|
||||
// dispatch(claimsHistoryAction.setClaims(res.data.data.encounter))
|
||||
// })
|
||||
})
|
||||
.catch((err) => {
|
||||
enqueueSnackbar(err.message, {variant: 'error'})
|
||||
|
||||
Reference in New Issue
Block a user