update banyak
This commit is contained in:
@@ -107,9 +107,9 @@ export default function Drugs() {
|
||||
<Card>
|
||||
<Box sx={{ borderBottom: 1, borderColor: 'divider' }}>
|
||||
<StyledTabs value={value} onChange={handleChange} aria-label="basic tabs example">
|
||||
<StyledTab label="All Data (999)" {...a11yProps(0)} />
|
||||
<StyledTab label="Ongoing (888)" {...a11yProps(1)} />
|
||||
<StyledTab label="Done (777)" {...a11yProps(2)} />
|
||||
<StyledTab label="All Data" {...a11yProps(0)} />
|
||||
<StyledTab label="Ongoing" {...a11yProps(1)} />
|
||||
<StyledTab label="Done" {...a11yProps(2)} />
|
||||
</StyledTabs>
|
||||
</Box>
|
||||
<TabPanel value={value} index={0}>
|
||||
|
||||
@@ -289,7 +289,7 @@ export default function List() {
|
||||
,
|
||||
status:
|
||||
obj.status === 1 ? (
|
||||
<Button onClick={() => navigate('service-monitoring/:id')}
|
||||
<Button onClick={() => navigate('service-monitoring/'+obj.personId )}
|
||||
startIcon={<Iconify icon="ic:round-check" />}
|
||||
sx={{
|
||||
backgroundColor: palette.light.grey[300],
|
||||
@@ -328,6 +328,8 @@ export default function List() {
|
||||
setPaginationTable(response.data);
|
||||
setRowsPerPage(response.data.per_page);
|
||||
|
||||
|
||||
|
||||
if (searchParams.get('page')) {
|
||||
//@ts-ignore
|
||||
const currentPage = parseInt(searchParams.get('page')) - 1;
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -43,7 +43,7 @@ export default function UserProfile() {
|
||||
});
|
||||
}, []);
|
||||
|
||||
console.log(id)
|
||||
console.log('data', data)
|
||||
|
||||
return (
|
||||
<Page title="Profile Peserta Jessica Lie">
|
||||
|
||||
@@ -277,6 +277,8 @@ export default function Index() {
|
||||
const corporateMembers = await axios.get(`${corporateValue}/members`, {
|
||||
params: { ...parameters },
|
||||
});
|
||||
|
||||
console.log('member',corporateMembers );
|
||||
const corporateTopUpLimit = await axios.get(`${corporateValue}/topup`);
|
||||
|
||||
setSearchParams(parameters);
|
||||
@@ -331,11 +333,11 @@ export default function Index() {
|
||||
Inactive
|
||||
</Button>
|
||||
),
|
||||
action: (
|
||||
/* action: (
|
||||
<IconButton onClick={handleAction}>
|
||||
<MoreVertIcon />
|
||||
</IconButton>
|
||||
),
|
||||
), */
|
||||
};
|
||||
})
|
||||
);
|
||||
|
||||
@@ -256,13 +256,13 @@ export default function CardPersonalInformation({data}) {
|
||||
fullWidth
|
||||
sx={{ marginTop: '16px' }}
|
||||
/>
|
||||
<TextField
|
||||
{/* <TextField
|
||||
label="Address"
|
||||
value={address}
|
||||
onChange={(e) => setAddress(e.target.value)}
|
||||
fullWidth
|
||||
sx={{ marginTop: '16px' }}
|
||||
/>
|
||||
/> */}
|
||||
|
||||
|
||||
{/* Add more fields as needed */}
|
||||
|
||||
@@ -2,7 +2,10 @@
|
||||
import { styled } from '@mui/material/styles';
|
||||
import { Card, Typography, Stack, LinearProgress, linearProgressClasses } from '@mui/material';
|
||||
import CardBenefitSummary from './CardBenefitSummary';
|
||||
import axios from '../../../utils/axios';
|
||||
|
||||
import { useContext, useState, useEffect } from 'react';
|
||||
import { UserCurrentCorporateContext } from '../../../contexts/UserCurrentCorporate';
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
const BorderLinearProgress = styled(LinearProgress)(({ theme }) => ({
|
||||
@@ -17,10 +20,73 @@ const BorderLinearProgress = styled(LinearProgress)(({ theme }) => ({
|
||||
},
|
||||
}));
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
type CardPolicyProps = {
|
||||
limit: {
|
||||
myLimit: {
|
||||
balance: number;
|
||||
total: number;
|
||||
percentage: number;
|
||||
};
|
||||
lockLimit: {
|
||||
balance: number;
|
||||
percentage: number;
|
||||
};
|
||||
};
|
||||
topUpLimit: {
|
||||
companyName: string;
|
||||
policyNumber: number;
|
||||
totalMembers: number;
|
||||
totalCases: number;
|
||||
totalPersen: number;
|
||||
myLimit: {
|
||||
balance: number;
|
||||
total: number;
|
||||
percentage: number;
|
||||
};
|
||||
maxTopUp: number;
|
||||
};
|
||||
members?: DataMember[];
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
export default function CardPolicyNumber() {
|
||||
return (
|
||||
|
||||
|
||||
const { corporateValue } = useContext(UserCurrentCorporateContext);
|
||||
const [policyNumber,setPolicyNumber] = useState('');
|
||||
const [policyData, setPolicyData] = useState<CardPolicyProps>();
|
||||
|
||||
/* axios.get(`${corporateValue}/topup`)
|
||||
.then(response => {
|
||||
console.log(response.data);
|
||||
})
|
||||
.catch(error => {
|
||||
console.error(error);
|
||||
}); */
|
||||
|
||||
useEffect(() => {
|
||||
axios
|
||||
.get(`${corporateValue}/topup`)
|
||||
.then(response => {
|
||||
const { data } = response.data; // Access the 'data' object from the response
|
||||
const { policyNumber } = data; // Access the 'policyNumber' field from the 'data' object
|
||||
setPolicyNumber(policyNumber);
|
||||
})
|
||||
.catch(error => {
|
||||
console.error(error);
|
||||
});
|
||||
|
||||
// const corporatePolicyLimit = axios.get(`${corporateValue}/policy`);
|
||||
// const corporateTopUpLimit = axios.get(`${corporateValue}/topup`);
|
||||
// setPolicyData({
|
||||
// limit: corporatePolicyLimit.data.data,
|
||||
// topUpLimit: corporateTopUpLimit.data.data,
|
||||
// });
|
||||
}, [corporateValue]);
|
||||
|
||||
return (
|
||||
<Card sx={{ padding: 2 }}>
|
||||
<Stack>
|
||||
<Stack direction="row" alignItems="center" spacing={1} justifyContent="space-between">
|
||||
@@ -28,7 +94,7 @@ export default function CardPolicyNumber() {
|
||||
<img width={52} height={52} src="/logo/logo-linksehat.png" alt="LinkSehat" />
|
||||
<Stack spacing={1}>
|
||||
<Typography variant="subtitle2">Policy Number</Typography>
|
||||
<Typography variant="subtitle2">12345678910</Typography>
|
||||
<Typography variant="subtitle2">{policyNumber}</Typography>
|
||||
</Stack>
|
||||
</Stack>
|
||||
<Stack spacing={1} sx={{ width: '206.5px' }}>
|
||||
|
||||
Reference in New Issue
Block a user