diff --git a/src/layout/MainLayout/Header/index.js b/src/layout/MainLayout/Header/index.js index 0500d58..847564e 100644 --- a/src/layout/MainLayout/Header/index.js +++ b/src/layout/MainLayout/Header/index.js @@ -95,10 +95,10 @@ function Header(props) { Users (Individual)
  • - Users (Organization) + Users (Organisation)
  • - Organization + Organisation
  • User Group diff --git a/src/pages/OrganizationDetailPage/OrganizationCard.js b/src/pages/OrganizationDetailPage/OrganizationCard.js index 2d4af82..7dcf8b1 100644 --- a/src/pages/OrganizationDetailPage/OrganizationCard.js +++ b/src/pages/OrganizationDetailPage/OrganizationCard.js @@ -201,7 +201,7 @@ const OrganizationCard = ({ userData, loadDataFun, id }) => { - Organization Details + Organisation Details diff --git a/src/pages/OrganizationDetailPage/index.js b/src/pages/OrganizationDetailPage/index.js index a617e79..8be47cf 100644 --- a/src/pages/OrganizationDetailPage/index.js +++ b/src/pages/OrganizationDetailPage/index.js @@ -77,7 +77,7 @@ const OrganizationDetailPage = () => {
    - Maintain Organization + Maintain Organisation
    diff --git a/src/pages/OrganizationDetailPage_FromUser/index.js b/src/pages/OrganizationDetailPage_FromUser/index.js index a7784f3..57f3bd5 100644 --- a/src/pages/OrganizationDetailPage_FromUser/index.js +++ b/src/pages/OrganizationDetailPage_FromUser/index.js @@ -66,7 +66,7 @@ const OrganizationDetailPage_FromUser = () => { : - Organization (Create From User) + Organisation (Create From User) {/*col 1*/} diff --git a/src/pages/OrganizationSearchPage/index.js b/src/pages/OrganizationSearchPage/index.js index eb1a25b..3995a76 100644 --- a/src/pages/OrganizationSearchPage/index.js +++ b/src/pages/OrganizationSearchPage/index.js @@ -70,7 +70,7 @@ const OrganizationSearchPage = () => {
    - View Organization + View Organisation
    diff --git a/src/pages/Proof/Payment/Pay.js b/src/pages/Proof/Payment/Pay.js index defd2f2..03da615 100644 --- a/src/pages/Proof/Payment/Pay.js +++ b/src/pages/Proof/Payment/Pay.js @@ -77,15 +77,15 @@ const Index = () => {
    - 公共啟事:交對完成及付款 + 公共啟事:校對完成及付款 - 我們已收到申請編號: {record?.appNo} 的稿件交對確定及可付印的指示。 + 我們已收到申請編號: {record?.appNo} 的稿件校對確定及可付印的指示。

    請於 {DateUtils.dateStr_Cht(record?.returnBeforeDate)} 下午 2:00 前 完成繳費,我們將於收到繳費確認後處理刊出事宜。

    - 如你在憲報期數 {record?.issueYear} 年 {record?.issueVolume} 卷, 第 {record?.issueNo} 期內有多於一個公共啟事的申請,你可選擇完成所有此期所有稿件交對確定後,於繳費期限前在「我的公共啟事」內合併付款。 + 如你在憲報期數 {record?.issueYear} 年 {record?.issueVolume} 卷, 第 {record?.issueNo} 期內有多於一個公共啟事的申請,你可選擇完成所有此期所有稿件校對確定後,於繳費期限前在「我的公共啟事」內合併付款。
    diff --git a/src/pages/Proof/Reply_Public/ApplicationDetails.js b/src/pages/Proof/Reply_Public/ApplicationDetails.js index ed7a89d..7ffa56c 100644 --- a/src/pages/Proof/Reply_Public/ApplicationDetails.js +++ b/src/pages/Proof/Reply_Public/ApplicationDetails.js @@ -166,7 +166,7 @@ const ApplicationDetailCard = ({ formData, }) => { - 我的備注: + 我的備註: diff --git a/src/pages/Proof/Search_GLD/SearchForm.js b/src/pages/Proof/Search_GLD/SearchForm.js index b953ae1..4bbb7b6 100644 --- a/src/pages/Proof/Search_GLD/SearchForm.js +++ b/src/pages/Proof/Search_GLD/SearchForm.js @@ -264,7 +264,7 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss }} renderInput={(params) => ( { setIsWarningPopUp(true); return; } - // console.log(values); HttpUtils.postWithFiles({ url: UrlUtils.POST_PUBLIC_NOTICE_APPLY, params: { @@ -120,7 +119,7 @@ const PublicNoticeApplyForm = ({ loadedData, selections }) => { return ( - +
    @@ -128,6 +127,11 @@ const PublicNoticeApplyForm = ({ loadedData, selections }) => {
    + + + {/* 申請公共啟事 */} @@ -169,7 +173,7 @@ const PublicNoticeApplyForm = ({ loadedData, selections }) => { - 目標期數: + 目標期數: { id="issueId" name="issueId" defaultValue={issueId} - onChange={(event)=>{ + onChange={(event) => { setIssueId(event.target.value); }} > @@ -188,11 +192,12 @@ const PublicNoticeApplyForm = ({ loadedData, selections }) => {
    + - 稿件檔案 ({"檔案大小應<10MB"}): + 稿件檔案 ({"檔案大小應<10MB"}): { size="large" >{attachment ? "上傳檔案" : "重新上傳"} - + {FieldUtils.getTextArea({ label: "備註:", diff --git a/src/pages/PublicNotice/ApplyForm/index.js b/src/pages/PublicNotice/ApplyForm/index.js index f43a626..af41ca4 100644 --- a/src/pages/PublicNotice/ApplyForm/index.js +++ b/src/pages/PublicNotice/ApplyForm/index.js @@ -7,7 +7,7 @@ import * as FormatUtils from "utils/FormatUtils"; import { Radio, - FormControlLabel + FormControlLabel } from '@mui/material'; import Loadable from 'components/Loadable'; @@ -19,24 +19,25 @@ const PublicNoticeApplyForm = Loadable(lazy(() => import('./PublicNoticeApplyFor // ==============================|| DASHBOARD - DEFAULT ||============================== // const ApplyForm = () => { - const [userData, setUserData] = React.useState([]); - const [selections, setSelection] = React.useState([]); + const [userData, setUserData] = React.useState(null); + const [selections, setSelection] = React.useState([]); const [isLoading, setLoding] = React.useState(true); - React.useEffect(()=>{ + React.useEffect(() => { loadUserData(); - },[]); + }, []); - const loadUserData = ()=>{ + const loadUserData = () => { setLoding(true); HttpUtils.get({ url: `${UrlUtils.GET_PUBLIC_NOTICE_getApplyUser}`, - onSuccess: function(response){ + onSuccess: function (response) { response["tel_countryCode"] = response?.contactTelNo?.countryCode; response["phoneNumber"] = response?.contactTelNo?.phoneNumber; response["fax_countryCode"] = response?.contactFaxNo?.countryCode; response["faxNumber"] = response?.contactFaxNo?.faxNumber; response["issueId"] = response?.gazetteIssueList[0].id; + response["remarks"] = ""; var selection = []; for (var i = 0; i < response?.gazetteIssueList?.length; i++) { @@ -45,26 +46,25 @@ const ApplyForm = () => { selection.push(} label={label} />); } setSelection(selection); - setUserData(response); } }); }; - function getIssueLabel(data){ - return data.year - +" Vol. "+FormatUtils.zeroPad(data.volume,3) - +", No. "+FormatUtils.zeroPad(data.issueNo,2) - +", "+DateUtils.dateFormat(data.issueDate, "D MMM YYYY (ddd)"); + function getIssueLabel(data) { + return data.year + + " Vol. " + FormatUtils.zeroPad(data.volume, 3) + + ", No. " + FormatUtils.zeroPad(data.issueNo, 2) + + ", " + DateUtils.dateFormat(data.issueDate, "D MMM YYYY (ddd)"); } React.useEffect(() => { - setLoding(false); + if (userData !== null) setLoding(false); }, [userData]); return ( isLoading ? - + : {setIsPopUp(true)}} + onClick={() => { setIsPopUp(true) }} disabled={currentApplicationDetailData.status == "rejected" || currentApplicationDetailData.status == "cancelled" || currentApplicationDetailData.status == "paid"} sx={{ textTransform: 'capitalize', @@ -191,20 +191,31 @@ const ApplicationDetailCard = ( 申請狀態: - + {StatusUtils.getStatusByText(currentApplicationDetailData.status)} - - - - - {currentApplicationDetailData.reason} - - - - + { + currentApplicationDetailData.reason ? + + + + + 原因: + + + + + {currentApplicationDetailData.reason} + + + + + + + : "" + }
    @@ -506,29 +517,29 @@ const ApplicationDetailCard = ( 備註:
    - {currentApplicationDetailData.remarks} + {currentApplicationDetailData.remarks}
    - setIsPopUp(false)} > - - 確認付款 - - - 總計金額: {FormatUtils.currencyFormat(fee)} - - - - - - - -
    + setIsPopUp(false)} > + + 確認付款 + + + 總計金額: {FormatUtils.currencyFormat(fee)} + + + + + + + + - + ); }; diff --git a/src/pages/PublicNotice/ListPanel/SearchPublicNoticeForm.js b/src/pages/PublicNotice/ListPanel/SearchPublicNoticeForm.js index d51819e..fe500a1 100644 --- a/src/pages/PublicNotice/ListPanel/SearchPublicNoticeForm.js +++ b/src/pages/PublicNotice/ListPanel/SearchPublicNoticeForm.js @@ -44,7 +44,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(); } diff --git a/src/pages/PublicNotice/ListPanel/SearchPublicNoticeTable.js b/src/pages/PublicNotice/ListPanel/SearchPublicNoticeTable.js index 4235186..d6aac1f 100644 --- a/src/pages/PublicNotice/ListPanel/SearchPublicNoticeTable.js +++ b/src/pages/PublicNotice/ListPanel/SearchPublicNoticeTable.js @@ -73,7 +73,7 @@ export default function SearchPublicNoticeTable({ recordList }) { id: 'status', field: 'status', headerName: '狀態', - width: 100, + width: 160, renderCell: (params) => { return [StatusUtils.getStatus(params)] }, @@ -82,7 +82,7 @@ export default function SearchPublicNoticeTable({ recordList }) { field: 'actions', type: 'actions', headerName: '', - width: 100, + width: 150, cellClassName: 'actions', renderCell: (params) => { return ; @@ -95,8 +95,7 @@ export default function SearchPublicNoticeTable({ recordList }) { } return ( -
    - +
    'auto'} />
    ); diff --git a/src/pages/PublicNotice/Search_GLD/SearchForm.js b/src/pages/PublicNotice/Search_GLD/SearchForm.js index 27cc414..2d4292b 100644 --- a/src/pages/PublicNotice/Search_GLD/SearchForm.js +++ b/src/pages/PublicNotice/Search_GLD/SearchForm.js @@ -236,7 +236,7 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss }} renderInput={(params) => ( } }); } else { - setWarningText("Please select Organization before active this account.") + setWarningText("Please select Organisation before active this account.") setIsWarningPopUp(true); } @@ -235,7 +235,7 @@ const UserInformationCard_Organization = ({ userData, loadDataFun, orgData }) => {/*end top button*/}
    - Organization User Details + Organisation User Details @@ -297,7 +297,7 @@ const UserInformationCard_Organization = ({ userData, loadDataFun, orgData }) => {FieldUtils.getComboField({ - label: "Organization:", + label: "Organisation:", valueName: "orgId", disabled: (!editMode), dataList: orgData, @@ -466,7 +466,7 @@ const UserInformationCard_Organization = ({ userData, loadDataFun, orgData }) => : null @@ -475,7 +475,7 @@ const UserInformationCard_Organization = ({ userData, loadDataFun, orgData }) => - Organization + Organisation diff --git a/src/pages/User/DetailsPage_Organization/index.js b/src/pages/User/DetailsPage_Organization/index.js index df96f6a..0b124a8 100644 --- a/src/pages/User/DetailsPage_Organization/index.js +++ b/src/pages/User/DetailsPage_Organization/index.js @@ -133,7 +133,7 @@ const UserMaintainPage_Organization = () => {
    - Maintain Organization User + Maintain Organisation User
    diff --git a/src/pages/User/SearchPage_Organization/index.js b/src/pages/User/SearchPage_Organization/index.js index 7200ad8..98f9553 100644 --- a/src/pages/User/SearchPage_Organization/index.js +++ b/src/pages/User/SearchPage_Organization/index.js @@ -72,7 +72,7 @@ const UserSearchPage_Organization = () => {
    - View Organization User + View Organisation User
    diff --git a/src/pages/authentication/auth-forms/CustomFormWizard.js b/src/pages/authentication/auth-forms/CustomFormWizard.js index 143e700..00b061a 100644 --- a/src/pages/authentication/auth-forms/CustomFormWizard.js +++ b/src/pages/authentication/auth-forms/CustomFormWizard.js @@ -1685,7 +1685,7 @@ const CustomFormWizard = (props) => { 帳戶申請已成功提交。 - 驗證電郵將發送到你的電郵地址,請要指示完成驗證及登入系統。 + 驗證電郵將發送到你的電郵地址,請依指示完成驗證及登入系統。 : diff --git a/src/pages/authentication/auth-forms/PreviewUploadFileTable.js b/src/pages/authentication/auth-forms/PreviewUploadFileTable.js index 779a7b6..4a48bb9 100644 --- a/src/pages/authentication/auth-forms/PreviewUploadFileTable.js +++ b/src/pages/authentication/auth-forms/PreviewUploadFileTable.js @@ -104,6 +104,7 @@ export default function PreviewUploadFileTable({ recordList, }) { disableColumnMenu disableColumnSelector hideFooter + getRowHeight={()=>"auto"} /> ); diff --git a/src/pages/authentication/auth-forms/UploadFileTable.js b/src/pages/authentication/auth-forms/UploadFileTable.js index 2b295e2..cecc645 100644 --- a/src/pages/authentication/auth-forms/UploadFileTable.js +++ b/src/pages/authentication/auth-forms/UploadFileTable.js @@ -106,6 +106,7 @@ export default function UploadFileTable({ recordList, setUpdateRows, }) { disableColumnMenu disableColumnSelector hideFooter + getRowHeight={()=>"auto"} /> ); diff --git a/src/utils/CommonFunction.js b/src/utils/CommonFunction.js index aef31ea..4ac4443 100644 --- a/src/utils/CommonFunction.js +++ b/src/utils/CommonFunction.js @@ -3,27 +3,27 @@ import DialogTitle from "@mui/material/DialogTitle"; import DialogContent from "@mui/material/DialogContent"; import DialogContentText from "@mui/material/DialogContentText"; import DialogActions from "@mui/material/DialogActions"; -import {Button} from "@mui/material"; +import { Button } from "@mui/material"; import Dialog from "@mui/material/Dialog"; import * as React from "react"; import { toast } from "react-toastify"; -export function getDeletedRecordWithRefList(referenceList, updatedList){ - return referenceList.filter(x => !updatedList.includes(x)) ; +export function getDeletedRecordWithRefList(referenceList, updatedList) { + return referenceList.filter(x => !updatedList.includes(x)); } -export function getIdList(input){ +export function getIdList(input) { const output = input.map(function (obj) { return obj.id; }); return output; } -export function getObjectById(list, id){ +export function getObjectById(list, id) { const obj = list.find((element) => { return element.id === id; }); - return obj === undefined || Object.keys(obj).length <= 0? null : obj + return obj === undefined || Object.keys(obj).length <= 0 ? null : obj } export function removeObjectWithId(arr, id) { @@ -34,7 +34,7 @@ export function removeObjectWithId(arr, id) { } export function getDateString(queryDateArray) { - return( + return ( queryDateArray[0] + "-" + queryDateArray[1] @@ -60,7 +60,8 @@ export const notifySaveSuccess = () => { draggable: true, progress: undefined, theme: "light", -})}; + }) +}; export const notifyCreateSuccess = () => { const userType = JSON.parse(localStorage.getItem("userData")).type @@ -73,108 +74,130 @@ export const notifyCreateSuccess = () => { draggable: true, progress: undefined, theme: "light", -})}; + }) +}; export const notifyVerifySuccess = () => { const userType = JSON.parse(localStorage.getItem("userData")).type toast.success(userType === "GLD" ? 'Verify success!' : "驗證成功!", { - position: "bottom-right", - autoClose: 5000, - hideProgressBar: false, - closeOnClick: true, - pauseOnHover: true, - draggable: true, - progress: undefined, - theme: "light", -})}; + position: "bottom-right", + autoClose: 5000, + hideProgressBar: false, + closeOnClick: true, + pauseOnHover: true, + draggable: true, + progress: undefined, + theme: "light", + }) +}; export const notifyDeleteSuccess = () => { const userType = JSON.parse(localStorage.getItem("userData")).type toast.success(userType === "GLD" ? 'Delete success!' : "刪除成功!", { - position: "bottom-right", - autoClose: 5000, - hideProgressBar: false, - closeOnClick: true, - pauseOnHover: true, - draggable: true, - progress: undefined, - theme: "light", -})}; + position: "bottom-right", + autoClose: 5000, + hideProgressBar: false, + closeOnClick: true, + pauseOnHover: true, + draggable: true, + progress: undefined, + theme: "light", + }) +}; export const notifyLockSuccess = () => { toast.success('Lock success!', { - position: "bottom-right", - autoClose: 5000, - hideProgressBar: false, - closeOnClick: true, - pauseOnHover: true, - draggable: true, - progress: undefined, - theme: "light", -})}; + position: "bottom-right", + autoClose: 5000, + hideProgressBar: false, + closeOnClick: true, + pauseOnHover: true, + draggable: true, + progress: undefined, + theme: "light", + }) +}; export const notifyUnlockSuccess = () => { toast.success('Unlock success!', { - position: "bottom-right", - autoClose: 5000, - hideProgressBar: false, - closeOnClick: true, - pauseOnHover: true, - draggable: true, - progress: undefined, - theme: "light", -})}; + position: "bottom-right", + autoClose: 5000, + hideProgressBar: false, + closeOnClick: true, + pauseOnHover: true, + draggable: true, + progress: undefined, + theme: "light", + }) +}; export const notifyActiveSuccess = () => { toast.success('Active success!', { - position: "bottom-right", - autoClose: 5000, - hideProgressBar: false, - closeOnClick: true, - pauseOnHover: true, - draggable: true, - progress: undefined, - theme: "light", -})}; + position: "bottom-right", + autoClose: 5000, + hideProgressBar: false, + closeOnClick: true, + pauseOnHover: true, + draggable: true, + progress: undefined, + theme: "light", + }) +}; export const notifyDownloadSuccess = () => { const userType = JSON.parse(localStorage.getItem("userData")).type toast.success(userType === "GLD" ? 'Download success!' : "下載成功!", { - position: "bottom-right", - autoClose: 5000, - hideProgressBar: false, - closeOnClick: true, - pauseOnHover: true, - draggable: true, - progress: undefined, - theme: "light", -})}; + position: "bottom-right", + autoClose: 5000, + hideProgressBar: false, + closeOnClick: true, + pauseOnHover: true, + draggable: true, + progress: undefined, + theme: "light", + }) +}; export const notifyActionSuccess = (actionMsg) => { toast.success(`${actionMsg}`, { - position: "bottom-right", - autoClose: 5000, - hideProgressBar: false, - closeOnClick: true, - pauseOnHover: true, - draggable: true, - progress: undefined, - theme: "light", -})}; + position: "bottom-right", + autoClose: 5000, + hideProgressBar: false, + closeOnClick: true, + pauseOnHover: true, + draggable: true, + progress: undefined, + theme: "light", + }) +}; export const notifyActionError = (actionMsg) => { toast.error(`${actionMsg}`, { - position: "bottom-right", - autoClose: 5000, - hideProgressBar: false, - closeOnClick: true, - pauseOnHover: true, - draggable: true, - progress: undefined, - theme: "light", -})}; - -export function prettyJson(json){ + position: "bottom-right", + autoClose: 5000, + hideProgressBar: false, + closeOnClick: true, + pauseOnHover: true, + draggable: true, + progress: undefined, + theme: "light", + }) +}; + +export const notifyActionWarning = (actionMsg) => { + toast.warn(`${actionMsg}`, { + position: "bottom-right", + autoClose: 5000, + hideProgressBar: false, + closeOnClick: true, + pauseOnHover: true, + draggable: true, + progress: undefined, + theme: "light", + }) +} + +export function prettyJson(json) { console.log(json); console.log(JSON.stringify(json, null, 2)); return ( @@ -183,11 +206,11 @@ export function prettyJson(json){ } export function GeneralConfirmWindow({ - isWindowOpen, - title, - content, - onNormalClose, - onConfirmClose}){ + isWindowOpen, + title, + content, + onNormalClose, + onConfirmClose }) { return ( { - form.handleChange = (event) => { - const value = event.target.value; - const name = event.target.name; - if (value.match(/[^0-9]/)) { - return event.preventDefault(); - } - if (valueName.code === name) form.setFieldValue(valueName.code, value) - if (valueName.num === name) form.setFieldValue(valueName.num, value) - } + return @@ -88,13 +80,31 @@ export const getPhoneField = ({ label, valueName, form, disabled }) => { valueName: valueName.code, form: form, disabled: disabled, - width: '35%' + width: '35%', + handleChange: (event) => { + const value = event.target.value; + const name = event.target.name; + if (value.match(/[^0-9]/)) { + return event.preventDefault(); + } + if (valueName.code === name) form.setFieldValue(valueName.code, value) + if (valueName.num === name) form.setFieldValue(valueName.num, value) + } })} {initField({ type: "tel", valueName: valueName.num, form: form, - disabled: disabled + disabled: disabled, + handleChange: (event) => { + const value = event.target.value; + const name = event.target.name; + if (value.match(/[^0-9]/)) { + return event.preventDefault(); + } + if (valueName.code === name) form.setFieldValue(valueName.code, value) + if (valueName.num === name) form.setFieldValue(valueName.num, value) + } })} @@ -160,7 +170,7 @@ export const getComboField = ({ label, dataList, valueName, form, disabled, getO ; } -export const initField = ({ type, valueName, form, disabled, multiline, placeholder, inputProps, width, ...props }) => { +export const initField = ({ type, valueName, form, disabled, multiline, handleChange, placeholder, inputProps, width, ...props }) => { let err = Boolean(form.errors[valueName]); return