penyesuiaan data claim
This commit is contained in:
@@ -38,6 +38,7 @@ import ClaimDetail from './components/ClaimDetail';
|
||||
import DialogHistoryPerawatan from './components/DialogHistoryPerawatan';
|
||||
import { IconButton } from '@mui/material';
|
||||
import { Tooltip } from '@mui/material';
|
||||
import { useSelector } from 'react-redux';
|
||||
|
||||
export default function ClaimsCreateUpdate() {
|
||||
const { themeStretch } = useSettings();
|
||||
@@ -48,6 +49,10 @@ export default function ClaimsCreateUpdate() {
|
||||
const [currentClaim, setCurrentClaim] = useState();
|
||||
const [documents, setDocuments] = useState([]);
|
||||
|
||||
const claimsHistoryData = useSelector((state) => state.claimsHistory)
|
||||
|
||||
console.log(claimsHistoryData)
|
||||
|
||||
const Item = styled(Paper)(({ theme }) => ({
|
||||
backgroundColor: theme.palette.mode === 'dark' ? '#1A2027' : '#fff',
|
||||
...theme.typography.body2,
|
||||
@@ -66,6 +71,12 @@ export default function ClaimsCreateUpdate() {
|
||||
setClaimItems([...claimItems, ...items]);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
if(claimsHistoryData) {
|
||||
setClaimItems(claimsHistoryData)
|
||||
}
|
||||
},[claimsHistoryData])
|
||||
|
||||
const handleSaveClaimItems = () => {
|
||||
console.log('Storing ', claimItems);
|
||||
setLoadingClaimItems(true);
|
||||
@@ -305,6 +316,9 @@ export default function ClaimsCreateUpdate() {
|
||||
</LoadingButton>
|
||||
)}
|
||||
</Stack>
|
||||
<Stack direction="row" justifyContent="space-between" alignItems="center">
|
||||
<Typography>Admission Date : {currentClaim?.claim_request?.submission_date}</Typography>
|
||||
</Stack>
|
||||
</Paper>
|
||||
|
||||
<Box sx={{ flexGrow: 1 }}>
|
||||
@@ -347,7 +361,7 @@ export default function ClaimsCreateUpdate() {
|
||||
<Typography variant="body2" fontWeight={600}>
|
||||
Nomor Polis
|
||||
</Typography>
|
||||
<Typography variant="body2">{currentClaim?.member?.full_name}</Typography>
|
||||
<Typography variant="body2">{currentClaim?.member?.current_policy?.code}</Typography>
|
||||
</Grid>
|
||||
|
||||
<Grid item xs={12} md={6}>
|
||||
|
||||
Reference in New Issue
Block a user