diff --git a/src/pages/Organization/DetailPage/OrganizationCard.js b/src/pages/Organization/DetailPage/OrganizationCard.js
index 3a4026f..4b92881 100644
--- a/src/pages/Organization/DetailPage/OrganizationCard.js
+++ b/src/pages/Organization/DetailPage/OrganizationCard.js
@@ -48,15 +48,24 @@ const OrganizationCard = ({ userData, loadDataFun, id, setEditModeFun }) => {
return {errorMsg}
}
+ function getMaxErrStr(num, fieldname){
+ return displayErrorMsg(intl.formatMessage({ id: 'noMoreThenNWords' },{num:num, fieldname:fieldname?intl.formatMessage({ id: fieldname})+": ":""}));
+ }
+
+ function getRequiredErrStr(fieldname){
+ return displayErrorMsg(intl.formatMessage({ id: 'require'},{fieldname:fieldname?intl.formatMessage({ id: fieldname}):""}));
+ }
+
const formik = useFormik({
enableReinitialize: true,
initialValues: currentUserData,
validationSchema: yup.object().shape({
- enCompanyName: yup.string().max(255).required(displayErrorMsg(intl.formatMessage({ id: 'userRequireEnglishName' }))),
+ enCompanyName: yup.string().max(255, getMaxErrStr(255)).required(displayErrorMsg(intl.formatMessage({ id: 'userRequireEnglishName' }))),
chCompanyName: yup.string().max(255, displayErrorMsg(intl.formatMessage({ id: 'userRequireChineseName' }))).nullable(),
- addressLine1: yup.string().max(40).required(displayErrorMsg(intl.formatMessage({ id: 'validateAddressLine1' }))),
- addressLine2: yup.string().max(40, displayErrorMsg(intl.formatMessage({ id: 'noMoreThen40Words' }))),
- addressLine3: yup.string().max(40, displayErrorMsg(intl.formatMessage({ id: 'noMoreThen40Words' }))),
+ addressLine1: yup.string().max(40, getMaxErrStr(40)).required(displayErrorMsg(intl.formatMessage({ id: 'validateAddressLine1' }))),
+ addressLine2: yup.string().max(40, getMaxErrStr(40)),
+ addressLine3: yup.string().max(40, getMaxErrStr(40)),
+ contactPerson: yup.string().max(60, getMaxErrStr(60)).required(getRequiredErrStr("contactPerson")),
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' }))),
diff --git a/src/pages/Proof/Reply_GLD/index.js b/src/pages/Proof/Reply_GLD/index.js
index 160954e..28eade1 100644
--- a/src/pages/Proof/Reply_GLD/index.js
+++ b/src/pages/Proof/Reply_GLD/index.js
@@ -60,7 +60,7 @@ const Index = () => {
if (!responseData.data?.id) {
navigate("/proof/search");
}
- setShowProofBtn(responseData.data.action != null && responseData.data.action===true);
+ setShowProofBtn(responseData.data.action != null && responseData.data.action === true);
responseData.data["phoneNumber"] = JSON.parse(responseData.data.contactTelNo).phoneNumber;
responseData.data["tel_countryCode"] = JSON.parse(responseData.data.contactTelNo).countryCode;
@@ -81,7 +81,7 @@ const Index = () => {
setIsOverTime(current.getTime() > proofPaymentDeadline.getTime());
setShowCancelBtn(responseData.data.cancelled || responseData.data.replyDate || current.getTime() > proofPaymentDeadline.getTime())
-
+
setRecord(responseData.data);
}
@@ -122,10 +122,8 @@ const Index = () => {
-
-
- Proof Record
-
+
+ Proof Record
diff --git a/src/pages/PublicNotice/ApplyForm/PublicNoticeApplyForm.js b/src/pages/PublicNotice/ApplyForm/PublicNoticeApplyForm.js
index 65ee239..3e9d8c5 100644
--- a/src/pages/PublicNotice/ApplyForm/PublicNoticeApplyForm.js
+++ b/src/pages/PublicNotice/ApplyForm/PublicNoticeApplyForm.js
@@ -53,6 +53,10 @@ const PublicNoticeApplyForm = ({ loadedData, selections }) => {
// loadedData.careOf = loadedData.contactPerson
// },[]);
+ function getMaxErrStr(num, fieldname){
+ return intl.formatMessage({ id: 'noMoreThenNWords' },{num:num, fieldname:fieldname?intl.formatMessage({ id: fieldname})+": ":""});
+ }
+
const formik = useFormik({
enableReinitialize: true,
initialValues: loadedData,
@@ -62,7 +66,8 @@ const PublicNoticeApplyForm = ({ loadedData, selections }) => {
fax_countryCode: yup.string().min(3, intl.formatMessage({id: 'require3Number'})),
phoneNumber: yup.string().min(8, intl.formatMessage({id: 'require8Number'})).required(intl.formatMessage({id: 'requireContactNumber'})),
faxNumber: yup.string().min(8, intl.formatMessage({id: 'require8Number'})),
- remarks: yup.string().max(255,intl.formatMessage({id: 'noMoreThen255Words'})).nullable(),
+ remarks: yup.string().max(100,getMaxErrStr(100)).nullable(),
+ careOf: yup.string().max(30,getMaxErrStr(30)).nullable(),
}),
onSubmit: values => {
if (!values.issueId) {
diff --git a/src/pages/PublicNotice/Details_GLD/ClientDetailCard.js b/src/pages/PublicNotice/Details_GLD/ClientDetailCard.js
index 5145ed7..999abe8 100644
--- a/src/pages/PublicNotice/Details_GLD/ClientDetailCard.js
+++ b/src/pages/PublicNotice/Details_GLD/ClientDetailCard.js
@@ -154,7 +154,7 @@ const ClientDetailCard = (
size="small"
{...register("type",
{
- value: currentApplicationDetailData.type,
+ value: currentApplicationDetailData.type == "ORG" ? "Organisation":"Individual",
})}
id='type'
sx={{
diff --git a/src/pages/PublicNotice/Details_GLD/StatusChangeDialog.js b/src/pages/PublicNotice/Details_GLD/StatusChangeDialog.js
index 2c96ae6..86222af 100644
--- a/src/pages/PublicNotice/Details_GLD/StatusChangeDialog.js
+++ b/src/pages/PublicNotice/Details_GLD/StatusChangeDialog.js
@@ -88,22 +88,25 @@ const StatusChangeDialog = (props) => {
const getNotAcceptedContent = () => {
setContent(
-
+
+
{
setRemarks(newValues.target.value);
setHelperText("");
}}
- >
-
+ variant="outlined"
+ InputProps={
+ {
+ style: { minHeight: '42.5px', maxHeight: '50vh', height: 'auto' },
+ }
+ }
+ />
);
@@ -119,7 +122,7 @@ const StatusChangeDialog = (props) => {
- {props.gazetteIssue + ", "}{props.issueNum + ", "}{props.issueDate}
+ {props.gazetteIssue + ", "}{props.issueNum + ", "}{props.issueDate}
diff --git a/src/pages/PublicNotice/Details_Public/ApplicationDetailCard.js b/src/pages/PublicNotice/Details_Public/ApplicationDetailCard.js
index e2f1516..71a8ec2 100644
--- a/src/pages/PublicNotice/Details_Public/ApplicationDetailCard.js
+++ b/src/pages/PublicNotice/Details_Public/ApplicationDetailCard.js
@@ -37,10 +37,10 @@ import {
import CloseIcon from '@mui/icons-material/Close';
import EditNoteIcon from '@mui/icons-material/EditNote';
import DownloadIcon from '@mui/icons-material/Download';
-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 * as React from "react";
-import {FormattedMessage, useIntl} from "react-intl";
+import { FormattedMessage, useIntl } from "react-intl";
// ==============================|| DASHBOARD - DEFAULT ||============================== //
const ApplicationDetailCard = (
{ applicationDetailData,
@@ -146,40 +146,40 @@ const ApplicationDetailCard = (
mb={2}
>
- {
- currentApplicationDetailData.status == "confirmed" ?
-
- : null
- }
- }
- aria-label={intl.formatMessage({id: 'cancel'})}
- >
-
-
+ {
+ currentApplicationDetailData.status == "confirmed" ?
+
+ : null
+ }
+ }
+ aria-label={intl.formatMessage({ id: 'cancel' })}
+ >
+
+
-
+