update type script dan nambah kolom member code
This commit is contained in:
@@ -154,7 +154,8 @@ class ReportLogController extends Controller
|
|||||||
$writer->openToFile(public_path('files/Report-Request-Final-LOG.xlsx'));
|
$writer->openToFile(public_path('files/Report-Request-Final-LOG.xlsx'));
|
||||||
$headerArray = [
|
$headerArray = [
|
||||||
'Code',
|
'Code',
|
||||||
'Member',
|
'Member Name',
|
||||||
|
'Member Code',
|
||||||
'GL Create Time',
|
'GL Create Time',
|
||||||
'GL Submit Time',
|
'GL Submit Time',
|
||||||
'GL Create By',
|
'GL Create By',
|
||||||
@@ -218,6 +219,7 @@ class ReportLogController extends Controller
|
|||||||
$rowData = [
|
$rowData = [
|
||||||
$row['code'], // code
|
$row['code'], // code
|
||||||
$row['member'] ? $row['member']['name'] : '', // name
|
$row['member'] ? $row['member']['name'] : '', // name
|
||||||
|
$row['member'] ? $row['member']['member_id'] : '', // member id
|
||||||
$formattedDateTime ? $formattedDateTime : "-" , // created at
|
$formattedDateTime ? $formattedDateTime : "-" , // created at
|
||||||
$row['submission_date'], // submission date
|
$row['submission_date'], // submission date
|
||||||
Helper::userName($row['approved_by']), // created by
|
Helper::userName($row['approved_by']), // created by
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ class ReportLogResource extends JsonResource
|
|||||||
'status' => $this->status ?? '-',
|
'status' => $this->status ?? '-',
|
||||||
'status_final_log' => $this->status_final_log ?? '-',
|
'status_final_log' => $this->status_final_log ?? '-',
|
||||||
'member_name' => $this->member->name,
|
'member_name' => $this->member->name,
|
||||||
|
'member_code' => $this->member->member_id,
|
||||||
'payment_type' => $this->payment_type,
|
'payment_type' => $this->payment_type,
|
||||||
'payment_type_name' => $this->payment_type_name,
|
'payment_type_name' => $this->payment_type_name,
|
||||||
'duration_gl' => $durationGl,
|
'duration_gl' => $durationGl,
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ import TableMoreMenu from '@/components/table/TableMoreMenu';
|
|||||||
import { Import } from '@/@types/claims';
|
import { Import } from '@/@types/claims';
|
||||||
// import DialogDeleteRequestLOG from '../Request/Components/DialogDeleteRequestLOG';
|
// import DialogDeleteRequestLOG from '../Request/Components/DialogDeleteRequestLOG';
|
||||||
import { HeadCell, Order } from '@/@types/table';
|
import { HeadCell, Order } from '@/@types/table';
|
||||||
|
import { ReportLog } from './Model/Type';
|
||||||
// import LoadingButton from '@/theme/overrides/LoadingButton';
|
// import LoadingButton from '@/theme/overrides/LoadingButton';
|
||||||
|
|
||||||
export default function List() {
|
export default function List() {
|
||||||
@@ -300,7 +301,7 @@ export default function List() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Called on every row to map the data to the columns
|
// Called on every row to map the data to the columns
|
||||||
function createData(data: any): any {
|
function createData(data: ReportLog){
|
||||||
return {
|
return {
|
||||||
...data,
|
...data,
|
||||||
};
|
};
|
||||||
@@ -319,6 +320,7 @@ export default function List() {
|
|||||||
<TableRow sx={{ '& > *': { borderBottom: 'unset' } }}>
|
<TableRow sx={{ '& > *': { borderBottom: 'unset' } }}>
|
||||||
<TableCell align="left">{row.code}</TableCell>
|
<TableCell align="left">{row.code}</TableCell>
|
||||||
<TableCell align="left">{row.member_name}</TableCell>
|
<TableCell align="left">{row.member_name}</TableCell>
|
||||||
|
<TableCell align="left">{row.member_code}</TableCell>
|
||||||
<TableCell align="left"><Label>{row.created_at ? fDateTimesecond(row.created_at) : '-'}</Label></TableCell>
|
<TableCell align="left"><Label>{row.created_at ? fDateTimesecond(row.created_at) : '-'}</Label></TableCell>
|
||||||
<TableCell align="left"><Label>{fDateTimesecond(row.submission_date)}</Label></TableCell>
|
<TableCell align="left"><Label>{fDateTimesecond(row.submission_date)}</Label></TableCell>
|
||||||
<TableCell align="left">{row.approved_by}</TableCell>
|
<TableCell align="left">{row.approved_by}</TableCell>
|
||||||
@@ -386,7 +388,13 @@ export default function List() {
|
|||||||
{
|
{
|
||||||
id: 'name',
|
id: 'name',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: 'Member',
|
label: 'Member Name',
|
||||||
|
isSort: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'code',
|
||||||
|
align: 'left',
|
||||||
|
label: 'Member Code',
|
||||||
isSort: false,
|
isSort: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
20
frontend/dashboard/src/pages/Report/Log/Model/Type.tsx
Normal file
20
frontend/dashboard/src/pages/Report/Log/Model/Type.tsx
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
export type ReportLog = {
|
||||||
|
id : number,
|
||||||
|
code : string,
|
||||||
|
member_name : string,
|
||||||
|
member_code : string,
|
||||||
|
submission_date : string,
|
||||||
|
service_name : string,
|
||||||
|
payment_type_name : string,
|
||||||
|
status_final_log : string,
|
||||||
|
provider : string,
|
||||||
|
status : string,
|
||||||
|
created_at : string,
|
||||||
|
approved_by : string,
|
||||||
|
approved_final_log_at : string,
|
||||||
|
created_final_at : string,
|
||||||
|
approved_final_log_by : string,
|
||||||
|
document_qty : string,
|
||||||
|
duration_gl : string,
|
||||||
|
duration_final_gl : string,
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user