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

@@ -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>