@mseva/digit-ui-module-ndc 1.0.17 → 1.0.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +68 -37
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +69 -38
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1157,6 +1157,7 @@ const NDCModal = _ref => {
|
|
|
1157
1157
|
Licenses: [applicationData]
|
|
1158
1158
|
});
|
|
1159
1159
|
}
|
|
1160
|
+
console.log("config.label.submit", config);
|
|
1160
1161
|
React.useEffect(() => {
|
|
1161
1162
|
if (action) {
|
|
1162
1163
|
setConfig(ModalConfig({
|
|
@@ -1463,11 +1464,7 @@ const ApplicationOverview = () => {
|
|
|
1463
1464
|
}
|
|
1464
1465
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
1465
1466
|
className: "employee-main-application-details"
|
|
1466
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
1467
|
-
styles: {
|
|
1468
|
-
fontSize: "32px"
|
|
1469
|
-
}
|
|
1470
|
-
}, t("NDC_APP_OVER_VIEW_HEADER"))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSubHeader, null, t("NDC_APPLICATION_DETAILS_OVERVIEW")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.StatusTable, null, (displayData === null || displayData === void 0 ? void 0 : displayData.applicantData) && ((_Object$entries = Object.entries(displayData === null || displayData === void 0 ? void 0 : displayData.applicantData)) === null || _Object$entries === void 0 ? void 0 : _Object$entries.map(_ref => {
|
|
1467
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSubHeader, null, t("NDC_APPLICATION_DETAILS_OVERVIEW")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.StatusTable, null, (displayData === null || displayData === void 0 ? void 0 : displayData.applicantData) && ((_Object$entries = Object.entries(displayData === null || displayData === void 0 ? void 0 : displayData.applicantData)) === null || _Object$entries === void 0 ? void 0 : _Object$entries.map(_ref => {
|
|
1471
1468
|
let [key, value] = _ref;
|
|
1472
1469
|
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
1473
1470
|
key: key,
|
|
@@ -1515,7 +1512,7 @@ const ApplicationOverview = () => {
|
|
|
1515
1512
|
label: t(checkpoint.status),
|
|
1516
1513
|
customChild: getTimelineCaptions(checkpoint, index, arr, t)
|
|
1517
1514
|
})))), (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A3 = applicationDetails.Applications) === null || _applicationDetails$A3 === void 0 ? void 0 : (_applicationDetails$A4 = _applicationDetails$A3[0]) === null || _applicationDetails$A4 === void 0 ? void 0 : _applicationDetails$A4.applicationStatus) !== "INITIATED" && actions && /*#__PURE__*/React__default.createElement(digitUiReactComponents.ActionBar, null, displayMenu && (workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data12 = workflowDetails.data) !== null && _workflowDetails$data12 !== void 0 && (_workflowDetails$data13 = _workflowDetails$data12.actionState) !== null && _workflowDetails$data13 !== void 0 && _workflowDetails$data13.nextActions || workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data14 = workflowDetails.data) !== null && _workflowDetails$data14 !== void 0 && _workflowDetails$data14.nextActions) ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Menu, {
|
|
1518
|
-
localeKeyPrefix: "
|
|
1515
|
+
localeKeyPrefix: "WF_EDITRENEWAL",
|
|
1519
1516
|
options: actions,
|
|
1520
1517
|
optionKey: "action",
|
|
1521
1518
|
t: t,
|
|
@@ -8982,13 +8979,14 @@ const getTimelineCaptions$1 = (checkpoint, index, arr, t) => {
|
|
|
8982
8979
|
}, caption.date && /*#__PURE__*/React__default.createElement("p", null, caption.date), caption.name && /*#__PURE__*/React__default.createElement("p", null, caption.name), caption.mobileNumber , caption.source && /*#__PURE__*/React__default.createElement("p", null, t("ES_COMMON_FILED_VIA_" + caption.source.toUpperCase()))));
|
|
8983
8980
|
};
|
|
8984
8981
|
const CitizenApplicationOverview = () => {
|
|
8985
|
-
var _user, _user$info, _user$info$roles, _applicationDetails$A3, _applicationDetails$A4, _Object$entries, _displayData$NdcDetai, _displayData$Document, _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _workflowDetails$data4, _workflowDetails$data5;
|
|
8982
|
+
var _user, _user$info, _user$info$roles, _applicationDetails$A3, _applicationDetails$A4, _applicationDetails$A5, _applicationDetails$A6, _Object$entries, _displayData$NdcDetai, _displayData$Document, _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _workflowDetails$data4, _workflowDetails$data5;
|
|
8986
8983
|
const {
|
|
8987
8984
|
id
|
|
8988
8985
|
} = reactRouterDom.useParams();
|
|
8989
8986
|
const {
|
|
8990
8987
|
t
|
|
8991
8988
|
} = reactI18next.useTranslation();
|
|
8989
|
+
const history = reactRouterDom.useHistory();
|
|
8992
8990
|
const tenantId = window.localStorage.getItem("CITIZEN.CITY");
|
|
8993
8991
|
const state = tenantId === null || tenantId === void 0 ? void 0 : tenantId.split(".")[0];
|
|
8994
8992
|
const [appDetails, setAppDetails] = React.useState({});
|
|
@@ -9041,12 +9039,12 @@ const CitizenApplicationOverview = () => {
|
|
|
9041
9039
|
var _applicationDetails$A;
|
|
9042
9040
|
const ndcObject = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A = applicationDetails.Applications) === null || _applicationDetails$A === void 0 ? void 0 : _applicationDetails$A[0];
|
|
9043
9041
|
if (ndcObject) {
|
|
9044
|
-
var _ndcObject$
|
|
9042
|
+
var _ndcObject$owners, _ndcObject$owners$, _ndcObject$owners2, _ndcObject$owners2$, _ndcObject$owners3, _ndcObject$owners3$, _ndcObject$NdcDetails, _ndcObject$NdcDetails2, _ndcObject$NdcDetails3, _removeDuplicatesByUU;
|
|
9045
9043
|
const applicantData = {
|
|
9046
|
-
|
|
9047
|
-
email: ndcObject === null || ndcObject === void 0 ? void 0 : (_ndcObject$owners = ndcObject.owners) === null || _ndcObject$owners === void 0 ? void 0 : (_ndcObject$owners$ = _ndcObject$owners[0]) === null || _ndcObject$owners$ === void 0 ? void 0 : _ndcObject$owners$.emailId,
|
|
9044
|
+
name: ndcObject === null || ndcObject === void 0 ? void 0 : (_ndcObject$owners = ndcObject.owners) === null || _ndcObject$owners === void 0 ? void 0 : (_ndcObject$owners$ = _ndcObject$owners[0]) === null || _ndcObject$owners$ === void 0 ? void 0 : _ndcObject$owners$.name,
|
|
9048
9045
|
mobile: ndcObject === null || ndcObject === void 0 ? void 0 : (_ndcObject$owners2 = ndcObject.owners) === null || _ndcObject$owners2 === void 0 ? void 0 : (_ndcObject$owners2$ = _ndcObject$owners2[0]) === null || _ndcObject$owners2$ === void 0 ? void 0 : _ndcObject$owners2$.mobileNumber,
|
|
9049
|
-
|
|
9046
|
+
email: ndcObject === null || ndcObject === void 0 ? void 0 : (_ndcObject$owners3 = ndcObject.owners) === null || _ndcObject$owners3 === void 0 ? void 0 : (_ndcObject$owners3$ = _ndcObject$owners3[0]) === null || _ndcObject$owners3$ === void 0 ? void 0 : _ndcObject$owners3$.emailId,
|
|
9047
|
+
address: ndcObject === null || ndcObject === void 0 ? void 0 : (_ndcObject$NdcDetails = ndcObject.NdcDetails) === null || _ndcObject$NdcDetails === void 0 ? void 0 : (_ndcObject$NdcDetails2 = _ndcObject$NdcDetails[0]) === null || _ndcObject$NdcDetails2 === void 0 ? void 0 : (_ndcObject$NdcDetails3 = _ndcObject$NdcDetails2.additionalDetails) === null || _ndcObject$NdcDetails3 === void 0 ? void 0 : _ndcObject$NdcDetails3.propertyAddress,
|
|
9050
9048
|
applicationNo: ndcObject === null || ndcObject === void 0 ? void 0 : ndcObject.uuid
|
|
9051
9049
|
};
|
|
9052
9050
|
const Documents = removeDuplicatesByUUID((ndcObject === null || ndcObject === void 0 ? void 0 : ndcObject.Documents) || []);
|
|
@@ -9068,7 +9066,6 @@ const CitizenApplicationOverview = () => {
|
|
|
9068
9066
|
}
|
|
9069
9067
|
}, [applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.Applications]);
|
|
9070
9068
|
React.useEffect(() => {
|
|
9071
|
-
console.log("applicationDetails", applicationDetails);
|
|
9072
9069
|
if (applicationDetails) {
|
|
9073
9070
|
setIsDetailsLoading(true);
|
|
9074
9071
|
setAppDetails(_extends({}, applicationDetails, {
|
|
@@ -9082,11 +9079,8 @@ const CitizenApplicationOverview = () => {
|
|
|
9082
9079
|
const handleDownloadPdf = function () {
|
|
9083
9080
|
try {
|
|
9084
9081
|
const Property = applicationDetails;
|
|
9085
|
-
|
|
9086
|
-
console.log("tenants", tenants);
|
|
9087
|
-
const tenantInfo = tenants.find(tenant => tenant.code === Property.tenantId);
|
|
9082
|
+
const tenantInfo = tenants === null || tenants === void 0 ? void 0 : tenants.find(tenant => (tenant === null || tenant === void 0 ? void 0 : tenant.code) === (Property === null || Property === void 0 ? void 0 : Property.tenantId));
|
|
9088
9083
|
return Promise.resolve(getAcknowledgementData(Property, tenantInfo, t)).then(function (acknowledgementData) {
|
|
9089
|
-
console.log("acknowledgementData", acknowledgementData);
|
|
9090
9084
|
Digit.Utils.pdf.generate(acknowledgementData);
|
|
9091
9085
|
});
|
|
9092
9086
|
} catch (e) {
|
|
@@ -9101,28 +9095,37 @@ const CitizenApplicationOverview = () => {
|
|
|
9101
9095
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9102
9096
|
style: {
|
|
9103
9097
|
display: "flex",
|
|
9104
|
-
justifyContent: "
|
|
9098
|
+
justifyContent: "end",
|
|
9105
9099
|
alignItems: "center",
|
|
9106
9100
|
padding: "16px"
|
|
9107
9101
|
}
|
|
9108
|
-
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.
|
|
9109
|
-
|
|
9110
|
-
fontSize: "32px"
|
|
9111
|
-
}
|
|
9112
|
-
}, t("NDC_APP_OVER_VIEW_HEADER")), (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A3 = applicationDetails.Applications) === null || _applicationDetails$A3 === void 0 ? void 0 : (_applicationDetails$A4 = _applicationDetails$A3[0]) === null || _applicationDetails$A4 === void 0 ? void 0 : _applicationDetails$A4.applicationStatus) === "APPROVED" && /*#__PURE__*/React__default.createElement(digitUiReactComponents.LinkButton, {
|
|
9102
|
+
}, (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A3 = applicationDetails.Applications) === null || _applicationDetails$A3 === void 0 ? void 0 : (_applicationDetails$A4 = _applicationDetails$A3[0]) === null || _applicationDetails$A4 === void 0 ? void 0 : _applicationDetails$A4.applicationStatus) === "APPROVED" && /*#__PURE__*/React__default.createElement(digitUiReactComponents.LinkButton, {
|
|
9103
|
+
className: "downLoadButton",
|
|
9113
9104
|
label: t("DOWNLOAD_CERTIFICATE"),
|
|
9114
|
-
style: {
|
|
9115
|
-
color: "#A52A2A"
|
|
9116
|
-
},
|
|
9117
9105
|
onClick: handleDownloadPdf
|
|
9118
|
-
})
|
|
9106
|
+
}), (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A5 = applicationDetails.Applications) === null || _applicationDetails$A5 === void 0 ? void 0 : (_applicationDetails$A6 = _applicationDetails$A5[0]) === null || _applicationDetails$A6 === void 0 ? void 0 : _applicationDetails$A6.applicationStatus) == "INITIATED" && /*#__PURE__*/React__default.createElement(digitUiReactComponents.ActionBar, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
|
|
9107
|
+
label: t("COMMON_EDIT"),
|
|
9108
|
+
onSubmit: () => {
|
|
9109
|
+
var _applicationDetails$A7, _applicationDetails$A8;
|
|
9110
|
+
const id = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A7 = applicationDetails.Applications) === null || _applicationDetails$A7 === void 0 ? void 0 : (_applicationDetails$A8 = _applicationDetails$A7[0]) === null || _applicationDetails$A8 === void 0 ? void 0 : _applicationDetails$A8.uuid;
|
|
9111
|
+
history.push("/digit-ui/citizen/ndc/new-application/" + id);
|
|
9112
|
+
}
|
|
9113
|
+
}))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, {
|
|
9114
|
+
className: "ndc_card_main"
|
|
9115
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSubHeader, {
|
|
9116
|
+
className: "ndc_label"
|
|
9117
|
+
}, t("NDC_APPLICATION_DETAILS_OVERVIEW")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.StatusTable, null, (displayData === null || displayData === void 0 ? void 0 : displayData.applicantData) && ((_Object$entries = Object.entries(displayData === null || displayData === void 0 ? void 0 : displayData.applicantData)) === null || _Object$entries === void 0 ? void 0 : _Object$entries.map(_ref => {
|
|
9119
9118
|
let [key, value] = _ref;
|
|
9120
9119
|
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
9121
9120
|
key: key,
|
|
9122
9121
|
label: t("" + (key === null || key === void 0 ? void 0 : key.toUpperCase())),
|
|
9123
9122
|
text: Array.isArray(value) ? value.map(item => typeof item === "object" ? t((item === null || item === void 0 ? void 0 : item.code) || "N/A") : t(item || "N/A")).join(", ") : typeof value === "object" ? t((value === null || value === void 0 ? void 0 : value.code) || "N/A") : t(value || "N/A")
|
|
9124
9123
|
});
|
|
9125
|
-
})))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card,
|
|
9124
|
+
})))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, {
|
|
9125
|
+
className: "ndc_card_main"
|
|
9126
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSubHeader, {
|
|
9127
|
+
className: "ndc_label"
|
|
9128
|
+
}, t("NDC_APPLICATION_NDC_DETAILS_OVERVIEW")), displayData === null || displayData === void 0 ? void 0 : (_displayData$NdcDetai = displayData.NdcDetails) === null || _displayData$NdcDetai === void 0 ? void 0 : _displayData$NdcDetai.map((detail, index) => {
|
|
9126
9129
|
var _detail$dueAmount;
|
|
9127
9130
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
9128
9131
|
key: index,
|
|
@@ -9145,7 +9148,11 @@ const CitizenApplicationOverview = () => {
|
|
|
9145
9148
|
label: t("NDC_PROPERTY_TYPE"),
|
|
9146
9149
|
text: t(detail.propertyType) || detail.propertyType
|
|
9147
9150
|
})));
|
|
9148
|
-
})), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card,
|
|
9151
|
+
})), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, {
|
|
9152
|
+
className: "ndc_card_main"
|
|
9153
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSubHeader, {
|
|
9154
|
+
className: "ndc_label"
|
|
9155
|
+
}, t("NDC_APPLICATION_DOCUMENTS_OVERVIEW")), /*#__PURE__*/React__default.createElement("div", {
|
|
9149
9156
|
style: {
|
|
9150
9157
|
display: "flex",
|
|
9151
9158
|
gap: "16px"
|
|
@@ -9154,13 +9161,17 @@ const CitizenApplicationOverview = () => {
|
|
|
9154
9161
|
value: {
|
|
9155
9162
|
workflowDocs: displayData === null || displayData === void 0 ? void 0 : displayData.Documents
|
|
9156
9163
|
}
|
|
9157
|
-
}) : /*#__PURE__*/React__default.createElement("div", null, t("TL_NO_DOCUMENTS_MSG")))), (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data = workflowDetails.data) === null || _workflowDetails$data === void 0 ? void 0 : _workflowDetails$data.timeline) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card,
|
|
9164
|
+
}) : /*#__PURE__*/React__default.createElement("div", null, t("TL_NO_DOCUMENTS_MSG")))), (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data = workflowDetails.data) === null || _workflowDetails$data === void 0 ? void 0 : _workflowDetails$data.timeline) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, {
|
|
9165
|
+
className: "ndc_card_main"
|
|
9166
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSubHeader, {
|
|
9167
|
+
className: "ndc_label"
|
|
9168
|
+
}, t("CS_APPLICATION_DETAILS_APPLICATION_TIMELINE")), (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data2 = workflowDetails.data) === null || _workflowDetails$data2 === void 0 ? void 0 : _workflowDetails$data2.timeline.length) === 1 ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.CheckPoint, {
|
|
9158
9169
|
isCompleted: true,
|
|
9159
|
-
label: t(
|
|
9170
|
+
label: t(workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data3 = workflowDetails.data) === null || _workflowDetails$data3 === void 0 ? void 0 : (_workflowDetails$data4 = _workflowDetails$data3.timeline[0]) === null || _workflowDetails$data4 === void 0 ? void 0 : _workflowDetails$data4.status)
|
|
9160
9171
|
}) : /*#__PURE__*/React__default.createElement(digitUiReactComponents.ConnectingCheckPoints, null, workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data5 = workflowDetails.data) === null || _workflowDetails$data5 === void 0 ? void 0 : _workflowDetails$data5.timeline.map((checkpoint, index, arr) => /*#__PURE__*/React__default.createElement(digitUiReactComponents.CheckPoint, {
|
|
9161
9172
|
keyValue: index,
|
|
9162
9173
|
isCompleted: index === 0,
|
|
9163
|
-
label: t(
|
|
9174
|
+
label: t(checkpoint.status),
|
|
9164
9175
|
customChild: getTimelineCaptions$1(checkpoint, index, arr, t)
|
|
9165
9176
|
})))));
|
|
9166
9177
|
};
|
|
@@ -11680,10 +11691,29 @@ const NewNDCStepForm = () => {
|
|
|
11680
11691
|
const formState = reactRedux.useSelector(state => state.ndc.NDCForm);
|
|
11681
11692
|
const step = formState.step;
|
|
11682
11693
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
11694
|
+
const id = window.location.pathname.split("/").pop();
|
|
11695
|
+
const {
|
|
11696
|
+
isLoading,
|
|
11697
|
+
data: applicationDetails
|
|
11698
|
+
} = Digit.Hooks.ndc.useSearchEmployeeApplication({
|
|
11699
|
+
uuid: id
|
|
11700
|
+
}, tenantId);
|
|
11701
|
+
React.useEffect(() => {
|
|
11702
|
+
if (applicationDetails !== null && applicationDetails !== void 0 && applicationDetails.Applications.length) {
|
|
11703
|
+
dispatch(updateNDCForm("responseData", applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.Applications));
|
|
11704
|
+
}
|
|
11705
|
+
}, [applicationDetails]);
|
|
11683
11706
|
const setStep = updatedStepNumber => {
|
|
11684
11707
|
dispatch(setNDCStep(updatedStepNumber));
|
|
11685
11708
|
};
|
|
11686
11709
|
const handleSubmit = () => {};
|
|
11710
|
+
React.useEffect(() => {
|
|
11711
|
+
const unlisten = history.listen(() => {
|
|
11712
|
+
console.log("route changes guys");
|
|
11713
|
+
dispatch(resetNDCForm());
|
|
11714
|
+
});
|
|
11715
|
+
return () => unlisten();
|
|
11716
|
+
}, [history, dispatch]);
|
|
11687
11717
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
11688
11718
|
className: "pageCard"
|
|
11689
11719
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardHeader, {
|
|
@@ -11878,7 +11908,7 @@ const NewNDCStepFormOne = _ref => {
|
|
|
11878
11908
|
if (!(propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.email)) missingFields.push(t("NDC_MESSAGE_EMAIL"));
|
|
11879
11909
|
if (!(NDCReason !== null && NDCReason !== void 0 && NDCReason.code)) missingFields.push(t("NDC_MESSAGE_NDC_REASON"));
|
|
11880
11910
|
const nameRegex = /^[A-Za-z\s]+$/;
|
|
11881
|
-
const emailRegex = /^[
|
|
11911
|
+
const emailRegex = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9-]+\.[a-zA-Z]{2,}$/;
|
|
11882
11912
|
const mobileRegex = /^[6-9]\d{9}$/;
|
|
11883
11913
|
if (propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.firstName && !nameRegex.test(propertyDetails.firstName)) {
|
|
11884
11914
|
invalidFields.push(t("NDC_MESSAGE_FIRST_NAME_ONLY_ALPHABETS_ALLOWED"));
|
|
@@ -12423,6 +12453,7 @@ const PropertyDetailsForm$1 = _ref => {
|
|
|
12423
12453
|
}));
|
|
12424
12454
|
}
|
|
12425
12455
|
}, [apiDataCheck]);
|
|
12456
|
+
console.log("propertyDetails====", propertyDetails, formData);
|
|
12426
12457
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
12427
12458
|
style: {
|
|
12428
12459
|
marginBottom: "16px"
|
|
@@ -12710,21 +12741,21 @@ const PropertyDetailsForm$1 = _ref => {
|
|
|
12710
12741
|
}, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
12711
12742
|
control: control,
|
|
12712
12743
|
name: "email",
|
|
12713
|
-
defaultValue: "",
|
|
12744
|
+
defaultValue: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.email) || "",
|
|
12714
12745
|
render: props => {
|
|
12715
|
-
var _formData$cpt7, _formData$cpt7$detail, _formData$cpt7$detail2, _formData$cpt7$detail3
|
|
12746
|
+
var _formData$cpt7, _formData$cpt7$detail, _formData$cpt7$detail2, _formData$cpt7$detail3;
|
|
12716
12747
|
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
12717
12748
|
value: props === null || props === void 0 ? void 0 : props.value,
|
|
12718
12749
|
onChange: e => {
|
|
12719
|
-
props.onChange(e.target.value);
|
|
12720
12750
|
setPropertyDetails(prev => _extends({}, prev, {
|
|
12721
12751
|
email: e.target.value
|
|
12722
12752
|
}));
|
|
12753
|
+
props.onChange(e.target.value);
|
|
12723
12754
|
},
|
|
12724
12755
|
onBlur: e => {
|
|
12725
12756
|
props.onBlur(e);
|
|
12726
12757
|
},
|
|
12727
|
-
disabled:
|
|
12758
|
+
disabled: formData === null || formData === void 0 ? void 0 : (_formData$cpt7 = formData.cpt) === null || _formData$cpt7 === void 0 ? void 0 : (_formData$cpt7$detail = _formData$cpt7.details) === null || _formData$cpt7$detail === void 0 ? void 0 : (_formData$cpt7$detail2 = _formData$cpt7$detail.owners) === null || _formData$cpt7$detail2 === void 0 ? void 0 : (_formData$cpt7$detail3 = _formData$cpt7$detail2[0]) === null || _formData$cpt7$detail3 === void 0 ? void 0 : _formData$cpt7$detail3.emailId
|
|
12728
12759
|
});
|
|
12729
12760
|
}
|
|
12730
12761
|
}))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, {
|
|
@@ -14143,7 +14174,7 @@ const NewNDCStepFormOne$1 = _ref => {
|
|
|
14143
14174
|
if (!(propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.email)) missingFields.push(t("NDC_MESSAGE_EMAIL"));
|
|
14144
14175
|
if (!(NDCReason !== null && NDCReason !== void 0 && NDCReason.code)) missingFields.push(t("NDC_MESSAGE_NDC_REASON"));
|
|
14145
14176
|
const nameRegex = /^[A-Za-z\s]+$/;
|
|
14146
|
-
const emailRegex = /^[
|
|
14177
|
+
const emailRegex = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9-]+\.[a-zA-Z]{2,}$/;
|
|
14147
14178
|
const mobileRegex = /^[6-9]\d{9}$/;
|
|
14148
14179
|
if (propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.firstName && !nameRegex.test(propertyDetails.firstName)) {
|
|
14149
14180
|
invalidFields.push(t("NDC_MESSAGE_FIRST_NAME_ONLY_ALPHABETS_ALLOWED"));
|