penyesuaian ambil data submission ke created at

This commit is contained in:
Linksehat Staging Server
2024-02-11 07:19:18 +07:00
parent f8f9356d4d
commit 1e7468fc02
5 changed files with 36 additions and 28 deletions

View File

@@ -24,6 +24,7 @@ class RequestLogResource extends JsonResource
$data = [ $data = [
'id' => $this->id, 'id' => $this->id,
'code' => $this->code, 'code' => $this->code,
'created_at' => $this->created_at,
'submission_date' => $this->submission_date, 'submission_date' => $this->submission_date,
'submission_date_fgl' => $this->approved_final_log_at, 'submission_date_fgl' => $this->approved_final_log_at,
'member_name' => $this->member->name, 'member_name' => $this->member->name,

View File

@@ -106,7 +106,8 @@ class RequestLogShowResource extends JsonResource
'principal_id' => $requestLog['member']['principal_id'] ? $requestLog['member']['principal_id'] : '-', 'principal_id' => $requestLog['member']['principal_id'] ? $requestLog['member']['principal_id'] : '-',
'principal_name' => $requestLog['member']['principal_id'] ? Helper::principalName($requestLog['member']['principal_id']) : '-', 'principal_name' => $requestLog['member']['principal_id'] ? Helper::principalName($requestLog['member']['principal_id']) : '-',
'relation_with_principal' => Helper::relationWithPrincipal($requestLog['member']['relation_with_principal']), 'relation_with_principal' => Helper::relationWithPrincipal($requestLog['member']['relation_with_principal']),
'submission_date' => $requestLog['submission_date'], 'admission_date' => $requestLog['submission_date'], // admission mengacu pada tanggal submit
'submission_date' => $requestLog['created_at'], // submission mengacu pada tanggal buat
'approved_final_log_at' => $requestLog['approved_final_log_at'], // submission final log 'approved_final_log_at' => $requestLog['approved_final_log_at'], // submission final log
'discharge_date' => $requestLog['discharge_date'], 'discharge_date' => $requestLog['discharge_date'],
'service_type' => Helper::serviceName($requestLog['service_code']), 'service_type' => Helper::serviceName($requestLog['service_code']),

View File

@@ -192,7 +192,11 @@ export default function Detail() {
</Stack> </Stack>
<Stack direction='row' spacing={2} sx={marginBottom1}> <Stack direction='row' spacing={2} sx={marginBottom1}>
<Typography variant='subtitle2' sx={style1} gutterBottom>Submission Date</Typography> <Typography variant='subtitle2' sx={style1} gutterBottom>Submission Date</Typography>
<Typography variant='subtitle2' sx={style2} gutterBottom>{requestLog?.approved_final_log_at ? fDateTimesecond(requestLog?.approved_final_log_at) : '-'}</Typography> <Typography variant='subtitle2' sx={style2} gutterBottom>{requestLog?.submission_date ? fDateTimesecond(requestLog?.submission_date) : '-'}</Typography>
</Stack>
<Stack direction='row' spacing={2} sx={marginBottom1}>
<Typography variant='subtitle2' sx={style1} gutterBottom>Admission Date</Typography>
<Typography variant='subtitle2' sx={style2} gutterBottom>{requestLog?.admission_date ? fDateTimesecond(requestLog?.admission_date) : '-'}</Typography>
</Stack> </Stack>
<Stack direction='row' spacing={2} sx={marginBottom1}> <Stack direction='row' spacing={2} sx={marginBottom1}>

View File

@@ -350,7 +350,7 @@ export default function List() {
<TableCell align="left">{row.code}</TableCell> <TableCell align="left">{row.code}</TableCell>
<TableCell align="left">{row.provider}</TableCell> <TableCell align="left">{row.provider}</TableCell>
<TableCell align="left">{row.member_name}</TableCell> <TableCell align="left">{row.member_name}</TableCell>
<TableCell align="left"><Label>{fDateTimesecond(row.submission_date_fgl)}</Label></TableCell> <TableCell align="left"><Label>{fDateTimesecond(row.created_at)}</Label></TableCell>
<TableCell align="left">{row.service_name}</TableCell> <TableCell align="left">{row.service_name}</TableCell>
<TableCell align="left">{row.payment_type_name}</TableCell> <TableCell align="left">{row.payment_type_name}</TableCell>
<TableCell align="left"> <TableCell align="left">

View File

@@ -16,6 +16,8 @@ export type FinalLogType = {
member : Member, member : Member,
member_name : string, member_name : string,
submission_date_fgl : string, submission_date_fgl : string,
submission_date : string,
created_at : string,
service_name : string, service_name : string,
payment_type_name : string, payment_type_name : string,
status_final_log : string, status_final_log : string,