improvement uat 1

This commit is contained in:
2023-11-14 13:57:33 +07:00
parent 7284354f47
commit c5e103fc57
18 changed files with 229 additions and 130 deletions

View File

@@ -116,6 +116,7 @@ const DialogDetailClaim = ({ title, openDialog, setOpenDialog, data }: MuiDialog
personID: item.memberId,
personName: item.fullName,
typePatient: 'IP',
service_type: item.service_type,
anotherDocument: [],
fileRealInvoice: [],
laboratoryResult: [],
@@ -275,71 +276,46 @@ const DialogDetailClaim = ({ title, openDialog, setOpenDialog, data }: MuiDialog
<Grid item xs={12} key={index}>
<Card sx={{ p: 3 }}>
<Grid container spacing={4} key={index}>
<Grid item xs={12} paddingX="24px" paddingY="20px">
<Stack direction="row" spacing={4}>
<Button
sx={{
padding: 2,
width: '50%',
border:
row.typePatient === 'OP' ? '1px solid #919EAB52' : '1px solid #19BBBB',
}}
variant="outlined"
color={row.typePatient === 'IP' ? 'primary' : 'inherit'}
onClick={() => {
handleServiceCode(row);
}}
>
Inpatient
</Button>
<Button
sx={{
padding: 2,
width: '50%',
border:
row.typePatient === 'IP' ? '1px solid #919EAB52' : '1px solid #19BBBB',
}}
variant="outlined"
color={row.typePatient === 'OP' ? 'primary' : 'inherit'}
onClick={() => {
handleServiceCode(row);
}}
>
Outpatient
</Button>
</Stack>
</Grid>
<Grid item xs={12}>
<Card sx={{ p: 2 }}>
<Stack direction="row" alignContent={'center'}>
<Avatar
src="https://minimal-assets-api.vercel.app/assets/images/avatars/avatar_5.jpg"
alt={'test'}
sx={{ margin: 1, width: 56, height: 56 }}
/>
<Stack sx={{ p: 1 }}>
<Typography variant="h5">{row.personName}</Typography>
<Typography variant="subtitle1" color="#637381">
{row.personID}
</Typography>
{row.service_type.map((r, i) => {
return(
<Button
sx={{
padding: 2,
width: '50%',
border:
row.typePatient === r.service_code ? '1px solid #919EAB52' : '1px solid #19BBBB',
}}
variant="outlined"
color={row.typePatient === r.service_code ? 'primary' : 'inherit'}
onClick={() => {
handleServiceCode(row);
}}
>
{r.service_code == 'IP' ? 'Inpatient' : 'Outpatient'}
</Button>
)
})}
{/* <Button
sx={{
padding: 2,
width: '50%',
border:
row.typePatient === 'IP' ? '1px solid #919EAB52' : '1px solid #19BBBB',
}}
variant="outlined"
color={row.typePatient === 'OP' ? 'primary' : 'inherit'}
onClick={() => {
handleServiceCode(row);
}}
>
Outpatient
</Button> */}
</Stack>
{/* <Stack sx={{ p: 1 }}>
<Typography variant="body1" sx={{ marginBottom: 1, fontWeight: 600 }}>
Total Limit
</Typography>
<BorderLinearProgress
variant="determinate"
value={row.limit && row.limit.percentage}
sx={{ mb: 1 }}
/>
<Typography sx={{ textAlign: 'right', marginTop: 1 }}>
{fCurrency(8000000)} / {fCurrency(100000)}
</Typography>
</Stack> */}
</Stack>
</Card>
</Grid>
</Grid>
{/* REAL INVOICE */}
<Grid item xs={12}>
<Grid container spacing={2}>

View File

@@ -168,7 +168,7 @@ export default function CardFamilyInformation({ data }) {
Date of Birth
</Typography>
<Typography variant="body2" sx={{ fontWeight: 500 }}>
{familyMember?.birth_date ? fDate(familyMember?.birth_date) : ''}
{familyMember?.birth_date != '0000-00-00' ? fDate(familyMember?.birth_date) : '-'}
</Typography>
</Stack>
<Stack

View File

@@ -20,6 +20,6 @@ export type Member = {
relation_with_principal: string,
bpjs_class: string,
active: string,
current_plan: Plan,
current_plans: Plan,
current_corporate: Corporate,
};

View File

@@ -31,6 +31,7 @@ import FormCreateFilesUpload from './FormCreateFilesUpload';
import useLoadOnScroll from '@/hooks/useLoadOnScroll';
import useCollapseDrawer from '@/hooks/useCollapseDrawer';
import FormCreateBtnChoose from './FormCreateBtnChoose';
import axios from '../../../utils/axios';
export default function FormCreate() {
const navigate = useNavigate()
@@ -72,10 +73,9 @@ export default function FormCreate() {
if (data.id == list.id) {
list.patien_type = type
}
return list;
})
setListChoosed(newListChoosed)
}
@@ -166,6 +166,8 @@ export default function FormCreate() {
}
}
let isDirty = listChoosed.some((row) => {
if (row.patien_type == undefined) {
return true
@@ -251,34 +253,26 @@ export default function FormCreate() {
</Label>
</Card>
</Grid>
{/* Patien Type */}
<Grid item xs={12}>
<Grid container spacing={2}>
<Grid item xs={6}>
<Button
sx={{ padding: 2, width: '100%',border: row.patien_type === 'IP' ? '1px solid #19BBBB' : '1px solid #919EAB52' }}
variant="outlined"
color={row.patien_type === 'IP' ? 'primary' : 'inherit'}
onClick={() => {
handleChoosePatienType(row, 'IP')
}}
>
Inpatient
</Button>
</Grid>
<Grid item xs={6}>
<Button
sx={{ padding: 2, width: '100%',border: row.patien_type === 'OP' ? '1px solid #19BBBB' : '1px solid #919EAB52' }}
variant="outlined"
color={row.patien_type === 'OP' ? 'primary' : 'inherit'}
onClick={() => {
handleChoosePatienType(row, 'OP')
}}
>
Outpatient
</Button>
</Grid>
{row.service_type.map((r,i) => {
const code = r.code
return (
<Grid item xs={6}>
<Button
sx={{ padding: 2, width: '100%',border: row.patien_type === code ? '1px solid #19BBBB' : '1px solid #919EAB52' }}
variant="outlined"
color={row.patien_type === code ? 'primary' : 'inherit'}
onClick={() => {
handleChoosePatienType(row, code)
}}
>
{r.name}
</Button>
</Grid>
)
})}
</Grid>
</Grid>

View File

@@ -32,7 +32,7 @@ export default function FormCreateBtnUpload ({handleChangeInputProp}: Props) {
style={{ display: 'none' }}
multiple
onChange={(event) => handleChangeInputProp(event.target.files ? event.target.files[0] : {})}
accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel, text/plain, application/pdf"
accept="application/pdf"
/>
</ButtonBase>
)

View File

@@ -92,17 +92,17 @@ export default function Detail() {
setOpenDialogSubmit(false);
}
const handleSubmitData = () => {
if(fileInvoices.length > 0)
{
// if(fileInvoices.length > 0)
// {
//submit data
axios
.post('claim-requests/'+id+'/approve')
.then((response) => {
enqueueSnackbar('Success Submit Claim Request', { variant: 'success' });
setOpenDialogSubmit(false);
enqueueSnackbar('Success Submit Claim Request', { variant: 'success' });
setOpenDialogSubmit(false);
})
.catch(({ response }) => {
enqueueSnackbar(response.data.message ?? 'Something went wrong!', { variant: 'error' });
enqueueSnackbar(response.data.message ?? 'Something went wrong!', { variant: 'error' });
});
//Upload file invoices
const formData = makeFormData({
@@ -117,11 +117,11 @@ export default function Detail() {
.catch(({ response }) => {
enqueueSnackbar(response.data.message ?? 'Something Went Wrong', { variant: 'error' });
});
}
else
{
enqueueSnackbar('Please upload file invoice, before submit', { variant: 'warning' });
}
// }
// else
// {
// enqueueSnackbar('Please upload file invoice, before submit', { variant: 'warning' });
// }
setTimeout(() =>
{
@@ -158,7 +158,7 @@ export default function Detail() {
</Button>
</Stack>
</Grid>
{!check_invoice ? (
{check_invoice ? (
<Grid item xs={12} md={12}>
<Stack direction="row" alignItems="center">
<Typography variant="subtitle1">Request Claim</Typography>
@@ -231,7 +231,7 @@ export default function Detail() {
style={{ display: 'none' }}
multiple
onChange={handleInvoiceInputChange}
accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel, text/plain, application/pdf"
accept="application/pdf"
/>
</ButtonBase>
</Stack>

View File

@@ -12,8 +12,14 @@ export type MemberListType = {
id : string,
member_id : string,
name : string,
service_type : ServiceType[],
patien_type? : string,
file_kondisi? : any[],
file_diagnosa? : any[],
file_penunjang? : any[]
file_penunjang? : any[],
}
export type ServiceType = {
code : string
name : string
}

View File

@@ -353,7 +353,7 @@ export default function Detail() {
const defaultValues = useMemo(
() => ({
service_code: 'OP',
service_code: claim?.service_code,
secondary_diagnosis_id: [{
value: {
name: "",

View File

@@ -484,7 +484,18 @@ export default function CorporatePlanList({handleSubmitSuccess}) {
<Typography variant='body2'>{row.name ? row.name : '-'}</Typography>
</TableCell>
<TableCell align="left">
<Typography variant='body2'>{row.current_plan?.code}</Typography>
<Typography variant='body2'>
{/* {row.current_plan?.code} */}
{row.current_plans
? row.current_plans.map((plan, index) => (
<>
{plan.code}
{index < row.current_plans.length - 1 && ', '}
</>
))
: '-'}
</Typography>
</TableCell>
<TableCell align="left">
<Typography variant='body2'>{row.activation_date ? row.activation_date : '-'}</Typography>