From dc72cb296bcd9bca6c9716a1f1c7960d5de7d9ae Mon Sep 17 00:00:00 2001 From: Alex Cheung Date: Mon, 18 Mar 2024 17:19:08 +0800 Subject: [PATCH 01/20] show orgdetail to application gld and check expired --- .../Details_GLD/ClientDetailCard.js | 87 ++++++++++++++++++- src/pages/PublicNotice/Details_GLD/index.js | 2 +- 2 files changed, 87 insertions(+), 2 deletions(-) diff --git a/src/pages/PublicNotice/Details_GLD/ClientDetailCard.js b/src/pages/PublicNotice/Details_GLD/ClientDetailCard.js index 999abe8..485fa02 100644 --- a/src/pages/PublicNotice/Details_GLD/ClientDetailCard.js +++ b/src/pages/PublicNotice/Details_GLD/ClientDetailCard.js @@ -24,6 +24,7 @@ import ContentPasteSearchIcon from '@mui/icons-material/ContentPasteSearch'; import CheckCircleOutline from '@mui/icons-material/CheckCircleOutline'; import HighlightOff from '@mui/icons-material/HighlightOff'; // import {useNavigate} from "react-router-dom"; +import * as DateUtils from "utils/DateUtils"; // ==============================|| DASHBOARD - DEFAULT ||============================== // const ClientDetailCard = ( @@ -35,6 +36,9 @@ const ClientDetailCard = ( ) => { // const params = useParams(); const [currentApplicationDetailData, setCurrentApplicationDetailData] = useState({}); + const [orgDetailData, setOrgDetailData] = useState({}); + const [brExpiryDate,setBrExpiryDate] = useState(""); + const [brNo,setBrNo] = useState(""); const [onReady, setOnReady] = useState(false); const [companyName, setCompanyName] = useState({ enCompanyName: "", chCompanyName: "" }); const { register, @@ -46,6 +50,7 @@ const ClientDetailCard = ( //if user data from parent are not null if (Object.keys(applicationDetailData).length > 0 && applicationDetailData !== undefined) { setCurrentApplicationDetailData(applicationDetailData.userData); + setOrgDetailData(applicationDetailData.orgDetail.data); if (!applicationDetailData.companyName1 == null) { setCompanyName(applicationDetailData.companyName); } else { @@ -62,9 +67,39 @@ const ClientDetailCard = ( //if state data are ready and assign to different field // console.log(currentApplicationDetailData) if (Object.keys(currentApplicationDetailData).length > 0) { - setOnReady(true); + if(currentApplicationDetailData.orgId>0 && currentApplicationDetailData.orgId !=undefined && currentApplicationDetailData.orgId!=null){ + if (Object.keys(orgDetailData).length > 0) { + setBrExpiryDate(DateUtils.dateStr(orgDetailData.brExpiryDate)); + setBrNo(orgDetailData.brNo); + setOnReady(true); + } + }else{ + setBrExpiryDate(DateUtils.dateStr(currentApplicationDetailData.brExpiryDate)); + setBrNo(currentApplicationDetailData.brNo); + setOnReady(true); + } } }, [currentApplicationDetailData]); + + useEffect(() => { + if (brNo != undefined && brNo.length > 0) { + console.log(brExpiryDate) + var currentDate = new Date(); // Current date + var targetDate = new Date(brExpiryDate); // Target date + + if (targetDate < currentDate) { + alert("The BR is expired.") + } else { + var timeDiff = Math.abs(currentDate.getTime()-targetDate.getTime()); + var diffDays = Math.ceil(timeDiff / (1000 * 3600 * 24)); + console.log(diffDays) + if (diffDays <= 7&&diffDays > 0){ + alert("The BR is expiring.") + } + } + setOnReady(true); + } + }, [brNo]); const handleViewClick = () => () => { console.log(currentApplicationDetailData) @@ -244,6 +279,56 @@ const ClientDetailCard = ( + + + BR No: + + + + + + + + + + BR Expiry Date: + + + + + + + { - + Date: Tue, 19 Mar 2024 16:32:35 +0800 Subject: [PATCH 02/20] align Record no --- src/pages/Announcement/Search/DataGrid.js | 9 +-- src/pages/DemandNote/Create/DataGrid.js | 6 +- src/pages/GFMIS/DataGrid.js | 9 --- src/pages/Message/Search/DataGrid.js | 5 +- src/pages/Payment/Search_GLD/DataGrid.js | 6 +- src/pages/Payment/Search_Public/DataGrid.js | 9 +-- src/pages/Proof/Search_GLD/DataGrid.js | 10 +--- src/pages/Proof/Search_Public/DataGrid.js | 8 +-- .../Details_GLD/tabTableDetail/PaymentTab.js | 11 +--- .../Details_GLD/tabTableDetail/ProofTab.js | 11 +--- .../tabTableDetail/PaymentTab.js | 11 +--- .../Details_Public/tabTableDetail/ProofTab.js | 10 +--- src/pages/PublicNotice/Search_GLD/DataGrid.js | 8 +-- src/pages/User/SearchPage/UserTable.js | 47 +++++++-------- src/pages/pnspsNotifyTest/index.js | 58 ------------------- src/routes/LoginRoutes.js | 9 --- src/utils/CommonFunction.js | 4 ++ 17 files changed, 57 insertions(+), 174 deletions(-) delete mode 100644 src/pages/pnspsNotifyTest/index.js diff --git a/src/pages/Announcement/Search/DataGrid.js b/src/pages/Announcement/Search/DataGrid.js index fe63c55..d9c0738 100644 --- a/src/pages/Announcement/Search/DataGrid.js +++ b/src/pages/Announcement/Search/DataGrid.js @@ -1,12 +1,12 @@ // material-ui import * as React from 'react'; import { - Button, Box } from '@mui/material'; import * as DateUtils from "utils/DateUtils"; import { useNavigate } from "react-router-dom"; import { FiDataGrid } from "components/FiDataGrid"; +import { clickableLink } from 'utils/CommonFunction'; // ==============================|| EVENT TABLE ||============================== // export default function SearchPublicNoticeTable({ recordList }) { @@ -17,11 +17,6 @@ export default function SearchPublicNoticeTable({ recordList }) { setRows(recordList); }, [recordList]); - const handleEditClick = (params) => () => { - navigate('/setting/announcement/details/' + params.id); - }; - - const columns = [ { field: 'announceDate', @@ -29,7 +24,7 @@ export default function SearchPublicNoticeTable({ recordList }) { width: 250, cellClassName: 'announceDate', renderCell: (params) => { - return ; + return clickableLink('/setting/announcement/details/' + params.id, DateUtils.datetimeStr(params?.value)); }, }, { diff --git a/src/pages/DemandNote/Create/DataGrid.js b/src/pages/DemandNote/Create/DataGrid.js index 20f01b9..5935975 100644 --- a/src/pages/DemandNote/Create/DataGrid.js +++ b/src/pages/DemandNote/Create/DataGrid.js @@ -1,12 +1,10 @@ // material-ui import * as React from 'react'; -import { - Button -} from '@mui/material'; import * as DateUtils from "utils/DateUtils"; import * as FormatUtils from "utils/FormatUtils"; import * as PublicNoteStatusUtils from "utils/statusUtils/PublicNoteStatusUtils" import { FiDataGrid } from "components/FiDataGrid"; +import { clickableLink } from 'utils/CommonFunction'; // ==============================|| EVENT TABLE ||============================== // export default function SearchPublicNoticeTable({ recordList }) { @@ -43,7 +41,7 @@ export default function SearchPublicNoticeTable({ recordList }) { headerName: 'App No.', flex: 1, renderCell: (params) => { - return ; + return clickableLink('/application/' + params.row.id, params.row.appNo) }, }, { diff --git a/src/pages/GFMIS/DataGrid.js b/src/pages/GFMIS/DataGrid.js index 3284d94..523c092 100644 --- a/src/pages/GFMIS/DataGrid.js +++ b/src/pages/GFMIS/DataGrid.js @@ -37,15 +37,6 @@ export default function SearchPublicNoticeTable({ recordList }) { }; const columns = [ - // { - // field: 'actions', - // headerName: 'Trans. No.', - // flex: 1, - // cellClassName: 'actions', - // renderCell: (params) => { - // return ; - // }, - // }, { id: 'paymentMethod', field: 'paymentMethod', diff --git a/src/pages/Message/Search/DataGrid.js b/src/pages/Message/Search/DataGrid.js index feef6ca..30892df 100644 --- a/src/pages/Message/Search/DataGrid.js +++ b/src/pages/Message/Search/DataGrid.js @@ -1,11 +1,10 @@ // material-ui import * as React from 'react'; -import { - Button} from '@mui/material'; import * as DateUtils from "utils/DateUtils"; import { useNavigate } from "react-router-dom"; import { FiDataGrid } from "components/FiDataGrid"; import {useIntl} from "react-intl"; +import { clickableLink } from 'utils/CommonFunction'; // ==============================|| EVENT TABLE ||============================== // export default function MsgTable({ recordList }) { @@ -53,7 +52,7 @@ export default function MsgTable({ recordList }) { flex: 1 , cellClassName: 'actions', renderCell: (params) => { - return ; + return clickableLink('/msg/details/' + params.row.id, params.row.subject); }, }, ]; diff --git a/src/pages/Payment/Search_GLD/DataGrid.js b/src/pages/Payment/Search_GLD/DataGrid.js index 87ac47a..da41674 100644 --- a/src/pages/Payment/Search_GLD/DataGrid.js +++ b/src/pages/Payment/Search_GLD/DataGrid.js @@ -1,13 +1,11 @@ // material-ui import * as React from 'react'; -import { - Button -} from '@mui/material'; import * as DateUtils from "utils/DateUtils"; import * as FormatUtils from "utils/FormatUtils" import * as PaymentStatus from "utils/statusUtils/PaymentStatus" import { useNavigate } from "react-router-dom"; import { FiDataGrid } from "components/FiDataGrid"; +import { clickableLink } from 'utils/CommonFunction'; // ==============================|| EVENT TABLE ||============================== // export default function SearchPublicNoticeTable({ recordList }) { @@ -55,7 +53,7 @@ export default function SearchPublicNoticeTable({ recordList }) { flex: 1, cellClassName: 'actions', renderCell: (params) => { - return ; + return clickableLink('/paymentPage/details/' + params.row.id, params.row.transNo); }, }, { diff --git a/src/pages/Payment/Search_Public/DataGrid.js b/src/pages/Payment/Search_Public/DataGrid.js index cdd669a..d27e8a7 100644 --- a/src/pages/Payment/Search_Public/DataGrid.js +++ b/src/pages/Payment/Search_Public/DataGrid.js @@ -1,7 +1,7 @@ // material-ui import * as React from 'react'; import { - Button, useMediaQuery + useMediaQuery } from '@mui/material'; import * as DateUtils from "utils/DateUtils"; import * as FormatUtils from "utils/FormatUtils" @@ -10,6 +10,7 @@ import { useNavigate } from "react-router-dom"; import { FiDataGrid } from "components/FiDataGrid"; import {useTheme} from "@emotion/react"; import {useIntl} from "react-intl"; +import { clickableLink } from 'utils/CommonFunction'; // ==============================|| EVENT TABLE ||============================== // export default function SearchPublicNoticeTable({ recordList }) { @@ -40,10 +41,6 @@ export default function SearchPublicNoticeTable({ recordList }) { setRows(recordList); }, [recordList]); - const handleEditClick = (params) => () => { - navigate('/paymentPage/details/' + params.row.id); - }; - const handleEditDoubleClick = (params) =>{ navigate('/paymentPage/details/' + params.row.id); }; @@ -56,7 +53,7 @@ export default function SearchPublicNoticeTable({ recordList }) { flex: isMdOrLg ? 1 : undefined, cellClassName: 'actions', renderCell: (params) => { - return ; + return clickableLink('/paymentPage/details/' + params.row.id, params.row.transNo); }, }, { diff --git a/src/pages/Proof/Search_GLD/DataGrid.js b/src/pages/Proof/Search_GLD/DataGrid.js index da76f23..5c9b8fa 100644 --- a/src/pages/Proof/Search_GLD/DataGrid.js +++ b/src/pages/Proof/Search_GLD/DataGrid.js @@ -1,13 +1,11 @@ // material-ui import * as React from 'react'; -import { - Button, -} from '@mui/material'; import * as DateUtils from "utils/DateUtils"; import * as FormatUtils from "utils/FormatUtils" import * as ProofStatus from "utils/statusUtils/ProofStatus"; import { useNavigate } from "react-router-dom"; import { FiDataGrid } from "components/FiDataGrid"; +import { clickableLink } from 'utils/CommonFunction'; // ==============================|| EVENT TABLE ||============================== // export default function SearchPublicNoticeTable({ recordList }) { @@ -18,10 +16,6 @@ export default function SearchPublicNoticeTable({ recordList }) { setRows(recordList); }, [recordList]); - const handleEditClick = (params) => () => { - navigate('/proof/reply/' + params.row.id); - }; - const columns = [ { field: 'actions', @@ -29,7 +23,7 @@ export default function SearchPublicNoticeTable({ recordList }) { width: 170, cellClassName: 'actions', renderCell: (params) => { - return ; + return clickableLink('/proof/reply/' + params.row.id, params.row.refNo); }, }, { diff --git a/src/pages/Proof/Search_Public/DataGrid.js b/src/pages/Proof/Search_Public/DataGrid.js index c0d252f..ce7d7d7 100644 --- a/src/pages/Proof/Search_Public/DataGrid.js +++ b/src/pages/Proof/Search_Public/DataGrid.js @@ -1,7 +1,7 @@ // material-ui import * as React from 'react'; import { - Button, useMediaQuery + useMediaQuery } from '@mui/material'; import * as DateUtils from "utils/DateUtils"; import * as FormatUtils from "utils/FormatUtils" @@ -13,6 +13,7 @@ import { } from "utils/Utils"; import {useTheme} from "@emotion/react"; import {useIntl} from "react-intl"; +import { clickableLink } from 'utils/CommonFunction'; // ==============================|| EVENT TABLE ||============================== // export default function SearchPublicNoticeTable({ recordList }) { @@ -43,9 +44,6 @@ export default function SearchPublicNoticeTable({ recordList }) { setRows(recordList); }, [recordList]); - const handleEditClick = (params) => () => { - navigate('/proof/reply/' + params.row.id); - }; /*eslint no-irregular-whitespace: ["error", { "skipComments": true }]*/ /*const getGroupTitle = (title) => { @@ -98,7 +96,7 @@ export default function SearchPublicNoticeTable({ recordList }) { flex: isMdOrLg ? 1.5 : undefined, cellClassName: 'actions', renderCell: (params) => { - return ; + return clickableLink('/proof/reply/' + params.row.id,params.row.refNo); }, }, { diff --git a/src/pages/PublicNotice/Details_GLD/tabTableDetail/PaymentTab.js b/src/pages/PublicNotice/Details_GLD/tabTableDetail/PaymentTab.js index e9ecf64..fa08b38 100644 --- a/src/pages/PublicNotice/Details_GLD/tabTableDetail/PaymentTab.js +++ b/src/pages/PublicNotice/Details_GLD/tabTableDetail/PaymentTab.js @@ -1,27 +1,22 @@ // material-ui import * as React from 'react'; import { - Button, useMediaQuery + useMediaQuery } from '@mui/material'; -import { useNavigate } from "react-router-dom"; import {FiDataGrid} from "components/FiDataGrid"; import * as FormatUtils from "utils/FormatUtils" import * as DateUtils from "utils/DateUtils" import * as PaymentStatus from "utils/statusUtils/PaymentStatus" import {useTheme} from "@emotion/react"; +import { clickableLink } from 'utils/CommonFunction'; // import * as StatusUtils from "./PublicNoteStatusUtils"; // ==============================|| EVENT TABLE ||============================== // export default function SubmittedTab({ rows }) { - const navigate = useNavigate() const theme = useTheme(); const isMdOrLg = useMediaQuery(theme.breakpoints.up('md')); - const handleEditClick = (params) => () => { - navigate('/paymentPage/details/' + params.row.id); - }; - const columns = [ { field: 'actions', @@ -30,7 +25,7 @@ export default function SubmittedTab({ rows }) { flex: isMdOrLg ? 1 : undefined, cellClassName: 'actions', renderCell: (params) => { - return ; + return clickableLink('/paymentPage/details/' + params.row.id, params.row.transNo); }, }, { diff --git a/src/pages/PublicNotice/Details_GLD/tabTableDetail/ProofTab.js b/src/pages/PublicNotice/Details_GLD/tabTableDetail/ProofTab.js index e32f7d3..4ea4b6b 100644 --- a/src/pages/PublicNotice/Details_GLD/tabTableDetail/ProofTab.js +++ b/src/pages/PublicNotice/Details_GLD/tabTableDetail/ProofTab.js @@ -1,13 +1,12 @@ // material-ui import * as React from 'react'; import { - Button, useMediaQuery, + useMediaQuery, } from '@mui/material'; import { GridActionsCellItem, } from "@mui/x-data-grid"; import * as Icon from 'utils/IconUtils'; -import { useNavigate } from "react-router-dom"; import * as DateUtils from "utils/DateUtils"; import * as ProofStatus from "utils/statusUtils/ProofStatus"; import {FiDataGrid} from "components/FiDataGrid"; @@ -15,18 +14,14 @@ import * as FormatUtils from "utils/FormatUtils" import * as HttpUtils from "utils/HttpUtils" import * as UrlUtils from "utils/ApiPathConst" import {useTheme} from "@emotion/react"; +import { clickableLink } from 'utils/CommonFunction'; // ==============================|| EVENT TABLE ||============================== // export default function ProofTab({rows}) { - const navigate = useNavigate() const theme = useTheme(); const isMdOrLg = useMediaQuery(theme.breakpoints.up('md')); - const handleEditClick = (params) => () => { - navigate('/proof/reply/' + params.row.id); - }; - const onDownloadClick = (params) => () => { HttpUtils.fileDownload({ url: UrlUtils.GEN_GAZETTE_PROOF+"/"+params.row.id, @@ -42,7 +37,7 @@ export default function ProofTab({rows}) { flex: isMdOrLg ? 1 : undefined, cellClassName: 'actions', renderCell: (params) => { - return ; + return clickableLink('/proof/reply/' + params.row.id, params.row.refNo); }, }, { diff --git a/src/pages/PublicNotice/Details_Public/tabTableDetail/PaymentTab.js b/src/pages/PublicNotice/Details_Public/tabTableDetail/PaymentTab.js index 9ac0af1..3a55cb5 100644 --- a/src/pages/PublicNotice/Details_Public/tabTableDetail/PaymentTab.js +++ b/src/pages/PublicNotice/Details_Public/tabTableDetail/PaymentTab.js @@ -1,31 +1,26 @@ // material-ui import * as React from 'react'; import { - Button, useMediaQuery + useMediaQuery } from '@mui/material'; -import { useNavigate } from "react-router-dom"; import {FiDataGrid} from "components/FiDataGrid"; import * as FormatUtils from "utils/FormatUtils" import * as DateUtils from "utils/DateUtils" import * as PaymentStatus from "utils/statusUtils/PaymentStatus" import {useTheme} from "@emotion/react"; import {useIntl} from "react-intl"; +import { clickableLink } from 'utils/CommonFunction'; // import * as StatusUtils from "./PublicNoteStatusUtils"; // ==============================|| EVENT TABLE ||============================== // export default function SubmittedTab({ rows }) { - const navigate = useNavigate() const theme = useTheme(); const isMdOrLg = useMediaQuery(theme.breakpoints.up('md')); const intl = useIntl(); const { locale } = intl; - const handleEditClick = (params) => () => { - navigate('/paymentPage/details/' + params.row.id); - }; - const columns = [ { field: 'actions', @@ -34,7 +29,7 @@ export default function SubmittedTab({ rows }) { flex: isMdOrLg ? 1 : undefined, cellClassName: 'actions', renderCell: (params) => { - return ; + return clickableLink('/paymentPage/details/' + params.row.id, params.row.transNo); }, }, { diff --git a/src/pages/PublicNotice/Details_Public/tabTableDetail/ProofTab.js b/src/pages/PublicNotice/Details_Public/tabTableDetail/ProofTab.js index 3448b71..e26625d 100644 --- a/src/pages/PublicNotice/Details_Public/tabTableDetail/ProofTab.js +++ b/src/pages/PublicNotice/Details_Public/tabTableDetail/ProofTab.js @@ -1,27 +1,23 @@ // material-ui import * as React from 'react'; import { - Button, useMediaQuery, + useMediaQuery, } from '@mui/material'; -import { useNavigate } from "react-router-dom"; import * as DateUtils from "utils/DateUtils"; import * as ProofStatus from "utils/statusUtils/ProofStatus"; import {FiDataGrid} from "components/FiDataGrid"; import * as FormatUtils from "utils/FormatUtils" import {useTheme} from "@emotion/react"; import {useIntl} from "react-intl"; +import { clickableLink } from 'utils/CommonFunction'; // ==============================|| EVENT TABLE ||============================== // export default function ProofTab({rows}) { const intl = useIntl(); - const navigate = useNavigate() const theme = useTheme(); const isMdOrLg = useMediaQuery(theme.breakpoints.up('md')); const { locale } = intl; - const handleEditClick = (params) => () => { - navigate('/proof/reply/' + params.row.id); - }; const columns = [ { @@ -31,7 +27,7 @@ export default function ProofTab({rows}) { width: 200, cellClassName: 'actions', renderCell: (params) => { - return ; + return clickableLink('/proof/reply/' + params.row.id, params.row.refNo); }, }, { diff --git a/src/pages/PublicNotice/Search_GLD/DataGrid.js b/src/pages/PublicNotice/Search_GLD/DataGrid.js index e868062..e08bb78 100644 --- a/src/pages/PublicNotice/Search_GLD/DataGrid.js +++ b/src/pages/PublicNotice/Search_GLD/DataGrid.js @@ -1,6 +1,7 @@ // material-ui import * as React from 'react'; import { + //Link, Button, Grid, Typography, @@ -14,7 +15,7 @@ import * as FormatUtils from "utils/FormatUtils"; import * as StatusUtils from "utils/statusUtils/PublicNoteStatusUtils"; import { useNavigate } from "react-router-dom"; import { FiDataGrid } from "components/FiDataGrid"; -import { notifyActionSuccess } from 'utils/CommonFunction'; +import { notifyActionSuccess, clickableLink } from 'utils/CommonFunction'; import { FormattedMessage, useIntl } from "react-intl"; // ==============================|| EVENT TABLE ||============================== // @@ -34,9 +35,6 @@ export default function SearchPublicNoticeTable({ recordList, reloadFunction }) setRows(recordList); }, [recordList]); - const handleEditClick = (params) => () => { - navigate('/application/' + params.id); - }; const columns = [ @@ -46,7 +44,7 @@ export default function SearchPublicNoticeTable({ recordList, reloadFunction }) width: 150, cellClassName: 'actions', renderCell: (params) => { - return ; + return clickableLink('/application/' + params.id, params.row.appNo); }, }, { diff --git a/src/pages/User/SearchPage/UserTable.js b/src/pages/User/SearchPage/UserTable.js index dd9054e..6b42854 100644 --- a/src/pages/User/SearchPage/UserTable.js +++ b/src/pages/User/SearchPage/UserTable.js @@ -1,15 +1,13 @@ // material-ui import * as React from 'react'; -import { GridActionsCellItem,} from "@mui/x-data-grid"; import {FiDataGrid} from "components/FiDataGrid"; -import EditIcon from '@mui/icons-material/Edit'; import {useEffect} from "react"; import {useNavigate} from "react-router-dom"; import { useTheme } from '@mui/material/styles'; import Checkbox from '@mui/material/Checkbox'; import * as UrlUtils from "../../../utils/ApiPathConst"; import * as HttpUtils from '../../../utils/HttpUtils'; -import { notifyLockSuccess, notifyUnlockSuccess } from 'utils/CommonFunction'; +import { notifyLockSuccess, notifyUnlockSuccess , clickableLink} from 'utils/CommonFunction'; // ==============================|| EVENT TABLE ||============================== // @@ -23,10 +21,6 @@ export default function UserTable({recordList,setChangeLocked}) { setRows(recordList); }, [recordList]); - const handleEditClick = (id) => () => { - navigate('/user/'+ id); - }; - const handleLock = (params) => () => { setChangeLocked(false) if (params.row.locked==true){ @@ -60,29 +54,32 @@ export default function UserTable({recordList,setChangeLocked}) { }; const columns = [ - { - field: 'actions', - type: 'actions', - headerName: 'Actions', - width: 100, - cellClassName: 'actions', - getActions: ({id}) => { - return [ - } - label="Edit" - className="textPrimary" - onClick={handleEditClick(id)} - color="primary" - />] - }, - }, + // { + // field: 'actions', + // type: 'actions', + // headerName: 'Actions', + // width: 100, + // cellClassName: 'actions', + // getActions: ({id}) => { + // return [ + // } + // label="Edit" + // className="textPrimary" + // onClick={handleEditClick(id)} + // color="primary" + // />] + // }, + // }, { id: 'username', field: 'username', headerName: 'Username', flex: 1, + renderCell: (params) => { + return clickableLink('/user/'+ params.row.id, params.row.username); + }, }, { id: 'enName', diff --git a/src/pages/pnspsNotifyTest/index.js b/src/pages/pnspsNotifyTest/index.js deleted file mode 100644 index e9e2e13..0000000 --- a/src/pages/pnspsNotifyTest/index.js +++ /dev/null @@ -1,58 +0,0 @@ -import { Grid, Button, TextField } from '@mui/material'; -import { useState } from 'react'; -import axios from 'axios'; -import { apiPath } from 'auth/utils'; - -const TestMailPage = () => { - const [host, setHost] = useState(apiPath+'/test'); - const [mail, setMail] = useState(''); - const [tempKey, setTempKey] = useState(''); - - const hostChange = (event) => { - setHost(event.target.value); - }; - - const mailChange = (event) => { - setMail(event.target.value); - }; - - const tempKeyChange = (event) => { - setTempKey(event.target.value); - }; - - const doMailTest = () => { - axios.post(host, { - email: mail, - tempKey: tempKey, - }) - .then((response) => { - console.log(response.data); - // Handle data - }) - .catch((error) => { - console.log(error); - }) - }; - - return ( - *': { - flexGrow: 1, - flexBasis: '100%' - } - }} - spacing={3}> - - - - - - ); -}; - -export default TestMailPage; \ No newline at end of file diff --git a/src/routes/LoginRoutes.js b/src/routes/LoginRoutes.js index 9874ee3..103ae75 100644 --- a/src/routes/LoginRoutes.js +++ b/src/routes/LoginRoutes.js @@ -31,7 +31,6 @@ const IAmSmart_AuthCallback = Loadable(lazy(() => import('pages/iAmSmart/AuthCal const IAmSmart_RegistryCallback = Loadable(lazy(() => import('pages/iAmSmart/RegistryCallback'))); //TODO: this page for testing only, please remove at prod -const TestMailPage = Loadable(lazy(() => import('pages/pnspsNotifyTest'))); const VerifyPage = Loadable(lazy(() => import('pages/authentication/Verify'))); const Testfps = Loadable(lazy(() => import('pages/Payment/FPS/FPSTest'))); const Payment_FPS_CallBack = Loadable(lazy(() => import('pages/Payment/FPS/fpscallback'))); @@ -42,10 +41,6 @@ const LoginRoutes = { path: '/', element: , children: [ - {//TODO: this page for testing only, please remove at prod - path: 'testMailPage', - element: - }, { path: 'login', element: @@ -94,10 +89,6 @@ const LoginRoutes = { path: 'iamsmart/loginSucess', element: }, - { - path: 'testMailPage', - element: - }, { path: 'verify/:verifyCode/:email', element: diff --git a/src/utils/CommonFunction.js b/src/utils/CommonFunction.js index 7e8f7c7..1dbecc1 100644 --- a/src/utils/CommonFunction.js +++ b/src/utils/CommonFunction.js @@ -8,6 +8,10 @@ import Dialog from "@mui/material/Dialog"; import * as React from "react"; import { toast } from "react-toastify"; +export const clickableLink=(link, label)=> { + return {label}; +} + export function getDeletedRecordWithRefList(referenceList, updatedList) { return referenceList.filter(x => !updatedList.includes(x)); } From 5641aaed50a186e7100ee2106f4fe5255f12b4c0 Mon Sep 17 00:00:00 2001 From: anna Date: Wed, 20 Mar 2024 00:51:25 +0800 Subject: [PATCH 03/20] update ui --- src/pages/DemandNote/Details/DnDetailCard.js | 10 ++-- .../ListPanel/SearchPublicNoticeForm.js | 54 +++++++++++++------ 2 files changed, 44 insertions(+), 20 deletions(-) diff --git a/src/pages/DemandNote/Details/DnDetailCard.js b/src/pages/DemandNote/Details/DnDetailCard.js index d430eb0..352dbe8 100644 --- a/src/pages/DemandNote/Details/DnDetailCard.js +++ b/src/pages/DemandNote/Details/DnDetailCard.js @@ -127,24 +127,24 @@ const DnDetailCard = ({ data }) => { {getDisplayField("Sent on", "")} - {getDisplayField("Reminder 1", DateUtils.dateStr(dnData.expectReminder1))} + {getDisplayField("Reminder 1", dnData?.expectReminder1 ? DateUtils.dateStr(dnData.expectReminder1):"--")} {getDisplayField("Reminder 1", dnData?.reminder1 ? DateUtils.datetimeStr(dnData.reminder1) : "--")} - {getDisplayField("Reminder 2", DateUtils.dateStr(dnData.expectReminder2))} + {getDisplayField("Reminder 2", dnData?.expectReminder2 ? DateUtils.dateStr(dnData.expectReminder2):"--")} {getDisplayField("Reminder 2", dnData?.reminder2 ? DateUtils.datetimeStr(dnData.reminder2) : "--")} - {getDisplayField("Reminder 3", DateUtils.dateStr(dnData.expectReminder3))} + {getDisplayField("Reminder 3", dnData?.expectReminder3 ? DateUtils.dateStr(dnData.expectReminder3):"--")} {getDisplayField("Reminder 3", dnData?.reminder3 ? DateUtils.datetimeStr(dnData.reminder3) : "--")} - {getDisplayField("Reminder 4", DateUtils.dateStr(dnData.expectReminder4))} + {getDisplayField("Reminder 4", dnData?.expectReminder4 ? DateUtils.dateStr(dnData.expectReminder4):"--")} {getDisplayField("Reminder 4", dnData?.reminder4 ? DateUtils.datetimeStr(dnData.reminder4) : "--")} - {getDisplayField("Reminder Final", DateUtils.dateStr(dnData.expectReminderFinal))} + {getDisplayField("Reminder Final", dnData?.expectReminderFinal ? DateUtils.dateStr(dnData.expectReminderFinal):"--")} {getDisplayField("Reminder Final", dnData?.reminderFinal ? DateUtils.datetimeStr(dnData.reminderFinal) : "--")} diff --git a/src/pages/PublicNotice/ListPanel/SearchPublicNoticeForm.js b/src/pages/PublicNotice/ListPanel/SearchPublicNoticeForm.js index 5e1a323..46a6b2f 100644 --- a/src/pages/PublicNotice/ListPanel/SearchPublicNoticeForm.js +++ b/src/pages/PublicNotice/ListPanel/SearchPublicNoticeForm.js @@ -1,4 +1,4 @@ -// material-ui +// material-uistatus import { Button, Grid, TextField, @@ -22,17 +22,17 @@ import {FormattedMessage, useIntl} from "react-intl"; const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { const intl = useIntl(); const [type, setType] = React.useState([]); - const [status, setStatus] = React.useState([{ key: 0, label: 'all', type: 'all' }]); + const [status, setStatus] = React.useState({ key: 0, label: 'all', type: 'all' }); const [minDate, setMinDate] = React.useState(searchCriteria.dateFrom); const [maxDate, setMaxDate] = React.useState(searchCriteria.dateTo); - const [selectedLabelsString, setSelectedLabelsString] = React.useState(''); + // const [selectedLabelsString, setSelectedLabelsString] = React.useState(''); const { reset, register, handleSubmit } = useForm() const marginBottom = 2.5; const onSubmit = (data) => { - data.status = selectedLabelsString + data.status = status.type; let typeArray = []; for (let i = 0; i < type.length; i++) { @@ -52,7 +52,7 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { function resetForm() { setType([]); - setStatus([{ key: 0, label: 'All', labelCht: "全部", type: 'all' }]); + setStatus({ key: 0, label: 'All', labelCht: "全部", type: 'all' }); reset(); } @@ -150,8 +150,39 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { }} /> - + options} + options={ + localStorage.getItem('userData').creditor ? + ComboData.publicNoticeStatic_Creditor : + ComboData.publicNoticeStatic + } + value={status} + // inputValue={status?.labelCht} + getOptionLabel={(option) => intl.formatMessage({id: option.label})} + onChange={(event, newValue) => { + setStatus(newValue); + }} + renderInput={(params) => ( + + )} + // InputLabelProps={{ + // shrink: true + // }} + /> + + + {/* { // shrink: true // }} /> - - {/**/} - {/* */} - {/**/} + */} + From a4a7706db9e55aec4e32f5bb3ae62dc7a502ad87 Mon Sep 17 00:00:00 2001 From: anna Date: Wed, 20 Mar 2024 10:24:35 +0800 Subject: [PATCH 04/20] app combo single select --- .../PublicNotice/Search_GLD/SearchForm.js | 52 +++++++++---------- 1 file changed, 25 insertions(+), 27 deletions(-) diff --git a/src/pages/PublicNotice/Search_GLD/SearchForm.js b/src/pages/PublicNotice/Search_GLD/SearchForm.js index 2fea903..b72d557 100644 --- a/src/pages/PublicNotice/Search_GLD/SearchForm.js +++ b/src/pages/PublicNotice/Search_GLD/SearchForm.js @@ -26,8 +26,7 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss const [orgCombo, setOrgCombo] = React.useState(); const [issueSelected, setIssueSelected] = React.useState({}); const [issueCombo, setIssueCombo] = React.useState([]); - const [selectedStatus, setSelectedStatus] = React.useState([]); - const [selectedLabelsString, setSelectedLabelsString] = React.useState(''); + const [selectedStatus, setSelectedStatus] = React.useState({key: 0, label: 'All', type: 'all'}); const [minDate, setMinDate] = React.useState(searchCriteria.dateFrom); const [maxDate, setMaxDate] = React.useState(searchCriteria.dateTo); @@ -38,7 +37,7 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss const marginBottom = 2.5; const { reset, register, handleSubmit } = useForm() const onSubmit = (data) => { - data.status = selectedLabelsString + data.status = selectedStatus.type let typeArray = []; for (let i = 0; i < type.length; i++) { @@ -75,7 +74,7 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss // setStatus({ key: 0, label: 'All', type: 'all' }); setOrgSelected({}); setIssueSelected({}); - setSelectedStatus([]); + setSelectedStatus({key: 0, label: 'All', type: 'all'}); reset(); } @@ -188,29 +187,28 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss + { + setSelectedStatus(newValue); + + }} + getOptionLabel={(option) => option.label} + renderInput={(params) => ( + + )} + /> {/* options} - options={ComboData.publicNoticeStatic_GLD} - value={status} - inputValue={status?.label} - onChange={(event, newValue) => { - if (newValue !== null) { - setStatus(newValue); - } - }} - renderInput={(params) => ( - - )} - InputLabelProps={{ - shrink: true - }} - /> */} - )} - /> + /> */} { From 8d66f29ab7d1024ef0f0a165f93f553411b6d507 Mon Sep 17 00:00:00 2001 From: Alex Cheung Date: Wed, 20 Mar 2024 10:26:25 +0800 Subject: [PATCH 05/20] fix payment block wrong status --- src/pages/Proof/Payment/Pay.js | 2 +- src/pages/PublicNotice/Details_Public/ApplicationDetailCard.js | 2 +- src/pages/PublicNotice/ListPanel/PendingPaymentTab.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/Proof/Payment/Pay.js b/src/pages/Proof/Payment/Pay.js index 265ed7a..a01864d 100644 --- a/src/pages/Proof/Payment/Pay.js +++ b/src/pages/Proof/Payment/Pay.js @@ -100,7 +100,7 @@ const Index = () => { }); const latestDataObjects = Object.values(latestData); - const filteredData = latestDataObjects.filter(item => item.timeDiff > 20 && item.status !== "APPR"); + const filteredData = latestDataObjects.filter(item => item.timeDiff > 20 || item.status !== "APPR"); const filteredAppIds = filteredData.map(item => item.appId); const appIdsNotInData = appIdList.filter(appId => !latestDataObjects.some(item => item.appId === appId)); diff --git a/src/pages/PublicNotice/Details_Public/ApplicationDetailCard.js b/src/pages/PublicNotice/Details_Public/ApplicationDetailCard.js index dde1124..bb832cc 100644 --- a/src/pages/PublicNotice/Details_Public/ApplicationDetailCard.js +++ b/src/pages/PublicNotice/Details_Public/ApplicationDetailCard.js @@ -149,7 +149,7 @@ const ApplicationDetailCard = ( }); const latestDataObjects = Object.values(latestData); - const filteredData = latestDataObjects.filter(item => item.timeDiff > 20 && item.status !== "APPR"); + const filteredData = latestDataObjects.filter(item => item.timeDiff > 20 || item.status !== "APPR"); const filteredAppIds = filteredData.map(item => item.appId); const appIdsNotInData = appIdList.filter(appId => !latestDataObjects.some(item => item.appId === appId)); diff --git a/src/pages/PublicNotice/ListPanel/PendingPaymentTab.js b/src/pages/PublicNotice/ListPanel/PendingPaymentTab.js index 7b092dd..20cbf65 100644 --- a/src/pages/PublicNotice/ListPanel/PendingPaymentTab.js +++ b/src/pages/PublicNotice/ListPanel/PendingPaymentTab.js @@ -138,7 +138,7 @@ export default function SubmittedTab({ rows }) { }); const latestDataObjects = Object.values(latestData); - const filteredData = latestDataObjects.filter(item => item.timeDiff > 20 && item.status !== "APPR"); + const filteredData = latestDataObjects.filter(item => item.timeDiff > 20 || item.status !== "APPR"); const filteredAppIds = filteredData.map(item => item.appId); const appIdsNotInData = appIdList.filter(appId => !latestDataObjects.some(item => item.appId === appId)); From 9644746725ff1dd72a21413bc984185df808084a Mon Sep 17 00:00:00 2001 From: anna Date: Wed, 20 Mar 2024 10:56:31 +0800 Subject: [PATCH 06/20] update status Combo --- src/utils/ComboData.js | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/src/utils/ComboData.js b/src/utils/ComboData.js index c46214d..47e57c0 100644 --- a/src/utils/ComboData.js +++ b/src/utils/ComboData.js @@ -61,14 +61,12 @@ export const publicNoticeStatic_Creditor = [ { key: 8, label: 'withdrawn', type: 'withdrawn' }, ]; - export const publicNoticeStatic_GLD = [ { key: 0, label: 'All', type: 'all' }, { key: 1, label: 'Submitted', type: 'submitted' }, { key: 2, label: 'Reviewed', type: 'reviewed' }, - { key: 3, label: 'Confirmed', type: 'confirmed' }, - { key: 3, label: 'Paid', type: 'paid' }, - { key: 4, label: 'Published', type: 'published' }, + { key: 3, label: 'Pending Publish', type: 'pendingPublish' }, + { key: 4, label: 'Pending Payment', type: 'pendingPayment' }, { key: 5, label: 'Completed', type: 'completed' }, { key: 6, label: 'Not Accepted', type: 'notAccepted' }, { key: 7, label: 'Re-Submit Required', type: 'resubmit' }, @@ -77,6 +75,21 @@ export const publicNoticeStatic_GLD = [ ]; +// export const publicNoticeStatic_GLD = [ +// { key: 0, label: 'All', type: 'all' }, +// { key: 1, label: 'Submitted', type: 'submitted' }, +// { key: 2, label: 'Reviewed', type: 'reviewed' }, +// { key: 3, label: 'Confirmed', type: 'confirmed' }, +// { key: 3, label: 'Paid', type: 'paid' }, +// { key: 4, label: 'Published', type: 'published' }, +// { key: 5, label: 'Completed', type: 'completed' }, +// { key: 6, label: 'Not Accepted', type: 'notAccepted' }, +// { key: 7, label: 'Re-Submit Required', type: 'resubmit' }, +// { key: 8, label: 'Cancelled', type: 'cancelled' }, +// { key: 9, label: 'Withdrawn', type: 'withdrawn' }, +// ]; + + export const groupTitle = [ { key: 1, labelCht: 'A1 - 私人帳單', label: 'A1 - Private Bill', title: 'Private Bill', type: 'A'}, { key: 2, labelCht: 'A2 - ???', label: 'A2 - Stock Shares', title: 'Stock Shares', type: 'A'}, From 4efd7f39948b24b947783681dd17261267d4c133 Mon Sep 17 00:00:00 2001 From: anna Date: Wed, 20 Mar 2024 11:33:40 +0800 Subject: [PATCH 07/20] combo clear function --- src/pages/DemandNote/Search/SearchForm.js | 31 +++++-------------- .../SearchPage/OrganizationSearchForm.js | 10 ++++-- src/pages/Payment/Search_GLD/SearchForm.js | 5 ++- src/pages/Payment/Search_Public/SearchForm.js | 2 ++ src/pages/Proof/Search_Public/SearchForm.js | 2 ++ .../ListPanel/SearchPublicNoticeForm.js | 8 +++-- .../PublicNotice/Search_GLD/SearchForm.js | 15 +++++---- .../UserSearchForm_Individual.js | 5 ++- .../UserSearchForm_Organization.js | 2 ++ 9 files changed, 43 insertions(+), 37 deletions(-) diff --git a/src/pages/DemandNote/Search/SearchForm.js b/src/pages/DemandNote/Search/SearchForm.js index 8a93408..e197179 100644 --- a/src/pages/DemandNote/Search/SearchForm.js +++ b/src/pages/DemandNote/Search/SearchForm.js @@ -21,13 +21,11 @@ const SearchDemandNoteForm = ({ applySearch, orgComboData, searchCriteria, issue }) => { const [type, setType] = React.useState([]); - // const [status, setStatus] = React.useState({ key: 0, label: 'All', type: 'all' }); const [orgSelected, setOrgSelected] = React.useState({}); const [orgCombo, setOrgCombo] = React.useState(); const [issueSelected, setIssueSelected] = React.useState({}); const [issueCombo, setIssueCombo] = React.useState([]); - const [selectedStatus, setSelectedStatus] = React.useState([]); - const [selectedLabelsString, setSelectedLabelsString] = React.useState(''); + const [selectedStatus, setSelectedStatus] = React.useState(ComboData.denmandNoteStatus[0]); const [minDate, setMinDate] = React.useState(searchCriteria.dateFrom); const [maxDate, setMaxDate] = React.useState(searchCriteria.dateTo); @@ -41,7 +39,7 @@ const SearchDemandNoteForm = ({ applySearch, orgComboData, searchCriteria, issue const { reset, register, handleSubmit } = useForm() const onSubmit = (data) => { - data.status = selectedLabelsString + data.status = selectedStatus?.type; let typeArray = []; for (let i = 0; i < type.length; i++) { @@ -57,7 +55,7 @@ const SearchDemandNoteForm = ({ applySearch, orgComboData, searchCriteria, issue dateTo: data.dateTo, dueDateFrom: data.dueDateFrom, dueDateTo: data.dueDateTo, - status: (data.status === '' || data.status.includes("all")) ? "" : data.status, + status: (data?.status === '' || data?.status?.includes("all")) ? "" : data.status, }; applySearch(temp); }; @@ -77,9 +75,9 @@ const SearchDemandNoteForm = ({ applySearch, orgComboData, searchCriteria, issue function resetForm() { setType([]); - // setStatus({ key: 0, label: 'All', type: 'all' }); setOrgSelected({}); setIssueSelected({}); + setSelectedStatus(ComboData.denmandNoteStatus[0]); reset(); } @@ -136,9 +134,7 @@ const SearchDemandNoteForm = ({ applySearch, orgComboData, searchCriteria, issue inputValue={(issueSelected?.id) ? getIssueLabel(issueSelected) : ""} getOptionLabel={(option) => getIssueLabel(option)} onChange={(event, newValue) => { - if (newValue !== null) { - setIssueSelected(newValue); - } + setIssueSelected(newValue); }} renderInput={(params) => ( { - if (newValue !== null) { setOrgSelected(newValue); - } }} renderInput={(params) => ( { - const findAllIndex = newValue.findIndex((ele) => { - return ele.type === "all" - }) - - if (findAllIndex > -1) { - setSelectedStatus([newValue[findAllIndex]]); - setSelectedLabelsString('all') - } else { - const selectedLabels = newValue.map(option => option.type); - const selectedLabelsString = `${selectedLabels.join(',')}`; + if(newValue==null){ + setSelectedStatus(ComboData.denmandNoteStatus[0]); + }else{ setSelectedStatus(newValue); - setSelectedLabelsString(selectedLabelsString); } }} getOptionLabel={(option) => option.label} diff --git a/src/pages/Organization/SearchPage/OrganizationSearchForm.js b/src/pages/Organization/SearchPage/OrganizationSearchForm.js index 44aad85..ae841c6 100644 --- a/src/pages/Organization/SearchPage/OrganizationSearchForm.js +++ b/src/pages/Organization/SearchPage/OrganizationSearchForm.js @@ -22,7 +22,7 @@ import {ThemeProvider} from "@emotion/react"; const OrganizationSearchForm = ({ applySearch }) => { const [type, setType] = useState([]); - const [creditorSelected, setCreditorSelected] = React.useState({ key: 0, labelCht: '全部', label: 'All', type: 'all' }); + const [creditorSelected, setCreditorSelected] = React.useState(ComboData.CreditorStatus[0]); const { reset, register, handleSubmit } = useForm() const onSubmit = (data) => { @@ -47,6 +47,7 @@ const OrganizationSearchForm = ({ applySearch }) => { function resetForm() { setType([]); + setCreditorSelected(ComboData.CreditorStatus[0]); reset(); } @@ -117,7 +118,12 @@ const OrganizationSearchForm = ({ applySearch }) => { options={ComboData.CreditorStatus} value={creditorSelected} onChange={(event, newValue) => { - setCreditorSelected(newValue); + if(newValue == null){ + setCreditorSelected(ComboData.CreditorStatus[0]); + }else{ + setCreditorSelected(newValue); + } + }} getOptionLabel={(option) => option.label} renderInput={(params) => ( diff --git a/src/pages/Payment/Search_GLD/SearchForm.js b/src/pages/Payment/Search_GLD/SearchForm.js index 8d048c7..70c4c85 100644 --- a/src/pages/Payment/Search_GLD/SearchForm.js +++ b/src/pages/Payment/Search_GLD/SearchForm.js @@ -36,6 +36,7 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { }; function resetForm() { + setStatus(ComboData.paymentStatus[0]); reset(); } @@ -134,7 +135,9 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { getOptionLabel={(option) => option.label} inputValue={status?.label ? status?.label : ""} onChange={(event, newValue) => { - if (newValue !== null) { + if(newValue==null){ + setStatus(ComboData.paymentStatus[0]); + }else{ setStatus(newValue); } }} diff --git a/src/pages/Payment/Search_Public/SearchForm.js b/src/pages/Payment/Search_Public/SearchForm.js index b927123..84387d3 100644 --- a/src/pages/Payment/Search_Public/SearchForm.js +++ b/src/pages/Payment/Search_Public/SearchForm.js @@ -144,6 +144,8 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { onChange={(event, newValue) => { if (newValue !== null) { setStatus(newValue); + }else{ + setStatus(ComboData.paymentStatus[0]); } }} renderInput={(params) => ( diff --git a/src/pages/Proof/Search_Public/SearchForm.js b/src/pages/Proof/Search_Public/SearchForm.js index c721ad3..dcf3ef9 100644 --- a/src/pages/Proof/Search_Public/SearchForm.js +++ b/src/pages/Proof/Search_Public/SearchForm.js @@ -268,6 +268,8 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria, issueComboData onChange={(event, newValue) => { if (newValue !== null) { setStatus(newValue); + }else{ + setStatus(ComboData.proofStatus[0]); } }} renderInput={(params) => ( diff --git a/src/pages/PublicNotice/ListPanel/SearchPublicNoticeForm.js b/src/pages/PublicNotice/ListPanel/SearchPublicNoticeForm.js index 46a6b2f..12dcf6f 100644 --- a/src/pages/PublicNotice/ListPanel/SearchPublicNoticeForm.js +++ b/src/pages/PublicNotice/ListPanel/SearchPublicNoticeForm.js @@ -22,7 +22,7 @@ import {FormattedMessage, useIntl} from "react-intl"; const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { const intl = useIntl(); const [type, setType] = React.useState([]); - const [status, setStatus] = React.useState({ key: 0, label: 'all', type: 'all' }); + const [status, setStatus] = React.useState(localStorage.getItem('userData').creditor?ComboData.publicNoticeStatic_Creditor[0]:ComboData.publicNoticeStatic[0]); const [minDate, setMinDate] = React.useState(searchCriteria.dateFrom); const [maxDate, setMaxDate] = React.useState(searchCriteria.dateTo); @@ -52,7 +52,7 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { function resetForm() { setType([]); - setStatus({ key: 0, label: 'All', labelCht: "全部", type: 'all' }); + setStatus(localStorage.getItem('userData').creditor?ComboData.publicNoticeStatic_Creditor[0]:ComboData.publicNoticeStatic[0]); reset(); } @@ -165,7 +165,11 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { // inputValue={status?.labelCht} getOptionLabel={(option) => intl.formatMessage({id: option.label})} onChange={(event, newValue) => { + if(newValue ==null){ + setStatus(localStorage.getItem('userData').creditor?ComboData.publicNoticeStatic_Creditor[0]:ComboData.publicNoticeStatic[0]); + }else{ setStatus(newValue); + } }} renderInput={(params) => ( { - data.status = selectedStatus.type + data.status = selectedStatus?.type let typeArray = []; for (let i = 0; i < type.length; i++) { @@ -49,7 +49,7 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss dateFrom: data.dateFrom, dateTo: data.dateTo, contact: data.contact, - status: (data.status === '' || data.status.includes("all")) ? "" : data.status, + status: (data.status === '' || data.status?.includes("all")) ? "" : data.status, orgId: (orgSelected?.key && orgSelected?.key > 0) ? orgSelected?.key : "", issueId: issueSelected?.id, groupNo: data.groupNo, @@ -194,8 +194,11 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss options={ComboData.publicNoticeStatic_GLD} value={selectedStatus} onChange={(event, newValue) => { - setSelectedStatus(newValue); - + if(newValue==null){ + setSelectedStatus(ComboData.publicNoticeStatic_GLD[0]); + }else{ + setSelectedStatus(newValue); + } }} getOptionLabel={(option) => option.label} renderInput={(params) => ( @@ -255,9 +258,7 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss value={orgSelected} inputValue={(orgSelected?.label) ? orgSelected?.label : ""} onChange={(event, newValue) => { - if (newValue !== null) { setOrgSelected(newValue); - } }} renderInput={(params) => ( getIssueLabel(option)} onChange={(event, newValue) => { - if (newValue !== null) { setIssueSelected(newValue); - } }} renderInput={(params) => ( { const [type, setType] = useState([]); - const [accountFilter, setAccountFilter] = useState("Active"); + const [accountFilter, setAccountFilter] = useState("All"); const { reset, register, handleSubmit } = useForm() const onSubmit = (data) => { @@ -42,6 +42,7 @@ const UserSearchForm_Individual = ({ applySearch }) => { function resetForm() { setType([]); + setAccountFilter("All"); reset(); } @@ -120,6 +121,8 @@ const UserSearchForm_Individual = ({ applySearch }) => { onChange={(event, newValue) => { if (newValue !== null) { setAccountFilter(newValue); + }else{ + setAccountFilter("All"); } }} renderInput={(params) => ( diff --git a/src/pages/User/SearchPage_Organization/UserSearchForm_Organization.js b/src/pages/User/SearchPage_Organization/UserSearchForm_Organization.js index f9e41e1..d56a80b 100644 --- a/src/pages/User/SearchPage_Organization/UserSearchForm_Organization.js +++ b/src/pages/User/SearchPage_Organization/UserSearchForm_Organization.js @@ -147,6 +147,8 @@ const UserSearchForm_Organization = ({applySearch}) => { onChange={(event, newValue) => { if (newValue !== null){ setAccountFilter(newValue); + }else{ + setAccountFilter("All"); } }} renderInput={(params) => ( From e4239f788162ede60f307a4e379f5a9133447911 Mon Sep 17 00:00:00 2001 From: anna Date: Wed, 20 Mar 2024 11:43:25 +0800 Subject: [PATCH 08/20] syn Reset btn and clear btn --- src/pages/Announcement/Search/SearchForm.js | 3 ++- src/pages/AuditLog/AuditLogSearchForm.js | 3 ++- src/pages/DemandNote/Search/SearchForm.js | 3 ++- src/pages/Organization/SearchPage/OrganizationSearchForm.js | 3 ++- src/pages/Proof/Search_GLD/SearchForm.js | 3 ++- src/pages/PublicNotice/Search_GLD/SearchForm.js | 3 ++- src/pages/User/SearchPage/UserSearchForm.js | 3 ++- .../User/SearchPage_Individual/UserSearchForm_Individual.js | 3 ++- .../SearchPage_Organization/UserSearchForm_Organization.js | 3 ++- src/pages/pnspsUserGroupSearchPage/UserGroupSearchForm.js | 3 ++- 10 files changed, 20 insertions(+), 10 deletions(-) diff --git a/src/pages/Announcement/Search/SearchForm.js b/src/pages/Announcement/Search/SearchForm.js index 7fd9691..65005a3 100644 --- a/src/pages/Announcement/Search/SearchForm.js +++ b/src/pages/Announcement/Search/SearchForm.js @@ -126,9 +126,10 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria}) => { diff --git a/src/pages/AuditLog/AuditLogSearchForm.js b/src/pages/AuditLog/AuditLogSearchForm.js index 50c7005..0eb4e7d 100644 --- a/src/pages/AuditLog/AuditLogSearchForm.js +++ b/src/pages/AuditLog/AuditLogSearchForm.js @@ -163,9 +163,10 @@ const AuditLogSearchForm = ({ applySearch, searchCriteria}) => { diff --git a/src/pages/DemandNote/Search/SearchForm.js b/src/pages/DemandNote/Search/SearchForm.js index e197179..6d81781 100644 --- a/src/pages/DemandNote/Search/SearchForm.js +++ b/src/pages/DemandNote/Search/SearchForm.js @@ -320,9 +320,10 @@ const SearchDemandNoteForm = ({ applySearch, orgComboData, searchCriteria, issue diff --git a/src/pages/Organization/SearchPage/OrganizationSearchForm.js b/src/pages/Organization/SearchPage/OrganizationSearchForm.js index ae841c6..9d81979 100644 --- a/src/pages/Organization/SearchPage/OrganizationSearchForm.js +++ b/src/pages/Organization/SearchPage/OrganizationSearchForm.js @@ -156,9 +156,10 @@ const OrganizationSearchForm = ({ applySearch }) => { diff --git a/src/pages/Proof/Search_GLD/SearchForm.js b/src/pages/Proof/Search_GLD/SearchForm.js index da1dd99..0b3bee6 100644 --- a/src/pages/Proof/Search_GLD/SearchForm.js +++ b/src/pages/Proof/Search_GLD/SearchForm.js @@ -315,9 +315,10 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss diff --git a/src/pages/PublicNotice/Search_GLD/SearchForm.js b/src/pages/PublicNotice/Search_GLD/SearchForm.js index 8cdbc45..312986f 100644 --- a/src/pages/PublicNotice/Search_GLD/SearchForm.js +++ b/src/pages/PublicNotice/Search_GLD/SearchForm.js @@ -317,9 +317,10 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss diff --git a/src/pages/User/SearchPage/UserSearchForm.js b/src/pages/User/SearchPage/UserSearchForm.js index 7d8b1e9..137e3db 100644 --- a/src/pages/User/SearchPage/UserSearchForm.js +++ b/src/pages/User/SearchPage/UserSearchForm.js @@ -171,9 +171,10 @@ const UserSearchForm = ({ applySearch }) => { diff --git a/src/pages/User/SearchPage_Individual/UserSearchForm_Individual.js b/src/pages/User/SearchPage_Individual/UserSearchForm_Individual.js index f4e8cd4..8c3b16c 100644 --- a/src/pages/User/SearchPage_Individual/UserSearchForm_Individual.js +++ b/src/pages/User/SearchPage_Individual/UserSearchForm_Individual.js @@ -153,9 +153,10 @@ const UserSearchForm_Individual = ({ applySearch }) => { diff --git a/src/pages/User/SearchPage_Organization/UserSearchForm_Organization.js b/src/pages/User/SearchPage_Organization/UserSearchForm_Organization.js index d56a80b..7105e97 100644 --- a/src/pages/User/SearchPage_Organization/UserSearchForm_Organization.js +++ b/src/pages/User/SearchPage_Organization/UserSearchForm_Organization.js @@ -179,9 +179,10 @@ const UserSearchForm_Organization = ({applySearch}) => { diff --git a/src/pages/pnspsUserGroupSearchPage/UserGroupSearchForm.js b/src/pages/pnspsUserGroupSearchPage/UserGroupSearchForm.js index ef72d3e..652d1cc 100644 --- a/src/pages/pnspsUserGroupSearchPage/UserGroupSearchForm.js +++ b/src/pages/pnspsUserGroupSearchPage/UserGroupSearchForm.js @@ -94,9 +94,10 @@ const UserGroupSearchForm = ({ applySearch }) => { From ffe93bd7dbfa0ea56c075a2e650ed48f2ff1a49f Mon Sep 17 00:00:00 2001 From: Alex Cheung Date: Wed, 20 Mar 2024 17:39:27 +0800 Subject: [PATCH 09/20] update date picker with dd/mm/yyy --- package-lock.json | 703 +++++++++++++----- package.json | 1 + .../DemandNote/Search_Public/DataGrid.js | 22 +- .../DemandNote/Search_Public/SearchForm.js | 108 ++- src/pages/Proof/Search_Public/DataGrid.js | 16 +- .../ListPanel/SearchPublicNoticeForm.js | 6 +- src/translations/en.json | 6 +- src/utils/DateUtils.js | 7 +- yarn.lock | 337 +++++++-- 9 files changed, 947 insertions(+), 259 deletions(-) diff --git a/package-lock.json b/package-lock.json index 019dcb2..4ffb39f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,6 +18,7 @@ "@mui/icons-material": "^5.14.1", "@mui/lab": "^5.0.0-alpha.139", "@mui/material": "^5.10.6", + "@mui/styles": "^5.15.14", "@mui/x-data-grid": "^6.11.1", "@mui/x-date-pickers": "^6.12.0", "@reduxjs/toolkit": "^1.8.5", @@ -2076,9 +2077,9 @@ "integrity": "sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==" }, "node_modules/@babel/runtime": { - "version": "7.23.2", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.2.tgz", - "integrity": "sha512-mM8eg4yl5D6i3lu2QKPuPH4FArvJ8KhTofbE7jwMUv9KX5mBvwPAqnV3MlyBNqdp9RyRKP6Yck8TrfYrPvX3bg==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.1.tgz", + "integrity": "sha512-+BIznRzyqBf+2wCTxcKE3wDjfGeCoVE61KSHGpkzqrLi8qxqFwBeUFyId2cxkTmm55fzDGnm0+yCxaxygrLUnQ==", "dependencies": { "regenerator-runtime": "^0.14.0" }, @@ -2142,6 +2143,18 @@ "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==" }, + "node_modules/@casl/ability": { + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/@casl/ability/-/ability-6.7.0.tgz", + "integrity": "sha512-NC51ha1nnfCMy88Gdk7cTBipv6n3QNo1yZA68EklsUIzWVDhTs9jJ5y70c3LpT6sN1GcUnGBP/cF7M2I4TkQ3w==", + "peer": true, + "dependencies": { + "@ucast/mongo2js": "^1.3.0" + }, + "funding": { + "url": "https://github.com/stalniy/casl/blob/master/BACKERS.md" + } + }, "node_modules/@casl/react": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/@casl/react/-/react-3.1.0.tgz", @@ -2611,6 +2624,21 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/@eslint/eslintrc/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, "node_modules/@eslint/eslintrc/node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -2641,6 +2669,11 @@ "js-yaml": "bin/js-yaml.js" } }, + "node_modules/@eslint/eslintrc/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, "node_modules/@eslint/js": { "version": "8.52.0", "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.52.0.tgz", @@ -4292,6 +4325,151 @@ "resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz", "integrity": "sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A==" }, + "node_modules/@material-ui/core": { + "version": "4.12.4", + "resolved": "https://registry.npmjs.org/@material-ui/core/-/core-4.12.4.tgz", + "integrity": "sha512-tr7xekNlM9LjA6pagJmL8QCgZXaubWUwkJnoYcMKd4gw/t4XiyvnTkjdGrUVicyB2BsdaAv1tvow45bPM4sSwQ==", + "deprecated": "Material UI v4 doesn't receive active development since September 2021. See the guide https://mui.com/material-ui/migration/migration-v4/ to upgrade to v5.", + "peer": true, + "dependencies": { + "@babel/runtime": "^7.4.4", + "@material-ui/styles": "^4.11.5", + "@material-ui/system": "^4.12.2", + "@material-ui/types": "5.1.0", + "@material-ui/utils": "^4.11.3", + "@types/react-transition-group": "^4.2.0", + "clsx": "^1.0.4", + "hoist-non-react-statics": "^3.3.2", + "popper.js": "1.16.1-lts", + "prop-types": "^15.7.2", + "react-is": "^16.8.0 || ^17.0.0", + "react-transition-group": "^4.4.0" + }, + "engines": { + "node": ">=8.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/material-ui" + }, + "peerDependencies": { + "@types/react": "^16.8.6 || ^17.0.0", + "react": "^16.8.0 || ^17.0.0", + "react-dom": "^16.8.0 || ^17.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@material-ui/core/node_modules/@emotion/hash": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.8.0.tgz", + "integrity": "sha512-kBJtf7PH6aWwZ6fka3zQ0p6SBYzx4fl1LoZXE2RrnYST9Xljm7WfKJrU4g/Xr3Beg72MLrp1AWNUmuYJTL7Cow==", + "peer": true + }, + "node_modules/@material-ui/core/node_modules/@material-ui/styles": { + "version": "4.11.5", + "resolved": "https://registry.npmjs.org/@material-ui/styles/-/styles-4.11.5.tgz", + "integrity": "sha512-o/41ot5JJiUsIETME9wVLAJrmIWL3j0R0Bj2kCOLbSfqEkKf0fmaPt+5vtblUh5eXr2S+J/8J3DaCb10+CzPGA==", + "deprecated": "Material UI v4 doesn't receive active development since September 2021. See the guide https://mui.com/material-ui/migration/migration-v4/ to upgrade to v5.", + "peer": true, + "dependencies": { + "@babel/runtime": "^7.4.4", + "@emotion/hash": "^0.8.0", + "@material-ui/types": "5.1.0", + "@material-ui/utils": "^4.11.3", + "clsx": "^1.0.4", + "csstype": "^2.5.2", + "hoist-non-react-statics": "^3.3.2", + "jss": "^10.5.1", + "jss-plugin-camel-case": "^10.5.1", + "jss-plugin-default-unit": "^10.5.1", + "jss-plugin-global": "^10.5.1", + "jss-plugin-nested": "^10.5.1", + "jss-plugin-props-sort": "^10.5.1", + "jss-plugin-rule-value-function": "^10.5.1", + "jss-plugin-vendor-prefixer": "^10.5.1", + "prop-types": "^15.7.2" + }, + "engines": { + "node": ">=8.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/material-ui" + }, + "peerDependencies": { + "@types/react": "^16.8.6 || ^17.0.0", + "react": "^16.8.0 || ^17.0.0", + "react-dom": "^16.8.0 || ^17.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@material-ui/core/node_modules/@material-ui/system": { + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/@material-ui/system/-/system-4.12.2.tgz", + "integrity": "sha512-6CSKu2MtmiJgcCGf6nBQpM8fLkuB9F55EKfbdTC80NND5wpTmKzwdhLYLH3zL4cLlK0gVaaltW7/wMuyTnN0Lw==", + "peer": true, + "dependencies": { + "@babel/runtime": "^7.4.4", + "@material-ui/utils": "^4.11.3", + "csstype": "^2.5.2", + "prop-types": "^15.7.2" + }, + "engines": { + "node": ">=8.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/material-ui" + }, + "peerDependencies": { + "@types/react": "^16.8.6 || ^17.0.0", + "react": "^16.8.0 || ^17.0.0", + "react-dom": "^16.8.0 || ^17.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@material-ui/core/node_modules/@material-ui/utils": { + "version": "4.11.3", + "resolved": "https://registry.npmjs.org/@material-ui/utils/-/utils-4.11.3.tgz", + "integrity": "sha512-ZuQPV4rBK/V1j2dIkSSEcH5uT6AaHuKWFfotADHsC0wVL1NLd2WkFCm4ZZbX33iO4ydl6V0GPngKm8HZQ2oujg==", + "peer": true, + "dependencies": { + "@babel/runtime": "^7.4.4", + "prop-types": "^15.7.2", + "react-is": "^16.8.0 || ^17.0.0" + }, + "engines": { + "node": ">=8.0.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0", + "react-dom": "^16.8.0 || ^17.0.0" + } + }, + "node_modules/@material-ui/core/node_modules/csstype": { + "version": "2.6.21", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.21.tgz", + "integrity": "sha512-Z1PhmomIfypOpoMjRQB70jfvy/wxT50qW08YXO5lMIJkrdq4yOTR+AW7FqutScmB9NkLwxo+jU+kZLbofZZq/w==", + "peer": true + }, + "node_modules/@material-ui/core/node_modules/react-is": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", + "peer": true + }, "node_modules/@material-ui/pickers": { "version": "3.3.11", "resolved": "https://registry.npmjs.org/@material-ui/pickers/-/pickers-3.3.11.tgz", @@ -4313,6 +4491,20 @@ "react-dom": "^16.8.0 || ^17.0.0" } }, + "node_modules/@material-ui/types": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@material-ui/types/-/types-5.1.0.tgz", + "integrity": "sha512-7cqRjrY50b8QzRSYyhSpx4WRw2YuO0KKIGQEVk5J8uoz2BanawykgZGoWEqKm7pVIbzFDN0SpPcVV4IhOFkl8A==", + "peer": true, + "peerDependencies": { + "@types/react": "*" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, "node_modules/@motionone/animation": { "version": "10.16.3", "resolved": "https://registry.npmjs.org/@motionone/animation/-/animation-10.16.3.tgz", @@ -4546,12 +4738,12 @@ } }, "node_modules/@mui/private-theming": { - "version": "5.14.14", - "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.14.14.tgz", - "integrity": "sha512-n77au3CQj9uu16hak2Y+rvbGSBaJKxziG/gEbOLVGrAuqZ+ycVSkorCfN6Y/4XgYOpG/xvmuiY3JwhAEOzY3iA==", + "version": "5.15.14", + "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.15.14.tgz", + "integrity": "sha512-UH0EiZckOWcxiXLX3Jbb0K7rC8mxTr9L9l6QhOZxYc4r8FHUkefltV9VDGLrzCaWh30SQiJvAEd7djX3XXY6Xw==", "dependencies": { - "@babel/runtime": "^7.23.1", - "@mui/utils": "^5.14.13", + "@babel/runtime": "^7.23.9", + "@mui/utils": "^5.15.14", "prop-types": "^15.8.1" }, "engines": { @@ -4559,7 +4751,7 @@ }, "funding": { "type": "opencollective", - "url": "https://opencollective.com/mui" + "url": "https://opencollective.com/mui-org" }, "peerDependencies": { "@types/react": "^17.0.0 || ^18.0.0", @@ -4602,6 +4794,59 @@ } } }, + "node_modules/@mui/styles": { + "version": "5.15.14", + "resolved": "https://registry.npmjs.org/@mui/styles/-/styles-5.15.14.tgz", + "integrity": "sha512-EspFoCqLf3BadSIRM5dBqrrbE0hioI6/YZXDGzvcPsedQ7j7wAdcIs9Ex6TVqrRUADNWI/Azg6/mhcqWiBDFOg==", + "dependencies": { + "@babel/runtime": "^7.23.9", + "@emotion/hash": "^0.9.1", + "@mui/private-theming": "^5.15.14", + "@mui/types": "^7.2.14", + "@mui/utils": "^5.15.14", + "clsx": "^2.1.0", + "csstype": "^3.1.3", + "hoist-non-react-statics": "^3.3.2", + "jss": "^10.10.0", + "jss-plugin-camel-case": "^10.10.0", + "jss-plugin-default-unit": "^10.10.0", + "jss-plugin-global": "^10.10.0", + "jss-plugin-nested": "^10.10.0", + "jss-plugin-props-sort": "^10.10.0", + "jss-plugin-rule-value-function": "^10.10.0", + "jss-plugin-vendor-prefixer": "^10.10.0", + "prop-types": "^15.8.1" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@types/react": "^17.0.0 || ^18.0.0", + "react": "^17.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/styles/node_modules/clsx": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.0.tgz", + "integrity": "sha512-m3iNNWpd9rl3jvvcBnu70ylMdrXt8Vlq4HYadnU5fwcOtvkSQWPmj7amUcDT2qYI7risszBjI5AUIUox9D16pg==", + "engines": { + "node": ">=6" + } + }, + "node_modules/@mui/styles/node_modules/csstype": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", + "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==" + }, "node_modules/@mui/system": { "version": "5.14.14", "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.14.14.tgz", @@ -4650,9 +4895,9 @@ } }, "node_modules/@mui/types": { - "version": "7.2.6", - "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.2.6.tgz", - "integrity": "sha512-7sjLQrUmBwufm/M7jw/quNiPK/oor2+pGUQP2CULRcFCArYTq78oJ3D5esTaL0UMkXKJvDqXn6Ike69yAOBQng==", + "version": "7.2.14", + "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.2.14.tgz", + "integrity": "sha512-MZsBZ4q4HfzBsywtXgM1Ksj6HDThtiwmOKUXH1pKYISI9gAVXCNHNpo7TlGoGrBaYWZTdNoirIN7JsQcQUjmQQ==", "peerDependencies": { "@types/react": "^17.0.0 || ^18.0.0" }, @@ -4663,12 +4908,12 @@ } }, "node_modules/@mui/utils": { - "version": "5.14.14", - "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.14.14.tgz", - "integrity": "sha512-3AKp8uksje5sRfVrtgG9Q/2TBsHWVBUtA0NaXliZqGcXo8J+A+Agp0qUW2rJ+ivgPWTCCubz9FZVT2IQZ3bGsw==", + "version": "5.15.14", + "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.15.14.tgz", + "integrity": "sha512-0lF/7Hh/ezDv5X7Pry6enMsbYyGKjADzvHyo3Qrc/SSlTsQ1VkbDMbH0m2t3OR5iIVLwMoxwM7yGd+6FCMtTFA==", "dependencies": { - "@babel/runtime": "^7.23.1", - "@types/prop-types": "^15.7.7", + "@babel/runtime": "^7.23.9", + "@types/prop-types": "^15.7.11", "prop-types": "^15.8.1", "react-is": "^18.2.0" }, @@ -4677,7 +4922,7 @@ }, "funding": { "type": "opencollective", - "url": "https://opencollective.com/mui" + "url": "https://opencollective.com/mui-org" }, "peerDependencies": { "@types/react": "^17.0.0 || ^18.0.0", @@ -5796,9 +6041,9 @@ "integrity": "sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==" }, "node_modules/@types/prop-types": { - "version": "15.7.9", - "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.9.tgz", - "integrity": "sha512-n1yyPsugYNSmHgxDFjicaI2+gCNjsBck8UX9kuofAKlc0h1bL+20oSF72KeNaW2DUlesbEVCFgyV2dPGTiY42g==" + "version": "15.7.11", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.11.tgz", + "integrity": "sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng==" }, "node_modules/@types/q": { "version": "1.5.7", @@ -5816,9 +6061,9 @@ "integrity": "sha512-+0autS93xyXizIYiyL02FCY8N+KkKPhILhcUSA276HxzreZ16kl+cmwvV2qAM/PuCCwPXzOXOWhiPcw20uSFcA==" }, "node_modules/@types/react": { - "version": "18.2.31", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.31.tgz", - "integrity": "sha512-c2UnPv548q+5DFh03y8lEDeMfDwBn9G3dRwfkrxQMo/dOtRHUUO57k6pHvBIfH/VF4Nh+98mZ5aaSe+2echD5g==", + "version": "17.0.79", + "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.79.tgz", + "integrity": "sha512-gavKA8AwJAML9zWHuiQRASjrrPJHbT/zrUDHiUGUf+l5a3pkEd6atvjjq+8y2vfRHBJLQJjFpxSa9I8qe9zHAw==", "dependencies": { "@types/prop-types": "*", "@types/scheduler": "*", @@ -6174,6 +6419,41 @@ "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/@ucast/core": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/@ucast/core/-/core-1.10.2.tgz", + "integrity": "sha512-ons5CwXZ/51wrUPfoduC+cO7AS1/wRb0ybpQJ9RrssossDxVy4t49QxWoWgfBDvVKsz9VXzBk9z0wqTdZ+Cq8g==", + "peer": true + }, + "node_modules/@ucast/js": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@ucast/js/-/js-3.0.4.tgz", + "integrity": "sha512-TgG1aIaCMdcaEyckOZKQozn1hazE0w90SVdlpIJ/er8xVumE11gYAtSbw/LBeUnA4fFnFWTcw3t6reqseeH/4Q==", + "peer": true, + "dependencies": { + "@ucast/core": "^1.0.0" + } + }, + "node_modules/@ucast/mongo": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/@ucast/mongo/-/mongo-2.4.3.tgz", + "integrity": "sha512-XcI8LclrHWP83H+7H2anGCEeDq0n+12FU2mXCTz6/Tva9/9ddK/iacvvhCyW6cijAAOILmt0tWplRyRhVyZLsA==", + "peer": true, + "dependencies": { + "@ucast/core": "^1.4.1" + } + }, + "node_modules/@ucast/mongo2js": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@ucast/mongo2js/-/mongo2js-1.3.4.tgz", + "integrity": "sha512-ahazOr1HtelA5AC1KZ9x0UwPMqqimvfmtSm/PRRSeKKeE5G2SCqTgwiNzO7i9jS8zA3dzXpKVPpXMkcYLnyItA==", + "peer": true, + "dependencies": { + "@ucast/core": "^1.6.1", + "@ucast/js": "^3.0.0", + "@ucast/mongo": "^2.4.0" + } + }, "node_modules/@ungap/structured-clone": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", @@ -6430,13 +6710,13 @@ } }, "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", "dependencies": { "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", "uri-js": "^4.2.2" }, "funding": { @@ -6460,34 +6740,6 @@ } } }, - "node_modules/ajv-formats/node_modules/ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ajv-formats/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" - }, - "node_modules/ajv-keywords": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", - "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "peerDependencies": { - "ajv": "^6.9.1" - } - }, "node_modules/ansi-escapes": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", @@ -6975,6 +7227,34 @@ "webpack": ">=2" } }, + "node_modules/babel-loader/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/babel-loader/node_modules/ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "peerDependencies": { + "ajv": "^6.9.1" + } + }, + "node_modules/babel-loader/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, "node_modules/babel-loader/node_modules/schema-utils": { "version": "2.7.1", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz", @@ -7990,21 +8270,6 @@ } } }, - "node_modules/css-minimizer-webpack-plugin/node_modules/ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, "node_modules/css-minimizer-webpack-plugin/node_modules/ajv-keywords": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", @@ -8016,11 +8281,6 @@ "ajv": "^8.8.2" } }, - "node_modules/css-minimizer-webpack-plugin/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" - }, "node_modules/css-minimizer-webpack-plugin/node_modules/schema-utils": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.2.0.tgz", @@ -8097,6 +8357,15 @@ "node": ">=0.10.0" } }, + "node_modules/css-vendor": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/css-vendor/-/css-vendor-2.0.8.tgz", + "integrity": "sha512-x9Aq0XTInxrkuFeHKbYC7zWY8ai7qJ04Kxd9MnvbC1uO5DagxoHQjm4JvG+vCdXOoFtCjbL2XSZfxmoYa9uQVQ==", + "dependencies": { + "@babel/runtime": "^7.8.3", + "is-in-browser": "^1.0.2" + } + }, "node_modules/css-what": { "version": "3.4.2", "resolved": "https://registry.npmjs.org/css-what/-/css-what-3.4.2.tgz", @@ -9410,21 +9679,6 @@ "webpack": "^5.0.0" } }, - "node_modules/eslint-webpack-plugin/node_modules/ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, "node_modules/eslint-webpack-plugin/node_modules/ajv-keywords": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", @@ -9457,11 +9711,6 @@ "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/eslint-webpack-plugin/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" - }, "node_modules/eslint-webpack-plugin/node_modules/schema-utils": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.2.0.tgz", @@ -9494,6 +9743,21 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, + "node_modules/eslint/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, "node_modules/eslint/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -9577,6 +9841,11 @@ "js-yaml": "bin/js-yaml.js" } }, + "node_modules/eslint/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, "node_modules/eslint/node_modules/levn": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", @@ -10158,6 +10427,29 @@ } } }, + "node_modules/fork-ts-checker-webpack-plugin/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/fork-ts-checker-webpack-plugin/node_modules/ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "peerDependencies": { + "ajv": "^6.9.1" + } + }, "node_modules/fork-ts-checker-webpack-plugin/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -10248,6 +10540,11 @@ "node": ">=8" } }, + "node_modules/fork-ts-checker-webpack-plugin/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, "node_modules/fork-ts-checker-webpack-plugin/node_modules/schema-utils": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.0.tgz", @@ -11110,6 +11407,11 @@ "node": ">=10.17.0" } }, + "node_modules/hyphenate-style-name": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/hyphenate-style-name/-/hyphenate-style-name-1.0.4.tgz", + "integrity": "sha512-ygGZLjmXfPHj+ZWh6LwbC37l43MhfztxetbFCoYTM2VjkIUpeHgSNn7QIyVFj7YQ1Wl9Cbw5sholVJPzWvC2MQ==" + }, "node_modules/iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", @@ -11507,6 +11809,11 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/is-in-browser": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/is-in-browser/-/is-in-browser-1.1.3.tgz", + "integrity": "sha512-FeXIBgG/CPGd/WUxuEyvgGTEfwiG9Z4EKGxjNMRqviiIIfsmgrpnHLffEDdwUHqNva1VEW91o3xBT/m8Elgl9g==" + }, "node_modules/is-map": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.2.tgz", @@ -15544,9 +15851,9 @@ "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==" }, "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", @@ -15605,6 +15912,88 @@ "node": ">=0.10.0" } }, + "node_modules/jss": { + "version": "10.10.0", + "resolved": "https://registry.npmjs.org/jss/-/jss-10.10.0.tgz", + "integrity": "sha512-cqsOTS7jqPsPMjtKYDUpdFC0AbhYFLTcuGRqymgmdJIeQ8cH7+AgX7YSgQy79wXloZq2VvATYxUOUQEvS1V/Zw==", + "dependencies": { + "@babel/runtime": "^7.3.1", + "csstype": "^3.0.2", + "is-in-browser": "^1.1.3", + "tiny-warning": "^1.0.2" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/jss" + } + }, + "node_modules/jss-plugin-camel-case": { + "version": "10.10.0", + "resolved": "https://registry.npmjs.org/jss-plugin-camel-case/-/jss-plugin-camel-case-10.10.0.tgz", + "integrity": "sha512-z+HETfj5IYgFxh1wJnUAU8jByI48ED+v0fuTuhKrPR+pRBYS2EDwbusU8aFOpCdYhtRc9zhN+PJ7iNE8pAWyPw==", + "dependencies": { + "@babel/runtime": "^7.3.1", + "hyphenate-style-name": "^1.0.3", + "jss": "10.10.0" + } + }, + "node_modules/jss-plugin-default-unit": { + "version": "10.10.0", + "resolved": "https://registry.npmjs.org/jss-plugin-default-unit/-/jss-plugin-default-unit-10.10.0.tgz", + "integrity": "sha512-SvpajxIECi4JDUbGLefvNckmI+c2VWmP43qnEy/0eiwzRUsafg5DVSIWSzZe4d2vFX1u9nRDP46WCFV/PXVBGQ==", + "dependencies": { + "@babel/runtime": "^7.3.1", + "jss": "10.10.0" + } + }, + "node_modules/jss-plugin-global": { + "version": "10.10.0", + "resolved": "https://registry.npmjs.org/jss-plugin-global/-/jss-plugin-global-10.10.0.tgz", + "integrity": "sha512-icXEYbMufiNuWfuazLeN+BNJO16Ge88OcXU5ZDC2vLqElmMybA31Wi7lZ3lf+vgufRocvPj8443irhYRgWxP+A==", + "dependencies": { + "@babel/runtime": "^7.3.1", + "jss": "10.10.0" + } + }, + "node_modules/jss-plugin-nested": { + "version": "10.10.0", + "resolved": "https://registry.npmjs.org/jss-plugin-nested/-/jss-plugin-nested-10.10.0.tgz", + "integrity": "sha512-9R4JHxxGgiZhurDo3q7LdIiDEgtA1bTGzAbhSPyIOWb7ZubrjQe8acwhEQ6OEKydzpl8XHMtTnEwHXCARLYqYA==", + "dependencies": { + "@babel/runtime": "^7.3.1", + "jss": "10.10.0", + "tiny-warning": "^1.0.2" + } + }, + "node_modules/jss-plugin-props-sort": { + "version": "10.10.0", + "resolved": "https://registry.npmjs.org/jss-plugin-props-sort/-/jss-plugin-props-sort-10.10.0.tgz", + "integrity": "sha512-5VNJvQJbnq/vRfje6uZLe/FyaOpzP/IH1LP+0fr88QamVrGJa0hpRRyAa0ea4U/3LcorJfBFVyC4yN2QC73lJg==", + "dependencies": { + "@babel/runtime": "^7.3.1", + "jss": "10.10.0" + } + }, + "node_modules/jss-plugin-rule-value-function": { + "version": "10.10.0", + "resolved": "https://registry.npmjs.org/jss-plugin-rule-value-function/-/jss-plugin-rule-value-function-10.10.0.tgz", + "integrity": "sha512-uEFJFgaCtkXeIPgki8ICw3Y7VMkL9GEan6SqmT9tqpwM+/t+hxfMUdU4wQ0MtOiMNWhwnckBV0IebrKcZM9C0g==", + "dependencies": { + "@babel/runtime": "^7.3.1", + "jss": "10.10.0", + "tiny-warning": "^1.0.2" + } + }, + "node_modules/jss-plugin-vendor-prefixer": { + "version": "10.10.0", + "resolved": "https://registry.npmjs.org/jss-plugin-vendor-prefixer/-/jss-plugin-vendor-prefixer-10.10.0.tgz", + "integrity": "sha512-UY/41WumgjW8r1qMCO8l1ARg7NHnfRVWRhZ2E2m0DMYsr2DD91qIXLyNhiX83hHswR7Wm4D+oDYNC1zWCJWtqg==", + "dependencies": { + "@babel/runtime": "^7.3.1", + "css-vendor": "^2.0.8", + "jss": "10.10.0" + } + }, "node_modules/jsx-ast-utils": { "version": "3.3.5", "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz", @@ -16003,21 +16392,6 @@ "webpack": "^5.0.0" } }, - "node_modules/mini-css-extract-plugin/node_modules/ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, "node_modules/mini-css-extract-plugin/node_modules/ajv-keywords": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", @@ -16029,11 +16403,6 @@ "ajv": "^8.8.2" } }, - "node_modules/mini-css-extract-plugin/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" - }, "node_modules/mini-css-extract-plugin/node_modules/schema-utils": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.2.0.tgz", @@ -16811,6 +17180,12 @@ "node": ">=4" } }, + "node_modules/popper.js": { + "version": "1.16.1-lts", + "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.1-lts.tgz", + "integrity": "sha512-Kjw8nKRl1m+VrSFCoVGPph93W/qrSO7ZkqPpTf7F4bk/sqcfWK019dWBUpE/fBOsOQY1dks/Bmcbfn1heM/IsA==", + "peer": true + }, "node_modules/postcss": { "version": "8.4.31", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz", @@ -19597,6 +19972,34 @@ "url": "https://opencollective.com/webpack" } }, + "node_modules/schema-utils/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/schema-utils/node_modules/ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "peerDependencies": { + "ajv": "^6.9.1" + } + }, + "node_modules/schema-utils/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, "node_modules/select-hose": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", @@ -21350,21 +21753,6 @@ "webpack": "^4.0.0 || ^5.0.0" } }, - "node_modules/webpack-dev-middleware/node_modules/ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, "node_modules/webpack-dev-middleware/node_modules/ajv-keywords": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", @@ -21376,11 +21764,6 @@ "ajv": "^8.8.2" } }, - "node_modules/webpack-dev-middleware/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" - }, "node_modules/webpack-dev-middleware/node_modules/schema-utils": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.2.0.tgz", @@ -21457,21 +21840,6 @@ } } }, - "node_modules/webpack-dev-server/node_modules/ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, "node_modules/webpack-dev-server/node_modules/ajv-keywords": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", @@ -21483,11 +21851,6 @@ "ajv": "^8.8.2" } }, - "node_modules/webpack-dev-server/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" - }, "node_modules/webpack-dev-server/node_modules/schema-utils": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.2.0.tgz", @@ -21791,21 +22154,6 @@ "node": ">=10.0.0" } }, - "node_modules/workbox-build/node_modules/ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, "node_modules/workbox-build/node_modules/fs-extra": { "version": "9.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", @@ -21820,11 +22168,6 @@ "node": ">=10" } }, - "node_modules/workbox-build/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" - }, "node_modules/workbox-build/node_modules/source-map": { "version": "0.8.0-beta.0", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.8.0-beta.0.tgz", diff --git a/package.json b/package.json index 3cf2df9..a577db7 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "@mui/icons-material": "^5.14.1", "@mui/lab": "^5.0.0-alpha.139", "@mui/material": "^5.10.6", + "@mui/styles": "^5.15.14", "@mui/x-data-grid": "^6.11.1", "@mui/x-date-pickers": "^6.12.0", "@reduxjs/toolkit": "^1.8.5", diff --git a/src/pages/DemandNote/Search_Public/DataGrid.js b/src/pages/DemandNote/Search_Public/DataGrid.js index a3b9315..5343f77 100644 --- a/src/pages/DemandNote/Search_Public/DataGrid.js +++ b/src/pages/DemandNote/Search_Public/DataGrid.js @@ -3,10 +3,12 @@ import * as React from 'react'; import { Button, Box, + useMediaQuery } from '@mui/material'; import * as DateUtils from "utils/DateUtils"; import * as StatusUtils from "utils/statusUtils/DnStatus"; import { FiDataGrid } from "components/FiDataGrid"; +import {useTheme} from "@emotion/react"; import * as HttpUtils from "utils/HttpUtils"; import {useIntl} from "react-intl"; @@ -15,6 +17,8 @@ import {useIntl} from "react-intl"; export default function SearchDemandNote({ recordList }) { const [rows, setRows] = React.useState(recordList); const intl = useIntl(); + const theme = useTheme(); + const isMdOrLg = useMediaQuery(theme.breakpoints.up('md')); React.useEffect(() => { setRows(recordList); @@ -32,18 +36,21 @@ export default function SearchDemandNote({ recordList }) { { field: 'dnNo', headerName: intl.formatMessage({id: 'paymentRecordId'}), - width: 200, + width: isMdOrLg ? 'auto' : 200, + flex: isMdOrLg ? 1 : undefined, }, { field: 'appNo', headerName: intl.formatMessage({id: 'applicationId'}), - width: 150, + width: isMdOrLg ? 'auto' : 150, + flex: isMdOrLg ? 1 : undefined, }, { id: 'issueDate', field: 'issueDate', headerName: intl.formatMessage({id: 'receiptDate'}), - width: 175, + width: isMdOrLg ? 'auto' : 175, + flex: isMdOrLg ? 1 : undefined, valueGetter: (params) => { return DateUtils.dateStr(params?.value); } @@ -51,7 +58,8 @@ export default function SearchDemandNote({ recordList }) { { field: 'status', headerName: intl.formatMessage({id: 'status'}), - width: 175, + width: isMdOrLg ? 'auto' : 175, + flex: isMdOrLg ? 1 : undefined, renderCell: (params) => { return [StatusUtils.getStatus_Cht(params)] }, @@ -59,7 +67,8 @@ export default function SearchDemandNote({ recordList }) { { field: 'sentDate', headerName: intl.formatMessage({id: 'sendDate'}), - flex: 1, + width: isMdOrLg ? 'auto' : 200, + flex: isMdOrLg ? 1 : undefined, valueGetter: (params) => { return params?.value ? DateUtils.datetimeStr(params?.value) + " - " + params.row.sentBy : ""; } @@ -67,7 +76,8 @@ export default function SearchDemandNote({ recordList }) { { field: 'filename', headerName: intl.formatMessage({id: 'files'}), - flex: 1, + width: isMdOrLg ? 'auto' : 300, + flex: isMdOrLg ? 1 : undefined, renderCell: (params) => { return ; }, diff --git a/src/pages/DemandNote/Search_Public/SearchForm.js b/src/pages/DemandNote/Search_Public/SearchForm.js index 531ba14..d50eed9 100644 --- a/src/pages/DemandNote/Search_Public/SearchForm.js +++ b/src/pages/DemandNote/Search_Public/SearchForm.js @@ -15,8 +15,25 @@ import * as FormatUtils from "utils/FormatUtils"; import {FormattedMessage, useIntl} from "react-intl"; import {PNSPS_BUTTON_THEME} from "../../../themes/buttonConst"; import {ThemeProvider} from "@emotion/react"; -// ==============================|| DASHBOARD - DEFAULT ||============================== // +import { makeStyles } from '@mui/styles'; +// ==============================|| DASHBOARD - DEFAULT ||============================== // +const useStyles = makeStyles(() => ({ + root: { + position: "relative" + }, + display: { + position: "absolute", + top: 2, + left: 12, + bottom: 2, + background: "white", + pointerEvents: "none", + right: 50, + display: "flex", + alignItems: "center" + }, + })); const SearchDemandNoteForm = ({ applySearch, searchCriteria, issueComboData }) => { @@ -27,27 +44,95 @@ const SearchDemandNoteForm = ({ applySearch, searchCriteria, issueComboData const [type, setType] = React.useState([]); const [issueSelected, setIssueSelected] = React.useState({ key: 0, i18nLabel: 'all', labelCht: '全部', label: 'All', type: 'all' }); const [issueCombo, setIssueCombo] = React.useState([]); - const [selectedStatus, setSelectedStatus] = React.useState({}); + const [selectedStatus, setSelectedStatus] = React.useState(ComboData.denmandNoteStatus_Public[0]); const [minDate, setMinDate] = React.useState(searchCriteria.dateFrom); const [maxDate, setMaxDate] = React.useState(searchCriteria.dateTo); + const [fromDateValue, setFromDateValue] = React.useState("dd / mm / yyyy"); + const [toDateValue, setToDateValue] = React.useState("dd / mm / yyyy"); + + React.useEffect(() => { + console.log(minDate) + if (minDate != searchCriteria.dateFrom){ + setFromDateValue(minDate); + } + }, [minDate]); + + React.useEffect(() => { + console.log(maxDate) + if (maxDate != searchCriteria.dateTo){ + setToDateValue(maxDate); + } + }, [maxDate]); + + function FormDateInputComponent({inputRef, ...props }) { + const classes = useStyles(); + return ( + <> +
+ {DateUtils.dateStr(fromDateValue)=="Invalid Date"? + fromDateValue + : + DateUtils.dateStr(fromDateValue)} +
+ + + ); + } + + function ToDateInputComponent({inputRef, ...props }) { + const classes = useStyles(); + return ( + <> +
+ {DateUtils.dateStr(toDateValue)=="Invalid Date"? + toDateValue + : + DateUtils.dateStr(toDateValue)} +
+ + + ); + } const { reset, register, handleSubmit } = useForm() const onSubmit = (data) => { let typeArray = []; + let sentDateFrom = ""; + let sentDateTo = ""; for (let i = 0; i < type.length; i++) { typeArray.push(type[i].label); } + if( fromDateValue!="dd / mm / yyyy"&&toDateValue!="dd / mm / yyyy"){ + sentDateFrom = DateUtils.dateValue(fromDateValue) + sentDateTo = DateUtils.dateValue(toDateValue) + } + const temp = { appNo: data.appNo, issueId: issueSelected?.id, dnNo: data.dnNo, - sentDateFrom: data.dateFrom, - sentDateTo: data.dateTo, + sentDateFrom: sentDateFrom, + sentDateTo: sentDateTo, status: (selectedStatus?.type && selectedStatus?.type != 'all') ? selectedStatus?.type : "", }; + console.log(temp) applySearch(temp); }; @@ -88,6 +173,7 @@ const SearchDemandNoteForm = ({ applySearch, searchCriteria, issueComboData + ", No. " + FormatUtils.zeroPad(issueNo, 2) + ", " + DateUtils.dateFormat(issueDate, "D MMM YYYY (ddd)"); } + return ( { - setMinDate(DateUtils.dateStr(newValue)); + setMinDate(newValue.target.value); }} InputLabelProps={{ shrink: true @@ -186,9 +276,11 @@ const SearchDemandNoteForm = ({ applySearch, searchCriteria, issueComboData shrink: true }} {...register("dateTo")} - InputProps={{ inputProps: { min: minDate } }} + InputProps={{ inputComponent: ToDateInputComponent, + inputProps: { min: minDate } + }} onChange={(newValue) => { - setMaxDate(DateUtils.dateStr(newValue)); + setMaxDate(newValue.target.value); }} id="dateTo" type="date" diff --git a/src/pages/Proof/Search_Public/DataGrid.js b/src/pages/Proof/Search_Public/DataGrid.js index ce7d7d7..f783ca9 100644 --- a/src/pages/Proof/Search_Public/DataGrid.js +++ b/src/pages/Proof/Search_Public/DataGrid.js @@ -92,7 +92,7 @@ export default function SearchPublicNoticeTable({ recordList }) { { field: 'actions', headerName: intl.formatMessage({id: 'proofId'}), - width: isMdOrLg ? 'auto' : 250, + width: isMdOrLg ? 'auto' : 200, flex: isMdOrLg ? 1.5 : undefined, cellClassName: 'actions', renderCell: (params) => { @@ -103,8 +103,8 @@ export default function SearchPublicNoticeTable({ recordList }) { id: 'appId', field: 'appId', headerName: isORGLoggedIn()?intl.formatMessage({id: 'gazetteCount3'}):intl.formatMessage({id: 'gazetteCount2'}), - width: isMdOrLg ? 'auto' : 160, - flex: isMdOrLg ? 1 : undefined, + width: isMdOrLg ? 'auto' : 330, + flex: isMdOrLg ? 2 : undefined, renderCell: (params) => { // let appNo = params.row.appNo; // let code = params.row.groupNo; @@ -118,7 +118,7 @@ export default function SearchPublicNoticeTable({ recordList }) { id: 'created', field: 'created', headerName: intl.formatMessage({id: 'proofDate'}), - width: isMdOrLg ? 'auto' : 250, + width: isMdOrLg ? 'auto' : 200, flex: isMdOrLg ? 1.5 : undefined, valueGetter: (params) => { return DateUtils.datetimeStr(params?.value); @@ -128,7 +128,7 @@ export default function SearchPublicNoticeTable({ recordList }) { id: 'proofPaymentDeadline', field: 'proofPaymentDeadline', headerName: intl.formatMessage({id: 'replyBefore'}), - width: isMdOrLg ? 'auto' : 250, + width: isMdOrLg ? 'auto' : 200, flex: isMdOrLg ? 1.5 : undefined, valueGetter: (params) => { let proofPaymentDeadline = DateUtils.convertToDate(params?.value); @@ -140,7 +140,7 @@ export default function SearchPublicNoticeTable({ recordList }) { id: 'replyDate', field: 'replyDate', headerName: intl.formatMessage({id: 'replyDate'}), - width: isMdOrLg ? 'auto' : 250, + width: isMdOrLg ? 'auto' : 200, flex: isMdOrLg ? 1.5 : undefined, valueGetter: (params) => { return params?.value ? DateUtils.datetimeStr(params?.value) : ""; @@ -159,8 +159,8 @@ export default function SearchPublicNoticeTable({ recordList }) { id: 'fee', field: 'fee', headerName: intl.formatMessage({id: 'fee'}), - width: isMdOrLg ? 'auto' : 250, - flex: isMdOrLg ? 1.5 : undefined, + width: isMdOrLg ? 'auto' : 160, + flex: isMdOrLg ? 1 : undefined, valueGetter: (params) => { return (params?.value) ? "$ " + FormatUtils.currencyFormat(params?.value) : ""; } diff --git a/src/pages/PublicNotice/ListPanel/SearchPublicNoticeForm.js b/src/pages/PublicNotice/ListPanel/SearchPublicNoticeForm.js index 46a6b2f..95307a3 100644 --- a/src/pages/PublicNotice/ListPanel/SearchPublicNoticeForm.js +++ b/src/pages/PublicNotice/ListPanel/SearchPublicNoticeForm.js @@ -90,6 +90,7 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { {...register("dateFrom")} id="dateFrom" type="date" + format="DD/MM/YYYY" aria-label={intl.formatMessage({id: 'submitDateFrom'})} label={intl.formatMessage({id: 'submitDateFrom'})} defaultValue={searchCriteria.dateFrom} @@ -112,6 +113,7 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { {...register("dateTo")} id="dateTo" type="date" + // format="DD/MM/YYYY" aria-label={intl.formatMessage({id: 'submitDateTo'})} label={intl.formatMessage({id: 'submitDateTo'})} defaultValue={searchCriteria.dateTo} @@ -137,7 +139,7 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => {
:null } - + {/* { shrink: true }} /> - + */} { - return dateFormat(date,"YYYY-MM-DD HH:mm:ss") + return dateFormat(date,"DD/MM/YYYY HH:mm:ss") }; export const dateStr = (date) =>{ + return dateFormat(date,"DD/MM/YYYY") +}; + +export const dateValue = (date) =>{ return dateFormat(date,"YYYY-MM-DD") }; + export const dateStr_Year = (date) =>{ return dateFormat(date,'YYYY') }; diff --git a/yarn.lock b/yarn.lock index 32d61fd..fce2684 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1140,10 +1140,10 @@ resolved "https://registry.npmjs.org/@babel/regjsgen/-/regjsgen-0.8.0.tgz" integrity sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA== -"@babel/runtime@^7.0.0", "@babel/runtime@^7.11.2", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.5", "@babel/runtime@^7.15.4", "@babel/runtime@^7.16.3", "@babel/runtime@^7.18.3", "@babel/runtime@^7.20.7", "@babel/runtime@^7.22.6", "@babel/runtime@^7.23.1", "@babel/runtime@^7.23.2", "@babel/runtime@^7.3.1", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.0", "@babel/runtime@^7.7.6", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2": - version "7.23.2" - resolved "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.2.tgz" - integrity sha512-mM8eg4yl5D6i3lu2QKPuPH4FArvJ8KhTofbE7jwMUv9KX5mBvwPAqnV3MlyBNqdp9RyRKP6Yck8TrfYrPvX3bg== +"@babel/runtime@^7.0.0", "@babel/runtime@^7.11.2", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.5", "@babel/runtime@^7.15.4", "@babel/runtime@^7.16.3", "@babel/runtime@^7.18.3", "@babel/runtime@^7.20.7", "@babel/runtime@^7.22.6", "@babel/runtime@^7.23.1", "@babel/runtime@^7.23.2", "@babel/runtime@^7.23.9", "@babel/runtime@^7.3.1", "@babel/runtime@^7.4.4", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.0", "@babel/runtime@^7.7.6", "@babel/runtime@^7.8.3", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2": + version "7.24.1" + resolved "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.1.tgz" + integrity sha512-+BIznRzyqBf+2wCTxcKE3wDjfGeCoVE61KSHGpkzqrLi8qxqFwBeUFyId2cxkTmm55fzDGnm0+yCxaxygrLUnQ== dependencies: regenerator-runtime "^0.14.0" @@ -1191,6 +1191,13 @@ resolved "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== +"@casl/ability@^3.0.0 || ^4.0.0 || ^5.1.0 || ^6.0.0": + version "6.7.0" + resolved "https://registry.npmjs.org/@casl/ability/-/ability-6.7.0.tgz" + integrity sha512-NC51ha1nnfCMy88Gdk7cTBipv6n3QNo1yZA68EklsUIzWVDhTs9jJ5y70c3LpT6sN1GcUnGBP/cF7M2I4TkQ3w== + dependencies: + "@ucast/mongo2js" "^1.3.0" + "@casl/react@^3.1.0": version "3.1.0" resolved "https://registry.npmjs.org/@casl/react/-/react-3.1.0.tgz" @@ -1345,6 +1352,11 @@ "@emotion/weak-memoize" "^0.3.1" stylis "4.2.0" +"@emotion/hash@^0.8.0": + version "0.8.0" + resolved "https://registry.npmjs.org/@emotion/hash/-/hash-0.8.0.tgz" + integrity sha512-kBJtf7PH6aWwZ6fka3zQ0p6SBYzx4fl1LoZXE2RrnYST9Xljm7WfKJrU4g/Xr3Beg72MLrp1AWNUmuYJTL7Cow== + "@emotion/hash@^0.9.1": version "0.9.1" resolved "https://registry.npmjs.org/@emotion/hash/-/hash-0.9.1.tgz" @@ -1886,6 +1898,24 @@ resolved "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz" integrity sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A== +"@material-ui/core@^4.0.0": + version "4.12.4" + resolved "https://registry.npmjs.org/@material-ui/core/-/core-4.12.4.tgz" + integrity sha512-tr7xekNlM9LjA6pagJmL8QCgZXaubWUwkJnoYcMKd4gw/t4XiyvnTkjdGrUVicyB2BsdaAv1tvow45bPM4sSwQ== + dependencies: + "@babel/runtime" "^7.4.4" + "@material-ui/styles" "^4.11.5" + "@material-ui/system" "^4.12.2" + "@material-ui/types" "5.1.0" + "@material-ui/utils" "^4.11.3" + "@types/react-transition-group" "^4.2.0" + clsx "^1.0.4" + hoist-non-react-statics "^3.3.2" + popper.js "1.16.1-lts" + prop-types "^15.7.2" + react-is "^16.8.0 || ^17.0.0" + react-transition-group "^4.4.0" + "@material-ui/pickers@^3.3.10": version "3.3.11" resolved "https://registry.npmjs.org/@material-ui/pickers/-/pickers-3.3.11.tgz" @@ -1898,6 +1928,52 @@ react-transition-group "^4.0.0" rifm "^0.7.0" +"@material-ui/styles@^4.11.5": + version "4.11.5" + resolved "https://registry.npmjs.org/@material-ui/styles/-/styles-4.11.5.tgz" + integrity sha512-o/41ot5JJiUsIETME9wVLAJrmIWL3j0R0Bj2kCOLbSfqEkKf0fmaPt+5vtblUh5eXr2S+J/8J3DaCb10+CzPGA== + dependencies: + "@babel/runtime" "^7.4.4" + "@emotion/hash" "^0.8.0" + "@material-ui/types" "5.1.0" + "@material-ui/utils" "^4.11.3" + clsx "^1.0.4" + csstype "^2.5.2" + hoist-non-react-statics "^3.3.2" + jss "^10.5.1" + jss-plugin-camel-case "^10.5.1" + jss-plugin-default-unit "^10.5.1" + jss-plugin-global "^10.5.1" + jss-plugin-nested "^10.5.1" + jss-plugin-props-sort "^10.5.1" + jss-plugin-rule-value-function "^10.5.1" + jss-plugin-vendor-prefixer "^10.5.1" + prop-types "^15.7.2" + +"@material-ui/system@^4.12.2": + version "4.12.2" + resolved "https://registry.npmjs.org/@material-ui/system/-/system-4.12.2.tgz" + integrity sha512-6CSKu2MtmiJgcCGf6nBQpM8fLkuB9F55EKfbdTC80NND5wpTmKzwdhLYLH3zL4cLlK0gVaaltW7/wMuyTnN0Lw== + dependencies: + "@babel/runtime" "^7.4.4" + "@material-ui/utils" "^4.11.3" + csstype "^2.5.2" + prop-types "^15.7.2" + +"@material-ui/types@5.1.0": + version "5.1.0" + resolved "https://registry.npmjs.org/@material-ui/types/-/types-5.1.0.tgz" + integrity sha512-7cqRjrY50b8QzRSYyhSpx4WRw2YuO0KKIGQEVk5J8uoz2BanawykgZGoWEqKm7pVIbzFDN0SpPcVV4IhOFkl8A== + +"@material-ui/utils@^4.11.3": + version "4.11.3" + resolved "https://registry.npmjs.org/@material-ui/utils/-/utils-4.11.3.tgz" + integrity sha512-ZuQPV4rBK/V1j2dIkSSEcH5uT6AaHuKWFfotADHsC0wVL1NLd2WkFCm4ZZbX33iO4ydl6V0GPngKm8HZQ2oujg== + dependencies: + "@babel/runtime" "^7.4.4" + prop-types "^15.7.2" + react-is "^16.8.0 || ^17.0.0" + "@motionone/animation@^10.16.3": version "10.16.3" resolved "https://registry.npmjs.org/@motionone/animation/-/animation-10.16.3.tgz" @@ -2008,13 +2084,13 @@ react-is "^18.2.0" react-transition-group "^4.4.5" -"@mui/private-theming@^5.14.14": - version "5.14.14" - resolved "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.14.14.tgz" - integrity sha512-n77au3CQj9uu16hak2Y+rvbGSBaJKxziG/gEbOLVGrAuqZ+ycVSkorCfN6Y/4XgYOpG/xvmuiY3JwhAEOzY3iA== +"@mui/private-theming@^5.14.14", "@mui/private-theming@^5.15.14": + version "5.15.14" + resolved "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.15.14.tgz" + integrity sha512-UH0EiZckOWcxiXLX3Jbb0K7rC8mxTr9L9l6QhOZxYc4r8FHUkefltV9VDGLrzCaWh30SQiJvAEd7djX3XXY6Xw== dependencies: - "@babel/runtime" "^7.23.1" - "@mui/utils" "^5.14.13" + "@babel/runtime" "^7.23.9" + "@mui/utils" "^5.15.14" prop-types "^15.8.1" "@mui/styled-engine@^5.14.13": @@ -2027,6 +2103,29 @@ csstype "^3.1.2" prop-types "^15.8.1" +"@mui/styles@^5.15.14": + version "5.15.14" + resolved "https://registry.npmjs.org/@mui/styles/-/styles-5.15.14.tgz" + integrity sha512-EspFoCqLf3BadSIRM5dBqrrbE0hioI6/YZXDGzvcPsedQ7j7wAdcIs9Ex6TVqrRUADNWI/Azg6/mhcqWiBDFOg== + dependencies: + "@babel/runtime" "^7.23.9" + "@emotion/hash" "^0.9.1" + "@mui/private-theming" "^5.15.14" + "@mui/types" "^7.2.14" + "@mui/utils" "^5.15.14" + clsx "^2.1.0" + csstype "^3.1.3" + hoist-non-react-statics "^3.3.2" + jss "^10.10.0" + jss-plugin-camel-case "^10.10.0" + jss-plugin-default-unit "^10.10.0" + jss-plugin-global "^10.10.0" + jss-plugin-nested "^10.10.0" + jss-plugin-props-sort "^10.10.0" + jss-plugin-rule-value-function "^10.10.0" + jss-plugin-vendor-prefixer "^10.10.0" + prop-types "^15.8.1" + "@mui/system@^5.14.14", "@mui/system@^5.4.1", "@mui/system@^5.8.0": version "5.14.14" resolved "https://registry.npmjs.org/@mui/system/-/system-5.14.14.tgz" @@ -2041,18 +2140,18 @@ csstype "^3.1.2" prop-types "^15.8.1" -"@mui/types@^7.2.6": - version "7.2.6" - resolved "https://registry.npmjs.org/@mui/types/-/types-7.2.6.tgz" - integrity sha512-7sjLQrUmBwufm/M7jw/quNiPK/oor2+pGUQP2CULRcFCArYTq78oJ3D5esTaL0UMkXKJvDqXn6Ike69yAOBQng== +"@mui/types@^7.2.14", "@mui/types@^7.2.6": + version "7.2.14" + resolved "https://registry.npmjs.org/@mui/types/-/types-7.2.14.tgz" + integrity sha512-MZsBZ4q4HfzBsywtXgM1Ksj6HDThtiwmOKUXH1pKYISI9gAVXCNHNpo7TlGoGrBaYWZTdNoirIN7JsQcQUjmQQ== -"@mui/utils@^5.14.13", "@mui/utils@^5.14.14", "@mui/utils@^5.14.3": - version "5.14.14" - resolved "https://registry.npmjs.org/@mui/utils/-/utils-5.14.14.tgz" - integrity sha512-3AKp8uksje5sRfVrtgG9Q/2TBsHWVBUtA0NaXliZqGcXo8J+A+Agp0qUW2rJ+ivgPWTCCubz9FZVT2IQZ3bGsw== +"@mui/utils@^5.14.13", "@mui/utils@^5.14.14", "@mui/utils@^5.14.3", "@mui/utils@^5.15.14": + version "5.15.14" + resolved "https://registry.npmjs.org/@mui/utils/-/utils-5.15.14.tgz" + integrity sha512-0lF/7Hh/ezDv5X7Pry6enMsbYyGKjADzvHyo3Qrc/SSlTsQ1VkbDMbH0m2t3OR5iIVLwMoxwM7yGd+6FCMtTFA== dependencies: - "@babel/runtime" "^7.23.1" - "@types/prop-types" "^15.7.7" + "@babel/runtime" "^7.23.9" + "@types/prop-types" "^15.7.11" prop-types "^15.8.1" react-is "^18.2.0" @@ -2604,10 +2703,10 @@ resolved "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.3.tgz" integrity sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA== -"@types/prop-types@*", "@types/prop-types@^15.7.7": - version "15.7.9" - resolved "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.9.tgz" - integrity sha512-n1yyPsugYNSmHgxDFjicaI2+gCNjsBck8UX9kuofAKlc0h1bL+20oSF72KeNaW2DUlesbEVCFgyV2dPGTiY42g== +"@types/prop-types@*", "@types/prop-types@^15.7.11": + version "15.7.11" + resolved "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.11.tgz" + integrity sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng== "@types/q@^1.5.1": version "1.5.7" @@ -2638,17 +2737,17 @@ dependencies: "@types/react" "*" -"@types/react-transition-group@^4.4.6", "@types/react-transition-group@^4.4.7": +"@types/react-transition-group@^4.2.0", "@types/react-transition-group@^4.4.6", "@types/react-transition-group@^4.4.7": version "4.4.8" resolved "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.8.tgz" integrity sha512-QmQ22q+Pb+HQSn04NL3HtrqHwYMf4h3QKArOy5F8U5nEVMaihBs3SR10WiOM1iwPz5jIo8x/u11al+iEGZZrvg== dependencies: "@types/react" "*" -"@types/react@*", "@types/react@^16.8 || ^17.0 || ^18.0", "@types/react@^17.0.0 || ^18.0.0", "@types/react@16 || 17 || 18": - version "18.2.31" - resolved "https://registry.npmjs.org/@types/react/-/react-18.2.31.tgz" - integrity sha512-c2UnPv548q+5DFh03y8lEDeMfDwBn9G3dRwfkrxQMo/dOtRHUUO57k6pHvBIfH/VF4Nh+98mZ5aaSe+2echD5g== +"@types/react@*", "@types/react@^16.8 || ^17.0 || ^18.0", "@types/react@^16.8.6 || ^17.0.0", "@types/react@^17.0.0 || ^18.0.0", "@types/react@16 || 17 || 18": + version "17.0.79" + resolved "https://registry.npmjs.org/@types/react/-/react-17.0.79.tgz" + integrity sha512-gavKA8AwJAML9zWHuiQRASjrrPJHbT/zrUDHiUGUf+l5a3pkEd6atvjjq+8y2vfRHBJLQJjFpxSa9I8qe9zHAw== dependencies: "@types/prop-types" "*" "@types/scheduler" "*" @@ -2858,6 +2957,34 @@ "@typescript-eslint/types" "5.62.0" eslint-visitor-keys "^3.3.0" +"@ucast/core@^1.0.0", "@ucast/core@^1.4.1", "@ucast/core@^1.6.1": + version "1.10.2" + resolved "https://registry.npmjs.org/@ucast/core/-/core-1.10.2.tgz" + integrity sha512-ons5CwXZ/51wrUPfoduC+cO7AS1/wRb0ybpQJ9RrssossDxVy4t49QxWoWgfBDvVKsz9VXzBk9z0wqTdZ+Cq8g== + +"@ucast/js@^3.0.0": + version "3.0.4" + resolved "https://registry.npmjs.org/@ucast/js/-/js-3.0.4.tgz" + integrity sha512-TgG1aIaCMdcaEyckOZKQozn1hazE0w90SVdlpIJ/er8xVumE11gYAtSbw/LBeUnA4fFnFWTcw3t6reqseeH/4Q== + dependencies: + "@ucast/core" "^1.0.0" + +"@ucast/mongo@^2.4.0": + version "2.4.3" + resolved "https://registry.npmjs.org/@ucast/mongo/-/mongo-2.4.3.tgz" + integrity sha512-XcI8LclrHWP83H+7H2anGCEeDq0n+12FU2mXCTz6/Tva9/9ddK/iacvvhCyW6cijAAOILmt0tWplRyRhVyZLsA== + dependencies: + "@ucast/core" "^1.4.1" + +"@ucast/mongo2js@^1.3.0": + version "1.3.4" + resolved "https://registry.npmjs.org/@ucast/mongo2js/-/mongo2js-1.3.4.tgz" + integrity sha512-ahazOr1HtelA5AC1KZ9x0UwPMqqimvfmtSm/PRRSeKKeE5G2SCqTgwiNzO7i9jS8zA3dzXpKVPpXMkcYLnyItA== + dependencies: + "@ucast/core" "^1.6.1" + "@ucast/js" "^3.0.0" + "@ucast/mongo" "^2.4.0" + "@ungap/structured-clone@^1.2.0": version "1.2.0" resolved "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz" @@ -3072,7 +3199,12 @@ ajv-formats@^2.1.1: dependencies: ajv "^8.0.0" -ajv-keywords@^3.4.1, ajv-keywords@^3.5.2: +ajv-keywords@^3.4.1: + version "3.5.2" + resolved "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz" + integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== + +ajv-keywords@^3.5.2: version "3.5.2" resolved "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz" integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== @@ -3084,7 +3216,7 @@ ajv-keywords@^5.1.0: dependencies: fast-deep-equal "^3.1.3" -ajv@^6.12.2, ajv@^6.12.4, ajv@^6.12.5, ajv@^6.9.1, ajv@>=8: +ajv@^6.12.2, ajv@^6.12.5, ajv@^6.9.1: version "6.12.6" resolved "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== @@ -3094,27 +3226,17 @@ ajv@^6.12.2, ajv@^6.12.4, ajv@^6.12.5, ajv@^6.9.1, ajv@>=8: json-schema-traverse "^0.4.1" uri-js "^4.2.2" -ajv@^8.0.0: - version "8.12.0" - resolved "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz" - integrity sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA== - dependencies: - fast-deep-equal "^3.1.1" - json-schema-traverse "^1.0.0" - require-from-string "^2.0.2" - uri-js "^4.2.2" - -ajv@^8.6.0: - version "8.12.0" - resolved "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz" - integrity sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA== +ajv@^6.12.4, ajv@^6.9.1: + version "6.12.6" + resolved "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== dependencies: fast-deep-equal "^3.1.1" - json-schema-traverse "^1.0.0" - require-from-string "^2.0.2" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" uri-js "^4.2.2" -ajv@^8.8.2, ajv@^8.9.0: +ajv@^8.0.0, ajv@^8.6.0, ajv@^8.8.2, ajv@^8.9.0, ajv@>=8: version "8.12.0" resolved "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz" integrity sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA== @@ -3860,7 +3982,7 @@ cliui@^7.0.2: strip-ansi "^6.0.0" wrap-ansi "^7.0.0" -clsx@^1.0.2, clsx@^1.1.1: +clsx@^1.0.2, clsx@^1.0.4, clsx@^1.1.1: version "1.2.1" resolved "https://registry.npmjs.org/clsx/-/clsx-1.2.1.tgz" integrity sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg== @@ -3870,6 +3992,11 @@ clsx@^2.0.0: resolved "https://registry.npmjs.org/clsx/-/clsx-2.0.0.tgz" integrity sha512-rQ1+kcj+ttHG0MKVGBUXwayCCF1oh39BF5COIpRzuCEv8Mwjv0XucrI2ExNTOn9IlLifGClWQcU9BrZORvtw6Q== +clsx@^2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/clsx/-/clsx-2.1.0.tgz" + integrity sha512-m3iNNWpd9rl3jvvcBnu70ylMdrXt8Vlq4HYadnU5fwcOtvkSQWPmj7amUcDT2qYI7risszBjI5AUIUox9D16pg== + co@^4.6.0: version "4.6.0" resolved "https://registry.npmjs.org/co/-/co-4.6.0.tgz" @@ -4202,6 +4329,14 @@ css-tree@1.0.0-alpha.37: mdn-data "2.0.4" source-map "^0.6.1" +css-vendor@^2.0.8: + version "2.0.8" + resolved "https://registry.npmjs.org/css-vendor/-/css-vendor-2.0.8.tgz" + integrity sha512-x9Aq0XTInxrkuFeHKbYC7zWY8ai7qJ04Kxd9MnvbC1uO5DagxoHQjm4JvG+vCdXOoFtCjbL2XSZfxmoYa9uQVQ== + dependencies: + "@babel/runtime" "^7.8.3" + is-in-browser "^1.0.2" + css-what@^3.2.1: version "3.4.2" resolved "https://registry.npmjs.org/css-what/-/css-what-3.4.2.tgz" @@ -4300,11 +4435,21 @@ cssstyle@^2.3.0: dependencies: cssom "~0.3.6" +csstype@^2.5.2: + version "2.6.21" + resolved "https://registry.npmjs.org/csstype/-/csstype-2.6.21.tgz" + integrity sha512-Z1PhmomIfypOpoMjRQB70jfvy/wxT50qW08YXO5lMIJkrdq4yOTR+AW7FqutScmB9NkLwxo+jU+kZLbofZZq/w== + csstype@^3.0.2, csstype@^3.1.2: version "3.1.2" resolved "https://registry.npmjs.org/csstype/-/csstype-3.1.2.tgz" integrity sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ== +csstype@^3.1.3: + version "3.1.3" + resolved "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz" + integrity sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw== + damerau-levenshtein@^1.0.8: version "1.0.8" resolved "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz" @@ -5993,6 +6138,11 @@ human-signals@^2.1.0: resolved "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz" integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== +hyphenate-style-name@^1.0.3: + version "1.0.4" + resolved "https://registry.npmjs.org/hyphenate-style-name/-/hyphenate-style-name-1.0.4.tgz" + integrity sha512-ygGZLjmXfPHj+ZWh6LwbC37l43MhfztxetbFCoYTM2VjkIUpeHgSNn7QIyVFj7YQ1Wl9Cbw5sholVJPzWvC2MQ== + iconv-lite@^0.6.3: version "0.6.3" resolved "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz" @@ -6253,6 +6403,11 @@ is-hexadecimal@^1.0.0: resolved "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz" integrity sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw== +is-in-browser@^1.0.2, is-in-browser@^1.1.3: + version "1.1.3" + resolved "https://registry.npmjs.org/is-in-browser/-/is-in-browser-1.1.3.tgz" + integrity sha512-FeXIBgG/CPGd/WUxuEyvgGTEfwiG9Z4EKGxjNMRqviiIIfsmgrpnHLffEDdwUHqNva1VEW91o3xBT/m8Elgl9g== + is-map@^2.0.1, is-map@^2.0.2: version "2.0.2" resolved "https://registry.npmjs.org/is-map/-/is-map-2.0.2.tgz" @@ -7138,6 +7293,76 @@ jsonpointer@^5.0.0: resolved "https://registry.npmjs.org/jsonpointer/-/jsonpointer-5.0.1.tgz" integrity sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ== +jss-plugin-camel-case@^10.10.0, jss-plugin-camel-case@^10.5.1: + version "10.10.0" + resolved "https://registry.npmjs.org/jss-plugin-camel-case/-/jss-plugin-camel-case-10.10.0.tgz" + integrity sha512-z+HETfj5IYgFxh1wJnUAU8jByI48ED+v0fuTuhKrPR+pRBYS2EDwbusU8aFOpCdYhtRc9zhN+PJ7iNE8pAWyPw== + dependencies: + "@babel/runtime" "^7.3.1" + hyphenate-style-name "^1.0.3" + jss "10.10.0" + +jss-plugin-default-unit@^10.10.0, jss-plugin-default-unit@^10.5.1: + version "10.10.0" + resolved "https://registry.npmjs.org/jss-plugin-default-unit/-/jss-plugin-default-unit-10.10.0.tgz" + integrity sha512-SvpajxIECi4JDUbGLefvNckmI+c2VWmP43qnEy/0eiwzRUsafg5DVSIWSzZe4d2vFX1u9nRDP46WCFV/PXVBGQ== + dependencies: + "@babel/runtime" "^7.3.1" + jss "10.10.0" + +jss-plugin-global@^10.10.0, jss-plugin-global@^10.5.1: + version "10.10.0" + resolved "https://registry.npmjs.org/jss-plugin-global/-/jss-plugin-global-10.10.0.tgz" + integrity sha512-icXEYbMufiNuWfuazLeN+BNJO16Ge88OcXU5ZDC2vLqElmMybA31Wi7lZ3lf+vgufRocvPj8443irhYRgWxP+A== + dependencies: + "@babel/runtime" "^7.3.1" + jss "10.10.0" + +jss-plugin-nested@^10.10.0, jss-plugin-nested@^10.5.1: + version "10.10.0" + resolved "https://registry.npmjs.org/jss-plugin-nested/-/jss-plugin-nested-10.10.0.tgz" + integrity sha512-9R4JHxxGgiZhurDo3q7LdIiDEgtA1bTGzAbhSPyIOWb7ZubrjQe8acwhEQ6OEKydzpl8XHMtTnEwHXCARLYqYA== + dependencies: + "@babel/runtime" "^7.3.1" + jss "10.10.0" + tiny-warning "^1.0.2" + +jss-plugin-props-sort@^10.10.0, jss-plugin-props-sort@^10.5.1: + version "10.10.0" + resolved "https://registry.npmjs.org/jss-plugin-props-sort/-/jss-plugin-props-sort-10.10.0.tgz" + integrity sha512-5VNJvQJbnq/vRfje6uZLe/FyaOpzP/IH1LP+0fr88QamVrGJa0hpRRyAa0ea4U/3LcorJfBFVyC4yN2QC73lJg== + dependencies: + "@babel/runtime" "^7.3.1" + jss "10.10.0" + +jss-plugin-rule-value-function@^10.10.0, jss-plugin-rule-value-function@^10.5.1: + version "10.10.0" + resolved "https://registry.npmjs.org/jss-plugin-rule-value-function/-/jss-plugin-rule-value-function-10.10.0.tgz" + integrity sha512-uEFJFgaCtkXeIPgki8ICw3Y7VMkL9GEan6SqmT9tqpwM+/t+hxfMUdU4wQ0MtOiMNWhwnckBV0IebrKcZM9C0g== + dependencies: + "@babel/runtime" "^7.3.1" + jss "10.10.0" + tiny-warning "^1.0.2" + +jss-plugin-vendor-prefixer@^10.10.0, jss-plugin-vendor-prefixer@^10.5.1: + version "10.10.0" + resolved "https://registry.npmjs.org/jss-plugin-vendor-prefixer/-/jss-plugin-vendor-prefixer-10.10.0.tgz" + integrity sha512-UY/41WumgjW8r1qMCO8l1ARg7NHnfRVWRhZ2E2m0DMYsr2DD91qIXLyNhiX83hHswR7Wm4D+oDYNC1zWCJWtqg== + dependencies: + "@babel/runtime" "^7.3.1" + css-vendor "^2.0.8" + jss "10.10.0" + +jss@^10.10.0, jss@^10.5.1, jss@10.10.0: + version "10.10.0" + resolved "https://registry.npmjs.org/jss/-/jss-10.10.0.tgz" + integrity sha512-cqsOTS7jqPsPMjtKYDUpdFC0AbhYFLTcuGRqymgmdJIeQ8cH7+AgX7YSgQy79wXloZq2VvATYxUOUQEvS1V/Zw== + dependencies: + "@babel/runtime" "^7.3.1" + csstype "^3.0.2" + is-in-browser "^1.1.3" + tiny-warning "^1.0.2" + "jsx-ast-utils@^2.4.1 || ^3.0.0", jsx-ast-utils@^3.3.3: version "3.3.5" resolved "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz" @@ -7979,6 +8204,11 @@ pkg-up@^3.1.0: dependencies: find-up "^3.0.0" +popper.js@1.16.1-lts: + version "1.16.1-lts" + resolved "https://registry.npmjs.org/popper.js/-/popper.js-1.16.1-lts.tgz" + integrity sha512-Kjw8nKRl1m+VrSFCoVGPph93W/qrSO7ZkqPpTf7F4bk/sqcfWK019dWBUpE/fBOsOQY1dks/Bmcbfn1heM/IsA== + postcss-attribute-case-insensitive@^5.0.2: version "5.0.2" resolved "https://registry.npmjs.org/postcss-attribute-case-insensitive/-/postcss-attribute-case-insensitive-5.0.2.tgz" @@ -8880,6 +9110,11 @@ react-is@^16.7.0: resolved "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz" integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== +"react-is@^16.8.0 || ^17.0.0": + version "17.0.2" + resolved "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz" + integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w== + react-is@^17.0.1: version "17.0.2" resolved "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz" @@ -9020,7 +9255,7 @@ react-toastify@^9.1.3: dependencies: clsx "^1.1.1" -react-transition-group@^4.0.0, react-transition-group@^4.4.5: +react-transition-group@^4.0.0, react-transition-group@^4.4.0, react-transition-group@^4.4.5: version "4.4.5" resolved "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.5.tgz" integrity sha512-pZcd1MCJoiKiBR2NRxeCRg13uCXbydPnmB4EOeRrY7480qNWO8IIgQG6zlDkm6uRMsURXPuKq0GWtiM59a5Q6g== @@ -9038,7 +9273,7 @@ react-window@^1.8.7: "@babel/runtime" "^7.0.0" memoize-one ">=3.1.1 <6" -"react@^0.14 || ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0", "react@^0.14.8 || ^15.0.1 || ^16.0.0 || ^17.0.1 || ^18.0.0", "react@^0.14.9 || ^15.3.0 || ^16.0.0-rc || ^16.0 || ^17.0 || ^18.0.0", "react@^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0", "react@^15.3.0 || 16 || 17 || 18", "react@^16.0.0 || ^17.0.0 || ^18.0.0", "react@^16.6.0 || 17 || 18", "react@^16.8 || ^17.0 || ^18.0", "react@^16.8.0 || ^17 || ^18", "react@^16.8.0 || ^17.0.0", "react@^16.8.0 || ^17.0.0 || ^18.0.0", "react@^16.9.0 || ^17.0.0 || ^18", "react@^17.0.0 || ^18.0.0", "react@^17.0.2 || ^18.0.0", react@^18.0.0, react@^18.2.0, "react@>= 0.14.0", "react@>= 16", "react@>= 16.3.0", react@>=0.13, react@>=16, react@>=16.0.0, react@>=16.3.3, react@>=16.6.0, react@>=16.8, react@>=16.8.0, react@>=16.9.0: +"react@^0.14 || ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0", "react@^0.14.8 || ^15.0.1 || ^16.0.0 || ^17.0.1 || ^18.0.0", "react@^0.14.9 || ^15.3.0 || ^16.0.0-rc || ^16.0 || ^17.0 || ^18.0.0", "react@^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0", "react@^15.3.0 || 16 || 17 || 18", "react@^16.0.0 || ^17.0.0 || ^18.0.0", "react@^16.6.0 || 17 || 18", "react@^16.8 || ^17.0 || ^18.0", "react@^16.8.0 || ^17 || ^18", "react@^16.8.0 || ^17.0.0", "react@^16.8.0 || ^17.0.0 || ^18.0.0", "react@^16.9.0 || ^17.0.0 || ^18", react@^17.0.0, "react@^17.0.0 || ^18.0.0", "react@^17.0.2 || ^18.0.0", react@^18.0.0, react@^18.2.0, "react@>= 0.14.0", "react@>= 16", "react@>= 16.3.0", react@>=0.13, react@>=16, react@>=16.0.0, react@>=16.3.3, react@>=16.6.0, react@>=16.8, react@>=16.8.0, react@>=16.9.0: version "18.2.0" resolved "https://registry.npmjs.org/react/-/react-18.2.0.tgz" integrity sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ== From e52d7fd56bdee1dc43863e1f0790d079c7e60d77 Mon Sep 17 00:00:00 2001 From: Alex Cheung Date: Wed, 20 Mar 2024 17:40:11 +0800 Subject: [PATCH 10/20] need use : npm install @mui/styles --save --force --- src/pages/DemandNote/Search_Public/SearchForm.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/DemandNote/Search_Public/SearchForm.js b/src/pages/DemandNote/Search_Public/SearchForm.js index d50eed9..0e36399 100644 --- a/src/pages/DemandNote/Search_Public/SearchForm.js +++ b/src/pages/DemandNote/Search_Public/SearchForm.js @@ -224,7 +224,7 @@ const SearchDemandNoteForm = ({ applySearch, searchCriteria, issueComboData Date: Wed, 20 Mar 2024 18:38:03 +0800 Subject: [PATCH 11/20] update dateStr to dateValue --- src/pages/Announcement/Search/SearchForm.js | 4 ++-- src/pages/Announcement/Search/index.js | 4 ++-- src/pages/Announcement/Search_Public/DataGrid.js | 2 +- .../Announcement/Search_Public/SearchForm.js | 4 ++-- src/pages/Announcement/Search_Public/index.js | 4 ++-- src/pages/AuditLog/AuditLogSearchForm.js | 4 ++-- src/pages/AuditLog/index.js | 4 ++-- src/pages/DemandNote/Create/SearchForm.js | 6 +++--- src/pages/DemandNote/Details/DnDetailCard.js | 10 +++++----- src/pages/DemandNote/Details/index.js | 2 +- src/pages/DemandNote/Search/DataGrid.js | 4 ++-- src/pages/DemandNote/Search/SearchForm.js | 8 ++++---- src/pages/DemandNote/Search/index.js | 8 ++++---- src/pages/DemandNote/Search_Public/DataGrid.js | 2 +- src/pages/DemandNote/Search_Public/index.js | 4 ++-- src/pages/GFMIS/SearchForm.js | 4 ++-- src/pages/GFMIS/index.js | 4 ++-- src/pages/GazetteIssue/ExportForm.js | 2 +- src/pages/GazetteIssue/SearchForm.js | 2 +- src/pages/GazetteIssue/index.js | 4 ++-- src/pages/Holiday/SearchForm.js | 2 +- src/pages/Holiday/index.js | 2 +- src/pages/Message/Search/SearchForm.js | 4 ++-- src/pages/Message/Search/index.js | 4 ++-- .../Organization/DetailPage/OrganizationCard.js | 2 +- src/pages/Organization/DetailPage/index.js | 4 ++-- .../OrganizationCard_loadFromUser.js | 2 +- .../Organization/DetailPage_FromUser/index.js | 2 +- .../Organization/SearchPage/OrganizationTable.js | 2 +- src/pages/Payment/Details_GLD/DataGrid.js | 4 ++-- src/pages/Payment/Details_Public/DataGrid.js | 2 +- src/pages/Payment/Search_GLD/DataGrid.js | 2 +- src/pages/Payment/Search_GLD/SearchForm.js | 4 ++-- src/pages/Payment/Search_GLD/index.js | 4 ++-- src/pages/Payment/Search_Public/DataGrid.js | 2 +- src/pages/Payment/Search_Public/SearchForm.js | 4 ++-- src/pages/Payment/Search_Public/index.js | 4 ++-- src/pages/Proof/Create_FromApp/index.js | 2 +- src/pages/Proof/Reply_Public/ProofForm.js | 2 +- src/pages/Proof/Search_GLD/SearchForm.js | 4 ++-- src/pages/Proof/Search_GLD/index.js | 4 ++-- src/pages/Proof/Search_Public/SearchForm.js | 4 ++-- src/pages/Proof/Search_Public/index.js | 4 ++-- .../PublicNotice/Details_GLD/ClientDetailCard.js | 15 ++++++++++----- .../ListPanel/SearchPublicNoticeForm.js | 4 ++-- .../ListPanel/SearchPublicNoticeTab.js | 4 ++-- src/pages/PublicNotice/Search_GLD/SearchForm.js | 4 ++-- src/pages/PublicNotice/Search_GLD/index.js | 4 ++-- src/pages/Recon/SearchForm.js | 12 ++++++------ src/pages/Recon/index.js | 4 ++-- src/pages/User/DetailsPage_Organization/index.js | 8 ++++---- src/pages/dashboard/Public/Notice.js | 2 +- 52 files changed, 109 insertions(+), 104 deletions(-) diff --git a/src/pages/Announcement/Search/SearchForm.js b/src/pages/Announcement/Search/SearchForm.js index 65005a3..6d2aaf0 100644 --- a/src/pages/Announcement/Search/SearchForm.js +++ b/src/pages/Announcement/Search/SearchForm.js @@ -79,7 +79,7 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria}) => { defaultValue={searchCriteria.dateFrom} InputProps={{ inputProps: { max: maxDate } }} onChange={(newValue) => { - setMinDate(DateUtils.dateStr(newValue)); + setMinDate(DateUtils.dateValue(newValue)); }} InputLabelProps={{ shrink: true @@ -96,7 +96,7 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria}) => { {...register("dateTo")} InputProps={{ inputProps: { min: minDate } }} onChange={(newValue) => { - setMaxDate(DateUtils.dateStr(newValue)); + setMaxDate(DateUtils.dateValue(newValue)); }} id="dateTo" type="date" diff --git a/src/pages/Announcement/Search/index.js b/src/pages/Announcement/Search/index.js index 073f486..cf58eb4 100644 --- a/src/pages/Announcement/Search/index.js +++ b/src/pages/Announcement/Search/index.js @@ -32,8 +32,8 @@ const UserSearchPage_Individual = () => { const [record, setRecord] = React.useState([]); const [searchCriteria, setSearchCriteria] = React.useState({ - dateTo: DateUtils.dateStr(new Date()), - dateFrom: DateUtils.dateStr(new Date().setDate(new Date().getDate() - 90)), + dateTo: DateUtils.dateValue(new Date()), + dateFrom: DateUtils.dateValue(new Date().setDate(new Date().getDate() - 90)), }); const [onReady, setOnReady] = React.useState(false); diff --git a/src/pages/Announcement/Search_Public/DataGrid.js b/src/pages/Announcement/Search_Public/DataGrid.js index e89ba81..b5990e4 100644 --- a/src/pages/Announcement/Search_Public/DataGrid.js +++ b/src/pages/Announcement/Search_Public/DataGrid.js @@ -21,7 +21,7 @@ export default function SearchPublicNoticeTable({ recordList }) { width: 250, cellClassName: 'announceDate', renderCell: (params) => { - return DateUtils.dateStr(params?.value); + return DateUtils.dateValue(params?.value); }, }, { diff --git a/src/pages/Announcement/Search_Public/SearchForm.js b/src/pages/Announcement/Search_Public/SearchForm.js index f10ad95..2ad4fc5 100644 --- a/src/pages/Announcement/Search_Public/SearchForm.js +++ b/src/pages/Announcement/Search_Public/SearchForm.js @@ -82,7 +82,7 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { defaultValue={searchCriteria.dateFrom} InputProps={{ inputProps: { max: maxDate } }} onChange={(newValue) => { - setMinDate(DateUtils.dateStr(newValue)); + setMinDate(DateUtils.dateValue(newValue)); }} InputLabelProps={{ shrink: true @@ -103,7 +103,7 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { {...register("dateTo")} InputProps={{ inputProps: { min: minDate } }} onChange={(newValue) => { - setMaxDate(DateUtils.dateStr(newValue)); + setMaxDate(DateUtils.dateValue(newValue)); }} id="dateTo" type="date" diff --git a/src/pages/Announcement/Search_Public/index.js b/src/pages/Announcement/Search_Public/index.js index 351edb5..e6df731 100644 --- a/src/pages/Announcement/Search_Public/index.js +++ b/src/pages/Announcement/Search_Public/index.js @@ -32,8 +32,8 @@ const BackgroundHead = { const UserSearchPage_Individual = () => { const [record, setRecord] = React.useState([]); const [searchCriteria, setSearchCriteria] = React.useState({ - dateTo: DateUtils.dateStr(new Date()), - dateFrom: DateUtils.dateStr(new Date().setDate(new Date().getDate() - 90)), + dateTo: DateUtils.dateValue(new Date()), + dateFrom: DateUtils.dateValue(new Date().setDate(new Date().getDate() - 90)), }); const [onReady, setOnReady] = React.useState(false); diff --git a/src/pages/AuditLog/AuditLogSearchForm.js b/src/pages/AuditLog/AuditLogSearchForm.js index 0eb4e7d..4a33cbf 100644 --- a/src/pages/AuditLog/AuditLogSearchForm.js +++ b/src/pages/AuditLog/AuditLogSearchForm.js @@ -107,7 +107,7 @@ const AuditLogSearchForm = ({ applySearch, searchCriteria}) => { defaultValue={searchCriteria.modifiedFrom} InputProps={{ inputProps: { max: maxDate } }} onChange={(newValue) => { - setMinDate(DateUtils.dateStr(newValue)); + setMinDate(DateUtils.dateValue(newValue)); }} InputLabelProps={{ shrink: true @@ -129,7 +129,7 @@ const AuditLogSearchForm = ({ applySearch, searchCriteria}) => { InputProps={{ inputProps: { min: minDate } }} onChange={(newValue) => { console.log(newValue) - setMaxDate(DateUtils.dateStr(newValue)); + setMaxDate(DateUtils.dateValue(newValue)); }} id="modifiedTo" type="date" diff --git a/src/pages/AuditLog/index.js b/src/pages/AuditLog/index.js index 7ddda71..c4102da 100644 --- a/src/pages/AuditLog/index.js +++ b/src/pages/AuditLog/index.js @@ -33,8 +33,8 @@ const BackgroundHead = { const AuditLogPage = () => { const [record, setRecord] = useState([]); const [searchCriteria, setSearchCriteria] = React.useState({ - modifiedTo: DateUtils.dateStr(new Date()), - modifiedFrom: DateUtils.dateStr(new Date().setDate(new Date().getDate()-14)), + modifiedTo: DateUtils.dateValue(new Date()), + modifiedFrom: DateUtils.dateValue(new Date().setDate(new Date().getDate()-14)), }); const [onReady, setOnReady] = useState(false); const [changelocked, setChangeLocked] = React.useState(false); diff --git a/src/pages/DemandNote/Create/SearchForm.js b/src/pages/DemandNote/Create/SearchForm.js index 0db3334..4185eb4 100644 --- a/src/pages/DemandNote/Create/SearchForm.js +++ b/src/pages/DemandNote/Create/SearchForm.js @@ -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.dateStr(DateUtils.dateStr((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,7 +91,7 @@ const SearchPublicNoticeForm = ({ applySearch, issueComboData, _paymentCount, _p setIsFailPopUp(true); return; } else { - setDueDate(DateUtils.dateStr((new Date().setDate(new Date().getDate() +1)))); + setDueDate(DateUtils.dateValue((new Date().setDate(new Date().getDate() +1)))); setConfirmPopUp(true); } }; @@ -261,7 +261,7 @@ const SearchPublicNoticeForm = ({ applySearch, issueComboData, _paymentCount, _p fullWidth type="date" defaultValue={dueDate} - InputProps={{ inputProps: { min: DateUtils.dateStr(new Date()) } }} + InputProps={{ inputProps: { min: DateUtils.dateValue(new Date()) } }} onChange={(newValue) => { setDueDate(newValue.currentTarget.value) }} diff --git a/src/pages/DemandNote/Details/DnDetailCard.js b/src/pages/DemandNote/Details/DnDetailCard.js index 352dbe8..38d1c14 100644 --- a/src/pages/DemandNote/Details/DnDetailCard.js +++ b/src/pages/DemandNote/Details/DnDetailCard.js @@ -127,24 +127,24 @@ const DnDetailCard = ({ data }) => { {getDisplayField("Sent on", "")} - {getDisplayField("Reminder 1", dnData?.expectReminder1 ? DateUtils.dateStr(dnData.expectReminder1):"--")} + {getDisplayField("Reminder 1", dnData?.expectReminder1 ? DateUtils.dateValue(dnData.expectReminder1):"--")} {getDisplayField("Reminder 1", dnData?.reminder1 ? DateUtils.datetimeStr(dnData.reminder1) : "--")} - {getDisplayField("Reminder 2", dnData?.expectReminder2 ? DateUtils.dateStr(dnData.expectReminder2):"--")} + {getDisplayField("Reminder 2", dnData?.expectReminder2 ? DateUtils.dateValue(dnData.expectReminder2):"--")} {getDisplayField("Reminder 2", dnData?.reminder2 ? DateUtils.datetimeStr(dnData.reminder2) : "--")} - {getDisplayField("Reminder 3", dnData?.expectReminder3 ? DateUtils.dateStr(dnData.expectReminder3):"--")} + {getDisplayField("Reminder 3", dnData?.expectReminder3 ? DateUtils.dateValue(dnData.expectReminder3):"--")} {getDisplayField("Reminder 3", dnData?.reminder3 ? DateUtils.datetimeStr(dnData.reminder3) : "--")} - {getDisplayField("Reminder 4", dnData?.expectReminder4 ? DateUtils.dateStr(dnData.expectReminder4):"--")} + {getDisplayField("Reminder 4", dnData?.expectReminder4 ? DateUtils.dateValue(dnData.expectReminder4):"--")} {getDisplayField("Reminder 4", dnData?.reminder4 ? DateUtils.datetimeStr(dnData.reminder4) : "--")} - {getDisplayField("Reminder Final", dnData?.expectReminderFinal ? DateUtils.dateStr(dnData.expectReminderFinal):"--")} + {getDisplayField("Reminder Final", dnData?.expectReminderFinal ? DateUtils.dateValue(dnData.expectReminderFinal):"--")} {getDisplayField("Reminder Final", dnData?.reminderFinal ? DateUtils.datetimeStr(dnData.reminderFinal) : "--")} diff --git a/src/pages/DemandNote/Details/index.js b/src/pages/DemandNote/Details/index.js index e89ba10..9dc5cac 100644 --- a/src/pages/DemandNote/Details/index.js +++ b/src/pages/DemandNote/Details/index.js @@ -49,7 +49,7 @@ const DemandNote_index = () => { url: `${DEMAND_NOTE_LOAD}/${params.id}`, onSuccess: (response) => { - response["issueDate"] = DateUtils.dateStr(response["issueDate"]); + response["issueDate"] = DateUtils.dateValue(response["issueDate"]); response["sentDate"] = response["sentDate"]?DateUtils.datetimeStr(response["sentDate"]):""; response["gazetteIssueDate"] = DateUtils.datetimeStr(response["gazetteIssueDate"]); response["contactFaxNo"] =JSON.parse(response["contactFaxNo"]); diff --git a/src/pages/DemandNote/Search/DataGrid.js b/src/pages/DemandNote/Search/DataGrid.js index fdad4ab..28b1b20 100644 --- a/src/pages/DemandNote/Search/DataGrid.js +++ b/src/pages/DemandNote/Search/DataGrid.js @@ -233,8 +233,8 @@ export default function SearchDemandNote({ recordList, reloadFun, applySearch }) width: 300, renderCell: (params) => { return ( - - + +
Issue:{DateUtils.dateStr(params?.row.issueDate)}
Due:{params?.value? DateUtils.dateStr(params?.value):"--"}
Issue:{DateUtils.dateValue(params?.row.issueDate)}
Due:{params?.value? DateUtils.dateValue(params?.value):"--"}
Sent:{params.row.sentDate ? <> {DateUtils.datetimeStr(params.row.sentDate)} - {params.row.sentBy} : <> To be sent}
); } diff --git a/src/pages/DemandNote/Search/SearchForm.js b/src/pages/DemandNote/Search/SearchForm.js index 6d81781..e3e29cb 100644 --- a/src/pages/DemandNote/Search/SearchForm.js +++ b/src/pages/DemandNote/Search/SearchForm.js @@ -213,7 +213,7 @@ const SearchDemandNoteForm = ({ applySearch, orgComboData, searchCriteria, issue defaultValue={searchCriteria.dateFrom} InputProps={{ inputProps: { max: maxDate } }} onChange={(newValue) => { - setMinDate(DateUtils.dateStr(newValue)); + setMinDate(DateUtils.dateValue(newValue)); }} InputLabelProps={{ shrink: true @@ -230,7 +230,7 @@ const SearchDemandNoteForm = ({ applySearch, orgComboData, searchCriteria, issue {...register("dateTo")} InputProps={{ inputProps: { min: minDate } }} onChange={(newValue) => { - setMaxDate(DateUtils.dateStr(newValue)); + setMaxDate(DateUtils.dateValue(newValue)); }} id="dateTo" type="date" @@ -253,7 +253,7 @@ const SearchDemandNoteForm = ({ applySearch, orgComboData, searchCriteria, issue defaultValue={searchCriteria.dueDateFrom} InputProps={{ inputProps: { max: maxDueDate } }} onChange={(newValue) => { - setMinDueDate(DateUtils.dateStr(newValue)); + setMinDueDate(DateUtils.dateValue(newValue)); }} InputLabelProps={{ shrink: true @@ -271,7 +271,7 @@ const SearchDemandNoteForm = ({ applySearch, orgComboData, searchCriteria, issue {...register("dueDateTo")} InputProps={{ inputProps: { min: minDueDate } }} onChange={(newValue) => { - setMaxDueDate(DateUtils.dateStr(newValue)); + setMaxDueDate(DateUtils.dateValue(newValue)); }} id="dueDateTo" type="date" diff --git a/src/pages/DemandNote/Search/index.js b/src/pages/DemandNote/Search/index.js index dcd9ec9..c1350aa 100644 --- a/src/pages/DemandNote/Search/index.js +++ b/src/pages/DemandNote/Search/index.js @@ -36,10 +36,10 @@ const UserSearchPage_Individual = () => { const [orgCombo, setOrgCombo] = React.useState([]); const [issueCombo, setIssueCombo] = React.useState([]); const [searchCriteria, setSearchCriteria] = React.useState({ - dateTo: DateUtils.dateStr(new Date()), - dateFrom: DateUtils.dateStr(new Date().setDate(new Date().getDate() - 14)), - dueDateTo: DateUtils.dateStr(new Date()), - dueDateFrom: DateUtils.dateStr(new Date().setDate(new Date().getDate() - 14)), + dateTo: DateUtils.dateValue(new Date()), + dateFrom: DateUtils.dateValue(new Date().setDate(new Date().getDate() - 14)), + dueDateTo: DateUtils.dateValue(new Date()), + dueDateFrom: DateUtils.dateValue(new Date().setDate(new Date().getDate() - 14)), }); const [onReady, setOnReady] = React.useState(false); diff --git a/src/pages/DemandNote/Search_Public/DataGrid.js b/src/pages/DemandNote/Search_Public/DataGrid.js index 5343f77..5351fd8 100644 --- a/src/pages/DemandNote/Search_Public/DataGrid.js +++ b/src/pages/DemandNote/Search_Public/DataGrid.js @@ -52,7 +52,7 @@ export default function SearchDemandNote({ recordList }) { width: isMdOrLg ? 'auto' : 175, flex: isMdOrLg ? 1 : undefined, valueGetter: (params) => { - return DateUtils.dateStr(params?.value); + return DateUtils.dateValue(params?.value); } }, { diff --git a/src/pages/DemandNote/Search_Public/index.js b/src/pages/DemandNote/Search_Public/index.js index d89b1ea..b90cd79 100644 --- a/src/pages/DemandNote/Search_Public/index.js +++ b/src/pages/DemandNote/Search_Public/index.js @@ -36,8 +36,8 @@ const UserSearchPage_Individual = () => { const [orgCombo, setOrgCombo] = React.useState([]); const [issueCombo, setIssueCombo] = React.useState([]); const [searchCriteria, setSearchCriteria] = React.useState({ - dateTo: DateUtils.dateStr(new Date()), - dateFrom: DateUtils.dateStr(new Date().setDate(new Date().getDate() - 14)), + dateTo: DateUtils.dateValue(new Date()), + dateFrom: DateUtils.dateValue(new Date().setDate(new Date().getDate() - 14)), }); const [onReady, setOnReady] = React.useState(false); diff --git a/src/pages/GFMIS/SearchForm.js b/src/pages/GFMIS/SearchForm.js index 6f4e4d2..b2763fc 100644 --- a/src/pages/GFMIS/SearchForm.js +++ b/src/pages/GFMIS/SearchForm.js @@ -78,7 +78,7 @@ const SearchPublicNoticeForm = ({ applySearch, generateXML, searchCriteria }) => max: maxDate, } }} // onChange={(newValue) => { - // setMinDate(DateUtils.dateStr(newValue)); + // setMinDate(DateUtils.dateValue(newValue)); // }} InputLabelProps={{ shrink: true @@ -95,7 +95,7 @@ const SearchPublicNoticeForm = ({ applySearch, generateXML, searchCriteria }) => {...register("dateTo")} InputProps={{ inputProps: { min: minDate } }} onChange={(newValue) => { - setMaxDate(DateUtils.dateStr(newValue)); + setMaxDate(DateUtils.dateValue(newValue)); }} id="dateTo" type="date" diff --git a/src/pages/GFMIS/index.js b/src/pages/GFMIS/index.js index 9b16ad1..1486dfe 100644 --- a/src/pages/GFMIS/index.js +++ b/src/pages/GFMIS/index.js @@ -32,8 +32,8 @@ const Index = () => { const [record,setRecord] = React.useState([]); const [searchCriteria, setSearchCriteria] = React.useState({ - dateFrom: DateUtils.dateStr(new Date()), - // dateFrom: DateUtils.dateStr(new Date().setDate(new Date().getDate()-14)), + dateFrom: DateUtils.dateValue(new Date()), + // dateFrom: DateUtils.dateValue(new Date().setDate(new Date().getDate()-14)), }); const [onReady, setOnReady] = React.useState(false); diff --git a/src/pages/GazetteIssue/ExportForm.js b/src/pages/GazetteIssue/ExportForm.js index e16b830..e721a2d 100644 --- a/src/pages/GazetteIssue/ExportForm.js +++ b/src/pages/GazetteIssue/ExportForm.js @@ -98,7 +98,7 @@ const SearchGazetteIssueForm = ({ applyExport, comboData, waitDownload}) => { {...register("dateTo")} InputProps={{ inputProps: { min: minDate } }} onChange={(newValue) => { - setMaxDate(DateUtils.dateStr(newValue)); + setMaxDate(DateUtils.dateValue(newValue)); }} id="dateTo" type="date" diff --git a/src/pages/GazetteIssue/SearchForm.js b/src/pages/GazetteIssue/SearchForm.js index f4bf8e4..48d5af6 100644 --- a/src/pages/GazetteIssue/SearchForm.js +++ b/src/pages/GazetteIssue/SearchForm.js @@ -96,7 +96,7 @@ const SearchGazetteIssueForm = ({ applySearch, comboData}) => { {...register("dateTo")} InputProps={{ inputProps: { min: minDate } }} onChange={(newValue) => { - setMaxDate(DateUtils.dateStr(newValue)); + setMaxDate(DateUtils.dateValue(newValue)); }} id="dateTo" type="date" diff --git a/src/pages/GazetteIssue/index.js b/src/pages/GazetteIssue/index.js index 933a66f..7b4b14b 100644 --- a/src/pages/GazetteIssue/index.js +++ b/src/pages/GazetteIssue/index.js @@ -44,12 +44,12 @@ const Index = () => { // const navigate = useNavigate() const [searchCriteria, setSearchCriteria] = React.useState({ year: dateStr_Year(new Date()), - // dateFrom: DateUtils.dateStr(new Date().setDate(new Date().getDate()-14)), + // dateFrom: DateUtils.dateValue(new Date().setDate(new Date().getDate()-14)), }); const [exportCriteria, setExportCriteria] = React.useState({ // year: dateStr_Year(new Date()), - // dateFrom: DateUtils.dateStr(new Date().setDate(new Date().getDate()-14)), + // dateFrom: DateUtils.dateValue(new Date().setDate(new Date().getDate()-14)), }); const [attachments, setAttachments] = React.useState([]); diff --git a/src/pages/Holiday/SearchForm.js b/src/pages/Holiday/SearchForm.js index 2ebdac6..e4c767f 100644 --- a/src/pages/Holiday/SearchForm.js +++ b/src/pages/Holiday/SearchForm.js @@ -96,7 +96,7 @@ const SearchHolidayForm = ({ applySearch, comboData}) => { {...register("dateTo")} InputProps={{ inputProps: { min: minDate } }} onChange={(newValue) => { - setMaxDate(DateUtils.dateStr(newValue)); + setMaxDate(DateUtils.dateValue(newValue)); }} id="dateTo" type="date" diff --git a/src/pages/Holiday/index.js b/src/pages/Holiday/index.js index 1a83f3d..6401ffe 100644 --- a/src/pages/Holiday/index.js +++ b/src/pages/Holiday/index.js @@ -44,7 +44,7 @@ const Index = () => { // const navigate = useNavigate() const [searchCriteria, setSearchCriteria] = React.useState({ year: dateStr_Year(new Date()), - // dateFrom: DateUtils.dateStr(new Date().setDate(new Date().getDate()-14)), + // dateFrom: DateUtils.dateValue(new Date().setDate(new Date().getDate()-14)), }); const [attachments, setAttachments] = React.useState([]); const [waitImport, setWaitImport] = React.useState(false); diff --git a/src/pages/Message/Search/SearchForm.js b/src/pages/Message/Search/SearchForm.js index 63d41b6..9b142af 100644 --- a/src/pages/Message/Search/SearchForm.js +++ b/src/pages/Message/Search/SearchForm.js @@ -99,7 +99,7 @@ const SearchForm = ({ applySearch, searchCriteria }) => { defaultValue={searchCriteria.dateFrom} InputProps={{ inputProps: { max: maxDate } }} onChange={(newValue) => { - setMinDate(DateUtils.dateStr(newValue)); + setMinDate(DateUtils.dateValue(newValue)); }} InputLabelProps={{ shrink: true @@ -120,7 +120,7 @@ const SearchForm = ({ applySearch, searchCriteria }) => { {...register("dateTo")} InputProps={{ inputProps: { min: minDate } }} onChange={(newValue) => { - setMaxDate(DateUtils.dateStr(newValue)); + setMaxDate(DateUtils.dateValue(newValue)); }} aria-label={intl.formatMessage({id: 'dateTo'})} id="dateTo" diff --git a/src/pages/Message/Search/index.js b/src/pages/Message/Search/index.js index 9ee6c86..69029bf 100644 --- a/src/pages/Message/Search/index.js +++ b/src/pages/Message/Search/index.js @@ -33,8 +33,8 @@ const Index = () => { const [record,setRecord] = React.useState([]); const [searchCriteria, setSearchCriteria] = React.useState({ - dateTo: DateUtils.dateStr(new Date()), - dateFrom: DateUtils.dateStr(new Date().setDate(new Date().getDate()-14)), + dateTo: DateUtils.dateValue(new Date()), + dateFrom: DateUtils.dateValue(new Date().setDate(new Date().getDate()-14)), }); const [onReady, setOnReady] = React.useState(false); diff --git a/src/pages/Organization/DetailPage/OrganizationCard.js b/src/pages/Organization/DetailPage/OrganizationCard.js index 759699c..3131de9 100644 --- a/src/pages/Organization/DetailPage/OrganizationCard.js +++ b/src/pages/Organization/DetailPage/OrganizationCard.js @@ -342,7 +342,7 @@ const OrganizationCard = ({ userData, loadDataFun, id, setEditModeFun }) => { id="brExpiryDate" name="brExpiryDate" type="date" - inputProps={{ min: DateUtils.dateStr(new Date()) }} + inputProps={{ min: DateUtils.dateValue(new Date()) }} error={Boolean(formik.errors["brExpiryDate"])} helperText={formik.errors["brExpiryDate"] ? formik.errors["brExpiryDate"] : ''} onChange={formik.handleChange} diff --git a/src/pages/Organization/DetailPage/index.js b/src/pages/Organization/DetailPage/index.js index d849fd8..8ce62c6 100644 --- a/src/pages/Organization/DetailPage/index.js +++ b/src/pages/Organization/DetailPage/index.js @@ -84,7 +84,7 @@ const OrganizationDetailPage = () => { response.data["faxNumber"] = response.data.faxNo?.faxNumber; response.data["fax_countryCode"] = response.data.faxNo?.countryCode; - response.data["brExpiryDate"] = response.data.brExpiryDate ? DateUtils.dateStr(response.data.brExpiryDate) : ""; + response.data["brExpiryDate"] = response.data.brExpiryDate ? DateUtils.dateValue(response.data.brExpiryDate) : ""; setFormData(response.data) setList(response.historyList) } @@ -109,7 +109,7 @@ const OrganizationDetailPage = () => { response.data["faxNumber"] = response.data.faxNo?.faxNumber; response.data["fax_countryCode"] = response.data.faxNo?.countryCode; - response.data["brExpiryDate"] = response.data.brExpiryDate ? DateUtils.dateStr(response.data.brExpiryDate) : ""; + response.data["brExpiryDate"] = response.data.brExpiryDate ? DateUtils.dateValue(response.data.brExpiryDate) : ""; setFormData(response.data) setList(response.historyList) } diff --git a/src/pages/Organization/DetailPage_FromUser/OrganizationCard_loadFromUser.js b/src/pages/Organization/DetailPage_FromUser/OrganizationCard_loadFromUser.js index 733b3f3..038063e 100644 --- a/src/pages/Organization/DetailPage_FromUser/OrganizationCard_loadFromUser.js +++ b/src/pages/Organization/DetailPage_FromUser/OrganizationCard_loadFromUser.js @@ -212,7 +212,7 @@ const OrganizationCard_loadFromUser = ({ userData, userId }) => { id="brExpiryDate" name="brExpiryDate" type="date" - inputProps={{ min: DateUtils.dateStr(new Date()) }} + inputProps={{ min: DateUtils.dateValue(new Date()) }} error={Boolean(formik.errors["brExpiryDate"])} helperText={formik.errors["brExpiryDate"] ? formik.errors["brExpiryDate"] : ''} onChange={formik.handleChange} diff --git a/src/pages/Organization/DetailPage_FromUser/index.js b/src/pages/Organization/DetailPage_FromUser/index.js index 5f88e64..be32755 100644 --- a/src/pages/Organization/DetailPage_FromUser/index.js +++ b/src/pages/Organization/DetailPage_FromUser/index.js @@ -58,7 +58,7 @@ const OrganizationDetailPage_FromUser = () => { response.data["faxNumber"] = response.data.faxNo?.faxNumber; response.data["fax_countryCode"] = response.data.faxNo?.countryCode; - response.data["brExpiryDate"] = response.data.brExpiryDate?DateUtils.dateStr(response.data.brExpiryDate): ""; + response.data["brExpiryDate"] = response.data.brExpiryDate?DateUtils.dateValue(response.data.brExpiryDate): ""; setFormData(response.data) } }); diff --git a/src/pages/Organization/SearchPage/OrganizationTable.js b/src/pages/Organization/SearchPage/OrganizationTable.js index e4ebe76..f6bb0ce 100644 --- a/src/pages/Organization/SearchPage/OrganizationTable.js +++ b/src/pages/Organization/SearchPage/OrganizationTable.js @@ -79,7 +79,7 @@ export default function OrganizationTable({ recordList }) { headerName: 'BR Expiry Date', flex: 1, valueGetter: (params) => { - return DateUtils.dateStr(params?.value); + return DateUtils.dateValue(params?.value); } }, { diff --git a/src/pages/Payment/Details_GLD/DataGrid.js b/src/pages/Payment/Details_GLD/DataGrid.js index 207e1ba..9bcf09e 100644 --- a/src/pages/Payment/Details_GLD/DataGrid.js +++ b/src/pages/Payment/Details_GLD/DataGrid.js @@ -43,11 +43,11 @@ export default function SearchPublicNoticeTable({ recordList }) { flex: 1, renderCell: (params) => { let appNo = params.row.appNo; - // console.log(params) + console.log(params.row) return
Gazette Supplement No. 6
{isORGLoggedIn()?<>Care Of: {params.row.careOf}
:null} App No: {appNo}
- Issue Date: {DateUtils.dateStr(params.row.issueDate)}
+ Issue Date: {DateUtils.dateValue(params.row.issueDate)}
Length: {params.row.length+ " cm"}
}, }, diff --git a/src/pages/Payment/Details_Public/DataGrid.js b/src/pages/Payment/Details_Public/DataGrid.js index 245604d..4bec609 100644 --- a/src/pages/Payment/Details_Public/DataGrid.js +++ b/src/pages/Payment/Details_Public/DataGrid.js @@ -74,7 +74,7 @@ export default function SearchPublicNoticeTable({ recordList }) {
{isORGLoggedIn()?<>: {params.row.careOf}
:null} : {appNo}
- : {locale === 'en' ? DateUtils.dateStr(params.row.issueDate) : DateUtils.dateStr_Cht(params.row.issueDate)}
+ : {locale === 'en' ? DateUtils.dateValue(params.row.issueDate) : DateUtils.dateStr_Cht(params.row.issueDate)}
: {params.row.length+ " cm"} }, }, diff --git a/src/pages/Payment/Search_GLD/DataGrid.js b/src/pages/Payment/Search_GLD/DataGrid.js index da41674..988f28a 100644 --- a/src/pages/Payment/Search_GLD/DataGrid.js +++ b/src/pages/Payment/Search_GLD/DataGrid.js @@ -62,7 +62,7 @@ export default function SearchPublicNoticeTable({ recordList }) { headerName: 'Transaction Date', flex: 1, valueGetter: (params) => { - return DateUtils.dateStr(params?.value); + return DateUtils.dateValue(params?.value); } }, { diff --git a/src/pages/Payment/Search_GLD/SearchForm.js b/src/pages/Payment/Search_GLD/SearchForm.js index 70c4c85..9bc90d5 100644 --- a/src/pages/Payment/Search_GLD/SearchForm.js +++ b/src/pages/Payment/Search_GLD/SearchForm.js @@ -83,7 +83,7 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { defaultValue={searchCriteria.dateFrom} InputProps={{ inputProps: { max: maxDate } }} onChange={(newValue) => { - setMinDate(DateUtils.dateStr(newValue)); + setMinDate(DateUtils.dateValue(newValue)); }} InputLabelProps={{ shrink: true @@ -99,7 +99,7 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { {...register("dateTo")} InputProps={{ inputProps: { min: minDate } }} onChange={(newValue) => { - setMaxDate(DateUtils.dateStr(newValue)); + setMaxDate(DateUtils.dateValue(newValue)); }} id="dateTo" type="date" diff --git a/src/pages/Payment/Search_GLD/index.js b/src/pages/Payment/Search_GLD/index.js index bed4346..793a4a3 100644 --- a/src/pages/Payment/Search_GLD/index.js +++ b/src/pages/Payment/Search_GLD/index.js @@ -32,8 +32,8 @@ const Index = () => { const [record,setRecord] = React.useState([]); const [searchCriteria, setSearchCriteria] = React.useState({ - dateTo: DateUtils.dateStr(new Date()), - dateFrom: DateUtils.dateStr(new Date().setDate(new Date().getDate()-14)), + dateTo: DateUtils.dateValue(new Date()), + dateFrom: DateUtils.dateValue(new Date().setDate(new Date().getDate()-14)), }); const [onReady, setOnReady] = React.useState(false); diff --git a/src/pages/Payment/Search_Public/DataGrid.js b/src/pages/Payment/Search_Public/DataGrid.js index d27e8a7..253fba1 100644 --- a/src/pages/Payment/Search_Public/DataGrid.js +++ b/src/pages/Payment/Search_Public/DataGrid.js @@ -74,7 +74,7 @@ export default function SearchPublicNoticeTable({ recordList }) { width: isMdOrLg ? 'auto' : 160, flex: isMdOrLg ? 1 : undefined, valueGetter: (params) => { - return DateUtils.dateStr(params?.value); + return DateUtils.dateValue(params?.value); } }, { diff --git a/src/pages/Payment/Search_Public/SearchForm.js b/src/pages/Payment/Search_Public/SearchForm.js index 84387d3..0b2e114 100644 --- a/src/pages/Payment/Search_Public/SearchForm.js +++ b/src/pages/Payment/Search_Public/SearchForm.js @@ -102,7 +102,7 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { defaultValue={searchCriteria.dateFrom} InputProps={{ inputProps: { max: maxDate } }} onChange={(newValue) => { - setMinDate(DateUtils.dateStr(newValue)); + setMinDate(DateUtils.dateValue(newValue)); }} InputLabelProps={{ shrink: true @@ -119,7 +119,7 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { {...register("dateTo")} InputProps={{ inputProps: { min: minDate } }} onChange={(newValue) => { - setMaxDate(DateUtils.dateStr(newValue)); + setMaxDate(DateUtils.dateValue(newValue)); }} id="dateTo" type="date" diff --git a/src/pages/Payment/Search_Public/index.js b/src/pages/Payment/Search_Public/index.js index 8c991c7..0871149 100644 --- a/src/pages/Payment/Search_Public/index.js +++ b/src/pages/Payment/Search_Public/index.js @@ -33,8 +33,8 @@ const Index = () => { const [record,setRecord] = React.useState([]); const [searchCriteria, setSearchCriteria] = React.useState({ - dateTo: DateUtils.dateStr(new Date()), - dateFrom: DateUtils.dateStr(new Date().setDate(new Date().getDate()-14)), + dateTo: DateUtils.dateValue(new Date()), + dateFrom: DateUtils.dateValue(new Date().setDate(new Date().getDate()-14)), }); const [onReady, setOnReady] = React.useState(false); diff --git a/src/pages/Proof/Create_FromApp/index.js b/src/pages/Proof/Create_FromApp/index.js index ab5910b..3019f5d 100644 --- a/src/pages/Proof/Create_FromApp/index.js +++ b/src/pages/Proof/Create_FromApp/index.js @@ -55,7 +55,7 @@ const Index = () => { responseData.data["fax_countryCode"] = JSON.parse(responseData.data.contactFaxNo).countryCode; responseData.data["issueNoStr"] = responseData.data.issueVolume + "/" + responseData.data.issueYear + " No. " + responseData.data.issueNo - responseData.data["issueDate"] = DateUtils.dateStr(responseData.data.issueDate); + responseData.data["issueDate"] = DateUtils.dateValue(responseData.data.issueDate); responseData.data["groupType"] = responseData.data.groupTitle; diff --git a/src/pages/Proof/Reply_Public/ProofForm.js b/src/pages/Proof/Reply_Public/ProofForm.js index 9e4bda9..b12719e 100644 --- a/src/pages/Proof/Reply_Public/ProofForm.js +++ b/src/pages/Proof/Reply_Public/ProofForm.js @@ -154,7 +154,7 @@ const FormPanel = ({ formData }) => { :  { locale === 'en' ? - DateUtils.dateStr(formik.values.replyDate) + DateUtils.dateValue(formik.values.replyDate) : DateUtils.datetimeStr_Cht(formik.values.replyDate) } diff --git a/src/pages/Proof/Search_GLD/SearchForm.js b/src/pages/Proof/Search_GLD/SearchForm.js index 0b3bee6..560dadd 100644 --- a/src/pages/Proof/Search_GLD/SearchForm.js +++ b/src/pages/Proof/Search_GLD/SearchForm.js @@ -210,7 +210,7 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss defaultValue={searchCriteria.dateFrom} InputProps={{ inputProps: { max: maxDate } }} onChange={(newValue) => { - setMinDate(DateUtils.dateStr(newValue)); + setMinDate(DateUtils.dateValue(newValue)); }} InputLabelProps={{ shrink: true @@ -227,7 +227,7 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss {...register("dateTo")} InputProps={{ inputProps: { min: minDate } }} onChange={(newValue) => { - setMaxDate(DateUtils.dateStr(newValue)); + setMaxDate(DateUtils.dateValue(newValue)); }} id="dateTo" type="date" diff --git a/src/pages/Proof/Search_GLD/index.js b/src/pages/Proof/Search_GLD/index.js index 2e7a327..d294304 100644 --- a/src/pages/Proof/Search_GLD/index.js +++ b/src/pages/Proof/Search_GLD/index.js @@ -34,8 +34,8 @@ const UserSearchPage_Individual = () => { const [orgCombo, setOrgCombo] = React.useState([]); const [issueCombo, setIssueCombo] = React.useState([]); const [searchCriteria, setSearchCriteria] = React.useState({ - dateTo: DateUtils.dateStr(new Date()), - dateFrom: DateUtils.dateStr(new Date().setDate(new Date().getDate() - 14)), + dateTo: DateUtils.dateValue(new Date()), + dateFrom: DateUtils.dateValue(new Date().setDate(new Date().getDate() - 14)), }); const [onReady, setOnReady] = React.useState(false); diff --git a/src/pages/Proof/Search_Public/SearchForm.js b/src/pages/Proof/Search_Public/SearchForm.js index dcf3ef9..cfb697d 100644 --- a/src/pages/Proof/Search_Public/SearchForm.js +++ b/src/pages/Proof/Search_Public/SearchForm.js @@ -212,7 +212,7 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria, issueComboData defaultValue={searchCriteria.dateFrom} InputProps={{ inputProps: { max: maxDate } }} onChange={(newValue) => { - setMinDate(DateUtils.dateStr(newValue)); + setMinDate(DateUtils.dateValue(newValue)); }} InputLabelProps={{ shrink: true @@ -229,7 +229,7 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria, issueComboData {...register("dateTo")} InputProps={{ inputProps: { min: minDate } }} onChange={(newValue) => { - setMaxDate(DateUtils.dateStr(newValue)); + setMaxDate(DateUtils.dateValue(newValue)); }} id="dateTo" type="date" diff --git a/src/pages/Proof/Search_Public/index.js b/src/pages/Proof/Search_Public/index.js index b0de3f1..b141da9 100644 --- a/src/pages/Proof/Search_Public/index.js +++ b/src/pages/Proof/Search_Public/index.js @@ -34,8 +34,8 @@ const UserSearchPage_Individual = () => { const [record,setRecord] = React.useState([]); const [issueCombo,setIssueCombo] = React.useState([]); const [searchCriteria, setSearchCriteria] = React.useState({ - dateTo: DateUtils.dateStr(new Date()), - dateFrom: DateUtils.dateStr(new Date().setDate(new Date().getDate()-14)), + dateTo: DateUtils.dateValue(new Date()), + dateFrom: DateUtils.dateValue(new Date().setDate(new Date().getDate()-14)), }); const [onReady, setOnReady] = React.useState(false); diff --git a/src/pages/PublicNotice/Details_GLD/ClientDetailCard.js b/src/pages/PublicNotice/Details_GLD/ClientDetailCard.js index 485fa02..913d7f9 100644 --- a/src/pages/PublicNotice/Details_GLD/ClientDetailCard.js +++ b/src/pages/PublicNotice/Details_GLD/ClientDetailCard.js @@ -50,7 +50,9 @@ const ClientDetailCard = ( //if user data from parent are not null if (Object.keys(applicationDetailData).length > 0 && applicationDetailData !== undefined) { setCurrentApplicationDetailData(applicationDetailData.userData); - setOrgDetailData(applicationDetailData.orgDetail.data); + if (!applicationDetailData.orgDetail == null){ + setOrgDetailData(applicationDetailData.orgDetail.data); + } if (!applicationDetailData.companyName1 == null) { setCompanyName(applicationDetailData.companyName); } else { @@ -67,15 +69,17 @@ const ClientDetailCard = ( //if state data are ready and assign to different field // console.log(currentApplicationDetailData) if (Object.keys(currentApplicationDetailData).length > 0) { - if(currentApplicationDetailData.orgId>0 && currentApplicationDetailData.orgId !=undefined && currentApplicationDetailData.orgId!=null){ + if( currentApplicationDetailData.orgId!=null){ if (Object.keys(orgDetailData).length > 0) { - setBrExpiryDate(DateUtils.dateStr(orgDetailData.brExpiryDate)); + setBrExpiryDate(DateUtils.dateValue(orgDetailData.brExpiryDate)); setBrNo(orgDetailData.brNo); setOnReady(true); + }else{ + setBrExpiryDate(DateUtils.dateValue(currentApplicationDetailData.brExpiryDate)); + setBrNo(currentApplicationDetailData.brNo); + setOnReady(true); } }else{ - setBrExpiryDate(DateUtils.dateStr(currentApplicationDetailData.brExpiryDate)); - setBrNo(currentApplicationDetailData.brNo); setOnReady(true); } } @@ -91,6 +95,7 @@ const ClientDetailCard = ( alert("The BR is expired.") } else { var timeDiff = Math.abs(currentDate.getTime()-targetDate.getTime()); + console.log(timeDiff) var diffDays = Math.ceil(timeDiff / (1000 * 3600 * 24)); console.log(diffDays) if (diffDays <= 7&&diffDays > 0){ diff --git a/src/pages/PublicNotice/ListPanel/SearchPublicNoticeForm.js b/src/pages/PublicNotice/ListPanel/SearchPublicNoticeForm.js index 105b725..fd4a983 100644 --- a/src/pages/PublicNotice/ListPanel/SearchPublicNoticeForm.js +++ b/src/pages/PublicNotice/ListPanel/SearchPublicNoticeForm.js @@ -96,7 +96,7 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { defaultValue={searchCriteria.dateFrom} InputProps={{ inputProps: { max: maxDate } }} onChange={(newValue) => { - setMinDate(DateUtils.dateStr(newValue)); + setMinDate(DateUtils.dateValue(newValue)); }} InputLabelProps={{ shrink: true @@ -119,7 +119,7 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { defaultValue={searchCriteria.dateTo} InputProps={{ inputProps: { min: minDate } }} onChange={(newValue) => { - setMaxDate(DateUtils.dateStr(newValue)); + setMaxDate(DateUtils.dateValue(newValue)); }} />
diff --git a/src/pages/PublicNotice/ListPanel/SearchPublicNoticeTab.js b/src/pages/PublicNotice/ListPanel/SearchPublicNoticeTab.js index de3eb5e..e01e2cc 100644 --- a/src/pages/PublicNotice/ListPanel/SearchPublicNoticeTab.js +++ b/src/pages/PublicNotice/ListPanel/SearchPublicNoticeTab.js @@ -18,8 +18,8 @@ const UserSearchPage_Individual = () => { const [record,setRecord] = React.useState([]); const [searchCriteria, setSearchCriteria] = React.useState({ - dateTo: DateUtils.dateStr(new Date()), - dateFrom: DateUtils.dateStr(new Date().setDate(new Date().getDate()-14)), + dateTo: DateUtils.dateValue(new Date()), + dateFrom: DateUtils.dateValue(new Date().setDate(new Date().getDate()-14)), }); React.useEffect(() => { diff --git a/src/pages/PublicNotice/Search_GLD/SearchForm.js b/src/pages/PublicNotice/Search_GLD/SearchForm.js index 312986f..5573846 100644 --- a/src/pages/PublicNotice/Search_GLD/SearchForm.js +++ b/src/pages/PublicNotice/Search_GLD/SearchForm.js @@ -144,7 +144,7 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss defaultValue={searchCriteria.dateFrom} InputProps={{ inputProps: { max: maxDate } }} onChange={(newValue) => { - setMinDate(DateUtils.dateStr(newValue)); + setMinDate(DateUtils.dateValue(newValue)); }} InputLabelProps={{ shrink: true @@ -161,7 +161,7 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss {...register("dateTo")} InputProps={{ inputProps: { min: minDate } }} onChange={(newValue) => { - setMaxDate(DateUtils.dateStr(newValue)); + setMaxDate(DateUtils.dateValue(newValue)); }} id="dateTo" type="date" diff --git a/src/pages/PublicNotice/Search_GLD/index.js b/src/pages/PublicNotice/Search_GLD/index.js index 4a8e300..39546d7 100644 --- a/src/pages/PublicNotice/Search_GLD/index.js +++ b/src/pages/PublicNotice/Search_GLD/index.js @@ -34,8 +34,8 @@ const UserSearchPage_Individual = () => { const [orgCombo, setOrgCombo] = React.useState([]); const [issueCombo, setIssueCombo] = React.useState([]); const [searchCriteria, setSearchCriteria] = React.useState({ - dateTo: DateUtils.dateStr(new Date()), - dateFrom: DateUtils.dateStr(new Date().setDate(new Date().getDate() - 14)), + dateTo: DateUtils.dateValue(new Date()), + dateFrom: DateUtils.dateValue(new Date().setDate(new Date().getDate() - 14)), }); const [onReady, setOnReady] = React.useState(false); diff --git a/src/pages/Recon/SearchForm.js b/src/pages/Recon/SearchForm.js index 64324a3..edcaece 100644 --- a/src/pages/Recon/SearchForm.js +++ b/src/pages/Recon/SearchForm.js @@ -188,7 +188,7 @@ const SearchPublicNoticeForm = ({ applySearch, generateReport, searchCriteria, o ////defaultValue={searchCriteria.dateFrom} InputProps={{ inputProps: { max: sysTxnMaxDate } }} onChange={(newValue) => { - setSysTxnMinDate(DateUtils.dateStr(newValue)); + setSysTxnMinDate(DateUtils.dateValue(newValue)); }} InputLabelProps={{ shrink: true @@ -204,7 +204,7 @@ const SearchPublicNoticeForm = ({ applySearch, generateReport, searchCriteria, o {...register("sysTxnDateTo")} InputProps={{ inputProps: { min: sysTxnMinDate } }} onChange={(newValue) => { - setsysTxnMaxDate(DateUtils.dateStr(newValue)); + setsysTxnMaxDate(DateUtils.dateValue(newValue)); }} id="sysTxnDateTo" type="date" @@ -230,7 +230,7 @@ const SearchPublicNoticeForm = ({ applySearch, generateReport, searchCriteria, o //defaultValue={searchCriteria.dateFrom} InputProps={{ inputProps: { max: txnMaxDate } }} onChange={(newValue) => { - setTxnMaxDate(DateUtils.dateStr(newValue)); + setTxnMaxDate(DateUtils.dateValue(newValue)); }} InputLabelProps={{ shrink: true @@ -246,7 +246,7 @@ const SearchPublicNoticeForm = ({ applySearch, generateReport, searchCriteria, o {...register("txnDateTo")} InputProps={{ inputProps: { min: txnMinDate } }} onChange={(newValue) => { - setTxnMinDate(DateUtils.dateStr(newValue)); + setTxnMinDate(DateUtils.dateValue(newValue)); }} id="txnDateTo" type="date" @@ -272,7 +272,7 @@ const SearchPublicNoticeForm = ({ applySearch, generateReport, searchCriteria, o //defaultValue={searchCriteria.dateFrom} InputProps={{ inputProps: { max: collMaxDate } }} onChange={(newValue) => { - setCollMinDate(DateUtils.dateStr(newValue)); + setCollMinDate(DateUtils.dateValue(newValue)); }} InputLabelProps={{ shrink: true @@ -288,7 +288,7 @@ const SearchPublicNoticeForm = ({ applySearch, generateReport, searchCriteria, o {...register("collDateTo")} InputProps={{ inputProps: { min: collMinDate } }} onChange={(newValue) => { - setCollMaxDate(DateUtils.dateStr(newValue)); + setCollMaxDate(DateUtils.dateValue(newValue)); }} id="collDateTo" type="date" diff --git a/src/pages/Recon/index.js b/src/pages/Recon/index.js index fcf0fc6..7d81972 100644 --- a/src/pages/Recon/index.js +++ b/src/pages/Recon/index.js @@ -33,8 +33,8 @@ const Index = () => { // const [record,setRecord] = React.useState([]); const [searchCriteria, setSearchCriteria] = React.useState({ - // dateTo: DateUtils.dateStr(new Date()), - // dateFrom: DateUtils.dateStr(new Date().setDate(new Date().getDate()-14)), + // dateTo: DateUtils.dateValue(new Date()), + // dateFrom: DateUtils.dateValue(new Date().setDate(new Date().getDate()-14)), }); const [onReady] = React.useState(true); const [onDownload, setOnDownload] = React.useState(false); diff --git a/src/pages/User/DetailsPage_Organization/index.js b/src/pages/User/DetailsPage_Organization/index.js index b3002dd..8bb1905 100644 --- a/src/pages/User/DetailsPage_Organization/index.js +++ b/src/pages/User/DetailsPage_Organization/index.js @@ -113,7 +113,7 @@ const UserMaintainPage_Organization = () => { response.data["contactTel"] = response.orgDetail.data["contactTel"]; response.data["faxNo"] = response.orgDetail.data["faxNo"]; - response.data["brExpiryDate"] = response.orgDetail.data.brExpiryDate ? DateUtils.dateStr(response.orgDetail.data.brExpiryDate) : ""; + response.data["brExpiryDate"] = response.orgDetail.data.brExpiryDate ? DateUtils.dateValue(response.orgDetail.data.brExpiryDate) : ""; response.data["brNo"] = response.orgDetail.data.brNo; response.data["enCompanyName"] = response.orgDetail.data.enCompanyName; response.data["chCompanyName"] = response.orgDetail.data.chCompanyName; @@ -123,7 +123,7 @@ const UserMaintainPage_Organization = () => { response.data["addressBus"] = JSON.parse(response.data["addressBus"]); response.data["contactTel"] = JSON.parse(response.data["contactTel"]); response.data["faxNo"] = JSON.parse(response.data["faxNo"]); - response.data["brExpiryDate"] = response.data.brExpiryDate ? DateUtils.dateStr(response.data.brExpiryDate) : ""; + response.data["brExpiryDate"] = response.data.brExpiryDate ? DateUtils.dateValue(response.data.brExpiryDate) : ""; } // console.log("2") // console.log(response.data) @@ -149,7 +149,7 @@ const UserMaintainPage_Organization = () => { // response.data["status"] = response.data?.locked?"locked":response.data?.status; response.data["preferLocale"] = getObjectByType(ComboData.Locale, "type", response.data?.preferLocale); - //response.data["orgId"] = response.data.brExpiryDate?DateUtils.dateStr(response.data.brExpiryDate):""; + //response.data["orgId"] = response.data.brExpiryDate?DateUtils.dateValue(response.data.brExpiryDate):""; // console.log("3") // console.log(response.data) @@ -174,7 +174,7 @@ const UserMaintainPage_Organization = () => { response.data["fax_countryCode"] = response.data.faxNo?.countryCode; response.data["preferLocale"] = getObjectByType(ComboData.Locale, "type", response.data?.preferLocale); - //response.data["orgId"] = response.data.brExpiryDate?DateUtils.dateStr(response.data.brExpiryDate):""; + //response.data["orgId"] = response.data.brExpiryDate?DateUtils.dateValue(response.data.brExpiryDate):""; setUserData(response.data); setOrgData(response.orgList); // console.log(response.data) diff --git a/src/pages/dashboard/Public/Notice.js b/src/pages/dashboard/Public/Notice.js index b518f11..c558773 100644 --- a/src/pages/dashboard/Public/Notice.js +++ b/src/pages/dashboard/Public/Notice.js @@ -33,7 +33,7 @@ const SearchDemandNoteForm = () => { list.push( {locale === 'en' ?item.subjectEng:locale === 'zh-HK' ?item.subjectCht:item.subjectChs} - {DateUtils.dateStr(item.announceDate)} + {DateUtils.dateValue(item.announceDate)} {locale === 'en' ?item.contentEng:locale === 'zh-HK' ?item.contentCht:item.contentChs} From e4a6ce8b15a198412eea3b77737e54f65fee90ae Mon Sep 17 00:00:00 2001 From: anna Date: Thu, 21 Mar 2024 16:59:44 +0800 Subject: [PATCH 12/20] i18n and ui update --- src/pages/DemandNote/Search_Public/DataGrid.js | 2 +- src/pages/Proof/Payment/Pay_Creditor.js | 13 ++++++++++--- src/translations/en.json | 4 ++++ src/translations/zh-CN.json | 2 ++ src/translations/zh-HK.json | 2 ++ 5 files changed, 19 insertions(+), 4 deletions(-) diff --git a/src/pages/DemandNote/Search_Public/DataGrid.js b/src/pages/DemandNote/Search_Public/DataGrid.js index 5351fd8..d8b0bad 100644 --- a/src/pages/DemandNote/Search_Public/DataGrid.js +++ b/src/pages/DemandNote/Search_Public/DataGrid.js @@ -70,7 +70,7 @@ export default function SearchDemandNote({ recordList }) { width: isMdOrLg ? 'auto' : 200, flex: isMdOrLg ? 1 : undefined, valueGetter: (params) => { - return params?.value ? DateUtils.datetimeStr(params?.value) + " - " + params.row.sentBy : ""; + return params?.value ? DateUtils.datetimeStr(params?.value):""; } }, { diff --git a/src/pages/Proof/Payment/Pay_Creditor.js b/src/pages/Proof/Payment/Pay_Creditor.js index 8b7cef0..feb8fe1 100644 --- a/src/pages/Proof/Payment/Pay_Creditor.js +++ b/src/pages/Proof/Payment/Pay_Creditor.js @@ -88,10 +88,17 @@ const Index = () => { - 我們已收到你已確定申請編號: {record?.appNo} 的稿件校對確定及可付印的指示,並將安排刊登於憲報 - 期數 {record?.appNo} 年 {record?.issueVolume} 卷 第 {record?.issueNo} 期內。 +

- 此公共啟事申請的費用將於下期發出的繳費發票時收取,請依時繳費。 +
diff --git a/src/translations/en.json b/src/translations/en.json index 1edff0e..11f0cff 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -71,6 +71,10 @@ "MSG.plzSelectApp": "Please select application", "MSG.actionFail": "Action failed", "MSG.paymentHolded": "Application number {appNo} is currently in the process of payment. If the payment is unsuccessful, please try again after 20 minutes. We apologise for any inconvenience caused.", + "MSG.pay_credity1": "We have received your confirmed application for proofreading and printing instructions regarding application number {appNo}. We will arrange for its publication with in the Year {year}, Volume {issueVolume}, Issue {issueNo} of the Official Gazette.", + "MSG.pay_credity2": "The fee for this public notice will be consolidated in the next Payment Notice. Please ensure timely payment.", + + "registerTitle1": "Become", "registerTitle2": "Gazette Notice", diff --git a/src/translations/zh-CN.json b/src/translations/zh-CN.json index 5c4cb30..e18389c 100644 --- a/src/translations/zh-CN.json +++ b/src/translations/zh-CN.json @@ -70,6 +70,8 @@ "MSG.plzSelectApp": "请选择公共启事。", "MSG.actionFail": "行动失败", "MSG.paymentHolded": "申请编号 {appNo} 已正在付款的流程中,如相关付款没有成功,请于20分钟后再尝试付款,不便之处,请见谅!", + "MSG.pay_credity1": "我们已收到你已确定申请编号: {appNo} 的稿件校对确定及可付印的指示,并将安排刊登于宪报期数{year} 年{issueVolume} 卷第{issueNo } 期内。", + "MSG.pay_credity2": "此公共启事申请的费用将于下期发出的缴费发票时收取,请依时缴费。", "registerTitle1": "立即成为", "registerTitle2": "宪报刊登公共启事", diff --git a/src/translations/zh-HK.json b/src/translations/zh-HK.json index b5b1661..71723b9 100644 --- a/src/translations/zh-HK.json +++ b/src/translations/zh-HK.json @@ -70,6 +70,8 @@ "MSG.plzSelectApp": "請選擇公共啟事。", "MSG.actionFail": "行動失敗", "MSG.paymentHolded": "申請編號 {appNo} 已正在付款的流程中,如相關付款沒有成功,請於20分鐘後再嘗試付款,不便之處,請見諒!", + "MSG.pay_credity1": "我們已收到你已確定申請編號: {appNo} 的稿件校對確定及可付印的指示,並將安排刊登於憲報 期數 {year} 年 {issueVolume} 卷 第 {issueNo} 期內。", + "MSG.pay_credity2": "此公共啟事申請的費用將於下期發出的繳費發票時收取,請依時繳費。", "registerTitle1": "立即成為", "registerTitle2": "憲報刊登公共啟事", From 58105eab3d9a7505634a3fe0bf4b4d3398c22bc9 Mon Sep 17 00:00:00 2001 From: anna Date: Fri, 22 Mar 2024 11:43:35 +0800 Subject: [PATCH 13/20] org combo --- .../DemandNote/Search_Public/SearchForm.js | 127 +++++++++--------- .../UserInformationCard_Organization.js | 12 +- .../User/DetailsPage_Organization/index.js | 6 + 3 files changed, 80 insertions(+), 65 deletions(-) diff --git a/src/pages/DemandNote/Search_Public/SearchForm.js b/src/pages/DemandNote/Search_Public/SearchForm.js index 0e36399..2d54619 100644 --- a/src/pages/DemandNote/Search_Public/SearchForm.js +++ b/src/pages/DemandNote/Search_Public/SearchForm.js @@ -12,37 +12,37 @@ import * as React from "react"; import * as ComboData from "utils/ComboData"; import * as DateUtils from "utils/DateUtils"; import * as FormatUtils from "utils/FormatUtils"; -import {FormattedMessage, useIntl} from "react-intl"; -import {PNSPS_BUTTON_THEME} from "../../../themes/buttonConst"; -import {ThemeProvider} from "@emotion/react"; +import { FormattedMessage, useIntl } from "react-intl"; +import { PNSPS_BUTTON_THEME } from "../../../themes/buttonConst"; +import { ThemeProvider } from "@emotion/react"; import { makeStyles } from '@mui/styles'; // ==============================|| DASHBOARD - DEFAULT ||============================== // const useStyles = makeStyles(() => ({ root: { - position: "relative" + position: "relative" }, display: { - position: "absolute", - top: 2, - left: 12, - bottom: 2, - background: "white", - pointerEvents: "none", - right: 50, - display: "flex", - alignItems: "center" + position: "absolute", + top: 2, + left: 12, + bottom: 2, + background: "white", + pointerEvents: "none", + right: 50, + display: "flex", + alignItems: "center" }, - })); +})); const SearchDemandNoteForm = ({ applySearch, searchCriteria, issueComboData }) => { const intl = useIntl(); const { locale } = intl; - + const [type, setType] = React.useState([]); - const [issueSelected, setIssueSelected] = React.useState({ key: 0, i18nLabel: 'all', labelCht: '全部', label: 'All', type: 'all' }); + const [issueSelected, setIssueSelected] = React.useState({ key: 0, i18nLabel: 'all', labelCht: '全部', label: 'All', type: 'all' }); const [issueCombo, setIssueCombo] = React.useState([]); const [selectedStatus, setSelectedStatus] = React.useState(ComboData.denmandNoteStatus_Public[0]); @@ -53,58 +53,58 @@ const SearchDemandNoteForm = ({ applySearch, searchCriteria, issueComboData React.useEffect(() => { console.log(minDate) - if (minDate != searchCriteria.dateFrom){ + if (minDate != searchCriteria.dateFrom) { setFromDateValue(minDate); } }, [minDate]); - + React.useEffect(() => { console.log(maxDate) - if (maxDate != searchCriteria.dateTo){ + if (maxDate != searchCriteria.dateTo) { setToDateValue(maxDate); } }, [maxDate]); - function FormDateInputComponent({inputRef, ...props }) { + function FormDateInputComponent({ inputRef, ...props }) { const classes = useStyles(); return ( <> -
- {DateUtils.dateStr(fromDateValue)=="Invalid Date"? - fromDateValue - : - DateUtils.dateStr(fromDateValue)} -
- +
+ {DateUtils.dateStr(fromDateValue) == "Invalid Date" ? + fromDateValue + : + DateUtils.dateStr(fromDateValue)} +
+ ); } - function ToDateInputComponent({inputRef, ...props }) { + function ToDateInputComponent({ inputRef, ...props }) { const classes = useStyles(); return ( <> -
- {DateUtils.dateStr(toDateValue)=="Invalid Date"? - toDateValue - : - DateUtils.dateStr(toDateValue)} -
- +
+ {DateUtils.dateStr(toDateValue) == "Invalid Date" ? + toDateValue + : + DateUtils.dateStr(toDateValue)} +
+ ); } @@ -119,7 +119,7 @@ const SearchDemandNoteForm = ({ applySearch, searchCriteria, issueComboData typeArray.push(type[i].label); } - if( fromDateValue!="dd / mm / yyyy"&&toDateValue!="dd / mm / yyyy"){ + if (fromDateValue != "dd / mm / yyyy" && toDateValue != "dd / mm / yyyy") { sentDateFrom = DateUtils.dateValue(fromDateValue) sentDateTo = DateUtils.dateValue(toDateValue) } @@ -188,7 +188,7 @@ const SearchDemandNoteForm = ({ applySearch, searchCriteria, issueComboData - + @@ -212,7 +212,7 @@ const SearchDemandNoteForm = ({ applySearch, searchCriteria, issueComboData }} renderInput={(params) => ( { @@ -284,7 +285,7 @@ const SearchDemandNoteForm = ({ applySearch, searchCriteria, issueComboData }} id="dateTo" type="date" - label={intl.formatMessage({id: 'sendDateTo'})} + label={intl.formatMessage({ id: 'sendDateTo' })} defaultValue={searchCriteria.dateTo} /> @@ -296,8 +297,8 @@ const SearchDemandNoteForm = ({ applySearch, searchCriteria, issueComboData id="status" size="small" options={ComboData.denmandNoteStatus_Public} - getOptionLabel={(option) => option?.i18nLabel? intl.formatMessage({ id: option.i18nLabel }) : ""} - inputValue={selectedStatus?.i18nLabel? intl.formatMessage({ id: selectedStatus.i18nLabel }) : ""} + getOptionLabel={(option) => option?.i18nLabel ? intl.formatMessage({ id: option.i18nLabel }) : ""} + inputValue={selectedStatus?.i18nLabel ? intl.formatMessage({ id: selectedStatus.i18nLabel }) : ""} value={selectedStatus} onChange={(event, newValue) => { if (newValue !== null) { @@ -307,7 +308,7 @@ const SearchDemandNoteForm = ({ applySearch, searchCriteria, issueComboData renderInput={(params) => ( )} InputLabelProps={{ @@ -323,13 +324,13 @@ const SearchDemandNoteForm = ({ applySearch, searchCriteria, issueComboData {/*last row*/} - + diff --git a/src/pages/User/DetailsPage_Organization/UserInformationCard_Organization.js b/src/pages/User/DetailsPage_Organization/UserInformationCard_Organization.js index cb67bbb..64565ef 100644 --- a/src/pages/User/DetailsPage_Organization/UserInformationCard_Organization.js +++ b/src/pages/User/DetailsPage_Organization/UserInformationCard_Organization.js @@ -98,7 +98,7 @@ const UserInformationCard_Organization = ({ userData, loadDataFun, orgData }) => contactPerson: values.contactPerson, // enCompanyName: values.enCompanyName, // chCompanyName: values.chCompanyName, - orgId: values.orgId, + orgId: values.orgId?.id, // brNo: values.brNo, // brExpiryDate: values.brExpiryDate, preferLocale: values.preferLocale.type @@ -303,6 +303,14 @@ const UserInformationCard_Organization = ({ userData, loadDataFun, orgData }) => {FieldUtils.getComboField({ + label: "Organisation:", + valueName: "orgId", + getOptionLabel: (option) => option.brNo? option.brNo : "", + dataList: orgData, + disabled: (!editMode), + form: formik + })} + {/* {FieldUtils.getComboField({ label: "Organisation:", valueName: "orgId", disabled: (!editMode), @@ -343,7 +351,7 @@ const UserInformationCard_Organization = ({ userData, loadDataFun, orgData }) => formik.setFieldValue("orgId", newValue.id); }, form: formik - })} + })} */} diff --git a/src/pages/User/DetailsPage_Organization/index.js b/src/pages/User/DetailsPage_Organization/index.js index 8bb1905..bca1c70 100644 --- a/src/pages/User/DetailsPage_Organization/index.js +++ b/src/pages/User/DetailsPage_Organization/index.js @@ -90,6 +90,12 @@ const UserMaintainPage_Organization = () => { loadData(); } }, []); + + useEffect(() => { + if (orgData.length > 0 && userData["orgId"] != null){ + userData["orgId"] = getObjectByType(orgData, "id", userData["orgId"]); + } + }, [orgData, userData]); useEffect(() => { // console.log(userData); From cf6a571203cc0fc4386e7e0b87d165f57a94e183 Mon Sep 17 00:00:00 2001 From: anna Date: Fri, 22 Mar 2024 11:53:19 +0800 Subject: [PATCH 14/20] update status margin --- src/utils/statusUtils/Base.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/statusUtils/Base.js b/src/utils/statusUtils/Base.js index 4ed3754..3b64235 100644 --- a/src/utils/statusUtils/Base.js +++ b/src/utils/statusUtils/Base.js @@ -2,7 +2,7 @@ import { Typography } from "@mui/material" export function getStatusTag({ color = "#000", textColor = "#FFF", text = "" }) { return ( -
+
{text} From 02c82e5d22acf7ce82e552428fb0a3a312b24799 Mon Sep 17 00:00:00 2001 From: Alex Cheung Date: Fri, 22 Mar 2024 12:31:52 +0800 Subject: [PATCH 15/20] change date search --- .../DemandNote/Search_Public/SearchForm.js | 5 +- src/pages/Payment/Search_Public/SearchForm.js | 106 ++++++++++++++++-- .../User/DetailsPage_Individual/index.js | 1 + .../User/DetailsPage_Organization/index.js | 1 + src/translations/zh-CN.json | 2 +- 5 files changed, 105 insertions(+), 10 deletions(-) diff --git a/src/pages/DemandNote/Search_Public/SearchForm.js b/src/pages/DemandNote/Search_Public/SearchForm.js index 0e36399..a23b68b 100644 --- a/src/pages/DemandNote/Search_Public/SearchForm.js +++ b/src/pages/DemandNote/Search_Public/SearchForm.js @@ -132,7 +132,7 @@ const SearchDemandNoteForm = ({ applySearch, searchCriteria, issueComboData sentDateTo: sentDateTo, status: (selectedStatus?.type && selectedStatus?.type != 'all') ? selectedStatus?.type : "", }; - console.log(temp) + // console.log(temp) applySearch(temp); }; @@ -276,7 +276,8 @@ const SearchDemandNoteForm = ({ applySearch, searchCriteria, issueComboData shrink: true }} {...register("dateTo")} - InputProps={{ inputComponent: ToDateInputComponent, + InputProps={{ + inputComponent: ToDateInputComponent, inputProps: { min: minDate } }} onChange={(newValue) => { diff --git a/src/pages/Payment/Search_Public/SearchForm.js b/src/pages/Payment/Search_Public/SearchForm.js index 0b2e114..67b2c1e 100644 --- a/src/pages/Payment/Search_Public/SearchForm.js +++ b/src/pages/Payment/Search_Public/SearchForm.js @@ -14,8 +14,24 @@ import * as ComboData from "utils/ComboData"; import {PNSPS_BUTTON_THEME} from "../../../themes/buttonConst"; import {ThemeProvider} from "@emotion/react"; import {FormattedMessage, useIntl} from "react-intl"; +import { makeStyles } from '@mui/styles'; // ==============================|| DASHBOARD - DEFAULT ||============================== // - +const useStyles = makeStyles(() => ({ + root: { + position: "relative" + }, + display: { + position: "absolute", + top: 2, + left: 12, + bottom: 2, + background: "white", + pointerEvents: "none", + right: 50, + display: "flex", + alignItems: "center" + }, + })); const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { const intl = useIntl(); @@ -23,6 +39,68 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { const [maxDate, setMaxDate] = React.useState(searchCriteria.dateTo); const [status, setStatus] = React.useState(ComboData.paymentStatus[0]); + const [fromDateValue, setFromDateValue] = React.useState("dd / mm / yyyy"); + const [toDateValue, setToDateValue] = React.useState("dd / mm / yyyy"); + + React.useEffect(() => { + // console.log(minDate) + const dateFrom = DateUtils.dateValue(new Date().setDate(new Date().getDate()-14)) + if (minDate != dateFrom){ + setFromDateValue(minDate); + } + }, [minDate]); + + React.useEffect(() => { + const dateTo = DateUtils.dateValue(new Date()) + if (maxDate != dateTo){ + setToDateValue(maxDate); + } + }, [maxDate]); + + function FormDateInputComponent({inputRef, ...props }) { + const classes = useStyles(); + return ( + <> +
+ {DateUtils.dateStr(fromDateValue)=="Invalid Date"? + fromDateValue + : + DateUtils.dateStr(fromDateValue)} +
+ + + ); + } + + function ToDateInputComponent({inputRef, ...props }) { + const classes = useStyles(); + return ( + <> +
+ {DateUtils.dateStr(toDateValue)=="Invalid Date"? + toDateValue + : + DateUtils.dateStr(toDateValue)} +
+ + + ); + } + const _sx = { padding: "4 2 4 2", boxShadow: 1, @@ -42,17 +120,27 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { const { reset, register, handleSubmit } = useForm() const onSubmit = (data) => { + let sentDateFrom = ""; + let sentDateTo = ""; + if( fromDateValue!="dd / mm / yyyy"&&toDateValue!="dd / mm / yyyy"){ + sentDateFrom = DateUtils.dateValue(fromDateValue) + sentDateTo = DateUtils.dateValue(toDateValue) + } const temp = { code: data.code, transNo: data.transNo, - dateFrom: data.dateFrom, - dateTo: data.dateTo, + dateFrom: sentDateFrom, + dateTo: sentDateTo, status : (status?.type && status?.type != 'all') ? status?.type : "", }; applySearch(temp); }; function resetForm() { + setMinDate(DateUtils.dateValue(new Date().setDate(new Date().getDate()-14))) + setMaxDate(DateUtils.dateValue(new Date())) + setFromDateValue("dd / mm / yyyy") + setToDateValue("dd / mm / yyyy") reset(); } @@ -100,9 +188,11 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { type="date" label={intl.formatMessage({id: 'payDateFrom'})} defaultValue={searchCriteria.dateFrom} - InputProps={{ inputProps: { max: maxDate } }} + InputProps={{ + inputComponent: FormDateInputComponent, + }} onChange={(newValue) => { - setMinDate(DateUtils.dateValue(newValue)); + setMinDate(newValue.target.value); }} InputLabelProps={{ shrink: true @@ -117,9 +207,11 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { shrink: true }} {...register("dateTo")} - InputProps={{ inputProps: { min: minDate } }} + InputProps={{ + inputComponent: ToDateInputComponent, + }} onChange={(newValue) => { - setMaxDate(DateUtils.dateValue(newValue)); + setMaxDate(newValue.target.value); }} id="dateTo" type="date" diff --git a/src/pages/User/DetailsPage_Individual/index.js b/src/pages/User/DetailsPage_Individual/index.js index 1a58ad0..4ab8500 100644 --- a/src/pages/User/DetailsPage_Individual/index.js +++ b/src/pages/User/DetailsPage_Individual/index.js @@ -118,6 +118,7 @@ const UserMaintainPage_Individual = () => { response.data["preferLocale"] = getObjectByType(ComboData.Locale, "type", response.data?.preferLocale); // console.log(response.data) setFormData(response.data); + setLoding(false); } }); } diff --git a/src/pages/User/DetailsPage_Organization/index.js b/src/pages/User/DetailsPage_Organization/index.js index 8bb1905..313c0e7 100644 --- a/src/pages/User/DetailsPage_Organization/index.js +++ b/src/pages/User/DetailsPage_Organization/index.js @@ -177,6 +177,7 @@ const UserMaintainPage_Organization = () => { //response.data["orgId"] = response.data.brExpiryDate?DateUtils.dateValue(response.data.brExpiryDate):""; setUserData(response.data); setOrgData(response.orgList); + setLoding(false); // console.log(response.data) } }); diff --git a/src/translations/zh-CN.json b/src/translations/zh-CN.json index e18389c..53c6ff0 100644 --- a/src/translations/zh-CN.json +++ b/src/translations/zh-CN.json @@ -2,7 +2,7 @@ "en": "English", "zh-HK": "繁體中文", "zh-CN": "简体中文", - "language":"語言", + "language":"语言", "PNSPS": "公共启事提交及缴费系统", "HKSARGOV": "香港特别行政区政府", From 431224b7d5247f9df24cbbdbab2033bb7d20bd79 Mon Sep 17 00:00:00 2001 From: anna Date: Fri, 22 Mar 2024 12:38:07 +0800 Subject: [PATCH 16/20] 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