bugs fix dan fitur submission di claim request
This commit is contained in:
@@ -38,6 +38,8 @@ import DialogDeleteFileLog from './Components/DialogDeleteFileLog';
|
||||
import DialogBenefit from '../CustomerService/FinalLog/Components/DialogBenefit';
|
||||
import DialogDeleteBenefit from '../CustomerService/FinalLog/Components/DialogDeleteBenefit';
|
||||
import DialogEditBenefit from '../CustomerService/FinalLog/Components/DialogEditBenefit';
|
||||
import DialogConfirmation from './Components/DialogConfirmation';
|
||||
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
@@ -49,6 +51,7 @@ export default function Detail() {
|
||||
const navigate = useNavigate();
|
||||
const { themeStretch } = useSettings();
|
||||
const [claimRequests, setClaimRequest] = useState<DetailClaimRequest>();
|
||||
const [openDialogSubmit, setOpenDialogSubmit] = useState(false);
|
||||
|
||||
const { id } = useParams();
|
||||
|
||||
@@ -421,7 +424,7 @@ export default function Detail() {
|
||||
<Grid item xs={12}>
|
||||
<Grid container spacing={2}>
|
||||
<Grid item xs={6}>
|
||||
<Typography variant="body2" sx={{ fontWeight: 'bold'}}>
|
||||
<Typography variant="subtitle1" sx={{ fontWeight: 'bold'}}>
|
||||
Total Benefit
|
||||
</Typography>
|
||||
</Grid>
|
||||
@@ -436,12 +439,12 @@ export default function Detail() {
|
||||
<Grid item xs={2}>
|
||||
<Grid container sx={{ borderRight: `0.5px solid ${palette.light.grey[400]}` }}>
|
||||
<Grid item xs={12}>
|
||||
<Typography variant="caption">
|
||||
<Typography variant="subtitle1">
|
||||
Amount Incurred
|
||||
</Typography>
|
||||
</Grid>
|
||||
<Grid item xs={12}>
|
||||
<Typography variant="caption" sx={{ fontWeight: 'bold' }}>
|
||||
<Typography variant="subtitle2" sx={{ fontWeight: 'bold' }}>
|
||||
{totalAmountIncurred ? fNumber(totalAmountIncurred) : '0'}
|
||||
</Typography>
|
||||
</Grid>
|
||||
@@ -452,12 +455,12 @@ export default function Detail() {
|
||||
<Grid item xs={2}>
|
||||
<Grid container sx={{ borderRight: `0.5px solid ${palette.light.grey[400]}` }}>
|
||||
<Grid item xs={12}>
|
||||
<Typography variant="caption">
|
||||
<Typography variant="subtitle1">
|
||||
Amount Approved
|
||||
</Typography>
|
||||
</Grid>
|
||||
<Grid item xs={12}>
|
||||
<Typography variant="caption" sx={{ fontWeight: 'bold' }}>
|
||||
<Typography variant="subtitle2" sx={{ fontWeight: 'bold' }}>
|
||||
{totalAmountApproved ? fNumber(totalAmountApproved) : '0'}
|
||||
</Typography>
|
||||
</Grid>
|
||||
@@ -468,12 +471,12 @@ export default function Detail() {
|
||||
<Grid item xs={3}>
|
||||
<Grid container sx={{ borderRight: `0.5px solid ${palette.light.grey[400]}` }}>
|
||||
<Grid item xs={12}>
|
||||
<Typography variant="caption">
|
||||
<Typography variant="subtitle1">
|
||||
Amount Not Approved
|
||||
</Typography>
|
||||
</Grid>
|
||||
<Grid item xs={12}>
|
||||
<Typography variant="caption" sx={{ fontWeight: 'bold' }}>
|
||||
<Typography variant="subtitle2" sx={{ fontWeight: 'bold' }}>
|
||||
{totalAmountNotApproved ? fNumber(totalAmountNotApproved) : 0}
|
||||
</Typography>
|
||||
</Grid>
|
||||
@@ -484,12 +487,12 @@ export default function Detail() {
|
||||
<Grid item xs={2}>
|
||||
<Grid container sx={{ borderRight: `0.5px solid ${palette.light.grey[400]}` }}>
|
||||
<Grid item xs={12}>
|
||||
<Typography variant="caption">
|
||||
<Typography variant="subtitle1">
|
||||
Excess Paid
|
||||
</Typography>
|
||||
</Grid>
|
||||
<Grid item xs={12}>
|
||||
<Typography variant="caption" sx={{ fontWeight: 'bold' }}>
|
||||
<Typography variant="subtitle2" sx={{ fontWeight: 'bold' }}>
|
||||
{totalExcessPaid ? fNumber(totalExcessPaid) : 0}
|
||||
</Typography>
|
||||
</Grid>
|
||||
@@ -497,6 +500,23 @@ export default function Detail() {
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Box>
|
||||
<Grid container spacing={1} marginY={2}>
|
||||
<Grid item xs={6}>
|
||||
<Typography variant="subtitle1">
|
||||
Biaya disetujui
|
||||
</Typography>
|
||||
</Grid>
|
||||
<Grid item xs={6} textAlign="right">
|
||||
<Typography variant="subtitle1" sx={{ fontWeight: 'bold' }}>
|
||||
{totalAmountApproved ? fNumber(totalAmountApproved) : '0'}
|
||||
</Typography>
|
||||
</Grid>
|
||||
<Grid item xs={12}>
|
||||
<Typography variant="subtitle2">
|
||||
Nominal diatas 1 juta akan menunggu persetujuan senior analyst
|
||||
</Typography>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
@@ -504,6 +524,8 @@ export default function Detail() {
|
||||
: (
|
||||
null
|
||||
)}
|
||||
|
||||
|
||||
</Box>
|
||||
</Card>
|
||||
|
||||
@@ -542,6 +564,42 @@ export default function Detail() {
|
||||
requestLog={requestLog}
|
||||
openDialog={openDialogEditDetail}
|
||||
/> */}
|
||||
|
||||
{(claimRequests?.status === 'requested') || (claimRequests?.status === 'decline') ? (
|
||||
<Grid item xs={12} md={12}>
|
||||
<Stack direction="row" padding={4} sx={{ justifyContent: 'flex-end' }}>
|
||||
<div style={{ marginRight: '10px' }}> {/* Perubahan sintaksis disini */}
|
||||
<Button
|
||||
variant="outlined"
|
||||
color='inherit'
|
||||
onClick={() => {
|
||||
navigate('/claim-requests')
|
||||
}}
|
||||
>
|
||||
Cancel
|
||||
</Button>
|
||||
</div>
|
||||
<div>
|
||||
<Button
|
||||
variant="contained"
|
||||
onClick={() => {
|
||||
setOpenDialogSubmit(true);
|
||||
setApprove('approved');
|
||||
}}
|
||||
>
|
||||
Submit
|
||||
</Button>
|
||||
</div>
|
||||
<DialogConfirmation
|
||||
setOpenDialog={setOpenDialogSubmit}
|
||||
requestLog={claimRequests}
|
||||
openDialog={openDialogSubmit}
|
||||
approve={approve}
|
||||
>
|
||||
</DialogConfirmation>
|
||||
</Stack>
|
||||
</Grid>
|
||||
) : null}
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user