From 431224b7d5247f9df24cbbdbab2033bb7d20bd79 Mon Sep 17 00:00:00 2001 From: anna Date: Fri, 22 Mar 2024 12:38:07 +0800 Subject: [PATCH] grid UI --- src/pages/DemandNote/Create/DataGrid.js | 6 ++ src/pages/DemandNote/Create/SearchForm.js | 97 +++++++++---------- .../SearchPage/OrganizationTable.js | 6 ++ src/pages/Payment/Search_GLD/DataGrid.js | 3 + src/pages/Proof/Search_GLD/DataGrid.js | 6 ++ .../Details_GLD/ApplicationDetailCard.js | 4 +- src/pages/PublicNotice/Search_GLD/DataGrid.js | 4 + .../UserTable_Individual.js | 7 ++ .../UserTable_Organization.js | 7 ++ 9 files changed, 85 insertions(+), 55 deletions(-) diff --git a/src/pages/DemandNote/Create/DataGrid.js b/src/pages/DemandNote/Create/DataGrid.js index 5935975..333634d 100644 --- a/src/pages/DemandNote/Create/DataGrid.js +++ b/src/pages/DemandNote/Create/DataGrid.js @@ -40,6 +40,7 @@ export default function SearchPublicNoticeTable({ recordList }) { field: 'appNo', headerName: 'App No.', flex: 1, + minWidth: 150, renderCell: (params) => { return clickableLink('/application/' + params.row.id, params.row.appNo) }, @@ -48,6 +49,7 @@ export default function SearchPublicNoticeTable({ recordList }) { field: 'status', headerName: 'Status', flex: 1, + minWidth: 200, renderCell: (params) => { return PublicNoteStatusUtils.getStatusByTextEng(params.row.status, params.row.creditor); } @@ -56,6 +58,7 @@ export default function SearchPublicNoticeTable({ recordList }) { field: 'date', headerName: 'Submit Date', flex: 1, + minWidth: 200, renderCell: (params) => { return DateUtils.datetimeStr(params.row.created); } @@ -65,6 +68,7 @@ export default function SearchPublicNoticeTable({ recordList }) { field: 'contactPerson', headerName: 'Contact Person', flex: 1, + minWidth: 200, renderCell: (params) => { let company = params.row.enCompanyName != null?params.row.enCompanyName: params.row.chCompanyName; company = company != null ? company : ""; @@ -95,6 +99,7 @@ export default function SearchPublicNoticeTable({ recordList }) { field: 'groupNo', headerName: 'Gazette Group', flex: 1, + minWidth: 150, valueGetter: (params) => { return (params?.value) ? (params?.value) : ""; } @@ -104,6 +109,7 @@ export default function SearchPublicNoticeTable({ recordList }) { field: 'fee', headerName: 'Amount($)', flex: 1, + minWidth: 150, valueGetter: (params) => { return FormatUtils.currencyFormat(params?.value); } diff --git a/src/pages/DemandNote/Create/SearchForm.js b/src/pages/DemandNote/Create/SearchForm.js index 4185eb4..b6cc3d2 100644 --- a/src/pages/DemandNote/Create/SearchForm.js +++ b/src/pages/DemandNote/Create/SearchForm.js @@ -14,8 +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"; +import { PNSPS_BUTTON_THEME } from "../../../themes/buttonConst"; +import { ThemeProvider } from "@emotion/react"; import { useIntl } from "react-intl"; @@ -28,7 +28,7 @@ const SearchPublicNoticeForm = ({ applySearch, issueComboData, _paymentCount, _p const [failText, setFailText] = React.useState(""); const [confirmPopUp, setConfirmPopUp] = React.useState(false); - const [dueDate, setDueDate] = React.useState(DateUtils.dateValue(DateUtils.dateValue((new Date().setDate(new Date().getDate() +1))))); + const [dueDate, setDueDate] = React.useState(DateUtils.dateValue(DateUtils.dateValue((new Date().setDate(new Date().getDate() + 1))))); const [isSuccessPopUp, setIsSuccessPopUp] = React.useState(false); const [resultCount, setResultCount] = React.useState(0); @@ -91,16 +91,16 @@ const SearchPublicNoticeForm = ({ applySearch, issueComboData, _paymentCount, _p setIsFailPopUp(true); return; } else { - setDueDate(DateUtils.dateValue((new Date().setDate(new Date().getDate() +1)))); + setDueDate(DateUtils.dateValue((new Date().setDate(new Date().getDate() + 1)))); setConfirmPopUp(true); } }; - const doDnCreate=()=>{ + const doDnCreate = () => { setConfirmPopUp(false); HttpUtils.post({ url: UrlUtils.DEMAND_NOTE_CREATE + "/" + issueSelected.id, - params:{ + params: { dueDate: dueDate }, onSuccess: function (responseData) { @@ -113,7 +113,7 @@ const SearchPublicNoticeForm = ({ applySearch, issueComboData, _paymentCount, _p const fileDownload = () => { HttpUtils.fileDownload({ - method:'post', + method: 'post', url: UrlUtils.DEMAND_NOTE_EXPORT, params: { "dnIdList": dnIdList @@ -126,7 +126,7 @@ const SearchPublicNoticeForm = ({ applySearch, issueComboData, _paymentCount, _p const onNavigate = () => { setIsSuccessPopUp(false); - if(resultCount > 0) + if (resultCount > 0) navigate('/paymentPage/demandNote'); }; @@ -148,17 +148,16 @@ const SearchPublicNoticeForm = ({ applySearch, issueComboData, _paymentCount, _p
{/*row 1*/} - + {/*row 1*/} - + Please Select Gazette Issue : {/*row 2*/} - - + - {/* - - */} - + - + - - Pending Payment: {paymentCount} - + + + + Pending Payment: {paymentCount} + - - Pending Publish: {publishCount} + + Pending Publish: {publishCount} + + -
Due Date: - + - { - setDueDate(newValue.currentTarget.value) - }} - InputLabelProps={{ - shrink: true - }} - /> - + { + setDueDate(newValue.currentTarget.value) + }} + InputLabelProps={{ + shrink: true + }} + /> + @@ -300,7 +291,7 @@ const SearchPublicNoticeForm = ({ applySearch, issueComboData, _paymentCount, _p