From 55ca5d036ab7a2eebe26718bd4ca9c61092e6d5d Mon Sep 17 00:00:00 2001 From: "jason.lam" Date: Wed, 24 Jan 2024 10:49:21 +0800 Subject: [PATCH 1/5] update payment page layout --- src/pages/DemandNote/Create/SearchForm.js | 47 ++++++----------- src/pages/DemandNote/Create/index.js | 8 +-- src/pages/DemandNote/Search/DataGrid.js | 39 +++++--------- src/pages/DemandNote/Search/SearchForm.js | 32 +++++------- src/pages/DemandNote/Search/index.js | 6 ++- src/pages/GFMIS/SearchForm.js | 59 +++++++--------------- src/pages/GFMIS/index.js | 4 +- src/pages/Payment/Search_GLD/SearchForm.js | 27 ++++------ src/pages/Payment/Search_GLD/index.js | 2 +- 9 files changed, 85 insertions(+), 139 deletions(-) diff --git a/src/pages/DemandNote/Create/SearchForm.js b/src/pages/DemandNote/Create/SearchForm.js index 740cde8..2473214 100644 --- a/src/pages/DemandNote/Create/SearchForm.js +++ b/src/pages/DemandNote/Create/SearchForm.js @@ -1,7 +1,6 @@ // material-ui import { Button, - CardContent, Grid, TextField, Autocomplete, Typography, @@ -15,6 +14,8 @@ import * as UrlUtils from "utils/ApiPathConst"; import * as HttpUtils from "utils/HttpUtils"; import { useNavigate } from "react-router-dom"; import { notifyDownloadSuccess } from 'utils/CommonFunction'; +import {PNSPS_BUTTON_THEME} from "../../../themes/buttonConst"; +import {ThemeProvider} from "@emotion/react"; // ==============================|| DASHBOARD - DEFAULT ||============================== // @@ -35,22 +36,6 @@ const SearchPublicNoticeForm = ({ applySearch, issueComboData, _paymentCount, _p const [issueCombo, setIssueCombo] = React.useState([]); const navigate = useNavigate() - const _sx = { - padding: "4 2 4 2", - boxShadow: 1, - border: 1, - borderColor: '#DDD', - '& .MuiDataGrid-cell': { - borderTop: 1, - borderBottom: 1, - borderColor: "#EEE" - }, - '& .MuiDataGrid-footerContainer': { - border: 1, - borderColor: "#EEE" - } - } - React.useEffect(() => { if (issueComboData && issueComboData.length > 0) { setIssueCombo(issueComboData); @@ -128,20 +113,21 @@ const SearchPublicNoticeForm = ({ applySearch, issueComboData, _paymentCount, _p
{/*row 1*/} - - - Please Select Gazette Issue : + + {/*row 1*/} + + + Please Select Gazette Issue : + - + {/*row 2*/} - {/*row 2*/} - - + + */} + + @@ -199,6 +183,7 @@ const SearchPublicNoticeForm = ({ applySearch, issueComboData, _paymentCount, _p Pending Publish: {publishCount} +
setIsFailPopUp(false)} > diff --git a/src/pages/DemandNote/Create/index.js b/src/pages/DemandNote/Create/index.js index b8740ac..d0e09c2 100644 --- a/src/pages/DemandNote/Create/index.js +++ b/src/pages/DemandNote/Create/index.js @@ -80,16 +80,18 @@ const Index = () => { !onReady ? : - +
- Create Demand Note + + Create Demand Note +
{/*row 1*/} - + + - Attach DN + Attach DN +
- + {/*row 1*/} - - - - Search Form - - + + + Search Form + {/*row 2*/} @@ -261,28 +260,25 @@ const SearchDemandNoteForm = ({ applySearch, orgComboData, searchCriteria, issue {/*last row*/} - + + - + + diff --git a/src/pages/DemandNote/Search/index.js b/src/pages/DemandNote/Search/index.js index 23eaa30..d84e03e 100644 --- a/src/pages/DemandNote/Search/index.js +++ b/src/pages/DemandNote/Search/index.js @@ -98,12 +98,14 @@ const UserSearchPage_Individual = () => {
- Demand Note + + Demand Note +
{/*row 1*/} - + const [maxDate, setMaxDate] = React.useState(searchCriteria.dateTo); // const [status, setStatus] = React.useState(ComboData.paymentStatus[0]); - const _sx = { - padding: "4 2 4 2", - boxShadow: 1, - border: 1, - borderColor: '#DDD', - '& .MuiDataGrid-cell': { - borderTop: 1, - borderBottom: 1, - borderColor: "#EEE" - }, - '& .MuiDataGrid-footerContainer': { - border: 1, - borderColor: "#EEE" - } - } - const { register, handleSubmit, getValues } = useForm() const onSubmit = (data) => { @@ -67,20 +52,19 @@ const SearchPublicNoticeForm = ({ applySearch, generateXML, searchCriteria }) => -
- {/*row 1*/} - - - Credit Date + + + {/*row 1*/} + + + Credit Date + - - - {/*row 2*/} - + {/*row 2*/} + */} - + + + +
diff --git a/src/pages/GFMIS/index.js b/src/pages/GFMIS/index.js index aaecf68..a20353a 100644 --- a/src/pages/GFMIS/index.js +++ b/src/pages/GFMIS/index.js @@ -100,7 +100,7 @@ const Index = () => { !onReady ? : - +
@@ -109,7 +109,7 @@ const Index = () => {
{/*row 1*/} - + { >
- + {/*row 1*/} @@ -148,32 +150,25 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { {/*last row*/} - - + + - + + diff --git a/src/pages/Payment/Search_GLD/index.js b/src/pages/Payment/Search_GLD/index.js index d27248c..f62fe09 100644 --- a/src/pages/Payment/Search_GLD/index.js +++ b/src/pages/Payment/Search_GLD/index.js @@ -75,7 +75,7 @@ const Index = () => {
{/*row 1*/} - + Date: Wed, 24 Jan 2024 11:54:08 +0800 Subject: [PATCH 2/5] update client search layout --- .../SearchPage/OrganizationSearchForm.js | 203 +++++++------ src/pages/Organization/SearchPage/index.js | 2 +- src/pages/User/SearchPage/UserSearchForm.js | 99 +++---- src/pages/User/SearchPage/index.js | 2 +- .../UserSearchForm_Individual.js | 42 ++- src/pages/User/SearchPage_Individual/index.js | 6 +- .../UserSearchForm_Organization.js | 274 +++++++++--------- .../User/SearchPage_Organization/index.js | 2 +- .../UserGroupSearchForm.js | 140 ++++----- src/pages/pnspsUserGroupSearchPage/index.js | 6 +- 10 files changed, 379 insertions(+), 397 deletions(-) diff --git a/src/pages/Organization/SearchPage/OrganizationSearchForm.js b/src/pages/Organization/SearchPage/OrganizationSearchForm.js index 90f130e..d1d623e 100644 --- a/src/pages/Organization/SearchPage/OrganizationSearchForm.js +++ b/src/pages/Organization/SearchPage/OrganizationSearchForm.js @@ -1,7 +1,6 @@ // material-ui import { Button, - CardContent, Grid, TextField, Typography, Autocomplete, @@ -15,6 +14,8 @@ import * as React from "react"; import * as UrlUtils from "utils/ApiPathConst"; import * as HttpUtils from "utils/HttpUtils"; import * as ComboData from "utils/ComboData"; +import {PNSPS_BUTTON_THEME} from "../../../themes/buttonConst"; +import {ThemeProvider} from "@emotion/react"; // ==============================|| DASHBOARD - DEFAULT ||============================== // @@ -62,119 +63,109 @@ const OrganizationSearchForm = ({ applySearch }) => {
{/*row 1*/} - - - Search Form + + {/*row 1*/} + + + Search Form + - - - {/*row 2*/} - - - - - - - - - - - - - - - { - setCreditorSelected(newValue); + {/*row 2*/} + + + + option.label} - renderInput={(params) => ( - - )} /> - - - - + + + + + + + + + + + + { + setCreditorSelected(newValue); + }} + getOptionLabel={(option) => option.label} + renderInput={(params) => ( + + )} + /> + - {/*last row*/} - - - - - - - - - + {/*last row*/} + + + + + + + + + + + + + + - -
diff --git a/src/pages/Organization/SearchPage/index.js b/src/pages/Organization/SearchPage/index.js index 770549f..a805885 100644 --- a/src/pages/Organization/SearchPage/index.js +++ b/src/pages/Organization/SearchPage/index.js @@ -76,7 +76,7 @@ const OrganizationSearchPage = () => { {/*row 1*/} - + {/*row 2*/} diff --git a/src/pages/User/SearchPage/UserSearchForm.js b/src/pages/User/SearchPage/UserSearchForm.js index a2949d7..0b1f1be 100644 --- a/src/pages/User/SearchPage/UserSearchForm.js +++ b/src/pages/User/SearchPage/UserSearchForm.js @@ -1,7 +1,7 @@ // material-uisubDivision import { Button, - CardContent, FormControlLabel, + FormControlLabel, Grid, TextField, Typography } from '@mui/material'; @@ -19,6 +19,8 @@ import AddCircleOutlineIcon from '@mui/icons-material/AddCircleOutline'; import { useNavigate } from "react-router"; import axios from "axios"; import { GET_EMAIL_LIST } from 'utils/ApiPathConst'; +import {PNSPS_BUTTON_THEME} from "../../../themes/buttonConst"; +import {ThemeProvider} from "@emotion/react"; // ==============================|| DASHBOARD - DEFAULT ||============================== // @@ -76,15 +78,16 @@ const UserSearchForm = ({ applySearch }) => { content={false}>
- {/*row 1*/} - - - Search Form (GLD User) + + {/*row 1*/} + + + Search Form (GLD User) + - + {/*row 2*/} - {/*row 2*/} - + { size="small" /> } - label={Locked} + label={Locked} /> - {/*last row*/} - - - - - - - - - - - - + {/*last row*/} + + + + + + + + + + + + + + + + diff --git a/src/pages/User/SearchPage/index.js b/src/pages/User/SearchPage/index.js index 09ab603..fba0ad2 100644 --- a/src/pages/User/SearchPage/index.js +++ b/src/pages/User/SearchPage/index.js @@ -82,7 +82,7 @@ const UserSettingPage = () => { {/*row 1*/} - + {/*row 2*/} diff --git a/src/pages/User/SearchPage_Individual/UserSearchForm_Individual.js b/src/pages/User/SearchPage_Individual/UserSearchForm_Individual.js index d89b152..d9ade40 100644 --- a/src/pages/User/SearchPage_Individual/UserSearchForm_Individual.js +++ b/src/pages/User/SearchPage_Individual/UserSearchForm_Individual.js @@ -1,7 +1,6 @@ // material-ui import { Button, - CardContent, Grid, TextField, Autocomplete, Typography @@ -10,6 +9,8 @@ import MainCard from "../../../components/MainCard"; import { useForm } from "react-hook-form"; import { useState } from "react"; import * as React from "react"; +import {PNSPS_BUTTON_THEME} from "../../../themes/buttonConst"; +import {ThemeProvider} from "@emotion/react"; // ==============================|| DASHBOARD - DEFAULT ||============================== // @@ -48,15 +49,16 @@ const UserSearchForm_Individual = ({ applySearch }) => { content={false}>
- {/*row 1*/} - - - Search Form + + {/*row 1*/} + + + Search Form + - + {/*row 2*/} - {/*row 2*/} - + { {/*last row*/} - - + + - + + + diff --git a/src/pages/User/SearchPage_Individual/index.js b/src/pages/User/SearchPage_Individual/index.js index 2d9f4f4..131505b 100644 --- a/src/pages/User/SearchPage_Individual/index.js +++ b/src/pages/User/SearchPage_Individual/index.js @@ -71,13 +71,15 @@ const UserSearchPage_Individual = () => {
- View Individual User + + View Individual User +
{/*row 1*/} - + {/*row 2*/} diff --git a/src/pages/User/SearchPage_Organization/UserSearchForm_Organization.js b/src/pages/User/SearchPage_Organization/UserSearchForm_Organization.js index 80c37cc..bf3917e 100644 --- a/src/pages/User/SearchPage_Organization/UserSearchForm_Organization.js +++ b/src/pages/User/SearchPage_Organization/UserSearchForm_Organization.js @@ -1,7 +1,7 @@ // material-ui import { Button, - CardContent, Autocomplete, + Autocomplete, Grid, TextField, Typography } from '@mui/material'; @@ -10,6 +10,8 @@ import {useForm} from "react-hook-form"; import { useState} from "react"; import * as React from "react"; +import {PNSPS_BUTTON_THEME} from "../../../themes/buttonConst"; +import {ThemeProvider} from "@emotion/react"; // ==============================|| DASHBOARD - DEFAULT ||============================== // @@ -51,151 +53,145 @@ const UserSearchForm_Organization = ({applySearch}) => { border={false} content={false}> -
- {/*row 1*/} - - - Search Form - - - - {/*row 2*/} - - - - - - - - + + + {/*row 1*/} + + + Search Form + + {/*row 2*/} + - - - - - - - - - - - - - - - - - { - if (newValue !== null){ - setAccountFilter(newValue); - } - }} - renderInput={(params) => ( - + + + + + + + + + + + + + + + + + + + + + + + + { + if (newValue !== null){ + setAccountFilter(newValue); + } + }} + renderInput={(params) => ( + + )} /> - )} - /> - - {/**/} - {/* */} - {/**/} - - + + {/**/} + {/* */} + {/**/} - - {/*last row*/} - - - - - - + + {/*last row*/} + + + + + + + + + + diff --git a/src/pages/User/SearchPage_Organization/index.js b/src/pages/User/SearchPage_Organization/index.js index 98f9553..e789caa 100644 --- a/src/pages/User/SearchPage_Organization/index.js +++ b/src/pages/User/SearchPage_Organization/index.js @@ -77,7 +77,7 @@ const UserSearchPage_Organization = () => { {/*row 1*/} - + {/*row 2*/} diff --git a/src/pages/pnspsUserGroupSearchPage/UserGroupSearchForm.js b/src/pages/pnspsUserGroupSearchPage/UserGroupSearchForm.js index 3b2c1c7..8c8d6fa 100644 --- a/src/pages/pnspsUserGroupSearchPage/UserGroupSearchForm.js +++ b/src/pages/pnspsUserGroupSearchPage/UserGroupSearchForm.js @@ -1,7 +1,6 @@ // material-ui import { Button, - CardContent, Grid, TextField, Typography } from '@mui/material'; @@ -10,6 +9,8 @@ import { useForm } from "react-hook-form"; import * as React from "react"; import AddCircleOutlineIcon from '@mui/icons-material/AddCircleOutline'; import { useNavigate } from "react-router"; +import {PNSPS_BUTTON_THEME} from "../../themes/buttonConst"; +import {ThemeProvider} from "@emotion/react"; // ==============================|| DASHBOARD - DEFAULT ||============================== // @@ -37,83 +38,82 @@ const UserGroupSearchForm = ({ applySearch }) => { >
- {/*row 1*/} - - - Search Form + + {/*row 1*/} + + + Search Form + - + {/*row 2*/} - {/*row 2*/} - - - - + + + + - - + + + - - {/*last row*/} - - - - - - - - - + {/*last row*/} + + + + + + + + + + - - + + + + diff --git a/src/pages/pnspsUserGroupSearchPage/index.js b/src/pages/pnspsUserGroupSearchPage/index.js index fbde832..c0bb997 100644 --- a/src/pages/pnspsUserGroupSearchPage/index.js +++ b/src/pages/pnspsUserGroupSearchPage/index.js @@ -79,13 +79,15 @@ const UserGroupSearchPanel = () => {
- View User Group + + View User Group +
{/*row 1*/} - + {/*row 2*/} From e359fae86eadba082139cf8ae0994a0a3c28298d Mon Sep 17 00:00:00 2001 From: anna Date: Wed, 24 Jan 2024 12:38:58 +0800 Subject: [PATCH 3/5] update ui --- src/pages/DemandNote/Search/DataGrid.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/pages/DemandNote/Search/DataGrid.js b/src/pages/DemandNote/Search/DataGrid.js index 4e8cbb2..bf47353 100644 --- a/src/pages/DemandNote/Search/DataGrid.js +++ b/src/pages/DemandNote/Search/DataGrid.js @@ -323,9 +323,8 @@ export default function SearchDemandNote({ recordList, reloadFun, applySearch }) From 8e3d697a5b240e7fbb8547fa2b11446e4166a85a Mon Sep 17 00:00:00 2001 From: "jason.lam" Date: Wed, 24 Jan 2024 15:27:48 +0800 Subject: [PATCH 4/5] update grid height --- src/components/FiDataGrid.js | 2 +- src/pages/PublicNotice/ListPanel/BaseGrid.js | 2 +- .../ListPanel/SearchPublicNoticeTab.js | 20 +++++++++++++------ .../ListPanel/SearchPublicNoticeTable.js | 2 +- src/pages/PublicNotice/ListPanel/index.js | 6 +++--- 5 files changed, 20 insertions(+), 12 deletions(-) diff --git a/src/components/FiDataGrid.js b/src/components/FiDataGrid.js index f1a1f05..43d96b7 100644 --- a/src/components/FiDataGrid.js +++ b/src/components/FiDataGrid.js @@ -110,7 +110,7 @@ export function FiDataGrid({ rows, columns, sx, autoHeight, count={_rows.length} page={page} rowsPerPage={pageSize} - rowsPerPageOptions={[5, 10, 25, 50]} + rowsPerPageOptions={[10]} labelDisplayedRows={({ from, to, count }) => `${from}-${to} ${intl.formatMessage({ id: "of" })} ${count}` } diff --git a/src/pages/PublicNotice/ListPanel/BaseGrid.js b/src/pages/PublicNotice/ListPanel/BaseGrid.js index 7727eee..8b88df2 100644 --- a/src/pages/PublicNotice/ListPanel/BaseGrid.js +++ b/src/pages/PublicNotice/ListPanel/BaseGrid.js @@ -118,7 +118,7 @@ export default function BaseGrid({rows}) { } return ( -
+
{ url: GET_PUBLIC_NOTICE_LIST, params: searchCriteria, onSuccess: function(responseData){ - setRecord(responseData); + setRecord( + [ + responseData[0],responseData[0],responseData[0],responseData[0],responseData[0],responseData[0],responseData[0],responseData[0],responseData[0],responseData[0], + responseData[0],responseData[0],responseData[0],responseData[0],responseData[0],responseData[0],responseData[0],responseData[0],responseData[0],responseData[0] + ] + ); } }); } @@ -45,7 +50,7 @@ const UserSearchPage_Individual = () => { } return ( - + {/*row 1*/} { - +
+ +
diff --git a/src/pages/PublicNotice/ListPanel/SearchPublicNoticeTable.js b/src/pages/PublicNotice/ListPanel/SearchPublicNoticeTable.js index ce1c222..f29aa12 100644 --- a/src/pages/PublicNotice/ListPanel/SearchPublicNoticeTable.js +++ b/src/pages/PublicNotice/ListPanel/SearchPublicNoticeTable.js @@ -121,7 +121,7 @@ export default function SearchPublicNoticeTable({ recordList }) { } return ( -
+
{ { JSON.parse(localStorage.getItem('userData')).creditor ? ( - + - + @@ -166,7 +166,7 @@ const PublicNotice = () => { ) : ( - + From 6f5716a5fb9fc02031e4f6eb3db6c86d12f0c3b3 Mon Sep 17 00:00:00 2001 From: "jason.lam" Date: Wed, 24 Jan 2024 16:18:10 +0800 Subject: [PATCH 5/5] bug fix --- src/pages/PublicNotice/ListPanel/SearchPublicNoticeTab.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/pages/PublicNotice/ListPanel/SearchPublicNoticeTab.js b/src/pages/PublicNotice/ListPanel/SearchPublicNoticeTab.js index 1703c4a..5cbb653 100644 --- a/src/pages/PublicNotice/ListPanel/SearchPublicNoticeTab.js +++ b/src/pages/PublicNotice/ListPanel/SearchPublicNoticeTab.js @@ -35,12 +35,7 @@ const UserSearchPage_Individual = () => { url: GET_PUBLIC_NOTICE_LIST, params: searchCriteria, onSuccess: function(responseData){ - setRecord( - [ - responseData[0],responseData[0],responseData[0],responseData[0],responseData[0],responseData[0],responseData[0],responseData[0],responseData[0],responseData[0], - responseData[0],responseData[0],responseData[0],responseData[0],responseData[0],responseData[0],responseData[0],responseData[0],responseData[0],responseData[0] - ] - ); + setRecord(responseData); } }); }