Update status
This commit is contained in:
@@ -579,6 +579,7 @@ class ClaimController extends Controller
|
||||
->where('claim_requests.id', $id)
|
||||
->update(
|
||||
[
|
||||
'status' => 'declined',
|
||||
'status_claim_management' => 'declined',
|
||||
'reason_decline' => $request->reasonDecline ? $request->reasonDecline : '',
|
||||
'approval_date_claim_management' => date('Y-m-d H:i:s'),
|
||||
@@ -608,6 +609,7 @@ class ClaimController extends Controller
|
||||
->where('claim_requests.id', $id)
|
||||
->update(
|
||||
[
|
||||
'status' => 'approved',
|
||||
'status_claim_management' => 'approved',
|
||||
'approval_date_claim_management' => date('Y-m-d H:i:s'),
|
||||
'approval_by_claim_management' => auth()->user()->id
|
||||
|
||||
@@ -99,6 +99,7 @@ class ClaimRequestShowResource extends JsonResource
|
||||
'service_type' => Helper::serviceName( $data['request_log']['service_code']),
|
||||
'claim_method' => $data['request_log']['payment_type'],
|
||||
'files' => $data['request_log']['files'],
|
||||
'reason_decline' => $data['reason_decline'],
|
||||
// 'benefit_data' => $benefitDetailLog,
|
||||
];
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ use App\Models\RequestLogBenefit;
|
||||
use App\Models\RequestLogMedicine;
|
||||
use App\Models\Organization;
|
||||
use App\Models\Exclusion;
|
||||
use App\Models\ClaimRequest;
|
||||
use App\Models\Icd;
|
||||
use App\Helpers\Helper;
|
||||
use App\Models\CorporatePolicy;
|
||||
@@ -36,6 +37,12 @@ class RequestLogShowResource extends JsonResource
|
||||
$benefitDetailLog = RequestLogBenefit::with('benefit')->where('request_log_id', $requestLog['id'])->get()->toArray();
|
||||
$medicineDetailLog = RequestLogMedicine::where('request_log_id', $requestLog['id'])->get()->toArray();
|
||||
$provider = Organization::where('id', $requestLog['organization_id'])->first();
|
||||
$claimRequest = ClaimRequest::where('request_log_id', $requestLog['id'])->first();
|
||||
if ($claimRequest) {
|
||||
$claimCode = $claimRequest->code;
|
||||
} else {
|
||||
$claimCode = '-';
|
||||
}
|
||||
|
||||
if ($provider){
|
||||
$providerName = $provider->name;
|
||||
@@ -95,6 +102,7 @@ class RequestLogShowResource extends JsonResource
|
||||
$data = [
|
||||
'id' => $requestLog['id'],
|
||||
'code' => $requestLog['code'],
|
||||
'code_claim' => $claimCode,
|
||||
'member_id' => $requestLog['member']['member_id'],
|
||||
'corporate_id' => $corporateId,
|
||||
'policy_number' =>$policyNumber->code ? $policyNumber->code : '-',
|
||||
|
||||
@@ -529,6 +529,20 @@ export default function Detail() {
|
||||
</Box>
|
||||
</Card>
|
||||
|
||||
{ claimRequests?.status === 'declined' ? (
|
||||
<Card sx={{padding:2, marginTop:2}} >
|
||||
<Stack direction="row" alignItems="center" sx={{marginBottom: 4}}>
|
||||
<Typography variant='subtitle1' sx={{color: '#19BBBB'}} gutterBottom>Reason</Typography>
|
||||
</Stack>
|
||||
<Box sx={{ border: '1px solid rgba(0,0,0,0.125)', px: '24px', py: '20px', marginBottom: '24px', borderRadius: '12px'}}>
|
||||
<Stack direction='row' spacing={2} sx={marginBottom1}>
|
||||
<Typography variant='subtitle2' sx={style1} gutterBottom>Reason Decline</Typography>
|
||||
<Typography variant='subtitle2' sx={style2} gutterBottom>{claimRequests?.reason_decline}</Typography>
|
||||
</Stack>
|
||||
</Box>
|
||||
</Card>
|
||||
) : null }
|
||||
|
||||
{/* PR Buat pindahin ke componen */}
|
||||
{/* <CardBenefit
|
||||
requestLog={requestLog}
|
||||
@@ -565,7 +579,7 @@ export default function Detail() {
|
||||
openDialog={openDialogEditDetail}
|
||||
/> */}
|
||||
|
||||
{(claimRequests?.status === 'requested') || (claimRequests?.status === 'decline') ? (
|
||||
{(claimRequests?.status === 'requested') || (claimRequests?.status === 'declined') ? (
|
||||
<Grid item xs={12} md={12}>
|
||||
<Stack direction="row" padding={4} sx={{ justifyContent: 'flex-end' }}>
|
||||
<div style={{ marginRight: '10px' }}> {/* Perubahan sintaksis disini */}
|
||||
|
||||
@@ -495,7 +495,7 @@ export default function List() {
|
||||
(<Label variant='ghost' color='primary'>{capitalizeFirstLetter(row.status)}</Label>) :
|
||||
row.status == "submission" ?
|
||||
(<Label color='info'> {capitalizeFirstLetter(row.status)}</Label>) :
|
||||
row.status == "decline" ?
|
||||
row.status == "declined" ?
|
||||
(<Label color='error'> {capitalizeFirstLetter(row.status)}</Label>) :
|
||||
(<Label color='success'> {capitalizeFirstLetter(row.status)}</Label>)
|
||||
}
|
||||
|
||||
@@ -51,6 +51,7 @@ export type DetailClaimRequest = {
|
||||
benefit_data : BenefitData[],
|
||||
diagnosis : Diagnosis[],
|
||||
request_log : RequestLogType | undefined,
|
||||
reason_decline : string,
|
||||
}
|
||||
|
||||
export type RequestLogType = {
|
||||
|
||||
@@ -186,7 +186,7 @@ export default function Detail() {
|
||||
<Container maxWidth={themeStretch ? false : 'xl'}>
|
||||
<Stack direction="row" alignItems="center" sx={{ marginBottom: 3 }}>
|
||||
<ArrowBackIosIcon onClick={() => navigate(-1)} sx={{cursor:'pointer'}}/>
|
||||
<Typography variant="h5" sx={{marginLeft:2}}>{(requestLog && requestLog.code ? requestLog.code : '')}</Typography>
|
||||
<Typography variant="h5" sx={{marginLeft:2}}>{(requestLog && requestLog.code_claim ? requestLog.code_claim : '')}</Typography>
|
||||
</Stack>
|
||||
<Grid container spacing={2}>
|
||||
{/* Detail */}
|
||||
|
||||
Reference in New Issue
Block a user