| @@ -29,12 +29,21 @@ export default function SearchPublicNoticeTable({ recordList }) { | |||||
| { | { | ||||
| field: 'actions', | field: 'actions', | ||||
| headerName: 'App No.', | headerName: 'App No.', | ||||
| flex: 1, | |||||
| width: 150, | |||||
| cellClassName: 'actions', | cellClassName: 'actions', | ||||
| renderCell: (params) => { | renderCell: (params) => { | ||||
| return <Button onClick={handleEditClick(params)}><u>{params.row.appNo}</u></Button>; | return <Button onClick={handleEditClick(params)}><u>{params.row.appNo}</u></Button>; | ||||
| }, | }, | ||||
| }, | }, | ||||
| { | |||||
| id: 'status', | |||||
| field: 'status', | |||||
| headerName: 'Status', | |||||
| width: 150, | |||||
| renderCell: (params) => { | |||||
| return [StatusUtils.getStatusEng(params)] | |||||
| }, | |||||
| }, | |||||
| { | { | ||||
| id: 'created', | id: 'created', | ||||
| field: 'created', | field: 'created', | ||||
| @@ -71,25 +80,33 @@ export default function SearchPublicNoticeTable({ recordList }) { | |||||
| } | } | ||||
| }, | }, | ||||
| { | { | ||||
| id: 'remarks', | |||||
| field: 'remarks', | |||||
| headerName: 'Remarks', | |||||
| flex: 3, | |||||
| id: 'groupNo', | |||||
| field: 'groupNo', | |||||
| headerName: 'Gazette Group', | |||||
| flex: 1, | |||||
| valueGetter: (params) => { | valueGetter: (params) => { | ||||
| return (params?.value)?(params?.value):""; | return (params?.value)?(params?.value):""; | ||||
| } | } | ||||
| }, | }, | ||||
| { | { | ||||
| id: 'status', | |||||
| field: 'status', | |||||
| headerName: 'Status', | |||||
| width: 150, | |||||
| renderCell: (params) => { | |||||
| return [StatusUtils.getStatusEng(params)] | |||||
| }, | |||||
| id: 'issueId', | |||||
| field: 'issueId', | |||||
| headerName: 'Issue No', | |||||
| flex: 1, | |||||
| valueGetter: (params) => { | |||||
| return params.row.issueYear | |||||
| +" Vol. "+zeroPad(params.row.issueVolume,3) | |||||
| +", No. "+zeroPad(params.row.issueNo,2) | |||||
| +", "+DateUtils.dateFormat(params.row.issueDate, "D MMM YYYY (ddd)"); | |||||
| } | |||||
| }, | }, | ||||
| ]; | ]; | ||||
| function zeroPad(num, places) { | |||||
| num=num?num:0; | |||||
| var zero = places - num.toString().length + 1; | |||||
| return Array(+(zero > 0 && zero)).join("0") + num; | |||||
| } | |||||
| return ( | return ( | ||||
| <div style={{ height: 400, width: '100%' }}> | <div style={{ height: 400, width: '100%' }}> | ||||