penyesuaian ambil data submission ke created at
This commit is contained in:
@@ -45,7 +45,7 @@ import DialogHospitalCare from './Components/DialogHospitalCare';
|
||||
import DialogBenefit from './Components/DialogBenefit';
|
||||
import DialogMedicine from './Components/DialogMedicine';
|
||||
import DialogDeleteBenfit from './Components/DialogDeleteBenefit';
|
||||
import DialogEditBenefit from './Components/DialogEditBenefit';
|
||||
import DialogEditBenefit from './Components/DialogEditBenefit';
|
||||
import DialogDeleteMedicine from './Components/DialogDeleteMedicine'
|
||||
|
||||
import MoreMenu from '@/components/MoreMenu';
|
||||
@@ -66,7 +66,7 @@ export default function Detail() {
|
||||
const navigate = useNavigate();
|
||||
const { themeStretch } = useSettings();
|
||||
const [requestLog, setRequestLog] = useState<DetailFinalLogType>();
|
||||
|
||||
|
||||
|
||||
const { id } = useParams();
|
||||
|
||||
@@ -107,7 +107,7 @@ export default function Detail() {
|
||||
// Handel Delete Detail Benefit
|
||||
const [idBenefitData, setIdBenefitData] = useState<number>();
|
||||
const [openDialogDeleteBenefit, setDialogDeleteBenefit] = useState(false)
|
||||
|
||||
|
||||
const [idMedicineData, setIdMedicineData] = useState<number>();
|
||||
const [openDialogDeleteMedicine, setDialogDeleteMedicine] = useState(false)
|
||||
|
||||
@@ -117,7 +117,7 @@ export default function Detail() {
|
||||
const [openDialogEditBenefit, setDialogEditBenefit] = useState(false)
|
||||
const [BenefitConfigurationData, setBenefitConfigurationData] = useState<BenefitData>();
|
||||
|
||||
// Buat total data
|
||||
// Buat total data
|
||||
const totalAmountIncurred = (requestLog?.benefit_data || []).reduce((accumulator, item) => {
|
||||
return accumulator + (item.amount_incurred || 0);
|
||||
}, 0);
|
||||
@@ -130,7 +130,7 @@ export default function Detail() {
|
||||
const totalExcessPaid = (requestLog?.benefit_data || []).reduce((accumulator, item) => {
|
||||
return accumulator + (item.excess_paid || 0);
|
||||
}, 0);
|
||||
|
||||
|
||||
|
||||
return (
|
||||
<Page title='Detail'>
|
||||
@@ -143,7 +143,7 @@ export default function Detail() {
|
||||
{/* Detail */}
|
||||
<Grid item xs={12} md={12}>
|
||||
<Card sx={{padding:2}} >
|
||||
<Grid container spacing={2}>
|
||||
<Grid container spacing={2}>
|
||||
<Grid item xs={6}>
|
||||
<Typography variant='subtitle1' sx={{ color: '#19BBBB', marginBottom: 4 }} gutterBottom>
|
||||
Detail
|
||||
@@ -164,7 +164,7 @@ export default function Detail() {
|
||||
}
|
||||
/>
|
||||
</Grid>) : null }
|
||||
|
||||
|
||||
</Grid>
|
||||
<Stack direction='row' spacing={2} sx={marginBottom1}>
|
||||
<Typography variant='subtitle2' sx={style1} gutterBottom>Provider</Typography>
|
||||
@@ -192,7 +192,11 @@ export default function Detail() {
|
||||
</Stack>
|
||||
<Stack direction='row' spacing={2} sx={marginBottom1}>
|
||||
<Typography variant='subtitle2' sx={style1} gutterBottom>Submission Date</Typography>
|
||||
<Typography variant='subtitle2' sx={style2} gutterBottom>{requestLog?.approved_final_log_at ? fDateTimesecond(requestLog?.approved_final_log_at) : '-'}</Typography>
|
||||
<Typography variant='subtitle2' sx={style2} gutterBottom>{requestLog?.submission_date ? fDateTimesecond(requestLog?.submission_date) : '-'}</Typography>
|
||||
</Stack>
|
||||
<Stack direction='row' spacing={2} sx={marginBottom1}>
|
||||
<Typography variant='subtitle2' sx={style1} gutterBottom>Admission Date</Typography>
|
||||
<Typography variant='subtitle2' sx={style2} gutterBottom>{requestLog?.admission_date ? fDateTimesecond(requestLog?.admission_date) : '-'}</Typography>
|
||||
</Stack>
|
||||
|
||||
<Stack direction='row' spacing={2} sx={marginBottom1}>
|
||||
@@ -245,16 +249,16 @@ export default function Detail() {
|
||||
|
||||
{/* Service */}
|
||||
<Grid item xs={12} md={12} marginTop={2}>
|
||||
<CardService
|
||||
<CardService
|
||||
requestLog={requestLog}
|
||||
isFinalLog={true}
|
||||
>
|
||||
</CardService>
|
||||
</Grid>
|
||||
|
||||
|
||||
{/* Exclusion */}
|
||||
<Grid item xs={12} md={12} marginTop={2}>
|
||||
{/* <CardExclusion
|
||||
{/* <CardExclusion
|
||||
requestLog={requestLog}
|
||||
>
|
||||
</CardExclusion> */}
|
||||
@@ -276,7 +280,7 @@ export default function Detail() {
|
||||
requestLog={requestLog}
|
||||
openDialog={openDialogHospital}
|
||||
setOpenDialog={setDialogHospital}
|
||||
|
||||
|
||||
>
|
||||
</DialogHospitalCare>
|
||||
</Grid> */}
|
||||
@@ -294,7 +298,7 @@ export default function Detail() {
|
||||
</Stack>
|
||||
|
||||
{requestLog?.benefit_data?.map((item, index) => (
|
||||
<Box key={index} sx={{ border: '1px solid rgba(0,0,0,0.125)', px: '24px', py: '20px', marginBottom: '24px', borderRadius: '12px'}}>
|
||||
<Box key={index} sx={{ border: '1px solid rgba(0,0,0,0.125)', px: '24px', py: '20px', marginBottom: '24px', borderRadius: '12px'}}>
|
||||
<Grid container spacing={2}>
|
||||
<Grid item xs={12}>
|
||||
<Grid container spacing={2}>
|
||||
@@ -415,14 +419,14 @@ export default function Detail() {
|
||||
</Grid>
|
||||
</Box>
|
||||
</Grid>
|
||||
|
||||
|
||||
</Grid>
|
||||
</Box>
|
||||
))}
|
||||
<hr/>
|
||||
<br/>
|
||||
{requestLog?.benefit_data && requestLog.benefit_data.length > 0 ? (
|
||||
<Box key={requestLog.benefit_data.length+1} sx={{ border: '1px solid rgba(0,0,0,0.125)', px: '24px', py: '20px', marginBottom: '24px', borderRadius: '12px'}}>
|
||||
<Box key={requestLog.benefit_data.length+1} sx={{ border: '1px solid rgba(0,0,0,0.125)', px: '24px', py: '20px', marginBottom: '24px', borderRadius: '12px'}}>
|
||||
<Grid container spacing={2}>
|
||||
<Grid item xs={12}>
|
||||
<Grid container spacing={2}>
|
||||
@@ -431,7 +435,7 @@ export default function Detail() {
|
||||
Total Benefit
|
||||
</Typography>
|
||||
</Grid>
|
||||
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid item xs={12}>
|
||||
@@ -504,13 +508,13 @@ export default function Detail() {
|
||||
</Grid>
|
||||
</Box>
|
||||
</Grid>
|
||||
|
||||
|
||||
</Grid>
|
||||
</Box>
|
||||
)
|
||||
)
|
||||
: (
|
||||
null
|
||||
)}
|
||||
)}
|
||||
</Card>
|
||||
|
||||
{/* PR Buat pindahin ke componen */}
|
||||
@@ -523,7 +527,7 @@ export default function Detail() {
|
||||
requestLog={requestLog}
|
||||
openDialog={openDialogBenefit}
|
||||
setOpenDialog={setDialogBenefit}
|
||||
|
||||
|
||||
/>
|
||||
{/* Dialog Edit */}
|
||||
<DialogEditBenefit
|
||||
@@ -534,14 +538,14 @@ export default function Detail() {
|
||||
/>
|
||||
|
||||
{/* Dialog Delete */}
|
||||
<DialogDeleteBenfit
|
||||
<DialogDeleteBenfit
|
||||
id={idBenefitData}
|
||||
openDialog={openDialogDeleteBenefit}
|
||||
setOpenDialog={setDialogDeleteBenefit}
|
||||
/>
|
||||
|
||||
{/* Dialog Edit Detai; */}
|
||||
<DialogEditFinalLOG
|
||||
<DialogEditFinalLOG
|
||||
setOpenDialog={setDialogDEditDetail}
|
||||
requestLog={requestLog}
|
||||
openDialog={openDialogEditDetail}
|
||||
@@ -637,7 +641,7 @@ export default function Detail() {
|
||||
</Stack>
|
||||
</Grid>
|
||||
) : null}
|
||||
|
||||
|
||||
</Grid>
|
||||
</Container>
|
||||
</Page>
|
||||
|
||||
@@ -350,7 +350,7 @@ export default function List() {
|
||||
<TableCell align="left">{row.code}</TableCell>
|
||||
<TableCell align="left">{row.provider}</TableCell>
|
||||
<TableCell align="left">{row.member_name}</TableCell>
|
||||
<TableCell align="left"><Label>{fDateTimesecond(row.submission_date_fgl)}</Label></TableCell>
|
||||
<TableCell align="left"><Label>{fDateTimesecond(row.created_at)}</Label></TableCell>
|
||||
<TableCell align="left">{row.service_name}</TableCell>
|
||||
<TableCell align="left">{row.payment_type_name}</TableCell>
|
||||
<TableCell align="left">
|
||||
@@ -577,7 +577,7 @@ export default function List() {
|
||||
</Grid>
|
||||
<Grid item sm={12}>
|
||||
{/* Dialog Delete */}
|
||||
<DialogDeleteFinalLOG
|
||||
<DialogDeleteFinalLOG
|
||||
id={idFinalLog}
|
||||
openDialog={openDialogDeleteFinalLog}
|
||||
setOpenDialog={setDialogDeleteFinalLog}
|
||||
|
||||
@@ -16,6 +16,8 @@ export type FinalLogType = {
|
||||
member : Member,
|
||||
member_name : string,
|
||||
submission_date_fgl : string,
|
||||
submission_date : string,
|
||||
created_at : string,
|
||||
service_name : string,
|
||||
payment_type_name : string,
|
||||
status_final_log : string,
|
||||
@@ -28,7 +30,7 @@ export type FinalLogType = {
|
||||
export type DetailFinalLogType = {
|
||||
id : number,
|
||||
code : string,
|
||||
member_id : string,
|
||||
member_id : string,
|
||||
provider : string,
|
||||
policy_number : string,
|
||||
name : string|any,
|
||||
|
||||
Reference in New Issue
Block a user