Download zip
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';
|
||||
@@ -69,7 +69,7 @@ export default function Detail() {
|
||||
const { themeStretch } = useSettings();
|
||||
const [requestLog, setRequestLog] = useState<DetailFinalLogType>();
|
||||
const [isReversal, setIsReversal] = useState(false);
|
||||
|
||||
|
||||
|
||||
const { id } = useParams();
|
||||
|
||||
@@ -111,7 +111,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)
|
||||
|
||||
@@ -121,7 +121,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);
|
||||
@@ -134,13 +134,13 @@ export default function Detail() {
|
||||
const totalExcessPaid = (requestLog?.benefit_data || []).reduce((accumulator, item) => {
|
||||
return accumulator + (item.excess_paid || 0);
|
||||
}, 0);
|
||||
|
||||
|
||||
const total = {
|
||||
totalAmountIncurred : totalAmountIncurred,
|
||||
totalAmountApproved : totalAmountApprove,
|
||||
totalAmountNotApproved : totalAmountNotApprove,
|
||||
totalExcessPaid : totalExcessPaid,
|
||||
}
|
||||
}
|
||||
// Handle Delete File LOG
|
||||
const [pathFile, setPathFile] = useState('')
|
||||
const [dialogDeleteFIleLog, setDialogDeleteFileLog] = useState(false)
|
||||
@@ -159,7 +159,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
|
||||
@@ -180,7 +180,7 @@ export default function Detail() {
|
||||
}
|
||||
/>
|
||||
</Grid>) : null }
|
||||
|
||||
|
||||
</Grid>
|
||||
<Stack direction='row' spacing={2} sx={marginBottom1}>
|
||||
<Typography variant='subtitle2' sx={style1} gutterBottom>Provider</Typography>
|
||||
@@ -265,16 +265,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> */}
|
||||
@@ -297,7 +297,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}>
|
||||
@@ -422,14 +422,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}>
|
||||
@@ -438,7 +438,7 @@ export default function Detail() {
|
||||
Total Benefit
|
||||
</Typography>
|
||||
</Grid>
|
||||
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid item xs={12}>
|
||||
@@ -511,13 +511,13 @@ export default function Detail() {
|
||||
</Grid>
|
||||
</Box>
|
||||
</Grid>
|
||||
|
||||
|
||||
</Grid>
|
||||
</Box>
|
||||
)
|
||||
)
|
||||
: (
|
||||
null
|
||||
)}
|
||||
)}
|
||||
</Card>
|
||||
|
||||
{/* PR Buat pindahin ke componen */}
|
||||
@@ -530,7 +530,7 @@ export default function Detail() {
|
||||
requestLog={requestLog}
|
||||
openDialog={openDialogBenefit}
|
||||
setOpenDialog={setDialogBenefit}
|
||||
|
||||
|
||||
/>
|
||||
{/* Dialog Edit */}
|
||||
<DialogEditBenefit
|
||||
@@ -542,14 +542,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}
|
||||
@@ -617,7 +617,7 @@ export default function Detail() {
|
||||
</Button>
|
||||
</Stack>
|
||||
) : null }
|
||||
|
||||
|
||||
</Stack>
|
||||
{requestLog?.files?.map((documentType, index) => (
|
||||
<Stack direction="row" alignItems="center" justifyContent="space-between" sx={{marginBottom: 2}} key={index}>
|
||||
@@ -640,7 +640,7 @@ export default function Detail() {
|
||||
</IconButton>
|
||||
</Stack>
|
||||
) : null }
|
||||
|
||||
|
||||
</Stack>
|
||||
))}
|
||||
|
||||
@@ -696,7 +696,7 @@ export default function Detail() {
|
||||
</Stack>
|
||||
</Grid>
|
||||
) : null}
|
||||
|
||||
|
||||
</Grid>
|
||||
</Container>
|
||||
</Page>
|
||||
|
||||
Reference in New Issue
Block a user