|
|
@@ -6,13 +6,13 @@ import { |
|
|
|
} from '@mui/material'; |
|
|
|
import * as DateUtils from "utils/DateUtils"; |
|
|
|
import * as StatusUtils from "utils/statusUtils/PublicNoteStatusUtils"; |
|
|
|
import {useNavigate} from "react-router-dom"; |
|
|
|
import {FiDataGrid} from "components/FiDataGrid"; |
|
|
|
import { useNavigate } from "react-router-dom"; |
|
|
|
import { FiDataGrid } from "components/FiDataGrid"; |
|
|
|
import { |
|
|
|
isORGLoggedIn, |
|
|
|
} from "utils/Utils"; |
|
|
|
import {useTheme} from "@emotion/react"; |
|
|
|
import {FormattedMessage, useIntl} from "react-intl"; |
|
|
|
} from "utils/Utils"; |
|
|
|
import { useTheme } from "@emotion/react"; |
|
|
|
import { FormattedMessage, useIntl } from "react-intl"; |
|
|
|
// ==============================|| EVENT TABLE ||============================== // |
|
|
|
|
|
|
|
export default function SearchPublicNoticeTable({ recordList }) { |
|
|
@@ -23,7 +23,7 @@ export default function SearchPublicNoticeTable({ recordList }) { |
|
|
|
const intl = useIntl(); |
|
|
|
|
|
|
|
const handleDetailClick = (params) => () => { |
|
|
|
navigate('/publicNotice/'+ params.id); |
|
|
|
navigate('/publicNotice/' + params.id); |
|
|
|
}; |
|
|
|
|
|
|
|
React.useEffect(() => { |
|
|
@@ -34,14 +34,14 @@ export default function SearchPublicNoticeTable({ recordList }) { |
|
|
|
{ |
|
|
|
id: 'appNo', |
|
|
|
field: 'appNo', |
|
|
|
headerName: intl.formatMessage({id: 'applicationId'}), |
|
|
|
headerName: intl.formatMessage({ id: 'applicationId' }), |
|
|
|
width: isMdOrLg ? 'auto' : 160, |
|
|
|
flex: isMdOrLg ? 1 : undefined, |
|
|
|
}, |
|
|
|
{ |
|
|
|
id: 'created', |
|
|
|
field: 'created', |
|
|
|
headerName: intl.formatMessage({id: 'submitDate'}), |
|
|
|
headerName: intl.formatMessage({ id: 'submitDate' }), |
|
|
|
width: isMdOrLg ? 'auto' : 160, |
|
|
|
flex: isMdOrLg ? 1 : undefined, |
|
|
|
valueGetter: (params) => { |
|
|
@@ -77,24 +77,28 @@ export default function SearchPublicNoticeTable({ recordList }) { |
|
|
|
{ |
|
|
|
id: 'remarks', |
|
|
|
field: 'remarks', |
|
|
|
headerName: isORGLoggedIn()? intl.formatMessage({id: 'gazetteCount2_1'}) : intl.formatMessage({id: 'myRemarks'}), |
|
|
|
headerName: isORGLoggedIn() ? intl.formatMessage({ id: 'gazetteCount2_1' }) : intl.formatMessage({ id: 'myRemarks' }), |
|
|
|
width: isMdOrLg ? 'auto' : 400, |
|
|
|
flex: isMdOrLg ? 3 : undefined, |
|
|
|
renderCell: (params) => ( |
|
|
|
isORGLoggedIn()? |
|
|
|
<div> |
|
|
|
Care Of: {params.row.careOf} <br/> |
|
|
|
<FormattedMessage id="myRemarks"/>: {params.row.remarks} |
|
|
|
</div>: |
|
|
|
<div> |
|
|
|
<Typography variant="pnspsNormalText">{params.row.remarks}</Typography> |
|
|
|
</div> |
|
|
|
) |
|
|
|
isORGLoggedIn() ? |
|
|
|
<div> |
|
|
|
<FormattedMessage id="gazetteCount" />: {params.row.issueVolume + "/" + params.row.issueYear |
|
|
|
+ " No. " + params.row.issueNo}<br /> |
|
|
|
Care Of: {params.row.careOf} <br /> |
|
|
|
<FormattedMessage id="myRemarks" />: {params.row.remarks} |
|
|
|
</div> : |
|
|
|
<div> |
|
|
|
<FormattedMessage id="gazetteCount" />: {params.row.issueVolume + "/" + params.row.issueYear |
|
|
|
+ " No. " + params.row.issueNo}<br /> |
|
|
|
<Typography variant="pnspsNormalText">{params.row.remarks}</Typography> |
|
|
|
</div> |
|
|
|
) |
|
|
|
}, |
|
|
|
{ |
|
|
|
id: 'status', |
|
|
|
field: 'status', |
|
|
|
headerName: intl.formatMessage({id: 'status'}), |
|
|
|
headerName: intl.formatMessage({ id: 'status' }), |
|
|
|
width: 200, |
|
|
|
renderCell: (params) => { |
|
|
|
return [StatusUtils.getStatusIntl(params, intl)] |
|
|
@@ -108,16 +112,16 @@ export default function SearchPublicNoticeTable({ recordList }) { |
|
|
|
cellClassName: 'actions', |
|
|
|
renderCell: (params) => { |
|
|
|
return <Button onClick={handleDetailClick(params)} |
|
|
|
aria-label={intl.formatMessage({id: 'viewDetail'})} |
|
|
|
aria-label={intl.formatMessage({ id: 'viewDetail' })} |
|
|
|
> |
|
|
|
<FormattedMessage id="viewDetail"/> |
|
|
|
<FormattedMessage id="viewDetail" /> |
|
|
|
</Button>; |
|
|
|
}, |
|
|
|
} |
|
|
|
]; |
|
|
|
|
|
|
|
function handleRowDoubleClick(params) { |
|
|
|
navigate('/publicNotice/'+ params.id); |
|
|
|
navigate('/publicNotice/' + params.id); |
|
|
|
} |
|
|
|
|
|
|
|
return ( |
|
|
|