diff --git a/src/components/FiDataGrid.js b/src/components/FiDataGrid.js
index 76a4ee2..761b5ec 100644
--- a/src/components/FiDataGrid.js
+++ b/src/components/FiDataGrid.js
@@ -1,8 +1,10 @@
// material-ui
import * as React from 'react';
import {
- DataGrid,
+ DataGrid, GridOverlay,
} from "@mui/x-data-grid";
+import {FormattedMessage, useIntl} from "react-intl";
+import {Typography} from '@mui/material';
// ==============================|| EVENT TABLE ||============================== //
@@ -10,6 +12,7 @@ export function FiDataGrid({ rows, columns, sx, autoHeight,
hideFooterSelectedRowCount, rowModesModel, editMode,
pageSizeOptions, filterItems,
...props }) {
+ const intl = useIntl();
const [_rows, set_rows] = React.useState([]);
const [_columns, set_columns] = React.useState([]);
const [_rowModesModel, set_rowModesModel] = React.useState({});
@@ -116,12 +119,38 @@ export function FiDataGrid({ rows, columns, sx, autoHeight,
set_filterItems(filterItems);
}
}, [filterItems]);
-
+
+ function CustomNoRowsOverlay() {
+ return (
+
+
+
+
+
+ );
+ }
+
+ const CustomPagination = (props) => {
+ const { pagination } = props;
+ const { page, pageSize, rowCount } = pagination;
+
+ const startIndex = page * pageSize + 1;
+ const endIndex = Math.min((page + 1) * pageSize, rowCount);
+
+ return (
+
+
{`${startIndex}-${endIndex} YES ${rowCount}`}
+ {/* Render other pagination controls */}
+
+ );
+ };
+
return (
(
+ CustomNoRowsOverlay()
+ )
+ }}
+ components={{
+ Pagination: CustomPagination,
+ }}
+ componentsProps={{
+ pagination: {
+ labelRowsPerPage: intl.formatMessage({id: 'rowsPerPage'}),
+ }
+ }}
/>
);
}
diff --git a/src/pages/Organization/DetailPage/OrganizationCard.js b/src/pages/Organization/DetailPage/OrganizationCard.js
index 982600e..d7f511d 100644
--- a/src/pages/Organization/DetailPage/OrganizationCard.js
+++ b/src/pages/Organization/DetailPage/OrganizationCard.js
@@ -17,7 +17,7 @@ const LoadingComponent = Loadable(lazy(() => import('../../extra-pages/LoadingCo
import Loadable from 'components/Loadable';
import { lazy } from 'react';
import { notifySaveSuccess } from 'utils/CommonFunction';
-import {useIntl} from "react-intl";
+import { useIntl } from "react-intl";
// ==============================|| DASHBOARD - DEFAULT ||============================== //
@@ -48,17 +48,17 @@ const OrganizationCard = ({ userData, loadDataFun, id, setEditModeFun }) => {
enableReinitialize: true,
initialValues: currentUserData,
validationSchema: yup.object().shape({
- enCompanyName: yup.string().max(255).required(displayErrorMsg(intl.formatMessage({id: 'userRequireEnglishName'}))),
- chCompanyName: yup.string().max(255, displayErrorMsg(intl.formatMessage({id: 'userRequireChineseName'}))).nullable(),
- addressLine1: yup.string().max(255).required(displayErrorMsg(intl.formatMessage({id: 'validateAddressLine1'}))),
- addressLine2: yup.string().max(255, displayErrorMsg(intl.formatMessage({id: 'noMoreThen255Words'}))),
- addressLine3: yup.string().max(255, displayErrorMsg(intl.formatMessage({id: 'noMoreThen255Words'}))),
- fax_countryCode: yup.string().min(3, displayErrorMsg(intl.formatMessage({id: 'requireDialingCode'}))).nullable(),
- tel_countryCode: yup.string().min(3, displayErrorMsg(intl.formatMessage({id: 'requireDialingCode'}))),
- phoneNumber: yup.string().min(8, displayErrorMsg(intl.formatMessage({id: 'requiredValidNumber'}))).required(displayErrorMsg(intl.formatMessage({id: 'requireContactNumber'}))),
- faxNumber: yup.string().min(8, displayErrorMsg(intl.formatMessage({id: 'require8Number'}))).nullable(),
- brExpiryDate: yup.string().min(8).required(displayErrorMsg(intl.formatMessage({id: 'pleaseFillInBusinessRegCertValidityDate'}))),
- brNo: yup.string().required(displayErrorMsg(intl.formatMessage({id: 'pleaseFillInBusinessRegCertNumber'}))).test('checkBrNoFormat', displayErrorMsg(displayErrorMsg(intl.formatMessage({id: 'pleaseFillInValidBusinessRegCertNumber'}))), function (value) {
+ enCompanyName: yup.string().max(255).required(displayErrorMsg(intl.formatMessage({ id: 'userRequireEnglishName' }))),
+ chCompanyName: yup.string().max(255, displayErrorMsg(intl.formatMessage({ id: 'userRequireChineseName' }))).nullable(),
+ addressLine1: yup.string().max(255).required(displayErrorMsg(intl.formatMessage({ id: 'validateAddressLine1' }))),
+ addressLine2: yup.string().max(255, displayErrorMsg(intl.formatMessage({ id: 'noMoreThen255Words' }))),
+ addressLine3: yup.string().max(255, displayErrorMsg(intl.formatMessage({ id: 'noMoreThen255Words' }))),
+ fax_countryCode: yup.string().min(3, displayErrorMsg(intl.formatMessage({ id: 'requireDialingCode' }))).nullable(),
+ tel_countryCode: yup.string().min(3, displayErrorMsg(intl.formatMessage({ id: 'requireDialingCode' }))),
+ phoneNumber: yup.string().min(8, displayErrorMsg(intl.formatMessage({ id: 'requiredValidNumber' }))).required(displayErrorMsg(intl.formatMessage({ id: 'requireContactNumber' }))),
+ faxNumber: yup.string().min(8, displayErrorMsg(intl.formatMessage({ id: 'require8Number' }))).nullable(),
+ brExpiryDate: yup.string().min(8).required(displayErrorMsg(intl.formatMessage({ id: 'pleaseFillInBusinessRegCertValidityDate' }))),
+ brNo: yup.string().required(displayErrorMsg(intl.formatMessage({ id: 'pleaseFillInBusinessRegCertNumber' }))).test('checkBrNoFormat', displayErrorMsg(displayErrorMsg(intl.formatMessage({ id: 'pleaseFillInValidBusinessRegCertNumber' }))), function (value) {
var brNo_pattern = /[0-9]{8}/
if (value !== undefined) {
if (value.match(brNo_pattern)) {
@@ -109,9 +109,9 @@ const OrganizationCard = ({ userData, loadDataFun, id, setEditModeFun }) => {
}
});
- useEffect(()=>{
+ useEffect(() => {
setEditModeFun(editMode);
- },[editMode]);
+ }, [editMode]);
useEffect(() => {
if (Object.keys(userData).length > 0) {
@@ -230,34 +230,39 @@ const OrganizationCard = ({ userData, loadDataFun, id, setEditModeFun }) => {
Edit
-
-
-
-
-
-
+
+ {
+ currentUserData.creditor ?
+
+
+
+ :
+
+
+
+ }
>
}
@@ -363,7 +368,7 @@ const OrganizationCard = ({ userData, loadDataFun, id, setEditModeFun }) => {
valueName: "country",
disabled: (!editMode && !createMode),
dataList: ComboData.country,
- getOptionLabel: (option) => option.type? intl.formatMessage({ id: option.type }) : "",
+ getOptionLabel: (option) => option.type ? intl.formatMessage({ id: option.type }) : "",
form: formik
})}
@@ -374,7 +379,7 @@ const OrganizationCard = ({ userData, loadDataFun, id, setEditModeFun }) => {
valueName: "district",
disabled: (!editMode && !createMode),
dataList: ComboData.district,
- getOptionLabel: (option) => option.type? intl.formatMessage({ id: option.type }) : "",
+ getOptionLabel: (option) => option.type ? intl.formatMessage({ id: option.type }) : "",
form: formik
})}
@@ -401,7 +406,7 @@ const OrganizationCard = ({ userData, loadDataFun, id, setEditModeFun }) => {
Are you sure mark as Creditor?
-
+
@@ -413,7 +418,7 @@ const OrganizationCard = ({ userData, loadDataFun, id, setEditModeFun }) => {
Are you sure mark as Non-Creditor?
-
+
diff --git a/src/pages/authentication/Verify.js b/src/pages/authentication/Verify.js
index 4fa15ac..c337f0a 100644
--- a/src/pages/authentication/Verify.js
+++ b/src/pages/authentication/Verify.js
@@ -63,7 +63,7 @@ export default function Verify() {
帳戶已成功驗證。
-
@@ -73,7 +73,7 @@ export default function Verify() {
{/* Submit */}
驗證失敗,請聯絡相關的系統管理員協助。
-
+
diff --git a/src/pages/authentication/auth-forms/BusCustomFormWizard.js b/src/pages/authentication/auth-forms/BusCustomFormWizard.js
index a1519a3..641b9ec 100644
--- a/src/pages/authentication/auth-forms/BusCustomFormWizard.js
+++ b/src/pages/authentication/auth-forms/BusCustomFormWizard.js
@@ -323,8 +323,8 @@ const BusCustomFormWizard = (props) => {
const { handleSubmit } = useForm({})
const _onSubmit = () => {
setLoding(true);
- values.address4 = selectedAddress4
- values.address5 = selectedAddress5
+ values.address4 = selectedAddress4.key
+ values.address5 = selectedAddress5.key
// console.log(values)
const busUserAddress = {
"addressLine1": "",
@@ -1637,7 +1637,8 @@ const BusCustomFormWizard = (props) => {
-
+
+
@@ -1646,8 +1647,10 @@ const BusCustomFormWizard = (props) => {
{/* Submit */}
- 申請失敗,請稍後嘗試
-
+
+
+
+
diff --git a/src/pages/authentication/auth-forms/CustomFormWizard.js b/src/pages/authentication/auth-forms/CustomFormWizard.js
index 99fabad..2d8604a 100644
--- a/src/pages/authentication/auth-forms/CustomFormWizard.js
+++ b/src/pages/authentication/auth-forms/CustomFormWizard.js
@@ -1801,7 +1801,7 @@ const CustomFormWizard = (props) => {
-
+
@@ -1810,8 +1810,10 @@ const CustomFormWizard = (props) => {
{/* Submit */}
- 申請失敗,請稍後嘗試
-
+
+
+
+
diff --git a/src/pages/authentication/auth-forms/IAmSmartFormWizard.js b/src/pages/authentication/auth-forms/IAmSmartFormWizard.js
index 4b36712..ad0f14e 100644
--- a/src/pages/authentication/auth-forms/IAmSmartFormWizard.js
+++ b/src/pages/authentication/auth-forms/IAmSmartFormWizard.js
@@ -1041,7 +1041,7 @@ const CustomFormWizard = (props) => {
-
+
@@ -1050,8 +1050,10 @@ const CustomFormWizard = (props) => {
{/* Submit */}
- 申請失敗,請稍後嘗試
-
+
+
+
+
diff --git a/src/themes/themeConst.js b/src/themes/themeConst.js
index 770f7c8..7ff2665 100644
--- a/src/themes/themeConst.js
+++ b/src/themes/themeConst.js
@@ -182,7 +182,7 @@ export const PNSPS_THEME = createTheme({
input: {
padding: '10.5px 14px 10.5px 12px',
'&.MuiOutlinedInput-input.Mui-disabled': {
- WebkitTextFillColor: '#888888',
+ WebkitTextFillColor: 'rgba(0, 0, 0, 1)',
},
color: 'rgba(0, 0, 0, 0.85)'
},
@@ -239,7 +239,8 @@ export const PNSPS_THEME = createTheme({
//padding: '1px', // Adjust the padding as needed
},
'& .MuiInputBase-input:disabled': {
- color: 'rgba(0, 0, 0, 0.8)',
+ color: 'rgba(0, 0, 0, 1)',
+ backgroundColor: "#f8f8f8",
//backgroundColor: '#777777', // Set background color to #777777 for disabled state
//color: '#010101', // Set text color to #111111 for disabled state
},
diff --git a/src/translations/en.json b/src/translations/en.json
index dd03623..655115b 100644
--- a/src/translations/en.json
+++ b/src/translations/en.json
@@ -39,6 +39,7 @@
"submit": "Submit",
"backToLogin": "Return to login page",
"registerSubmitted": "Account application submitted successfully.",
+ "registerFail": "Application failed, please try again later",
"mainPage": "Main Page",
"myPublicNotice": "My Public Notice",
@@ -69,7 +70,7 @@
"userPassword": "Password",
"forgotUserPassword": "Forgot Password",
"learnMore": "Learn More",
- "createOrReActivate": "Create/reactivate account",
+ "createOrReActivate": "Create account",
"usernameTaken": "This user login name has been registered, please use another user login name",
"userRegistered": "This user has already registered. Please return to the login page and proceed with the login process.",
@@ -352,6 +353,8 @@
"idNo": "ID No.",
"country": "Country",
"district": "District",
+ "noRecordFound": "No record found",
+ "rowsPerPage": "Rows Per Page",
"Dashboard": "Dashboard",
"event": "Event"
diff --git a/src/translations/zh-CN.json b/src/translations/zh-CN.json
index 097dd86..6558d95 100644
--- a/src/translations/zh-CN.json
+++ b/src/translations/zh-CN.json
@@ -39,6 +39,7 @@
"submit": "提交",
"backToLogin": "返回登入页面",
"registerSubmitted": "帐户申请已成功提交。",
+ "registerFail": "申请失败,请稍后尝试",
"mainPage": "主页",
"myPublicNotice": "我的公共启事",
@@ -69,7 +70,7 @@
"userPassword": "密码",
"forgotUserPassword": "忘记密码",
"learnMore": "了解更多",
- "createOrReActivate": "建立/重新启动帐户",
+ "createOrReActivate": "建立帐户",
"usernameTaken": "此用户登入名称已被注册,请使用其他用户登入名称",
"userRegistered": "此用户已注册,请返回登入页面并进行登入流程。",
@@ -352,6 +353,8 @@
"idNo": "身份证号码",
"country": "国家",
"district": "区",
+ "noRecordFound": "找不到記錄",
+ "rowsPerPage": "每页项数",
"Dashboard": "仪表板",
"event": "活动"
diff --git a/src/translations/zh-HK.json b/src/translations/zh-HK.json
index 85ff7f8..7c0e384 100644
--- a/src/translations/zh-HK.json
+++ b/src/translations/zh-HK.json
@@ -39,6 +39,7 @@
"submit": "提交",
"backToLogin": "返回登入頁面",
"registerSubmitted": "帳戶申請已成功提交。",
+ "registerFail": "申請失敗,請稍後嘗試",
"mainPage": "主頁",
"myPublicNotice": "我的公共啟事",
@@ -69,7 +70,7 @@
"userPassword": "密碼",
"forgotUserPassword": "忘記密碼",
"learnMore": "了解更多",
- "createOrReActivate": "建立/重新啟動帳戶",
+ "createOrReActivate": "建立帳戶",
"usernameTaken": "此用戶登入名稱已被注冊,請使用其他用戶登入名稱",
"userRegistered": "此用戶已注冊,請返回登入頁面並進行登入流程。",
@@ -332,7 +333,7 @@
"unlock": "解鎖",
"pendingFor": "待批核",
"active": "生效中",
- "primary": "源自",
+ "primary": "主要帳戶",
"submitApplication": "提交公共啟事申請",
"applicationSubheading": "提供你的啟事內容作排版,校對及計價。",
@@ -352,6 +353,8 @@
"idNo": "身分證號碼",
"country": "國家",
"district": "區",
+ "noRecordFound": "找不到記錄",
+ "rowsPerPage": "每頁項數",
"Dashboard": "儀表板",
"event": "活動"
diff --git a/src/utils/FieldUtils.js b/src/utils/FieldUtils.js
index 8e6fb02..a1463f3 100644
--- a/src/utils/FieldUtils.js
+++ b/src/utils/FieldUtils.js
@@ -191,10 +191,6 @@ export const initField = ({ type, valueName, form, disabled, multiline, handleCh
value={form.values[valueName]}
disabled={disabled}
sx={{
- "& .MuiInputBase-input.Mui-disabled": {
- WebkitTextFillColor: "#000000",
- background: "#f8f8f8",
- },
width: width ? width : '100%'
}}
{...props}