Merge remote-tracking branch 'origin/staging' into origin/production

This commit is contained in:
Linksehat Staging Server
2024-01-09 09:32:05 +07:00
10 changed files with 115 additions and 16 deletions

View File

@@ -354,6 +354,7 @@ export default function List() {
</Typography>
</TableCell> */}
<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)}</Label></TableCell>
<TableCell align="left">{row.service_name}</TableCell>
@@ -482,6 +483,9 @@ export default function List() {
<TableCell style={headStyle} align="left">
Code
</TableCell>
<TableCell style={headStyle} align="left">
Provider
</TableCell>
<TableCell style={headStyle} align="left">
Name
</TableCell>

View File

@@ -27,6 +27,10 @@ export default function CardDetail({requestLog} : CardDetail ) {
return (
<Card sx={{padding:2}} >
<Typography variant='subtitle1' sx={{color: '#19BBBB', marginBottom: 4}} gutterBottom>Detail</Typography>
<Stack direction='row' spacing={2} sx={marginBottom1}>
<Typography variant='subtitle2' sx={style1} gutterBottom>Provider</Typography>
<Typography variant='subtitle2' sx={style2} gutterBottom>{requestLog?.provider}</Typography>
</Stack>
<Stack direction='row' spacing={2} sx={marginBottom1}>
<Typography variant='subtitle2' sx={style1} gutterBottom>Member ID</Typography>
<Typography variant='subtitle2' sx={style2} gutterBottom>{requestLog?.member_id}</Typography>
@@ -51,6 +55,27 @@ export default function CardDetail({requestLog} : CardDetail ) {
<Typography variant='subtitle2' sx={style1} gutterBottom>Submission Date</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>No KTP</Typography>
<Typography variant='subtitle2' sx={style2} gutterBottom>{requestLog?.no_identitas ? requestLog?.no_identitas : '-'}</Typography>
</Stack>
<Stack direction='row' spacing={2} sx={marginBottom1}>
<Typography variant='subtitle2' sx={style1} gutterBottom>Keterangan</Typography>
<Typography variant='subtitle2' sx={style2} gutterBottom>{requestLog?.keterangan ? requestLog?.keterangan : '-'}</Typography>
</Stack>
<Stack direction='row' spacing={2} sx={marginBottom1}>
<Typography variant='subtitle2' sx={style1} gutterBottom>Hak Kamar Pasien</Typography>
<Typography variant='subtitle2' sx={style2} gutterBottom>{requestLog?.hak_kamar_pasien ? requestLog?.hak_kamar_pasien : '-'}</Typography>
</Stack>
<Stack direction='row' spacing={2} sx={marginBottom1}>
<Typography variant='subtitle2' sx={style1} gutterBottom>Penempatan Kamar</Typography>
<Typography variant='subtitle2' sx={style2} gutterBottom>{requestLog?.penempatan_kamar ? requestLog?.penempatan_kamar : '-'}</Typography>
</Stack>
<Stack direction='row' spacing={2} sx={marginBottom1}>
<Typography variant='subtitle2' sx={style1} gutterBottom>Catatan</Typography>
<Typography variant='subtitle2' sx={style2} gutterBottom>{requestLog?.catatan ? requestLog?.catatan : '-'}</Typography>
</Stack>
</Card>
)

View File

@@ -1,8 +1,8 @@
import MuiDialog from "@/components/MuiDialog";
import { Button, Card, Checkbox, DialogActions, Grid, Typography } from "@mui/material";
import { Button, Card, Checkbox, DialogActions, Grid, TextField, Typography } from "@mui/material";
import { Paper } from "@mui/material";
import { Stack } from '@mui/material';
import React, { useState } from 'react';
import React, { useEffect, useState } from 'react';
import { DetailFinalLogType } from "../Model/Types";
import { fDateTimesecond, toTitleCase } from "@/utils/formatTime";
import axios from "@/utils/axios";
@@ -21,23 +21,51 @@ type DialogConfirmationType = {
export default function DialogConfirmation({requestLog, setOpenDialog, openDialog, approve, onSubmit} : DialogConfirmationType ) {
const navigate = useNavigate();
const [formData, setFormData] = useState({
id: requestLog?.id,
status: approve || '',
catatan: '',
});
useEffect(() => {
// Update formData setiap kali approve berubah
setFormData(prevData => ({
...prevData,
status: approve || '',
}));
}, [approve]);
const handleChange = (field, value) => {
setFormData((prevData) => ({
...prevData,
[field]: value,
}));
};
const handleApprove = () => {
setFormData((prevData) => ({
...prevData,
status: approve,
}));
handleSubmit();
};
const handleSubmit = () => {
const formData = {
status : approve,
id: requestLog?.id
}
axios
.post(`customer-service/request/final-log`, formData)
.then((response) => {
enqueueSnackbar('Verification Final LOG Success', { variant: 'success' });
enqueueSnackbar('Verification Request LOG Success', { variant: 'success' });
setOpenDialog(false);
navigate('/custormer-service/final-log')
navigate('/case_management/inpatient_monitoring')
})
.catch(({ response }) => {
enqueueSnackbar(response.data.message ?? 'Something went wrong!', { variant: 'error' });
});
}
const style1 = {
color: '#919EAB',
width: '30%'
@@ -48,7 +76,9 @@ export default function DialogConfirmation({requestLog, setOpenDialog, openDialo
const marginBottom1 = {
marginBottom: 1,
}
const marginBottom2 = {
marginBottom: 2,
}
const handleCloseDialog = () => {
setOpenDialog(false);
}
@@ -83,14 +113,27 @@ export default function DialogConfirmation({requestLog, setOpenDialog, openDialo
<Typography variant='subtitle2' sx={style2} gutterBottom>{requestLog?.service_type}</Typography>
</Stack>
</Card>
<Card sx={{padding:2, marginTop:2}} >
<Stack direction='row' spacing={2} sx={marginBottom2}>
<Typography variant='subtitle2' sx={style1} gutterBottom>Catatan</Typography>
<TextField
label="Catatan"
variant="outlined"
fullWidth
value={formData.catatan}
onChange={(e) => handleChange('catatan', e.target.value)}
/>
</Stack>
</Card>
</Grid>
<DialogActions>
<Button variant="outlined" sx={{color: '#212B36', borderColor: '#919EAB52'}} onClick={handleCloseDialog}>Cancel</Button>
{approve == 'approved' ? (
<Button color="primary" variant="contained" onClick={handleSubmit}>Approve</Button>
<Button color="primary" variant="contained" onClick={() => handleApprove()}>Approve</Button>
) : (
<Button color="error" variant="contained" onClick={handleSubmit}>Decline</Button>
<Button color="error" variant="contained" onClick={() => handleApprove()}>Decline</Button>
) }
</DialogActions>

View File

@@ -354,6 +354,7 @@ export default function List() {
</Typography>
</TableCell> */}
<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)}</Label></TableCell>
<TableCell align="left">{row.service_name}</TableCell>

View File

@@ -19,6 +19,7 @@ export type FinalLogType = {
service_name : string,
payment_type_name : string,
status_final_log : string,
provider : string,
status : string,
files_by_type : files_by_type,
}
@@ -27,7 +28,8 @@ export type FinalLogType = {
export type DetailFinalLogType = {
id : number,
code : string,
member_id : string,
member_id : string,
provider : string,
policy_number : string,
name : string|any,
date_of_birth : string,
@@ -38,6 +40,11 @@ export type DetailFinalLogType = {
claim_method : string,
status : string,
status_final_log : string,
no_identitas : string,
keterangan : string,
hak_kamar_pasien : string,
penempatan_kamar : string,
catatan : string,
benefit : Benefit[],
benefit_data : BenefitData[],
config_service : ConfigService,

View File

@@ -80,6 +80,10 @@ export default function Detail() {
<Grid item xs={12} md={12}>
<Card sx={{padding:2}} >
<Typography variant='subtitle1' sx={{color: '#19BBBB', marginBottom: 4}} gutterBottom>Detail</Typography>
<Stack direction='row' spacing={2} sx={marginBottom1}>
<Typography variant='subtitle2' sx={style1} gutterBottom>Provider Name</Typography>
<Typography variant='subtitle2' sx={style2} gutterBottom>{requestLog?.provider}</Typography>
</Stack>
<Stack direction='row' spacing={2} sx={marginBottom1}>
<Typography variant='subtitle2' sx={style1} gutterBottom>Member ID</Typography>
<Typography variant='subtitle2' sx={style2} gutterBottom>{requestLog?.member_id}</Typography>

View File

@@ -357,6 +357,7 @@ export default function List() {
</Typography>
</TableCell> */}
<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)}</Label></TableCell>
<TableCell align="left">{row.service_name}</TableCell>
@@ -482,6 +483,9 @@ export default function List() {
<TableCell style={headStyle} align="left">
Code
</TableCell>
<TableCell style={headStyle} align="left">
Provider
</TableCell>
<TableCell style={headStyle} align="left">
Name
</TableCell>

View File

@@ -49,6 +49,7 @@ export type DetailRequestLogType = {
keterangan : string,
hak_kamar_pasien : string,
penempatan_kamar : string,
provider : string,
status : string,
benefit : Benefit[],
}