Browse Source

add gld application search page to menu bar

master
Alex Cheung 1 year ago
parent
commit
82ebd17dd4
2 changed files with 10 additions and 3 deletions
  1. +1
    -1
      src/layout/MainLayout/Header/index.js
  2. +9
    -2
      src/pages/PublicNoticeSearch_GLD/DataGrid.js

+ 1
- 1
src/layout/MainLayout/Header/index.js View File

@@ -77,7 +77,7 @@ function Header(props) {
<Link className="dashboard" to='/dashboard'>Dashboard</Link> <Link className="dashboard" to='/dashboard'>Dashboard</Link>
</li> </li>
<li> <li>
<Link className="application" to='/dashboard'>Application</Link>
<Link className="application" to='/application/search'>Application</Link>
</li> </li>
<li> <li>
<Link className="proof" to='/dashboard'>Proof</Link> <Link className="proof" to='/dashboard'>Proof</Link>


+ 9
- 2
src/pages/PublicNoticeSearch_GLD/DataGrid.js View File

@@ -8,16 +8,23 @@ import {
} from '@mui/material'; } from '@mui/material';
import * as DateUtils from "utils/DateUtils"; import * as DateUtils from "utils/DateUtils";
import * as StatusUtils from "pages/PublicNotice/ListPanel/PublicNoteStatusUtils"; import * as StatusUtils from "pages/PublicNotice/ListPanel/PublicNoteStatusUtils";
import {useNavigate} from "react-router-dom";
// ==============================|| EVENT TABLE ||============================== // // ==============================|| EVENT TABLE ||============================== //


export default function SearchPublicNoticeTable({ recordList }) { export default function SearchPublicNoticeTable({ recordList }) {
const [rows, setRows] = React.useState(recordList); const [rows, setRows] = React.useState(recordList);
const [rowModesModel] = React.useState({}); const [rowModesModel] = React.useState({});
const navigate = useNavigate()


React.useEffect(() => { React.useEffect(() => {
setRows(recordList); setRows(recordList);
}, [recordList]); }, [recordList]);


const handleEditClick = (params) => () => {
navigate('/application/'+ params.id);
};


const columns = [ const columns = [
{ {
id: 'appNo', id: 'appNo',
@@ -80,8 +87,8 @@ export default function SearchPublicNoticeTable({ recordList }) {
headerName: '', headerName: '',
width: 100, width: 100,
cellClassName: 'actions', cellClassName: 'actions',
renderCell: () => {
return <Button onClick={() => { }}>Details</Button>;
renderCell: (params) => {
return <Button onClick={handleEditClick(params)}>Details</Button>;
}, },
} }
]; ];


Loading…
Cancel
Save