update banyak
This commit is contained in:
@@ -17,8 +17,13 @@ import Page from '../../components/Page';
|
||||
import Iconify from '../../components/Iconify';
|
||||
// utils
|
||||
import useSettings from '../../hooks/useSettings';
|
||||
import { useState, SyntheticEvent } from 'react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { useState, SyntheticEvent, useContext, useEffect } from 'react';
|
||||
import { UserCurrentCorporateContext } from '../../contexts/UserCurrentCorporate';
|
||||
import { useNavigate, useParams } from 'react-router-dom';
|
||||
import axios from '../../utils/axios';
|
||||
|
||||
|
||||
|
||||
// sections
|
||||
// import ListTable from '../../sections/claimreports/ListTable';
|
||||
// import ClaimStatusCard from '../../sections/claimreports/ClaimStatusCard';
|
||||
@@ -115,6 +120,47 @@ export default function ServiceMonitoring() {
|
||||
|
||||
};
|
||||
|
||||
const [data, setData] = useState({});
|
||||
const [data1, setData1] = useState();
|
||||
|
||||
|
||||
|
||||
const {corporateValue} = useContext(UserCurrentCorporateContext);
|
||||
const {id} = useParams();
|
||||
const claimId = '2'
|
||||
console.log('id',id);
|
||||
|
||||
useEffect (() => {
|
||||
|
||||
console.log('fetching data...')
|
||||
axios.get('/data/'+id )
|
||||
.then(response => {
|
||||
console.log('data fetched...', response.data)
|
||||
setData(response.data);
|
||||
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('error fetching data...', error);
|
||||
});
|
||||
}, []);
|
||||
|
||||
console.log('Data:' , data);
|
||||
|
||||
const [encounterData, setEncounterData] = useState({});
|
||||
|
||||
useEffect(() => {
|
||||
console.log('fetching encounter data...');
|
||||
axios.get('/claims/${claim_id}/encounters')
|
||||
.then(response => {
|
||||
console.log('encounter data fetched...', response.data);
|
||||
setEncounterData(response.data);
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('error fetching encounter data...', error);
|
||||
});
|
||||
}, []);
|
||||
|
||||
|
||||
|
||||
return (
|
||||
<Page title="Service Monitoring 123456">
|
||||
@@ -160,23 +206,23 @@ export default function ServiceMonitoring() {
|
||||
<Stack spacing={2}>
|
||||
<Stack>
|
||||
<Typography variant="caption">Nama perusahaan</Typography>
|
||||
<Typography variant="body2">PT. Amman Mineral</Typography>
|
||||
<Typography variant="body2">{corporateValue}</Typography>
|
||||
</Stack>
|
||||
<Stack>
|
||||
<Typography variant="caption">Nama Lengkap</Typography>
|
||||
<Typography variant="body2">Stephen kuow</Typography>
|
||||
</Stack>
|
||||
<Typography variant="caption">Nama Lengkap</Typography>
|
||||
<Typography variant="body2">{data.name || 'Loading...'}</Typography>
|
||||
</Stack>
|
||||
<Stack>
|
||||
<Typography variant="caption">Tanggal lahir</Typography>
|
||||
<Typography variant="body2">09 Aug 1980</Typography>
|
||||
<Typography variant="body2">{data.birth_date}</Typography>
|
||||
</Stack>
|
||||
<Stack>
|
||||
<Typography variant="caption">Email</Typography>
|
||||
<Typography variant="body2">Stephen.uow@gmal.com</Typography>
|
||||
<Typography variant="body2">{data.email}</Typography>
|
||||
</Stack>
|
||||
<Stack>
|
||||
<Typography variant="caption">No telepon</Typography>
|
||||
<Typography variant="body2">+62 821-8123-2323</Typography>
|
||||
<Typography variant="body2">{data.phone}</Typography>
|
||||
</Stack>
|
||||
</Stack>
|
||||
<Stack>
|
||||
|
||||
Reference in New Issue
Block a user