update revisi
This commit is contained in:
@@ -14,7 +14,7 @@ type DialogConfirmationType = {
|
||||
setOpenDialog: any;
|
||||
onSubmit?: void;
|
||||
approve: string;
|
||||
requestLog: DetailFinalLogType|undefined;
|
||||
requestLog: DetailFinalLogType|undefined;
|
||||
}
|
||||
|
||||
export default function DialogConfirmation({requestLog, setOpenDialog, openDialog, approve, onSubmit} : DialogConfirmationType ) {
|
||||
@@ -29,7 +29,7 @@ export default function DialogConfirmation({requestLog, setOpenDialog, openDialo
|
||||
// icdCodes: requestLog?.diagnosis.length ? requestLog.diagnosis.map(diagnosis => ({ value: diagnosis.id, label: diagnosis.name })) : []
|
||||
icdCodes: requestLog?.diagnosis
|
||||
});
|
||||
|
||||
|
||||
const [error, setError] = useState(false);
|
||||
|
||||
const [icdOptions, setIcdOptions] = useState([
|
||||
@@ -73,10 +73,10 @@ export default function DialogConfirmation({requestLog, setOpenDialog, openDialo
|
||||
}
|
||||
|
||||
const handleSubmit = () => {
|
||||
if (formData.type_of_member == "" && requestLog?.corporate_id == 5) { // corporate vale
|
||||
if (formData.type_of_member == "" && requestLog?.view_type_member) { // corporate vale
|
||||
setError(true);
|
||||
alert('Silakan pilih Type Of Member sebelum mengirimkan data.');
|
||||
}
|
||||
}
|
||||
else {
|
||||
axios
|
||||
.post(`customer-service/request/final-log`, formData)
|
||||
@@ -121,10 +121,12 @@ export default function DialogConfirmation({requestLog, setOpenDialog, openDialo
|
||||
<Typography variant='subtitle2' sx={style1} gutterBottom>Member ID</Typography>
|
||||
<Typography variant='subtitle2' sx={style2} gutterBottom>{requestLog?.member_id}</Typography>
|
||||
</Stack>
|
||||
<Stack direction='row' spacing={2} sx={marginBottom1}>
|
||||
<Typography variant='subtitle2' sx={style1} gutterBottom>Member Of Type</Typography>
|
||||
<Typography variant='subtitle2' sx={style2} gutterBottom>{requestLog?.type_of_member}</Typography>
|
||||
</Stack>
|
||||
{requestLog?.view_type_member ? (
|
||||
<Stack direction='row' spacing={2} sx={marginBottom1}>
|
||||
<Typography variant='subtitle2' sx={style1} gutterBottom>Member Of Type</Typography>
|
||||
<Typography variant='subtitle2' sx={style2} gutterBottom>{requestLog?.type_of_member}</Typography>
|
||||
</Stack>
|
||||
):('')}
|
||||
<Stack direction='row' spacing={2} sx={marginBottom1}>
|
||||
<Typography variant='subtitle2' sx={style1} gutterBottom>Policy Number</Typography>
|
||||
<Typography variant='subtitle2' sx={style2} gutterBottom>{requestLog?.policy_number}</Typography>
|
||||
@@ -189,24 +191,26 @@ export default function DialogConfirmation({requestLog, setOpenDialog, openDialo
|
||||
)}
|
||||
/>
|
||||
</Stack>
|
||||
<Stack direction='row' spacing={2} sx={marginBottom2}>
|
||||
<Typography variant='subtitle2' sx={style1} gutterBottom>Type Of Member*</Typography>
|
||||
<Select
|
||||
fullWidth
|
||||
value={formData.type_of_member}
|
||||
onChange={(e) => handleChange('type_of_member', e.target.value)}
|
||||
variant="outlined"
|
||||
displayEmpty
|
||||
required
|
||||
error={error}
|
||||
>
|
||||
<MenuItem value="" disabled>
|
||||
Type Member
|
||||
</MenuItem>
|
||||
<MenuItem value="OMT">OMT</MenuItem>
|
||||
<MenuItem value="Non OMT">Non OMT</MenuItem>
|
||||
</Select>
|
||||
</Stack>
|
||||
{requestLog?.view_type_member ? (
|
||||
<Stack direction='row' spacing={2} sx={marginBottom2}>
|
||||
<Typography variant='subtitle2' sx={style1} gutterBottom>Type Of Member</Typography>
|
||||
<Select
|
||||
fullWidth
|
||||
value={formData.type_of_member}
|
||||
onChange={(e) => handleChange('type_of_member', e.target.value)}
|
||||
variant="outlined"
|
||||
displayEmpty
|
||||
required
|
||||
error={error}
|
||||
>
|
||||
<MenuItem value="" disabled>
|
||||
Type Member
|
||||
</MenuItem>
|
||||
<MenuItem value="OMT">OMT</MenuItem>
|
||||
<MenuItem value="Non OMT">Non OMT</MenuItem>
|
||||
</Select>
|
||||
</Stack>
|
||||
):('')}
|
||||
</Card>
|
||||
</Grid>
|
||||
<DialogActions>
|
||||
|
||||
@@ -30,6 +30,7 @@ export default function DialogEditFinalLOG({requestLog, setOpenDialog, openDialo
|
||||
reason: requestLog?.reason,
|
||||
type_of_member: requestLog?.type_of_member,
|
||||
organization_id: requestLog?.organization_id || 0,
|
||||
edit: true
|
||||
|
||||
});
|
||||
|
||||
@@ -64,6 +65,7 @@ export default function DialogEditFinalLOG({requestLog, setOpenDialog, openDialo
|
||||
reason: requestLog?.reason|| '',
|
||||
type_of_member: requestLog?.type_of_member|| '',
|
||||
organization_id: requestLog?.organization_id || 0,
|
||||
edit: true
|
||||
|
||||
});
|
||||
setIdProvider(requestLog?.organization_id || 0);
|
||||
@@ -101,7 +103,7 @@ export default function DialogEditFinalLOG({requestLog, setOpenDialog, openDialo
|
||||
|
||||
|
||||
const handleSubmit = () => {
|
||||
if (formData.type_of_member == "" && requestLog?.corporate_id == 5) {
|
||||
if (formData.type_of_member == "" && requestLog?.view_type_member) {
|
||||
setError(true);
|
||||
alert('Silakan pilih Type Of Member sebelum mengirimkan data.');
|
||||
}
|
||||
@@ -148,6 +150,7 @@ export default function DialogEditFinalLOG({requestLog, setOpenDialog, openDialo
|
||||
reason: requestLog?.reason ?? '',
|
||||
type_of_member: requestLog?.type_of_member ?? '',
|
||||
organization_id: requestLog?.organization_id || 0,
|
||||
edit: true
|
||||
|
||||
});
|
||||
};
|
||||
@@ -163,6 +166,7 @@ export default function DialogEditFinalLOG({requestLog, setOpenDialog, openDialo
|
||||
{ value: 'endorsement', label: 'Endorsement' },
|
||||
{ value: 'renewal', label: 'Renewal' },
|
||||
{ value: 'wrong_setting', label: 'Wrong Setting' },
|
||||
{ value: 'approval', label: 'Approval' },
|
||||
// Add more options as needed
|
||||
];
|
||||
|
||||
@@ -261,24 +265,26 @@ export default function DialogEditFinalLOG({requestLog, setOpenDialog, openDialo
|
||||
onChange={(e) => handleChange('billing_no', e.target.value)}
|
||||
/>
|
||||
</Stack>
|
||||
<Stack direction='row' spacing={2} sx={marginBottom2}>
|
||||
<Typography variant='subtitle2' sx={style1} gutterBottom>Type Of Member*</Typography>
|
||||
<Select
|
||||
fullWidth
|
||||
value={formData.type_of_member}
|
||||
onChange={(e) => handleChange('type_of_member', e.target.value)}
|
||||
variant="outlined"
|
||||
displayEmpty
|
||||
required
|
||||
error={error}
|
||||
>
|
||||
<MenuItem value="" disabled>
|
||||
Type Member
|
||||
</MenuItem>
|
||||
<MenuItem value="OMT">OMT</MenuItem>
|
||||
<MenuItem value="Non OMT">Non OMT</MenuItem>
|
||||
</Select>
|
||||
</Stack>
|
||||
{requestLog?.view_type_member ? (
|
||||
<Stack direction='row' spacing={2} sx={marginBottom2}>
|
||||
<Typography variant='subtitle2' sx={style1} gutterBottom>Type Of Member</Typography>
|
||||
<Select
|
||||
fullWidth
|
||||
value={formData.type_of_member}
|
||||
onChange={(e) => handleChange('type_of_member', e.target.value)}
|
||||
variant="outlined"
|
||||
displayEmpty
|
||||
required
|
||||
error={error}
|
||||
>
|
||||
<MenuItem value="" disabled>
|
||||
Type Member
|
||||
</MenuItem>
|
||||
<MenuItem value="OMT">OMT</MenuItem>
|
||||
<MenuItem value="Non OMT">Non OMT</MenuItem>
|
||||
</Select>
|
||||
</Stack>
|
||||
):('')}
|
||||
<Stack direction='row' spacing={2} sx={marginBottom2}>
|
||||
<Typography variant='subtitle2' sx={style1} gutterBottom>Discharge Date</Typography>
|
||||
<TextField
|
||||
|
||||
@@ -139,7 +139,7 @@ function submitRequestFinalLog() {
|
||||
discharge_date: fPostFormat(dischargeDate, 'yyyy-MM-dd HH:mm:ss'),
|
||||
service_code: serviceCode,
|
||||
spescialis_id: idSpecialities,
|
||||
dppj: inputDppj,
|
||||
dppj: inputDppj
|
||||
});
|
||||
axios
|
||||
.post('/request-final-log', formData)
|
||||
@@ -437,10 +437,12 @@ function submitRequestFinalLog() {
|
||||
<Typography variant='subtitle2' sx={style1} gutterBottom>Member ID</Typography>
|
||||
<Typography variant='subtitle2' sx={style2} gutterBottom>{requestLog?.member_id}</Typography>
|
||||
</Stack>
|
||||
<Stack direction='row' spacing={2} sx={marginBottom1}>
|
||||
<Typography variant='subtitle2' sx={style1} gutterBottom>Type Of Member</Typography>
|
||||
<Typography variant='subtitle2' sx={style2} gutterBottom>{requestLog?.type_of_member}</Typography>
|
||||
</Stack>
|
||||
{requestLog?.view_type_member ? (
|
||||
<Stack direction='row' spacing={2} sx={marginBottom1}>
|
||||
<Typography variant='subtitle2' sx={style1} gutterBottom>Type Of Member</Typography>
|
||||
<Typography variant='subtitle2' sx={style2} gutterBottom>{requestLog?.type_of_member}</Typography>
|
||||
</Stack>
|
||||
):('')}
|
||||
<Stack direction='row' spacing={2} sx={marginBottom1}>
|
||||
<Typography variant='subtitle2' sx={style1} gutterBottom>Policy Number</Typography>
|
||||
<Typography variant='subtitle2' sx={style2} gutterBottom>{requestLog?.policy_number}</Typography>
|
||||
@@ -1275,7 +1277,7 @@ function submitRequestFinalLog() {
|
||||
|
||||
{requestLog?.status_final_log == 'requested' ? (
|
||||
<Grid item xs={12} md={12}>
|
||||
<Stack direction="row" padding={4} sx={{ justifyContent: 'space-between' }}>
|
||||
<Stack direction="row" padding={4} spacing={2} sx={{ justifyContent: 'flex-end' }}>
|
||||
<>
|
||||
<div>
|
||||
<Button
|
||||
|
||||
@@ -35,6 +35,7 @@ export type DetailFinalLogType = {
|
||||
id : number,
|
||||
code : string,
|
||||
member_id : string,
|
||||
view_type_member : any,
|
||||
organization_id : any,
|
||||
id_member : string,
|
||||
service_code : string,
|
||||
|
||||
@@ -16,7 +16,7 @@ type DialogConfirmationType = {
|
||||
setOpenDialog: any;
|
||||
onSubmit?: void;
|
||||
approve: string;
|
||||
requestLog: DetailRequestLogType|undefined;
|
||||
requestLog: DetailRequestLogType|undefined;
|
||||
}
|
||||
|
||||
export default function DialogConfirmation({requestLog, setOpenDialog, openDialog, approve, onSubmit} : DialogConfirmationType ) {
|
||||
@@ -55,10 +55,10 @@ export default function DialogConfirmation({requestLog, setOpenDialog, openDialo
|
||||
}));
|
||||
handleSubmit();
|
||||
};
|
||||
|
||||
|
||||
|
||||
const handleSubmit = () => {
|
||||
if (formData.type_of_member == "" && requestLog?.corporate_id == 5) {
|
||||
if (formData.type_of_member == "" && requestLog?.view_type_member) {
|
||||
setError(true);
|
||||
alert('Silakan pilih Type Of Member sebelum mengirimkan data.');
|
||||
} else {
|
||||
@@ -121,7 +121,7 @@ export default function DialogConfirmation({requestLog, setOpenDialog, openDialo
|
||||
handleChange('keterangan', `${formData.keterangan}\n`);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
const getContent = () => (
|
||||
<Stack spacing={1} marginTop={2}>
|
||||
@@ -132,10 +132,12 @@ export default function DialogConfirmation({requestLog, setOpenDialog, openDialo
|
||||
<Typography variant='subtitle2' sx={style1} gutterBottom>Member ID</Typography>
|
||||
<Typography variant='subtitle2' sx={style2} gutterBottom>{requestLog?.member_id}</Typography>
|
||||
</Stack>
|
||||
<Stack direction='row' spacing={2} sx={marginBottom1}>
|
||||
<Typography variant='subtitle2' sx={style1} gutterBottom>Type of Member</Typography>
|
||||
<Typography variant='subtitle2' sx={style2} gutterBottom>{requestLog?.type_of_member}</Typography>
|
||||
</Stack>
|
||||
{requestLog?.view_type_member ? (
|
||||
<Stack direction='row' spacing={2} sx={marginBottom1}>
|
||||
<Typography variant='subtitle2' sx={style1} gutterBottom>Type of Member</Typography>
|
||||
<Typography variant='subtitle2' sx={style2} gutterBottom>{requestLog?.type_of_member}</Typography>
|
||||
</Stack>
|
||||
):('')}
|
||||
<Stack direction='row' spacing={2} sx={marginBottom1}>
|
||||
<Typography variant='subtitle2' sx={style1} gutterBottom>Policy Number</Typography>
|
||||
<Typography variant='subtitle2' sx={style2} gutterBottom>{requestLog?.policy_number}</Typography>
|
||||
@@ -206,24 +208,26 @@ export default function DialogConfirmation({requestLog, setOpenDialog, openDialo
|
||||
onChange={(e) => handleChange('penempatan_kamar', e.target.value)}
|
||||
/>
|
||||
</Stack>
|
||||
<Stack direction='row' spacing={2} sx={marginBottom2}>
|
||||
<Typography variant='subtitle2' sx={style1} gutterBottom>Type Of Member*</Typography>
|
||||
<Select
|
||||
fullWidth
|
||||
value={formData.type_of_member}
|
||||
onChange={(e) => handleChange('type_of_member', e.target.value)}
|
||||
variant="outlined"
|
||||
displayEmpty
|
||||
required
|
||||
error={error}
|
||||
>
|
||||
<MenuItem value="" disabled>
|
||||
Type Member
|
||||
</MenuItem>
|
||||
<MenuItem value="OMT">OMT</MenuItem>
|
||||
<MenuItem value="Non OMT">Non OMT</MenuItem>
|
||||
</Select>
|
||||
</Stack>
|
||||
{requestLog?.view_type_member ? (
|
||||
<Stack direction='row' spacing={2} sx={marginBottom2}>
|
||||
<Typography variant='subtitle2' sx={style1} gutterBottom>Type Of Member</Typography>
|
||||
<Select
|
||||
fullWidth
|
||||
value={formData.type_of_member}
|
||||
onChange={(e) => handleChange('type_of_member', e.target.value)}
|
||||
variant="outlined"
|
||||
displayEmpty
|
||||
required
|
||||
error={error}
|
||||
>
|
||||
<MenuItem value="" disabled>
|
||||
Type Member
|
||||
</MenuItem>
|
||||
<MenuItem value="OMT">OMT</MenuItem>
|
||||
<MenuItem value="Non OMT">Non OMT</MenuItem>
|
||||
</Select>
|
||||
</Stack>
|
||||
):('')}
|
||||
</Card>
|
||||
</Grid>
|
||||
<DialogActions>
|
||||
@@ -234,7 +238,7 @@ export default function DialogConfirmation({requestLog, setOpenDialog, openDialo
|
||||
<Button color="error" variant="contained" onClick={() => handleApprove()}>Decline</Button>
|
||||
|
||||
) }
|
||||
|
||||
|
||||
</DialogActions>
|
||||
</Stack>
|
||||
);
|
||||
|
||||
@@ -17,7 +17,7 @@ type DialogConfirmationType = {
|
||||
openDialog: boolean;
|
||||
setOpenDialog: any;
|
||||
onSubmit?: void;
|
||||
requestLog: DetailRequestLogType|undefined;
|
||||
requestLog: DetailRequestLogType|undefined;
|
||||
}
|
||||
|
||||
export default function DialogEditInformation({requestLog, setOpenDialog, openDialog, onSubmit} : DialogConfirmationType ) {
|
||||
@@ -34,7 +34,7 @@ export default function DialogEditInformation({requestLog, setOpenDialog, openDi
|
||||
const [error, setError] = useState(false);
|
||||
|
||||
const [isReasonSelected, setIsReasonSelected] = useState(true);
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
// Update formData setiap kali requestLog berubah
|
||||
setFormData({
|
||||
@@ -65,10 +65,10 @@ export default function DialogEditInformation({requestLog, setOpenDialog, openDi
|
||||
}));
|
||||
handleSubmit();
|
||||
};
|
||||
|
||||
|
||||
|
||||
const handleSubmit = () => {
|
||||
if (formData.type_of_member == "" && requestLog?.corporate_id == 5) {
|
||||
if (formData.type_of_member == "" && requestLog?.view_type_member) {
|
||||
setError(true);
|
||||
alert('Silakan pilih Type Of Member sebelum mengirimkan data.');
|
||||
} else if (isReasonSelected && formData.reason !== '') {
|
||||
@@ -88,7 +88,7 @@ export default function DialogEditInformation({requestLog, setOpenDialog, openDi
|
||||
alert('Silakan pilih alasan sebelum mengirimkan data.');
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
const style1 = {
|
||||
@@ -114,7 +114,7 @@ export default function DialogEditInformation({requestLog, setOpenDialog, openDi
|
||||
penempatan_kamar: requestLog?.penempatan_kamar ?? '',
|
||||
reason: requestLog?.reason ?? '',
|
||||
type_of_member: requestLog?.type_of_member ?? ''
|
||||
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
@@ -201,24 +201,26 @@ export default function DialogEditInformation({requestLog, setOpenDialog, openDi
|
||||
onChange={(e) => handleChange('penempatan_kamar', e.target.value)}
|
||||
/>
|
||||
</Stack>
|
||||
<Stack direction='row' spacing={2} sx={marginBottom2}>
|
||||
<Typography variant='subtitle2' sx={style1} gutterBottom>Type Of Member*</Typography>
|
||||
<Select
|
||||
fullWidth
|
||||
value={formData.type_of_member}
|
||||
onChange={(e) => handleChange('type_of_member', e.target.value)}
|
||||
variant="outlined"
|
||||
displayEmpty
|
||||
required
|
||||
error={error}
|
||||
>
|
||||
<MenuItem value="" disabled>
|
||||
Type Member
|
||||
</MenuItem>
|
||||
<MenuItem value="OMT">OMT</MenuItem>
|
||||
<MenuItem value="Non OMT">Non OMT</MenuItem>
|
||||
</Select>
|
||||
</Stack>
|
||||
{requestLog?.view_type_member ? (
|
||||
<Stack direction='row' spacing={2} sx={marginBottom2}>
|
||||
<Typography variant='subtitle2' sx={style1} gutterBottom>Type Of Member</Typography>
|
||||
<Select
|
||||
fullWidth
|
||||
value={formData.type_of_member}
|
||||
onChange={(e) => handleChange('type_of_member', e.target.value)}
|
||||
variant="outlined"
|
||||
displayEmpty
|
||||
required
|
||||
error={error}
|
||||
>
|
||||
<MenuItem value="" disabled>
|
||||
Type Member
|
||||
</MenuItem>
|
||||
<MenuItem value="OMT">OMT</MenuItem>
|
||||
<MenuItem value="Non OMT">Non OMT</MenuItem>
|
||||
</Select>
|
||||
</Stack>
|
||||
):('')}
|
||||
<Stack direction='row' spacing={2} sx={marginBottom2}>
|
||||
<Typography variant='subtitle2' sx={style1} gutterBottom>Reason*</Typography>
|
||||
<Autocomplete
|
||||
|
||||
@@ -116,10 +116,12 @@ export default function Detail() {
|
||||
<Typography variant='subtitle2' sx={style1} gutterBottom>Member ID</Typography>
|
||||
<Typography variant='subtitle2' sx={style2} gutterBottom>{requestLog?.member_id}</Typography>
|
||||
</Stack>
|
||||
<Stack direction='row' spacing={2} sx={marginBottom1}>
|
||||
<Typography variant='subtitle2' sx={style1} gutterBottom>Type Of Member</Typography>
|
||||
<Typography variant='subtitle2' sx={style2} gutterBottom>{requestLog?.type_of_member}</Typography>
|
||||
</Stack>
|
||||
{requestLog?.view_type_member ? (
|
||||
<Stack direction='row' spacing={2} sx={marginBottom1}>
|
||||
<Typography variant='subtitle2' sx={style1} gutterBottom>Type Of Member</Typography>
|
||||
<Typography variant='subtitle2' sx={style2} gutterBottom>{requestLog?.type_of_member}</Typography>
|
||||
</Stack>
|
||||
):('')}
|
||||
<Stack direction='row' spacing={2} sx={marginBottom1}>
|
||||
<Typography variant='subtitle2' sx={style1} gutterBottom>Policy Number</Typography>
|
||||
<Typography variant='subtitle2' sx={style2} gutterBottom>{requestLog?.policy_number}</Typography>
|
||||
@@ -192,7 +194,7 @@ export default function Detail() {
|
||||
</Grid>
|
||||
{requestLog?.status == 'requested' || requestLog?.status == 'canceled' || requestLog?.status == 'waiting_billing' ? (
|
||||
<Grid item xs={12} md={12}>
|
||||
<Stack direction="row" padding={4} sx={{ justifyContent: 'space-between' }}>
|
||||
<Stack direction="row" padding={4} spacing={2} sx={{ justifyContent: 'flex-end' }}>
|
||||
<>
|
||||
<div>
|
||||
<Button
|
||||
|
||||
@@ -39,6 +39,7 @@ export type file = {
|
||||
export type DetailRequestLogType = {
|
||||
id : number,
|
||||
code : string,
|
||||
view_type_member : any,
|
||||
member_id : string,
|
||||
policy_number : string,
|
||||
name : string,
|
||||
|
||||
Reference in New Issue
Block a user