update revisi
This commit is contained in:
@@ -375,14 +375,14 @@ class RequestLogController extends Controller
|
||||
DB::table('request_logs')
|
||||
->where('request_logs.id', '=', $request->request_logs_id)
|
||||
->update([
|
||||
'status_final_log' => 'requested',
|
||||
'final_log' => 1,
|
||||
'status_final_log' => $request->edit ? null : 'requested',
|
||||
'final_log' => $request->edit ? 0 : 1,
|
||||
'service_code' =>$request->service_code,
|
||||
'discharge_date' => $request->discharge_date,
|
||||
'dppj' => $request->dppj,
|
||||
'specialities_id' => $request->spescialis_id,
|
||||
'created_final_by'=> auth()->user()->id,
|
||||
'created_final_at'=> date('Y-m-d H:i:s'),
|
||||
'created_final_by'=> $request->edit ? null : auth()->user()->id,
|
||||
'created_final_at'=> $request->edit ? null : date('Y-m-d H:i:s'),
|
||||
]);
|
||||
if ($request->hasFile('result_files')) {
|
||||
foreach ($request->result_files as $file) {
|
||||
|
||||
@@ -517,9 +517,7 @@ class RequestLogController extends Controller
|
||||
} else {
|
||||
$requestLog->diagnosis = '';
|
||||
}
|
||||
if (!empty($request->status)) {
|
||||
$requestLog->status_final_log = $status;
|
||||
}
|
||||
|
||||
|
||||
if (!empty($request->reason)) {
|
||||
$requestLog->reason_final = $request->reason;
|
||||
@@ -533,9 +531,21 @@ class RequestLogController extends Controller
|
||||
$requestLog->organization_id = $request->organization_id;
|
||||
}
|
||||
|
||||
$requestLog->final_log = 1;
|
||||
$requestLog->approved_final_log_by = auth()->user()->id;
|
||||
$requestLog->approved_final_log_at = Carbon::now();
|
||||
if(empty($request->edit)) {
|
||||
if (!empty($request->status)) {
|
||||
$requestLog->status_final_log = $status;
|
||||
if($request->status == 'requested') {
|
||||
$requestLog->final_log = 1;
|
||||
$requestLog->created_final_by = auth()->user()->id;
|
||||
$requestLog->created_final_at = date('Y-m-d H:i:s');
|
||||
}
|
||||
if($request->status == 'approved') {
|
||||
$requestLog->approved_final_log_by = auth()->user()->id;
|
||||
$requestLog->approved_final_log_at = Carbon::now();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// if($requestLog->service_code != 'IP'){
|
||||
// $requestLog->discharge_date = Carbon::now();
|
||||
// }
|
||||
|
||||
@@ -15,6 +15,7 @@ use App\Models\ClaimRequest;
|
||||
use App\Models\Icd;
|
||||
use App\Models\Speciality;
|
||||
use App\Helpers\Helper;
|
||||
use App\Models\Corporate;
|
||||
use App\Models\CorporatePolicy;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
@@ -135,6 +136,8 @@ class RequestLogShowResource extends JsonResource
|
||||
} else {
|
||||
$dppj = '-';
|
||||
}
|
||||
//cek untuk view omt non omt
|
||||
$code_corporate = Corporate::where('id', $corporateId)->first();
|
||||
$data = [
|
||||
'id' => $requestLog['id'],
|
||||
'code' => $requestLog['code'],
|
||||
@@ -186,7 +189,7 @@ class RequestLogShowResource extends JsonResource
|
||||
'diagnosis' => $icd,
|
||||
'url_approval' => env('LMS_WEB_URL') . '/custormer-service/final-log/detail/'.$requestLog['id'] . '/' . auth()->user()->id,
|
||||
'is_reversal' => $isReversal, // untuk penjagaan, jika true tidak bisa di edit/hapus lagi
|
||||
|
||||
'view_type_member' => $code_corporate->code == 'VALEIND' ? true : false,
|
||||
|
||||
];
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -73,7 +73,7 @@ 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.');
|
||||
}
|
||||
@@ -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>
|
||||
{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>
|
||||
|
||||
@@ -31,6 +31,7 @@ export default function DialogEditFinalLOG({requestLog, setOpenDialog, openDialo
|
||||
type_of_member: requestLog?.type_of_member,
|
||||
organization_id: requestLog?.organization_id || 0,
|
||||
status: 'requested',
|
||||
edit: true
|
||||
});
|
||||
|
||||
const [error, setError] = useState(false);
|
||||
@@ -65,6 +66,7 @@ export default function DialogEditFinalLOG({requestLog, setOpenDialog, openDialo
|
||||
type_of_member: requestLog?.type_of_member|| '',
|
||||
organization_id: requestLog?.organization_id || 0,
|
||||
status: 'requested',
|
||||
edit: true
|
||||
});
|
||||
setIdProvider(requestLog?.organization_id || 0); // ✅ sekalian sync UI
|
||||
}, [requestLog]);
|
||||
@@ -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.');
|
||||
}
|
||||
@@ -112,7 +114,9 @@ export default function DialogEditFinalLOG({requestLog, setOpenDialog, openDialo
|
||||
enqueueSnackbar('Request Final LOG Success', { variant: 'success' });
|
||||
setOpenDialog(false);
|
||||
navigate('/detail-request-final-log/' + requestLog?.id)
|
||||
window.location.reload()
|
||||
setTimeout(() => {
|
||||
window.location.reload();
|
||||
}, 1000); // 1000 ms = 1 detik
|
||||
})
|
||||
.catch(({ response }) => {
|
||||
enqueueSnackbar(response.data.message ?? 'Something went wrong!', { variant: 'error' });
|
||||
@@ -148,7 +152,8 @@ export default function DialogEditFinalLOG({requestLog, setOpenDialog, openDialo
|
||||
reason: requestLog?.reason ?? '',
|
||||
type_of_member: requestLog?.type_of_member ?? '',
|
||||
organization_id: requestLog?.organization_id || 0,
|
||||
status: 'requested'
|
||||
status: 'requested',
|
||||
edit: true
|
||||
});
|
||||
};
|
||||
const [isReasonSelected, setIsReasonSelected] = useState(true);
|
||||
@@ -163,6 +168,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
|
||||
];
|
||||
|
||||
@@ -258,24 +264,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
|
||||
|
||||
@@ -364,6 +364,7 @@ export default function DetailRequestFinalLog() {
|
||||
service_code: serviceCode,
|
||||
spescialis_id: idSpecialities,
|
||||
dppj: inputDppj,
|
||||
edit: true
|
||||
});
|
||||
axios
|
||||
.post('/request-final-log', formData)
|
||||
@@ -457,10 +458,13 @@ export default function DetailRequestFinalLog() {
|
||||
<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>
|
||||
@@ -893,7 +897,14 @@ export default function DetailRequestFinalLog() {
|
||||
!isReversal ? (
|
||||
<Button variant="outlined" startIcon={<AddIcon/>} sx={{marginLeft: 'auto'}} onClick={() => {
|
||||
if (!requestLog?.discharge_date || !requestLog?.service_code || !requestLog?.specialitiesID || !requestLog?.dppj) {
|
||||
alert('Lengkapi Tanggal Keluar, Service Code, Specialities, dan DPPJ terlebih dahulu, lalu simpan');
|
||||
alert(
|
||||
'Lengkapi:\n\n' +
|
||||
'- Tanggal Keluar\n' +
|
||||
'- Service Code\n' +
|
||||
'- Specialities\n' +
|
||||
'- DPPJ\n\n' +
|
||||
'Terlebih dahulu, lalu simpan'
|
||||
);
|
||||
return;
|
||||
}
|
||||
setDialogBenefit(true);
|
||||
@@ -1279,7 +1290,7 @@ export default function DetailRequestFinalLog() {
|
||||
</Card>
|
||||
</Grid>
|
||||
|
||||
{requestLog?.status == 'approved' && requestLog?.status_final_log == 'requested' ? (
|
||||
{requestLog?.status == 'approved' ? (
|
||||
<Grid item xs={12} md={12}>
|
||||
<Stack direction="row" padding={4} sx={{ justifyContent: 'space-between' }}>
|
||||
<>
|
||||
@@ -1307,8 +1318,15 @@ export default function DetailRequestFinalLog() {
|
||||
!(requestLog?.files?.length > 0)
|
||||
) {
|
||||
alert(
|
||||
'Lengkapi Tanggal Keluar, Service Code, Specialities, DPJP, isi benefit, dan upload files terlebih dahulu, lalu simpan'
|
||||
);
|
||||
'Lengkapi:\n\n' +
|
||||
'- Tanggal Keluar\n' +
|
||||
'- Service Code\n' +
|
||||
'- Specialities\n' +
|
||||
'- DPJP\n' +
|
||||
'- Isi Benefit\n' +
|
||||
'- Upload Files\n\n' +
|
||||
'Terlebih dahulu, lalu simpan'
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1316,7 +1334,7 @@ export default function DetailRequestFinalLog() {
|
||||
setOpenDialogSubmit(true);
|
||||
}}
|
||||
>
|
||||
{requestLog?.status_final_log == 'requested' ? 'Edit' : ''} Request Final LOG
|
||||
{requestLog?.status_final_log == 'requested' ? 'Update' : 'Request Final LOG'}
|
||||
</Button>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -484,7 +484,7 @@ export default function TableListFinalLog() {
|
||||
}
|
||||
>
|
||||
<Iconify icon="fa:file-text" />
|
||||
Edit Request Final LOG
|
||||
Edit
|
||||
</MenuItem>
|
||||
):''}
|
||||
{obj.status === 'approved' ? (
|
||||
|
||||
@@ -253,10 +253,10 @@
|
||||
<td>{{ $dataMember->code_plan }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="hot-line-<?php echo now()->timestamp; ?>">
|
||||
<!-- <div class="hot-line-<?php echo now()->timestamp; ?>">
|
||||
<b>Call Center LinkSehat : 08114123962</b>
|
||||
</div>
|
||||
<div class="txt-tindakan-<?php echo now()->timestamp; ?>">
|
||||
</div> -->
|
||||
<div class="txt-tindakan-<?php echo now()->timestamp; ?>" style="margin-top: 5px;">
|
||||
LinkSehat bertindak mewakili perusahaan asuransi/penanggung untuk mengeluarkan Surat Jaminan Akhir untuk peserta dibawah ini :
|
||||
</div>
|
||||
<div class="container2-<?php echo now()->timestamp; ?>">
|
||||
@@ -439,7 +439,7 @@
|
||||
@php
|
||||
if(count($dataDiagnosis))
|
||||
{
|
||||
foreach ($dataDiagnosis as $valDiagnosis)
|
||||
foreach ($dataDiagnosis as $valDiagnosis)
|
||||
{
|
||||
@endphp
|
||||
<tr>
|
||||
@@ -453,7 +453,7 @@
|
||||
@endphp
|
||||
<tr>
|
||||
<td colspan="5" style="width: 5%; text-align: left;">-</td>
|
||||
</tr>
|
||||
</tr>
|
||||
@php
|
||||
}
|
||||
@endphp
|
||||
|
||||
@@ -260,10 +260,10 @@
|
||||
<td>{{ $dataMember->code_plan }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="hot-line-<?php echo now()->timestamp; ?>">
|
||||
<!-- <div class="hot-line-<?php echo now()->timestamp; ?>">
|
||||
<b>Call Center LinkSehat : 08114123962</b>
|
||||
</div>
|
||||
<div class="txt-tindakan-<?php echo now()->timestamp; ?>">
|
||||
</div> -->
|
||||
<div class="txt-tindakan-<?php echo now()->timestamp; ?>" style="margin-top: 5px;">
|
||||
LinkSehat bertindak mewakili perusahaan asuransi/penanggung untuk mengeluarkan Surat Jaminan Awal untuk peserta dibawah ini :
|
||||
</div>
|
||||
<div class="container2-<?php echo now()->timestamp; ?>">
|
||||
@@ -395,7 +395,7 @@
|
||||
</div>
|
||||
<div class="title-container-page-<?php echo now()->timestamp; ?>">
|
||||
<div class="txt-syarat-<?php echo now()->timestamp; ?>">SYARAT DAN KETENTUAN</div>
|
||||
|
||||
|
||||
<table class="claim-info-<?php echo now()->timestamp; ?>">
|
||||
<tr>
|
||||
<td style="width: 3%;">1.</td>
|
||||
|
||||
Reference in New Issue
Block a user