@mseva/digit-ui-module-ndc 1.0.15 → 1.0.17
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 +464 -186
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +465 -189
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -739,14 +739,16 @@ const App = () => {
|
|
|
739
739
|
path
|
|
740
740
|
} = _useRouteMatch,
|
|
741
741
|
match = _objectWithoutPropertiesLoose(_useRouteMatch, _excluded);
|
|
742
|
-
|
|
742
|
+
const {
|
|
743
|
+
t
|
|
744
|
+
} = reactI18next.useTranslation();
|
|
743
745
|
const NewNDCStepForm = Digit.ComponentRegistryService.getComponent("NewNDCStepFormCitizen");
|
|
744
746
|
const MyApplications = Digit.ComponentRegistryService.getComponent("MyApplications");
|
|
745
747
|
const NDCResponseCitizen = Digit.ComponentRegistryService.getComponent("NDCResponseCitizen");
|
|
746
748
|
const ApplicationOverview = (_Digit = Digit) === null || _Digit === void 0 ? void 0 : (_Digit$ComponentRegis = _Digit.ComponentRegistryService) === null || _Digit$ComponentRegis === void 0 ? void 0 : _Digit$ComponentRegis.getComponent("CitizenApplicationOverview");
|
|
747
749
|
return /*#__PURE__*/React__default.createElement("span", {
|
|
748
750
|
className: "tl-citizen"
|
|
749
|
-
}, /*#__PURE__*/React__default.createElement(reactRouterDom.Switch, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.AppContainer, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
|
|
751
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.BackButton, null, t("CS_COMMON_BACK")), /*#__PURE__*/React__default.createElement(reactRouterDom.Switch, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.AppContainer, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
|
|
750
752
|
path: path + "/new-application",
|
|
751
753
|
component: NewNDCStepForm
|
|
752
754
|
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
|
|
@@ -1209,7 +1211,6 @@ const getTimelineCaptions = (checkpoint, index, arr, t) => {
|
|
|
1209
1211
|
thumbnailsToShow,
|
|
1210
1212
|
wfDocuments
|
|
1211
1213
|
} = checkpoint;
|
|
1212
|
-
console.log("wfDocuments", wfDocuments);
|
|
1213
1214
|
const caption = {
|
|
1214
1215
|
date: checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$auditDeta = checkpoint.auditDetails) === null || _checkpoint$auditDeta === void 0 ? void 0 : _checkpoint$auditDeta.lastModified,
|
|
1215
1216
|
name: checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$assigner = checkpoint.assigner) === null || _checkpoint$assigner === void 0 ? void 0 : _checkpoint$assigner.name,
|
|
@@ -1242,7 +1243,7 @@ const getTimelineCaptions = (checkpoint, index, arr, t) => {
|
|
|
1242
1243
|
}, caption.date && /*#__PURE__*/React__default.createElement("p", null, caption.date), caption.name && /*#__PURE__*/React__default.createElement("p", null, caption.name), caption.mobileNumber && /*#__PURE__*/React__default.createElement("p", null, caption.mobileNumber), caption.source && /*#__PURE__*/React__default.createElement("p", null, t("ES_COMMON_FILED_VIA_" + caption.source.toUpperCase()))));
|
|
1243
1244
|
};
|
|
1244
1245
|
const ApplicationOverview = () => {
|
|
1245
|
-
var _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _user, _user$info, _user$info$roles, _workflowDetails$data6, _workflowDetails$data7, _workflowDetails$data8, _workflowDetailsTemp$, _workflowDetailsTemp$2, _Object$entries, _displayData$NdcDetai, _displayData$Document, _workflowDetails$data9, _workflowDetails$data0, _workflowDetails$data1, _workflowDetails$data10, _workflowDetails$data11, _workflowDetails$data12, _workflowDetails$data13, _workflowDetails$data14, _workflowDetails$data15;
|
|
1246
|
+
var _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _user, _user$info, _user$info$roles, _workflowDetails$data6, _workflowDetails$data7, _workflowDetails$data8, _workflowDetailsTemp$, _workflowDetailsTemp$2, _Object$entries, _displayData$NdcDetai, _displayData$Document, _workflowDetails$data9, _workflowDetails$data0, _workflowDetails$data1, _workflowDetails$data10, _workflowDetails$data11, _applicationDetails$A3, _applicationDetails$A4, _workflowDetails$data12, _workflowDetails$data13, _workflowDetails$data14, _applicationDetails$A5, _applicationDetails$A6, _workflowDetails$data15;
|
|
1246
1247
|
const {
|
|
1247
1248
|
id
|
|
1248
1249
|
} = reactRouterDom.useParams();
|
|
@@ -1348,12 +1349,12 @@ const ApplicationOverview = () => {
|
|
|
1348
1349
|
var _applicationDetails$A;
|
|
1349
1350
|
const ndcObject = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A = applicationDetails.Applications) === null || _applicationDetails$A === void 0 ? void 0 : _applicationDetails$A[0];
|
|
1350
1351
|
if (ndcObject) {
|
|
1351
|
-
var _ndcObject$
|
|
1352
|
+
var _ndcObject$owners, _ndcObject$owners$, _ndcObject$owners2, _ndcObject$owners2$, _ndcObject$owners3, _ndcObject$owners3$, _ndcObject$NdcDetails, _ndcObject$NdcDetails2, _ndcObject$NdcDetails3, _removeDuplicatesByUU;
|
|
1352
1353
|
const applicantData = {
|
|
1353
|
-
|
|
1354
|
-
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,
|
|
1354
|
+
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,
|
|
1355
1355
|
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,
|
|
1356
|
-
|
|
1356
|
+
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,
|
|
1357
|
+
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,
|
|
1357
1358
|
applicationNo: ndcObject === null || ndcObject === void 0 ? void 0 : ndcObject.uuid
|
|
1358
1359
|
};
|
|
1359
1360
|
const Documents = removeDuplicatesByUUID((ndcObject === null || ndcObject === void 0 ? void 0 : ndcObject.Documents) || []);
|
|
@@ -1375,14 +1376,12 @@ const ApplicationOverview = () => {
|
|
|
1375
1376
|
}
|
|
1376
1377
|
}, [applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.Applications]);
|
|
1377
1378
|
React.useEffect(() => {
|
|
1378
|
-
console.log("applicationDetails", applicationDetails);
|
|
1379
1379
|
if (applicationDetails) {
|
|
1380
1380
|
setIsDetailsLoading(true);
|
|
1381
1381
|
setIsDetailsLoading(false);
|
|
1382
1382
|
}
|
|
1383
1383
|
}, [applicationDetails]);
|
|
1384
1384
|
function onActionSelect(action) {
|
|
1385
|
-
console.log("action", action);
|
|
1386
1385
|
const payload = {
|
|
1387
1386
|
Licenses: [action]
|
|
1388
1387
|
};
|
|
@@ -1401,7 +1400,6 @@ const ApplicationOverview = () => {
|
|
|
1401
1400
|
try {
|
|
1402
1401
|
var _data$Licenses;
|
|
1403
1402
|
const payloadData = applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.Applications[0];
|
|
1404
|
-
console.log("data", data);
|
|
1405
1403
|
const updatedApplicant = _extends({}, payloadData, {
|
|
1406
1404
|
workflow: {}
|
|
1407
1405
|
});
|
|
@@ -1412,7 +1410,6 @@ const ApplicationOverview = () => {
|
|
|
1412
1410
|
comment: filtData === null || filtData === void 0 ? void 0 : filtData.comment,
|
|
1413
1411
|
documents: filtData === null || filtData === void 0 ? void 0 : filtData.wfDocuments
|
|
1414
1412
|
};
|
|
1415
|
-
console.log("filtData", filtData);
|
|
1416
1413
|
if (!(filtData !== null && filtData !== void 0 && filtData.assignee) && filtData.action == "FORWARD") {
|
|
1417
1414
|
setShowToast({
|
|
1418
1415
|
key: "error"
|
|
@@ -1509,15 +1506,15 @@ const ApplicationOverview = () => {
|
|
|
1509
1506
|
value: {
|
|
1510
1507
|
workflowDocs: displayData === null || displayData === void 0 ? void 0 : displayData.Documents
|
|
1511
1508
|
}
|
|
1512
|
-
}) : /*#__PURE__*/React__default.createElement("div", null, t("TL_NO_DOCUMENTS_MSG")))), (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data9 = workflowDetails.data) === null || _workflowDetails$data9 === void 0 ? void 0 : _workflowDetails$data9.timeline) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSubHeader, null, t("
|
|
1509
|
+
}) : /*#__PURE__*/React__default.createElement("div", null, t("TL_NO_DOCUMENTS_MSG")))), (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data9 = workflowDetails.data) === null || _workflowDetails$data9 === void 0 ? void 0 : _workflowDetails$data9.timeline) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSubHeader, null, t("CS_APPLICATION_DETAILS_APPLICATION_TIMELINE")), (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data0 = workflowDetails.data) === null || _workflowDetails$data0 === void 0 ? void 0 : _workflowDetails$data0.timeline.length) === 1 ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.CheckPoint, {
|
|
1513
1510
|
isCompleted: true,
|
|
1514
|
-
label: t(
|
|
1511
|
+
label: t(workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data1 = workflowDetails.data) === null || _workflowDetails$data1 === void 0 ? void 0 : (_workflowDetails$data10 = _workflowDetails$data1.timeline[0]) === null || _workflowDetails$data10 === void 0 ? void 0 : _workflowDetails$data10.status)
|
|
1515
1512
|
}) : /*#__PURE__*/React__default.createElement(digitUiReactComponents.ConnectingCheckPoints, null, workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data11 = workflowDetails.data) === null || _workflowDetails$data11 === void 0 ? void 0 : _workflowDetails$data11.timeline.map((checkpoint, index, arr) => /*#__PURE__*/React__default.createElement(digitUiReactComponents.CheckPoint, {
|
|
1516
1513
|
keyValue: index,
|
|
1517
1514
|
isCompleted: index === 0,
|
|
1518
|
-
label: t(
|
|
1515
|
+
label: t(checkpoint.status),
|
|
1519
1516
|
customChild: getTimelineCaptions(checkpoint, index, arr, t)
|
|
1520
|
-
})))), 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, {
|
|
1517
|
+
})))), (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, {
|
|
1521
1518
|
localeKeyPrefix: "WF_EMPLOYEE_" + "NDC",
|
|
1522
1519
|
options: actions,
|
|
1523
1520
|
optionKey: "action",
|
|
@@ -1527,6 +1524,13 @@ const ApplicationOverview = () => {
|
|
|
1527
1524
|
ref: menuRef,
|
|
1528
1525
|
label: t("WF_TAKE_ACTION"),
|
|
1529
1526
|
onSubmit: () => setDisplayMenu(!displayMenu)
|
|
1527
|
+
})), (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, {
|
|
1528
|
+
label: t("COMMON_EDIT"),
|
|
1529
|
+
onSubmit: () => {
|
|
1530
|
+
var _applicationDetails$A7, _applicationDetails$A8;
|
|
1531
|
+
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;
|
|
1532
|
+
history.push("/digit-ui/employee/ndc/create/" + id);
|
|
1533
|
+
}
|
|
1530
1534
|
})), showModal ? /*#__PURE__*/React__default.createElement(NDCModal, {
|
|
1531
1535
|
t: t,
|
|
1532
1536
|
action: selectedAction,
|
|
@@ -9150,7 +9154,7 @@ const CitizenApplicationOverview = () => {
|
|
|
9150
9154
|
value: {
|
|
9151
9155
|
workflowDocs: displayData === null || displayData === void 0 ? void 0 : displayData.Documents
|
|
9152
9156
|
}
|
|
9153
|
-
}) : /*#__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, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSubHeader, null, t("
|
|
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, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSubHeader, null, 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, {
|
|
9154
9158
|
isCompleted: true,
|
|
9155
9159
|
label: t("NDC_STATUS_" + (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))
|
|
9156
9160
|
}) : /*#__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, {
|
|
@@ -9672,7 +9676,7 @@ const Inbox = _ref => {
|
|
|
9672
9676
|
}, [data]);
|
|
9673
9677
|
const PropsForInboxLinks = {
|
|
9674
9678
|
logoIcon: /*#__PURE__*/React__default.createElement(digitUiReactComponents.ComplaintIcon, null),
|
|
9675
|
-
headerText: "
|
|
9679
|
+
headerText: "" + t("MODULE_NKS_NO_DUE_CERTIFICATE_FEES"),
|
|
9676
9680
|
links: [{
|
|
9677
9681
|
text: "Create NDC Application",
|
|
9678
9682
|
link: "/digit-ui/employee/ndc/create"
|
|
@@ -11583,9 +11587,15 @@ const PropertyDetailsStep2 = _ref => {
|
|
|
11583
11587
|
};
|
|
11584
11588
|
|
|
11585
11589
|
const config = [{
|
|
11586
|
-
head: "
|
|
11590
|
+
head: "",
|
|
11587
11591
|
stepNumber: 1,
|
|
11588
11592
|
body: [{
|
|
11593
|
+
name: "NDC_COMMON_NDC_REASON",
|
|
11594
|
+
type: "component",
|
|
11595
|
+
component: "SelectNDCReason",
|
|
11596
|
+
key: "NDCReason",
|
|
11597
|
+
withoutLabel: true
|
|
11598
|
+
}, {
|
|
11589
11599
|
name: "",
|
|
11590
11600
|
type: "component",
|
|
11591
11601
|
component: "NDCPropertySearch",
|
|
@@ -11597,12 +11607,6 @@ const config = [{
|
|
|
11597
11607
|
component: "PropertyDetailsFormCitizen",
|
|
11598
11608
|
key: "PropertyDetails",
|
|
11599
11609
|
withoutLabel: true
|
|
11600
|
-
}, {
|
|
11601
|
-
name: "NDC_COMMON_NDC_REASON",
|
|
11602
|
-
type: "component",
|
|
11603
|
-
component: "SelectNDCReason",
|
|
11604
|
-
key: "NDCReason",
|
|
11605
|
-
withoutLabel: true
|
|
11606
11610
|
}]
|
|
11607
11611
|
}, {
|
|
11608
11612
|
head: "NDC_COMMON_DOCUMENTS_REQUIRED",
|
|
@@ -11625,8 +11629,8 @@ const config = [{
|
|
|
11625
11629
|
}];
|
|
11626
11630
|
|
|
11627
11631
|
const createEmployeeConfig$1 = [{
|
|
11628
|
-
head: "
|
|
11629
|
-
stepLabel: "
|
|
11632
|
+
head: "Applicant Details",
|
|
11633
|
+
stepLabel: "Applicant Details",
|
|
11630
11634
|
stepNumber: 1,
|
|
11631
11635
|
isStepEnabled: true,
|
|
11632
11636
|
type: "component",
|
|
@@ -11689,7 +11693,7 @@ const NewNDCStepForm = () => {
|
|
|
11689
11693
|
color: "#1C1D1F"
|
|
11690
11694
|
},
|
|
11691
11695
|
divider: true
|
|
11692
|
-
}, t("
|
|
11696
|
+
}, t("ndc_header_application")), /*#__PURE__*/React__default.createElement(Stepper, {
|
|
11693
11697
|
stepsList: updatedCreateEmployeeconfig$1,
|
|
11694
11698
|
onSubmit: handleSubmit,
|
|
11695
11699
|
step: step,
|
|
@@ -11720,7 +11724,6 @@ const NewNDCStepFormOne = _ref => {
|
|
|
11720
11724
|
const tenantId = window.localStorage.getItem("CITIZEN.CITY");
|
|
11721
11725
|
function goNext(data) {
|
|
11722
11726
|
var _checkFormData$apiDat, _checkFormData$apiDat2, _checkFormData$apiDat3;
|
|
11723
|
-
console.log("Data in step " + config.currStepNumber + " is: \n", data);
|
|
11724
11727
|
const missingFields = validateStepData(currentStepData);
|
|
11725
11728
|
if (missingFields.length > 0) {
|
|
11726
11729
|
setError("" + missingFields[0]);
|
|
@@ -11830,19 +11833,43 @@ const NewNDCStepFormOne = _ref => {
|
|
|
11830
11833
|
return Promise.reject(e);
|
|
11831
11834
|
}
|
|
11832
11835
|
};
|
|
11833
|
-
const validatePropertyId = value => {
|
|
11834
|
-
const regex = /^PT-\d{4}-\d{7,8}$/;
|
|
11835
|
-
return regex.test(value);
|
|
11836
|
-
};
|
|
11837
11836
|
function validateStepData(data) {
|
|
11837
|
+
var _data$cpt6, _data$cpt6$dues, _data$cpt7, _data$cpt7$dues, _data$dues, _propertyDetails$wate, _propertyDetails$sewe;
|
|
11838
11838
|
const missingFields = [];
|
|
11839
11839
|
const invalidFields = [];
|
|
11840
11840
|
const cpt = (data === null || data === void 0 ? void 0 : data.cpt) || {};
|
|
11841
11841
|
const cptDetails = (cpt === null || cpt === void 0 ? void 0 : cpt.details) || {};
|
|
11842
11842
|
const propertyDetails = (data === null || data === void 0 ? void 0 : data.PropertyDetails) || {};
|
|
11843
11843
|
const NDCReason = (data === null || data === void 0 ? void 0 : data.NDCReason) || {};
|
|
11844
|
+
if ((data === null || data === void 0 ? void 0 : (_data$cpt6 = data.cpt) === null || _data$cpt6 === void 0 ? void 0 : (_data$cpt6$dues = _data$cpt6.dues) === null || _data$cpt6$dues === void 0 ? void 0 : _data$cpt6$dues.totalAmount) != 0) {
|
|
11845
|
+
missingFields.push(t("NDC_MESSAGE_PLEASE_CHECK_STATUS_OF_PROPERTY_TAX") + " " + (cpt === null || cpt === void 0 ? void 0 : cpt.id));
|
|
11846
|
+
}
|
|
11847
|
+
if (data !== null && data !== void 0 && (_data$cpt7 = data.cpt) !== null && _data$cpt7 !== void 0 && (_data$cpt7$dues = _data$cpt7.dues) !== null && _data$cpt7$dues !== void 0 && _data$cpt7$dues.id && (data === null || data === void 0 ? void 0 : (_data$dues = data.dues) === null || _data$dues === void 0 ? void 0 : _data$dues.totalAmount) > 0) {
|
|
11848
|
+
missingFields.push(t("NDC_MESSAGE_PLEASE_PAY_DUES_OF_PROPERTY_TAX") + " " + (cpt === null || cpt === void 0 ? void 0 : cpt.id));
|
|
11849
|
+
}
|
|
11850
|
+
if ((propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$wate = propertyDetails.waterConnection) === null || _propertyDetails$wate === void 0 ? void 0 : _propertyDetails$wate.length) > 0) {
|
|
11851
|
+
propertyDetails.waterConnection.forEach(value => {
|
|
11852
|
+
var _value$billData, _value$billData2, _value$billData3;
|
|
11853
|
+
if ((value === null || value === void 0 ? void 0 : (_value$billData = value.billData) === null || _value$billData === void 0 ? void 0 : _value$billData.totalAmount) != 0) {
|
|
11854
|
+
missingFields.push(t("NDC_MESSAGE_PLEASE_CHECK_STATUS_OF_WATER_CONNECTION") + " " + (value === null || value === void 0 ? void 0 : value.connectionNo));
|
|
11855
|
+
}
|
|
11856
|
+
if (value !== null && value !== void 0 && (_value$billData2 = value.billData) !== null && _value$billData2 !== void 0 && _value$billData2.id && (value === null || value === void 0 ? void 0 : (_value$billData3 = value.billData) === null || _value$billData3 === void 0 ? void 0 : _value$billData3.totalAmount) > 0) {
|
|
11857
|
+
missingFields.push(t("NDC_MESSAGE_PLEASE_PAY_DUES_OF_WATER_CONNECTION") + " " + (value === null || value === void 0 ? void 0 : value.connectionNo));
|
|
11858
|
+
}
|
|
11859
|
+
});
|
|
11860
|
+
}
|
|
11861
|
+
if ((propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$sewe = propertyDetails.sewerageConnection) === null || _propertyDetails$sewe === void 0 ? void 0 : _propertyDetails$sewe.length) > 0) {
|
|
11862
|
+
propertyDetails.sewerageConnection.forEach(value => {
|
|
11863
|
+
var _value$billData4, _value$billData5, _value$billData6;
|
|
11864
|
+
if ((value === null || value === void 0 ? void 0 : (_value$billData4 = value.billData) === null || _value$billData4 === void 0 ? void 0 : _value$billData4.totalAmount) != 0) {
|
|
11865
|
+
missingFields.push(t("NDC_MESSAGE_PLEASE_CHECK_STATUS_OF_SEWERAGE_CONNECTION") + " " + (value === null || value === void 0 ? void 0 : value.connectionNo));
|
|
11866
|
+
}
|
|
11867
|
+
if (value !== null && value !== void 0 && (_value$billData5 = value.billData) !== null && _value$billData5 !== void 0 && _value$billData5.id && (value === null || value === void 0 ? void 0 : (_value$billData6 = value.billData) === null || _value$billData6 === void 0 ? void 0 : _value$billData6.totalAmount) > 0) {
|
|
11868
|
+
missingFields.push(t("NDC_MESSAGE_PLEASE_PAY_DUES_OF_SEWERAGE_CONNECTION") + " " + (value === null || value === void 0 ? void 0 : value.connectionNo));
|
|
11869
|
+
}
|
|
11870
|
+
});
|
|
11871
|
+
}
|
|
11844
11872
|
if (!(cpt !== null && cpt !== void 0 && cpt.id)) missingFields.push(t("NDC_MESSAGE_PROPERTY_ID"));
|
|
11845
|
-
if (!validatePropertyId(cpt === null || cpt === void 0 ? void 0 : cpt.id)) missingFields.push(t("PT_PROPERTY_ID_INVALID"));
|
|
11846
11873
|
if (!cptDetails || Object.keys(cptDetails).length === 0) missingFields.push(t("NDC_MESSAGE_PLEASE_SEARCH_PROPERTY_ID"));
|
|
11847
11874
|
if (!(propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.firstName)) missingFields.push(t("NDC_MESSAGE_FIRST_NAME"));
|
|
11848
11875
|
if (!(propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.lastName)) missingFields.push(t("NDC_MESSAGE_LAST_NAME"));
|
|
@@ -11856,8 +11883,12 @@ const NewNDCStepFormOne = _ref => {
|
|
|
11856
11883
|
if (propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.firstName && !nameRegex.test(propertyDetails.firstName)) {
|
|
11857
11884
|
invalidFields.push(t("NDC_MESSAGE_FIRST_NAME_ONLY_ALPHABETS_ALLOWED"));
|
|
11858
11885
|
}
|
|
11859
|
-
if (propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.lastName
|
|
11860
|
-
|
|
11886
|
+
if (propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.lastName) {
|
|
11887
|
+
if (!nameRegex.test(propertyDetails.lastName)) {
|
|
11888
|
+
invalidFields.push(t("NDC_MESSAGE_LAST_NAME_ONLY_ALPHABETS_ALLOWED"));
|
|
11889
|
+
} else if (propertyDetails.lastName.length > 100) {
|
|
11890
|
+
invalidFields.push(t("NDC_MESSAGE_LAST_NAME_MAX_100_CHARACTERS"));
|
|
11891
|
+
}
|
|
11861
11892
|
}
|
|
11862
11893
|
if (propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.email && !emailRegex.test(propertyDetails.email)) {
|
|
11863
11894
|
invalidFields.push(t("NDC_MESSAGE_EMAIL_INVALID_FORMAT"));
|
|
@@ -11921,6 +11952,10 @@ function SelectNDCReason(_ref) {
|
|
|
11921
11952
|
const {
|
|
11922
11953
|
t
|
|
11923
11954
|
} = reactI18next.useTranslation();
|
|
11955
|
+
const apiDataCheck = reactRedux.useSelector(state => {
|
|
11956
|
+
var _state$ndc$NDCForm, _state$ndc$NDCForm$fo;
|
|
11957
|
+
return (_state$ndc$NDCForm = state.ndc.NDCForm) === null || _state$ndc$NDCForm === void 0 ? void 0 : (_state$ndc$NDCForm$fo = _state$ndc$NDCForm.formData) === null || _state$ndc$NDCForm$fo === void 0 ? void 0 : _state$ndc$NDCForm$fo.responseData;
|
|
11958
|
+
});
|
|
11924
11959
|
const {
|
|
11925
11960
|
data: menuList,
|
|
11926
11961
|
isLoading
|
|
@@ -11944,6 +11979,18 @@ function SelectNDCReason(_ref) {
|
|
|
11944
11979
|
React.useEffect(() => {
|
|
11945
11980
|
onSelect("NDCReason", ndcReason, config);
|
|
11946
11981
|
}, [ndcReason]);
|
|
11982
|
+
React.useEffect(() => {
|
|
11983
|
+
if (apiDataCheck && (ndcReasonOptions === null || ndcReasonOptions === void 0 ? void 0 : ndcReasonOptions.length) > 0) {
|
|
11984
|
+
const matchedOption = ndcReasonOptions.find(opt => {
|
|
11985
|
+
var _apiDataCheck$;
|
|
11986
|
+
return (opt === null || opt === void 0 ? void 0 : opt.code) === (apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$ = apiDataCheck[0]) === null || _apiDataCheck$ === void 0 ? void 0 : _apiDataCheck$.reason);
|
|
11987
|
+
});
|
|
11988
|
+
if (matchedOption) {
|
|
11989
|
+
setNDCReason(matchedOption);
|
|
11990
|
+
setValue("NDCReason", matchedOption);
|
|
11991
|
+
}
|
|
11992
|
+
}
|
|
11993
|
+
}, [apiDataCheck, ndcReasonOptions]);
|
|
11947
11994
|
if (isLoading) {
|
|
11948
11995
|
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null);
|
|
11949
11996
|
}
|
|
@@ -11955,10 +12002,10 @@ function SelectNDCReason(_ref) {
|
|
|
11955
12002
|
};
|
|
11956
12003
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
11957
12004
|
style: {
|
|
11958
|
-
|
|
12005
|
+
paddingBottom: "16px"
|
|
11959
12006
|
}
|
|
11960
12007
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, {
|
|
11961
|
-
className: "card-label-smaller"
|
|
12008
|
+
className: "card-label-smaller ndc_card_labels"
|
|
11962
12009
|
}, t("NDC_NEW_NDC_APPLICATION_NDC_REASON") + " * "), /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
11963
12010
|
name: "NDCReason",
|
|
11964
12011
|
rules: {
|
|
@@ -11972,6 +12019,7 @@ function SelectNDCReason(_ref) {
|
|
|
11972
12019
|
option: ndcReasonOptions,
|
|
11973
12020
|
select: e => {
|
|
11974
12021
|
setNDCReason(e);
|
|
12022
|
+
props.onChange(e);
|
|
11975
12023
|
},
|
|
11976
12024
|
optionKey: "i18nKey",
|
|
11977
12025
|
onBlur: props.onBlur,
|
|
@@ -11983,7 +12031,7 @@ function SelectNDCReason(_ref) {
|
|
|
11983
12031
|
}
|
|
11984
12032
|
|
|
11985
12033
|
const PropertyDetailsForm$1 = _ref => {
|
|
11986
|
-
var _formData$cpt, _formData$cpt$details, _formData$cpt3, _Digit, _Digit$ComponentRegis, _formData$cpt4,
|
|
12034
|
+
var _formData$cpt, _formData$cpt$details, _formData$cpt3, _Digit, _Digit$ComponentRegis, _formData$cpt4, _apiDataCheck$6, _propertyDetails$wate, _propertyDetails$sewe;
|
|
11987
12035
|
const fetchBill = function (bussinessService, consumercodes, index) {
|
|
11988
12036
|
try {
|
|
11989
12037
|
if (bussinessService === "WS") {
|
|
@@ -12049,52 +12097,80 @@ const PropertyDetailsForm$1 = _ref => {
|
|
|
12049
12097
|
}));
|
|
12050
12098
|
}
|
|
12051
12099
|
} else if (result !== null && result !== void 0 && result.Bill) {
|
|
12052
|
-
setShowToast({
|
|
12053
|
-
error: true,
|
|
12054
|
-
label: t("NDC_MESSAGE_NO_BILLS_FOUND_FOR_THIS_CONSUMER_NUMBER")
|
|
12055
|
-
});
|
|
12056
12100
|
if (bussinessService === "WS") {
|
|
12057
12101
|
const updated = [...propertyDetails.waterConnection];
|
|
12102
|
+
updated[index].billData = {
|
|
12103
|
+
totalAmount: 0
|
|
12104
|
+
};
|
|
12058
12105
|
updated[index].isLoading = false;
|
|
12059
12106
|
setPropertyDetails(prev => _extends({}, prev, {
|
|
12060
12107
|
waterConnection: updated
|
|
12061
12108
|
}));
|
|
12109
|
+
setShowToast({
|
|
12110
|
+
error: false,
|
|
12111
|
+
label: t("NDC_NO_BILLS_FOUND_WS")
|
|
12112
|
+
});
|
|
12062
12113
|
} else if (bussinessService === "SW") {
|
|
12063
12114
|
const updated = [...propertyDetails.sewerageConnection];
|
|
12115
|
+
updated[index].billData = {
|
|
12116
|
+
totalAmount: 0
|
|
12117
|
+
};
|
|
12064
12118
|
updated[index].isLoading = false;
|
|
12065
12119
|
setPropertyDetails(prev => _extends({}, prev, {
|
|
12066
12120
|
sewerageConnection: updated
|
|
12067
12121
|
}));
|
|
12122
|
+
setShowToast({
|
|
12123
|
+
error: false,
|
|
12124
|
+
label: t("NDC_NO_BILLS_FOUND_SW")
|
|
12125
|
+
});
|
|
12068
12126
|
} else if (bussinessService === "PT") {
|
|
12069
12127
|
let updated = _extends({}, propertyDetails.propertyBillData);
|
|
12070
12128
|
updated.isLoading = false;
|
|
12071
12129
|
setPropertyDetails(prev => _extends({}, prev, {
|
|
12072
12130
|
propertyBillData: updated
|
|
12073
12131
|
}));
|
|
12132
|
+
setShowToast({
|
|
12133
|
+
error: false,
|
|
12134
|
+
label: t("NDC_NO_BILLS_FOUND_PROPERTY")
|
|
12135
|
+
});
|
|
12074
12136
|
}
|
|
12075
12137
|
} else {
|
|
12076
|
-
setShowToast({
|
|
12077
|
-
error: true,
|
|
12078
|
-
label: t("INVALID_CONSUMER_NUMBER")
|
|
12079
|
-
});
|
|
12080
12138
|
if (bussinessService === "WS") {
|
|
12081
12139
|
const updated = [...propertyDetails.waterConnection];
|
|
12082
12140
|
updated[index].isLoading = false;
|
|
12141
|
+
updated[index].billData = {
|
|
12142
|
+
totalAmount: 0
|
|
12143
|
+
};
|
|
12083
12144
|
setPropertyDetails(prev => _extends({}, prev, {
|
|
12084
12145
|
waterConnection: updated
|
|
12085
12146
|
}));
|
|
12147
|
+
setShowToast({
|
|
12148
|
+
error: false,
|
|
12149
|
+
label: t("NDC_NO_BILLS_FOUND_WS")
|
|
12150
|
+
});
|
|
12086
12151
|
} else if (bussinessService === "SW") {
|
|
12087
12152
|
const updated = [...propertyDetails.sewerageConnection];
|
|
12088
12153
|
updated[index].isLoading = false;
|
|
12154
|
+
updated[index].billData = {
|
|
12155
|
+
totalAmount: 0
|
|
12156
|
+
};
|
|
12089
12157
|
setPropertyDetails(prev => _extends({}, prev, {
|
|
12090
12158
|
sewerageConnection: updated
|
|
12091
12159
|
}));
|
|
12160
|
+
setShowToast({
|
|
12161
|
+
error: false,
|
|
12162
|
+
label: t("NDC_NO_BILLS_FOUND_SW")
|
|
12163
|
+
});
|
|
12092
12164
|
} else if (bussinessService === "PT") {
|
|
12093
12165
|
let updated = _extends({}, propertyDetails.propertyBillData);
|
|
12094
12166
|
updated.isLoading = false;
|
|
12095
12167
|
setPropertyDetails(prev => _extends({}, prev, {
|
|
12096
12168
|
propertyBillData: updated
|
|
12097
12169
|
}));
|
|
12170
|
+
setShowToast({
|
|
12171
|
+
error: false,
|
|
12172
|
+
label: t("NDC_NO_BILLS_FOUND_PROPERTY")
|
|
12173
|
+
});
|
|
12098
12174
|
}
|
|
12099
12175
|
}
|
|
12100
12176
|
});
|
|
@@ -12131,6 +12207,10 @@ const PropertyDetailsForm$1 = _ref => {
|
|
|
12131
12207
|
t
|
|
12132
12208
|
} = reactI18next.useTranslation();
|
|
12133
12209
|
const tenantId = window.location.href.includes("citizen") ? window.localStorage.getItem("CITIZEN.CITY") : window.localStorage.getItem("Employee.tenant-id");
|
|
12210
|
+
const apiDataCheck = reactRedux.useSelector(state => {
|
|
12211
|
+
var _state$ndc$NDCForm, _state$ndc$NDCForm$fo;
|
|
12212
|
+
return (_state$ndc$NDCForm = state.ndc.NDCForm) === null || _state$ndc$NDCForm === void 0 ? void 0 : (_state$ndc$NDCForm$fo = _state$ndc$NDCForm.formData) === null || _state$ndc$NDCForm$fo === void 0 ? void 0 : _state$ndc$NDCForm$fo.responseData;
|
|
12213
|
+
});
|
|
12134
12214
|
const [showToast, setShowToast] = React.useState(null);
|
|
12135
12215
|
const [propertyLoader, setPropertyLoader] = React.useState(false);
|
|
12136
12216
|
const [showPayModal, setShowPayModal] = React.useState(false);
|
|
@@ -12196,37 +12276,61 @@ const PropertyDetailsForm$1 = _ref => {
|
|
|
12196
12276
|
});
|
|
12197
12277
|
}, [formData === null || formData === void 0 ? void 0 : (_formData$cpt3 = formData.cpt) === null || _formData$cpt3 === void 0 ? void 0 : _formData$cpt3.details]);
|
|
12198
12278
|
React.useEffect(() => {
|
|
12199
|
-
var
|
|
12200
|
-
|
|
12201
|
-
|
|
12202
|
-
|
|
12203
|
-
|
|
12204
|
-
|
|
12205
|
-
|
|
12206
|
-
|
|
12207
|
-
|
|
12208
|
-
|
|
12209
|
-
|
|
12210
|
-
|
|
12211
|
-
|
|
12279
|
+
var _apiDataCheck$;
|
|
12280
|
+
let waterConnection;
|
|
12281
|
+
if (apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$ = apiDataCheck[0]) !== null && _apiDataCheck$ !== void 0 && _apiDataCheck$.NdcDetails) {
|
|
12282
|
+
var _apiDataCheck$2;
|
|
12283
|
+
const resData = apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$2 = apiDataCheck[0]) === null || _apiDataCheck$2 === void 0 ? void 0 : _apiDataCheck$2.NdcDetails.filter(item => {
|
|
12284
|
+
return item.businessService == "WS";
|
|
12285
|
+
});
|
|
12286
|
+
waterConnection = (resData === null || resData === void 0 ? void 0 : resData.map(item => ({
|
|
12287
|
+
connectionNo: item === null || item === void 0 ? void 0 : item.consumerCode,
|
|
12288
|
+
isEdit: false,
|
|
12289
|
+
billData: {
|
|
12290
|
+
totalAmount: 0
|
|
12291
|
+
},
|
|
12292
|
+
isLoading: false
|
|
12293
|
+
}))) || [];
|
|
12294
|
+
} else {
|
|
12295
|
+
waterConnection = (waterConnectionData === null || waterConnectionData === void 0 ? void 0 : waterConnectionData.map(item => ({
|
|
12296
|
+
connectionNo: item === null || item === void 0 ? void 0 : item.connectionNo,
|
|
12297
|
+
isEdit: false,
|
|
12298
|
+
billData: {},
|
|
12299
|
+
isLoading: false
|
|
12300
|
+
}))) || [];
|
|
12212
12301
|
}
|
|
12213
|
-
|
|
12302
|
+
setPropertyDetails(prev => _extends({}, prev, {
|
|
12303
|
+
waterConnection
|
|
12304
|
+
}));
|
|
12305
|
+
}, [waterConnectionData, apiDataCheck]);
|
|
12214
12306
|
React.useEffect(() => {
|
|
12215
|
-
var
|
|
12216
|
-
|
|
12217
|
-
|
|
12218
|
-
|
|
12219
|
-
|
|
12220
|
-
|
|
12221
|
-
|
|
12222
|
-
|
|
12223
|
-
|
|
12224
|
-
|
|
12225
|
-
|
|
12226
|
-
|
|
12227
|
-
|
|
12307
|
+
var _apiDataCheck$3;
|
|
12308
|
+
let sewerageConnection;
|
|
12309
|
+
if (apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$3 = apiDataCheck[0]) !== null && _apiDataCheck$3 !== void 0 && _apiDataCheck$3.NdcDetails) {
|
|
12310
|
+
var _apiDataCheck$4;
|
|
12311
|
+
const resData = apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$4 = apiDataCheck[0]) === null || _apiDataCheck$4 === void 0 ? void 0 : _apiDataCheck$4.NdcDetails.filter(item => {
|
|
12312
|
+
return item.businessService == "SW";
|
|
12313
|
+
});
|
|
12314
|
+
sewerageConnection = (resData === null || resData === void 0 ? void 0 : resData.map(item => ({
|
|
12315
|
+
connectionNo: item === null || item === void 0 ? void 0 : item.consumerCode,
|
|
12316
|
+
isEdit: false,
|
|
12317
|
+
billData: {
|
|
12318
|
+
totalAmount: 0
|
|
12319
|
+
},
|
|
12320
|
+
isLoading: false
|
|
12321
|
+
}))) || [];
|
|
12322
|
+
} else {
|
|
12323
|
+
sewerageConnection = (sewerageConnectionData === null || sewerageConnectionData === void 0 ? void 0 : sewerageConnectionData.map(item => ({
|
|
12324
|
+
connectionNo: item === null || item === void 0 ? void 0 : item.connectionNo,
|
|
12325
|
+
isEdit: false,
|
|
12326
|
+
billData: {},
|
|
12327
|
+
isLoading: false
|
|
12328
|
+
}))) || [];
|
|
12228
12329
|
}
|
|
12229
|
-
|
|
12330
|
+
setPropertyDetails(prev => _extends({}, prev, {
|
|
12331
|
+
sewerageConnection
|
|
12332
|
+
}));
|
|
12333
|
+
}, [sewerageConnectionData, apiDataCheck]);
|
|
12230
12334
|
React.useEffect(() => {
|
|
12231
12335
|
onSelect("PropertyDetails", propertyDetails, config);
|
|
12232
12336
|
}, [propertyDetails]);
|
|
@@ -12301,63 +12405,46 @@ const PropertyDetailsForm$1 = _ref => {
|
|
|
12301
12405
|
}
|
|
12302
12406
|
}
|
|
12303
12407
|
const PayWSBillModal = (_Digit = Digit) === null || _Digit === void 0 ? void 0 : (_Digit$ComponentRegis = _Digit.ComponentRegistryService) === null || _Digit$ComponentRegis === void 0 ? void 0 : _Digit$ComponentRegis.getComponent("PayWSBillModal");
|
|
12304
|
-
|
|
12305
|
-
|
|
12306
|
-
|
|
12307
|
-
|
|
12308
|
-
|
|
12309
|
-
|
|
12310
|
-
style: {
|
|
12311
|
-
display: "flex",
|
|
12312
|
-
flexDirection: "column",
|
|
12313
|
-
gap: "4px"
|
|
12314
|
-
}
|
|
12315
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
12316
|
-
style: {
|
|
12317
|
-
display: "flex",
|
|
12318
|
-
flexDirection: "row"
|
|
12319
|
-
}
|
|
12320
|
-
}, propertyLoader ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null) : /*#__PURE__*/React__default.createElement("div", null, (formData === null || formData === void 0 ? void 0 : (_formData$cpt5 = formData.cpt) === null || _formData$cpt5 === void 0 ? void 0 : _formData$cpt5.id) && !(propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$prop = propertyDetails.propertyBillData) !== null && _propertyDetails$prop !== void 0 && (_propertyDetails$prop2 = _propertyDetails$prop.billData) !== null && _propertyDetails$prop2 !== void 0 && _propertyDetails$prop2.id) && /*#__PURE__*/React__default.createElement("button", {
|
|
12321
|
-
className: "submit-bar",
|
|
12322
|
-
type: "button",
|
|
12323
|
-
style: {
|
|
12324
|
-
color: "white",
|
|
12325
|
-
fontSize: "13px"
|
|
12326
|
-
},
|
|
12327
|
-
onClick: () => {
|
|
12328
|
-
var _formData$cpt6;
|
|
12329
|
-
fetchBill("PT", formData === null || formData === void 0 ? void 0 : (_formData$cpt6 = formData.cpt) === null || _formData$cpt6 === void 0 ? void 0 : _formData$cpt6.id);
|
|
12408
|
+
React.useEffect(() => {
|
|
12409
|
+
if (showToast) {
|
|
12410
|
+
const timer = setTimeout(() => {
|
|
12411
|
+
setShowToast(null);
|
|
12412
|
+
}, 3000);
|
|
12413
|
+
return () => clearTimeout(timer);
|
|
12330
12414
|
}
|
|
12331
|
-
},
|
|
12332
|
-
|
|
12333
|
-
|
|
12334
|
-
|
|
12335
|
-
|
|
12336
|
-
|
|
12337
|
-
|
|
12338
|
-
|
|
12339
|
-
|
|
12415
|
+
}, [showToast]);
|
|
12416
|
+
React.useEffect(() => {
|
|
12417
|
+
if (apiDataCheck) {
|
|
12418
|
+
var _apiDataCheck$5, _apiDataCheck$5$owner, _apiDataCheck$5$owner2;
|
|
12419
|
+
const apiEmail = (apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$5 = apiDataCheck[0]) === null || _apiDataCheck$5 === void 0 ? void 0 : (_apiDataCheck$5$owner = _apiDataCheck$5.owners) === null || _apiDataCheck$5$owner === void 0 ? void 0 : (_apiDataCheck$5$owner2 = _apiDataCheck$5$owner[0]) === null || _apiDataCheck$5$owner2 === void 0 ? void 0 : _apiDataCheck$5$owner2.emailId) || "";
|
|
12420
|
+
setValue("email", apiEmail);
|
|
12421
|
+
setPropertyDetails(prev => _extends({}, prev, {
|
|
12422
|
+
email: apiEmail
|
|
12423
|
+
}));
|
|
12340
12424
|
}
|
|
12341
|
-
},
|
|
12425
|
+
}, [apiDataCheck]);
|
|
12426
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
12342
12427
|
style: {
|
|
12343
|
-
|
|
12428
|
+
marginBottom: "16px"
|
|
12344
12429
|
}
|
|
12345
|
-
},
|
|
12430
|
+
}, ((formData === null || formData === void 0 ? void 0 : (_formData$cpt4 = formData.cpt) === null || _formData$cpt4 === void 0 ? void 0 : _formData$cpt4.details) || (apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$6 = apiDataCheck[0]) === null || _apiDataCheck$6 === void 0 ? void 0 : _apiDataCheck$6.NdcDetails)) && /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, {
|
|
12346
12431
|
style: {
|
|
12347
12432
|
marginTop: "40px"
|
|
12348
12433
|
}
|
|
12349
12434
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, {
|
|
12350
|
-
className: "card-label-smaller"
|
|
12435
|
+
className: "card-label-smaller ndc_card_labels"
|
|
12351
12436
|
}, "" + t("NDC_WATER_CONNECTION")), waterConnectionLoading ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null) : /*#__PURE__*/React__default.createElement("div", {
|
|
12352
12437
|
className: "field",
|
|
12353
12438
|
style: {
|
|
12354
12439
|
display: "flex",
|
|
12355
12440
|
flexDirection: "column",
|
|
12356
|
-
gap: "8px"
|
|
12441
|
+
gap: "8px",
|
|
12442
|
+
width: "100%"
|
|
12357
12443
|
}
|
|
12358
12444
|
}, propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$wate = propertyDetails.waterConnection) === null || _propertyDetails$wate === void 0 ? void 0 : _propertyDetails$wate.map((item, index) => {
|
|
12359
|
-
var _item$billData, _item$billData2, _item$billData3;
|
|
12445
|
+
var _apiDataCheck$7, _item$billData, _item$billData2, _item$billData3, _item$billData4;
|
|
12360
12446
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
12447
|
+
className: "ndc_property_search",
|
|
12361
12448
|
key: index,
|
|
12362
12449
|
style: {
|
|
12363
12450
|
display: "flex",
|
|
@@ -12395,7 +12482,7 @@ const PropertyDetailsForm$1 = _ref => {
|
|
|
12395
12482
|
alignItems: "center",
|
|
12396
12483
|
gap: "12px"
|
|
12397
12484
|
}
|
|
12398
|
-
}, (item === null || item === void 0 ? void 0 : item.connectionNo) && !(item !== null && item !== void 0 && (_item$billData = item.billData) !== null && _item$billData !== void 0 && _item$billData.id) && /*#__PURE__*/React__default.createElement("button", {
|
|
12485
|
+
}, !(apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$7 = apiDataCheck[0]) !== null && _apiDataCheck$7 !== void 0 && _apiDataCheck$7.NdcDetails) && (item === null || item === void 0 ? void 0 : item.connectionNo) && !(item !== null && item !== void 0 && (_item$billData = item.billData) !== null && _item$billData !== void 0 && _item$billData.id) && (item === null || item === void 0 ? void 0 : (_item$billData2 = item.billData) === null || _item$billData2 === void 0 ? void 0 : _item$billData2.totalAmount) != 0 && /*#__PURE__*/React__default.createElement("button", {
|
|
12399
12486
|
className: "submit-bar",
|
|
12400
12487
|
type: "button",
|
|
12401
12488
|
style: {
|
|
@@ -12405,7 +12492,7 @@ const PropertyDetailsForm$1 = _ref => {
|
|
|
12405
12492
|
onClick: () => {
|
|
12406
12493
|
fetchBill("WS", item.connectionNo, index);
|
|
12407
12494
|
}
|
|
12408
|
-
}, "
|
|
12495
|
+
}, "" + t("CHECK_STATUS_WATER")), (item === null || item === void 0 ? void 0 : item.connectionNo) && (item === null || item === void 0 ? void 0 : (_item$billData3 = item.billData) === null || _item$billData3 === void 0 ? void 0 : _item$billData3.totalAmount) > 0 && /*#__PURE__*/React__default.createElement("button", {
|
|
12409
12496
|
className: "submit-bar",
|
|
12410
12497
|
type: "button",
|
|
12411
12498
|
style: {
|
|
@@ -12414,7 +12501,7 @@ const PropertyDetailsForm$1 = _ref => {
|
|
|
12414
12501
|
onClick: () => {
|
|
12415
12502
|
redirectToPayBill(item === null || item === void 0 ? void 0 : item.billData, index, item.isEdit);
|
|
12416
12503
|
}
|
|
12417
|
-
}, "" + t("PAY_DUES")), (item === null || item === void 0 ? void 0 : item.connectionNo) && (item === null || item === void 0 ? void 0 : (_item$
|
|
12504
|
+
}, "" + t("PAY_DUES")), (item === null || item === void 0 ? void 0 : item.connectionNo) && (item === null || item === void 0 ? void 0 : (_item$billData4 = item.billData) === null || _item$billData4 === void 0 ? void 0 : _item$billData4.totalAmount) == 0 && /*#__PURE__*/React__default.createElement("div", {
|
|
12418
12505
|
style: {
|
|
12419
12506
|
color: "green"
|
|
12420
12507
|
}
|
|
@@ -12440,7 +12527,8 @@ const PropertyDetailsForm$1 = _ref => {
|
|
|
12440
12527
|
className: "submit-bar",
|
|
12441
12528
|
type: "button",
|
|
12442
12529
|
style: {
|
|
12443
|
-
color: "white"
|
|
12530
|
+
color: "white",
|
|
12531
|
+
fontSize: "12px"
|
|
12444
12532
|
},
|
|
12445
12533
|
onClick: () => {
|
|
12446
12534
|
addWaterConnection();
|
|
@@ -12450,17 +12538,19 @@ const PropertyDetailsForm$1 = _ref => {
|
|
|
12450
12538
|
marginTop: "40px"
|
|
12451
12539
|
}
|
|
12452
12540
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, {
|
|
12453
|
-
className: "card-label-smaller"
|
|
12541
|
+
className: "card-label-smaller ndc_card_labels"
|
|
12454
12542
|
}, t("NDC_SEWERAGE_CONNECTION") + " "), sewerageConnectionLoading ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null) : /*#__PURE__*/React__default.createElement("div", {
|
|
12455
12543
|
className: "field",
|
|
12456
12544
|
style: {
|
|
12457
12545
|
display: "flex",
|
|
12458
12546
|
flexDirection: "column",
|
|
12459
|
-
gap: "8px"
|
|
12547
|
+
gap: "8px",
|
|
12548
|
+
width: "100%"
|
|
12460
12549
|
}
|
|
12461
12550
|
}, propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$sewe = propertyDetails.sewerageConnection) === null || _propertyDetails$sewe === void 0 ? void 0 : _propertyDetails$sewe.map((item, index) => {
|
|
12462
|
-
var
|
|
12551
|
+
var _apiDataCheck$8, _item$billData5, _item$billData6, _item$billData7, _item$billData8;
|
|
12463
12552
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
12553
|
+
className: "ndc_property_search",
|
|
12464
12554
|
key: index,
|
|
12465
12555
|
style: {
|
|
12466
12556
|
display: "flex",
|
|
@@ -12498,7 +12588,7 @@ const PropertyDetailsForm$1 = _ref => {
|
|
|
12498
12588
|
alignItems: "center",
|
|
12499
12589
|
gap: "12px"
|
|
12500
12590
|
}
|
|
12501
|
-
}, (item === null || item === void 0 ? void 0 : item.connectionNo) && !(item !== null && item !== void 0 && (_item$
|
|
12591
|
+
}, !(apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$8 = apiDataCheck[0]) !== null && _apiDataCheck$8 !== void 0 && _apiDataCheck$8.NdcDetails) && (item === null || item === void 0 ? void 0 : item.connectionNo) && !(item !== null && item !== void 0 && (_item$billData5 = item.billData) !== null && _item$billData5 !== void 0 && _item$billData5.id) && (item === null || item === void 0 ? void 0 : (_item$billData6 = item.billData) === null || _item$billData6 === void 0 ? void 0 : _item$billData6.totalAmount) != 0 && /*#__PURE__*/React__default.createElement("button", {
|
|
12502
12592
|
className: "submit-bar",
|
|
12503
12593
|
type: "button",
|
|
12504
12594
|
style: {
|
|
@@ -12508,7 +12598,7 @@ const PropertyDetailsForm$1 = _ref => {
|
|
|
12508
12598
|
onClick: () => {
|
|
12509
12599
|
fetchBill("SW", item.connectionNo, index);
|
|
12510
12600
|
}
|
|
12511
|
-
}, "
|
|
12601
|
+
}, "" + t("CHECK_STATUS_SEWERAGE")), (item === null || item === void 0 ? void 0 : item.connectionNo) && (item === null || item === void 0 ? void 0 : (_item$billData7 = item.billData) === null || _item$billData7 === void 0 ? void 0 : _item$billData7.totalAmount) > 0 && /*#__PURE__*/React__default.createElement("button", {
|
|
12512
12602
|
className: "submit-bar",
|
|
12513
12603
|
type: "button",
|
|
12514
12604
|
style: {
|
|
@@ -12517,7 +12607,11 @@ const PropertyDetailsForm$1 = _ref => {
|
|
|
12517
12607
|
onClick: () => {
|
|
12518
12608
|
redirectToPayBill(item === null || item === void 0 ? void 0 : item.billData, index);
|
|
12519
12609
|
}
|
|
12520
|
-
}, "" + t("PAY_DUES")), (item === null || item === void 0 ? void 0 : item.connectionNo) && (item === null || item === void 0 ? void 0 : (_item$
|
|
12610
|
+
}, "" + t("PAY_DUES")), (item === null || item === void 0 ? void 0 : item.connectionNo) && (item === null || item === void 0 ? void 0 : (_item$billData8 = item.billData) === null || _item$billData8 === void 0 ? void 0 : _item$billData8.totalAmount) == 0 && /*#__PURE__*/React__default.createElement("div", {
|
|
12611
|
+
style: {
|
|
12612
|
+
color: "green"
|
|
12613
|
+
}
|
|
12614
|
+
}, t("NO_DUES")), (item === null || item === void 0 ? void 0 : item.isEdit) && /*#__PURE__*/React__default.createElement("button", {
|
|
12521
12615
|
onClick: () => {
|
|
12522
12616
|
let updated = [...propertyDetails.sewerageConnection];
|
|
12523
12617
|
updated.splice(index, 1);
|
|
@@ -12539,7 +12633,8 @@ const PropertyDetailsForm$1 = _ref => {
|
|
|
12539
12633
|
className: "submit-bar",
|
|
12540
12634
|
type: "button",
|
|
12541
12635
|
style: {
|
|
12542
|
-
color: "white"
|
|
12636
|
+
color: "white",
|
|
12637
|
+
fontSize: " 12px"
|
|
12543
12638
|
},
|
|
12544
12639
|
onClick: () => {
|
|
12545
12640
|
addSewerageConnection();
|
|
@@ -12549,7 +12644,7 @@ const PropertyDetailsForm$1 = _ref => {
|
|
|
12549
12644
|
marginTop: "40px"
|
|
12550
12645
|
}
|
|
12551
12646
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, {
|
|
12552
|
-
className: "card-label-smaller"
|
|
12647
|
+
className: "card-label-smaller ndc_card_labels"
|
|
12553
12648
|
}, t("NDC_FIRST_NAME") + " * "), /*#__PURE__*/React__default.createElement("div", {
|
|
12554
12649
|
className: "field"
|
|
12555
12650
|
}, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
@@ -12563,7 +12658,7 @@ const PropertyDetailsForm$1 = _ref => {
|
|
|
12563
12658
|
}
|
|
12564
12659
|
},
|
|
12565
12660
|
render: props => {
|
|
12566
|
-
var _formData$
|
|
12661
|
+
var _formData$cpt5, _formData$cpt5$detail, _formData$cpt5$detail2, _formData$cpt5$detail3, _formData$cpt5$detail4, _formData$cpt5$detail5, _formData$cpt5$detail6;
|
|
12567
12662
|
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
12568
12663
|
value: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.firstName) || "",
|
|
12569
12664
|
onChange: e => {
|
|
@@ -12575,11 +12670,11 @@ const PropertyDetailsForm$1 = _ref => {
|
|
|
12575
12670
|
onBlur: e => {
|
|
12576
12671
|
props.onBlur(e);
|
|
12577
12672
|
},
|
|
12578
|
-
disabled: (formData === null || formData === void 0 ? void 0 : (_formData$
|
|
12673
|
+
disabled: (formData === null || formData === void 0 ? void 0 : (_formData$cpt5 = formData.cpt) === null || _formData$cpt5 === void 0 ? void 0 : (_formData$cpt5$detail = _formData$cpt5.details) === null || _formData$cpt5$detail === void 0 ? void 0 : (_formData$cpt5$detail2 = _formData$cpt5$detail.owners) === null || _formData$cpt5$detail2 === void 0 ? void 0 : (_formData$cpt5$detail3 = _formData$cpt5$detail2[0]) === null || _formData$cpt5$detail3 === void 0 ? void 0 : (_formData$cpt5$detail4 = _formData$cpt5$detail3.name) === null || _formData$cpt5$detail4 === void 0 ? void 0 : (_formData$cpt5$detail5 = _formData$cpt5$detail4.split(" ")) === null || _formData$cpt5$detail5 === void 0 ? void 0 : (_formData$cpt5$detail6 = _formData$cpt5$detail5[0]) === null || _formData$cpt5$detail6 === void 0 ? void 0 : _formData$cpt5$detail6.length) > 0
|
|
12579
12674
|
});
|
|
12580
12675
|
}
|
|
12581
12676
|
}))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, {
|
|
12582
|
-
className: "card-label-smaller"
|
|
12677
|
+
className: "card-label-smaller ndc_card_labels"
|
|
12583
12678
|
}, t("NDC_LAST_NAME") + " * "), /*#__PURE__*/React__default.createElement("div", {
|
|
12584
12679
|
className: "field"
|
|
12585
12680
|
}, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
@@ -12593,7 +12688,7 @@ const PropertyDetailsForm$1 = _ref => {
|
|
|
12593
12688
|
}
|
|
12594
12689
|
},
|
|
12595
12690
|
render: props => {
|
|
12596
|
-
var _formData$
|
|
12691
|
+
var _formData$cpt6, _formData$cpt6$detail, _formData$cpt6$detail2, _formData$cpt6$detail3, _formData$cpt6$detail4, _formData$cpt6$detail5, _formData$cpt6$detail6;
|
|
12597
12692
|
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
12598
12693
|
value: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.lastName) || "",
|
|
12599
12694
|
onChange: e => {
|
|
@@ -12605,35 +12700,35 @@ const PropertyDetailsForm$1 = _ref => {
|
|
|
12605
12700
|
onBlur: e => {
|
|
12606
12701
|
props.onBlur(e);
|
|
12607
12702
|
},
|
|
12608
|
-
disabled: (formData === null || formData === void 0 ? void 0 : (_formData$
|
|
12703
|
+
disabled: (formData === null || formData === void 0 ? void 0 : (_formData$cpt6 = formData.cpt) === null || _formData$cpt6 === void 0 ? void 0 : (_formData$cpt6$detail = _formData$cpt6.details) === null || _formData$cpt6$detail === void 0 ? void 0 : (_formData$cpt6$detail2 = _formData$cpt6$detail.owners) === null || _formData$cpt6$detail2 === void 0 ? void 0 : (_formData$cpt6$detail3 = _formData$cpt6$detail2[0]) === null || _formData$cpt6$detail3 === void 0 ? void 0 : (_formData$cpt6$detail4 = _formData$cpt6$detail3.name) === null || _formData$cpt6$detail4 === void 0 ? void 0 : (_formData$cpt6$detail5 = _formData$cpt6$detail4.split(" ")) === null || _formData$cpt6$detail5 === void 0 ? void 0 : (_formData$cpt6$detail6 = _formData$cpt6$detail5[1]) === null || _formData$cpt6$detail6 === void 0 ? void 0 : _formData$cpt6$detail6.length) > 0
|
|
12609
12704
|
});
|
|
12610
12705
|
}
|
|
12611
12706
|
}))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, {
|
|
12612
|
-
className: "card-label-smaller"
|
|
12707
|
+
className: "card-label-smaller ndc_card_labels"
|
|
12613
12708
|
}, t("NDC_EMAIL") + " * "), /*#__PURE__*/React__default.createElement("div", {
|
|
12614
12709
|
className: "field"
|
|
12615
12710
|
}, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
12616
12711
|
control: control,
|
|
12617
12712
|
name: "email",
|
|
12618
|
-
defaultValue:
|
|
12713
|
+
defaultValue: "",
|
|
12619
12714
|
render: props => {
|
|
12620
|
-
var _formData$
|
|
12715
|
+
var _formData$cpt7, _formData$cpt7$detail, _formData$cpt7$detail2, _formData$cpt7$detail3, _formData$cpt7$detail4;
|
|
12621
12716
|
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
12622
|
-
value:
|
|
12717
|
+
value: props === null || props === void 0 ? void 0 : props.value,
|
|
12623
12718
|
onChange: e => {
|
|
12719
|
+
props.onChange(e.target.value);
|
|
12624
12720
|
setPropertyDetails(prev => _extends({}, prev, {
|
|
12625
12721
|
email: e.target.value
|
|
12626
12722
|
}));
|
|
12627
|
-
props.onChange(e.target.value);
|
|
12628
12723
|
},
|
|
12629
12724
|
onBlur: e => {
|
|
12630
12725
|
props.onBlur(e);
|
|
12631
12726
|
},
|
|
12632
|
-
disabled: (formData === null || formData === void 0 ? void 0 : (_formData$
|
|
12727
|
+
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$detail4 = _formData$cpt7$detail3.email) === null || _formData$cpt7$detail4 === void 0 ? void 0 : _formData$cpt7$detail4.length) > 0
|
|
12633
12728
|
});
|
|
12634
12729
|
}
|
|
12635
12730
|
}))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, {
|
|
12636
|
-
className: "card-label-smaller"
|
|
12731
|
+
className: "card-label-smaller ndc_card_labels"
|
|
12637
12732
|
}, t("NDC_MOBILE_NUMBER") + " * "), /*#__PURE__*/React__default.createElement("div", {
|
|
12638
12733
|
className: "field"
|
|
12639
12734
|
}, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
@@ -12653,7 +12748,7 @@ const PropertyDetailsForm$1 = _ref => {
|
|
|
12653
12748
|
}
|
|
12654
12749
|
})
|
|
12655
12750
|
}))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, {
|
|
12656
|
-
className: "card-label-smaller"
|
|
12751
|
+
className: "card-label-smaller ndc_card_labels"
|
|
12657
12752
|
}, t("NDC_ADDRESS") + " * "), /*#__PURE__*/React__default.createElement("div", {
|
|
12658
12753
|
className: "field"
|
|
12659
12754
|
}, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
@@ -12661,7 +12756,7 @@ const PropertyDetailsForm$1 = _ref => {
|
|
|
12661
12756
|
name: "address",
|
|
12662
12757
|
defaultValue: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.address) || "",
|
|
12663
12758
|
render: props => {
|
|
12664
|
-
var _formData$
|
|
12759
|
+
var _formData$cpt8, _formData$cpt8$detail, _formData$cpt8$detail2, _formData$cpt8$detail3, _formData$cpt8$detail4;
|
|
12665
12760
|
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
12666
12761
|
value: propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.address,
|
|
12667
12762
|
onChange: e => {
|
|
@@ -12673,11 +12768,11 @@ const PropertyDetailsForm$1 = _ref => {
|
|
|
12673
12768
|
onBlur: e => {
|
|
12674
12769
|
props.onBlur(e);
|
|
12675
12770
|
},
|
|
12676
|
-
disabled: (formData === null || formData === void 0 ? void 0 : (_formData$
|
|
12771
|
+
disabled: (formData === null || formData === void 0 ? void 0 : (_formData$cpt8 = formData.cpt) === null || _formData$cpt8 === void 0 ? void 0 : (_formData$cpt8$detail = _formData$cpt8.details) === null || _formData$cpt8$detail === void 0 ? void 0 : (_formData$cpt8$detail2 = _formData$cpt8$detail.owners) === null || _formData$cpt8$detail2 === void 0 ? void 0 : (_formData$cpt8$detail3 = _formData$cpt8$detail2[0]) === null || _formData$cpt8$detail3 === void 0 ? void 0 : (_formData$cpt8$detail4 = _formData$cpt8$detail3.permanentAddress) === null || _formData$cpt8$detail4 === void 0 ? void 0 : _formData$cpt8$detail4.length) > 0
|
|
12677
12772
|
});
|
|
12678
12773
|
}
|
|
12679
12774
|
})))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, {
|
|
12680
|
-
className: "card-label-smaller"
|
|
12775
|
+
className: "card-label-smaller ndc_card_labels"
|
|
12681
12776
|
}, "" + t("NDC_TL_NUMBER")), /*#__PURE__*/React__default.createElement("div", {
|
|
12682
12777
|
className: "field"
|
|
12683
12778
|
}, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
@@ -12714,33 +12809,99 @@ const getAddress = (address, t) => {
|
|
|
12714
12809
|
return (address !== null && address !== void 0 && address.doorNo ? (address === null || address === void 0 ? void 0 : address.doorNo) + ", " : "") + " " + (address !== null && address !== void 0 && address.street ? (address === null || address === void 0 ? void 0 : address.street) + ", " : "") + (address !== null && address !== void 0 && address.landmark ? (address === null || address === void 0 ? void 0 : address.landmark) + ", " : "") + t(Digit.Utils.pt.getMohallaLocale(address === null || address === void 0 ? void 0 : address.locality.code, address === null || address === void 0 ? void 0 : address.tenantId)) + ", " + t(Digit.Utils.pt.getCityLocale(address === null || address === void 0 ? void 0 : address.tenantId)) + (address !== null && address !== void 0 && address.pincode && t(address === null || address === void 0 ? void 0 : address.pincode) ? ", " + address.pincode : " ");
|
|
12715
12810
|
};
|
|
12716
12811
|
const PropertySearchNSummary = _ref => {
|
|
12717
|
-
var _formData$cpt, _formData$cpt2, _propertyDetails$Prop3;
|
|
12812
|
+
var _apiDataCheck$, _apiDataCheck$$NdcDet, _formData$cpt, _formData$cpt2, _propertyDetails$Prop3, _apiDataCheck$2, _formData$cpt11, _formData$cpt12, _formData$cpt12$dues;
|
|
12813
|
+
const fetchBill = function () {
|
|
12814
|
+
try {
|
|
12815
|
+
const _temp = _catch(function () {
|
|
12816
|
+
var _formData$cpt14;
|
|
12817
|
+
return Promise.resolve(Digit.PaymentService.fetchBill(tenantId, {
|
|
12818
|
+
businessService: "PT",
|
|
12819
|
+
consumerCode: formData === null || formData === void 0 ? void 0 : (_formData$cpt14 = formData.cpt) === null || _formData$cpt14 === void 0 ? void 0 : _formData$cpt14.id
|
|
12820
|
+
})).then(function (result) {
|
|
12821
|
+
var _result$Bill;
|
|
12822
|
+
if ((result === null || result === void 0 ? void 0 : (_result$Bill = result.Bill) === null || _result$Bill === void 0 ? void 0 : _result$Bill.length) > 0) {
|
|
12823
|
+
var _result$Bill$;
|
|
12824
|
+
if ((result === null || result === void 0 ? void 0 : (_result$Bill$ = result.Bill[0]) === null || _result$Bill$ === void 0 ? void 0 : _result$Bill$.totalAmount) > 0) {
|
|
12825
|
+
setShowToast({
|
|
12826
|
+
error: true,
|
|
12827
|
+
label: t("NDC_MESSAGE_DUES_FOUND_PLEASE_PAY")
|
|
12828
|
+
});
|
|
12829
|
+
} else {
|
|
12830
|
+
setShowToast({
|
|
12831
|
+
error: false,
|
|
12832
|
+
label: t("NDC_NO_BILLS_FOUND_PROPERTY")
|
|
12833
|
+
});
|
|
12834
|
+
setNoDue(true);
|
|
12835
|
+
setCheckStats(false);
|
|
12836
|
+
}
|
|
12837
|
+
setPropertyDues({
|
|
12838
|
+
dues: result === null || result === void 0 ? void 0 : result.Bill[0]
|
|
12839
|
+
});
|
|
12840
|
+
} else if (result !== null && result !== void 0 && result.Bill) {
|
|
12841
|
+
setShowToast({
|
|
12842
|
+
error: false,
|
|
12843
|
+
label: t("NDC_NO_BILLS_FOUND_PROPERTY")
|
|
12844
|
+
});
|
|
12845
|
+
setPropertyDues({
|
|
12846
|
+
dues: {
|
|
12847
|
+
totalAmount: 0
|
|
12848
|
+
}
|
|
12849
|
+
});
|
|
12850
|
+
setNoDue(true);
|
|
12851
|
+
setCheckStats(false);
|
|
12852
|
+
} else {
|
|
12853
|
+
setShowToast({
|
|
12854
|
+
error: false,
|
|
12855
|
+
label: t("NDC_NO_BILLS_FOUND_PROPERTY")
|
|
12856
|
+
});
|
|
12857
|
+
setPropertyDues({
|
|
12858
|
+
dues: {
|
|
12859
|
+
totalAmount: 0
|
|
12860
|
+
}
|
|
12861
|
+
});
|
|
12862
|
+
setNoDue(true);
|
|
12863
|
+
setCheckStats(false);
|
|
12864
|
+
}
|
|
12865
|
+
});
|
|
12866
|
+
}, function () {
|
|
12867
|
+
setShowToast({
|
|
12868
|
+
error: true,
|
|
12869
|
+
label: t("NDC_MESSAGE_FETCH_FAILED")
|
|
12870
|
+
});
|
|
12871
|
+
});
|
|
12872
|
+
return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
|
|
12873
|
+
} catch (e) {
|
|
12874
|
+
return Promise.reject(e);
|
|
12875
|
+
}
|
|
12876
|
+
};
|
|
12718
12877
|
let {
|
|
12719
12878
|
config,
|
|
12720
12879
|
onSelect,
|
|
12721
|
-
|
|
12722
|
-
formData,
|
|
12723
|
-
setError,
|
|
12724
|
-
formState,
|
|
12725
|
-
clearErrors
|
|
12880
|
+
formData
|
|
12726
12881
|
} = _ref;
|
|
12727
12882
|
const {
|
|
12728
12883
|
t
|
|
12729
12884
|
} = reactI18next.useTranslation();
|
|
12730
|
-
const
|
|
12885
|
+
const myElementRef = React.useRef(null);
|
|
12886
|
+
const dispatch = reactRedux.useDispatch();
|
|
12731
12887
|
let {
|
|
12732
12888
|
pathname,
|
|
12733
12889
|
state
|
|
12734
12890
|
} = reactRouterDom.useLocation();
|
|
12735
12891
|
state = state && (typeof state === "string" || state instanceof String) ? JSON.parse(state) : state;
|
|
12892
|
+
const apiDataCheck = reactRedux.useSelector(state => {
|
|
12893
|
+
var _state$ndc$NDCForm, _state$ndc$NDCForm$fo;
|
|
12894
|
+
return (_state$ndc$NDCForm = state.ndc.NDCForm) === null || _state$ndc$NDCForm === void 0 ? void 0 : (_state$ndc$NDCForm$fo = _state$ndc$NDCForm.formData) === null || _state$ndc$NDCForm$fo === void 0 ? void 0 : _state$ndc$NDCForm$fo.responseData;
|
|
12895
|
+
});
|
|
12736
12896
|
const isEditScreen = pathname.includes("/modify-application/");
|
|
12737
|
-
const tenantId = Digit.ULBService.getCurrentPermanentCity();
|
|
12738
|
-
const isEmpNewApplication = window.location.href.includes("/employee/tl/new-application") || window.location.href.includes("/citizen/tl/tradelicence/new-application");
|
|
12739
|
-
const isEmpRenewLicense = window.location.href.includes("/employee/tl/renew-application-details") || window.location.href.includes("/employee/tl/edit-application-details");
|
|
12897
|
+
const tenantId = window.location.href.includes("employee") ? Digit.ULBService.getCurrentPermanentCity() : localStorage.getItem("CITIZEN.CITY");
|
|
12740
12898
|
const search = reactRouterDom.useLocation().search;
|
|
12741
12899
|
const urlPropertyId = new URLSearchParams(search).get("propertyId");
|
|
12742
|
-
const
|
|
12743
|
-
const
|
|
12900
|
+
const isfirstRender = React.useRef(true);
|
|
12901
|
+
const ptFromApi = apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$ = apiDataCheck[0]) === null || _apiDataCheck$ === void 0 ? void 0 : (_apiDataCheck$$NdcDet = _apiDataCheck$.NdcDetails) === null || _apiDataCheck$$NdcDet === void 0 ? void 0 : _apiDataCheck$$NdcDet.find(item => item.businessService == "PT");
|
|
12902
|
+
console.log("ptFromApi", ptFromApi);
|
|
12903
|
+
const [propertyId, setPropertyId] = React.useState((formData === null || formData === void 0 ? void 0 : (_formData$cpt = formData.cpt) === null || _formData$cpt === void 0 ? void 0 : _formData$cpt.id) || (urlPropertyId !== "null" ? urlPropertyId : "") || (ptFromApi === null || ptFromApi === void 0 ? void 0 : ptFromApi.consumerCode) || "");
|
|
12904
|
+
const [searchPropertyId, setSearchPropertyId] = React.useState((formData === null || formData === void 0 ? void 0 : (_formData$cpt2 = formData.cpt) === null || _formData$cpt2 === void 0 ? void 0 : _formData$cpt2.id) || (urlPropertyId !== "null" ? urlPropertyId : "") || (ptFromApi === null || ptFromApi === void 0 ? void 0 : ptFromApi.consumerCode) || "");
|
|
12744
12905
|
const [showToast, setShowToast] = React.useState(null);
|
|
12745
12906
|
const [propertyDetails, setPropertyDetails] = React.useState(() => {
|
|
12746
12907
|
var _formData$cpt3, _formData$cpt4;
|
|
@@ -12755,9 +12916,22 @@ const PropertySearchNSummary = _ref => {
|
|
|
12755
12916
|
};
|
|
12756
12917
|
}
|
|
12757
12918
|
});
|
|
12758
|
-
const
|
|
12759
|
-
|
|
12760
|
-
|
|
12919
|
+
const [propertyDues, setPropertyDues] = React.useState(() => {
|
|
12920
|
+
var _formData$cpt6, _formData$cpt7;
|
|
12921
|
+
if (formData !== null && formData !== void 0 && (_formData$cpt6 = formData.cpt) !== null && _formData$cpt6 !== void 0 && _formData$cpt6.dues && Object.keys(formData === null || formData === void 0 ? void 0 : (_formData$cpt7 = formData.cpt) === null || _formData$cpt7 === void 0 ? void 0 : _formData$cpt7.dues).length > 0) {
|
|
12922
|
+
var _formData$cpt8;
|
|
12923
|
+
return {
|
|
12924
|
+
dues: _extends({}, formData === null || formData === void 0 ? void 0 : (_formData$cpt8 = formData.cpt) === null || _formData$cpt8 === void 0 ? void 0 : _formData$cpt8.dues)
|
|
12925
|
+
};
|
|
12926
|
+
} else {
|
|
12927
|
+
return {
|
|
12928
|
+
dues: {}
|
|
12929
|
+
};
|
|
12930
|
+
}
|
|
12931
|
+
});
|
|
12932
|
+
const [isSearchClicked, setIsSearchClicked] = React.useState(false);
|
|
12933
|
+
const [getNoDue, setNoDue] = React.useState(false);
|
|
12934
|
+
const [getCheckStatus, setCheckStats] = React.useState(false);
|
|
12761
12935
|
const {
|
|
12762
12936
|
isLoading,
|
|
12763
12937
|
isError,
|
|
@@ -12776,20 +12950,31 @@ const PropertySearchNSummary = _ref => {
|
|
|
12776
12950
|
enabled: searchPropertyId ? true : false,
|
|
12777
12951
|
privacy: Digit.Utils.getPrivacyObject()
|
|
12778
12952
|
});
|
|
12779
|
-
|
|
12953
|
+
console.log("apiDataCheck", apiDataCheck);
|
|
12954
|
+
React.useEffect(() => {
|
|
12955
|
+
if (ptFromApi !== null && ptFromApi !== void 0 && ptFromApi.consumerCode) {
|
|
12956
|
+
setIsSearchClicked(true);
|
|
12957
|
+
setPropertyId(ptFromApi.consumerCode);
|
|
12958
|
+
setSearchPropertyId(ptFromApi.consumerCode);
|
|
12959
|
+
setNoDue(true);
|
|
12960
|
+
onSelect(config.key, _extends({}, formData[config.key], {
|
|
12961
|
+
id: ptFromApi.consumerCode
|
|
12962
|
+
}));
|
|
12963
|
+
}
|
|
12964
|
+
}, [ptFromApi]);
|
|
12780
12965
|
React.useEffect(() => {
|
|
12781
12966
|
var _propertyDetailsFetch;
|
|
12782
12967
|
if (propertyDetailsFetch && propertyDetailsFetch !== null && propertyDetailsFetch !== void 0 && propertyDetailsFetch.Properties && (propertyDetailsFetch === null || propertyDetailsFetch === void 0 ? void 0 : (_propertyDetailsFetch = propertyDetailsFetch.Properties) === null || _propertyDetailsFetch === void 0 ? void 0 : _propertyDetailsFetch.length) > 0) {
|
|
12783
12968
|
setPropertyDetails(propertyDetailsFetch);
|
|
12784
12969
|
setShowToast(null);
|
|
12970
|
+
setCheckStats(true);
|
|
12785
12971
|
} else {
|
|
12786
|
-
var _formData$
|
|
12972
|
+
var _formData$cpt9;
|
|
12787
12973
|
if (isfirstRender.current) {
|
|
12788
12974
|
isfirstRender.current = false;
|
|
12789
12975
|
return;
|
|
12790
12976
|
}
|
|
12791
|
-
if (!(formData !== null && formData !== void 0 && (_formData$
|
|
12792
|
-
console.log("Property Id not found in response", propertyId);
|
|
12977
|
+
if (!(formData !== null && formData !== void 0 && (_formData$cpt9 = formData.cpt) !== null && _formData$cpt9 !== void 0 && _formData$cpt9.details)) {
|
|
12793
12978
|
setPropertyDetails({});
|
|
12794
12979
|
setShowToast({
|
|
12795
12980
|
error: true,
|
|
@@ -12804,7 +12989,6 @@ const PropertySearchNSummary = _ref => {
|
|
|
12804
12989
|
React.useEffect(() => {
|
|
12805
12990
|
var _propertyDetails$Prop;
|
|
12806
12991
|
if (isLoading == false && error && error == true && (propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop = propertyDetails.Properties) === null || _propertyDetails$Prop === void 0 ? void 0 : _propertyDetails$Prop.length) == 0) {
|
|
12807
|
-
console.log("Error Caught", error, propertyDetails);
|
|
12808
12992
|
setShowToast({
|
|
12809
12993
|
error: true,
|
|
12810
12994
|
label: "PT_ENTER_VALID_PROPERTY_ID"
|
|
@@ -12817,6 +13001,11 @@ const PropertySearchNSummary = _ref => {
|
|
|
12817
13001
|
details: propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop2 = propertyDetails.Properties) === null || _propertyDetails$Prop2 === void 0 ? void 0 : _propertyDetails$Prop2[0]
|
|
12818
13002
|
}));
|
|
12819
13003
|
}, [propertyDetails, pathname]);
|
|
13004
|
+
React.useEffect(() => {
|
|
13005
|
+
onSelect(config.key, _extends({}, formData[config.key], {
|
|
13006
|
+
dues: propertyDues === null || propertyDues === void 0 ? void 0 : propertyDues.dues
|
|
13007
|
+
}));
|
|
13008
|
+
}, [propertyDues, pathname]);
|
|
12820
13009
|
const searchProperty = () => {
|
|
12821
13010
|
if (!propertyId) {
|
|
12822
13011
|
setShowToast({
|
|
@@ -12830,8 +13019,16 @@ const PropertySearchNSummary = _ref => {
|
|
|
12830
13019
|
Properties: []
|
|
12831
13020
|
});
|
|
12832
13021
|
setSearchPropertyId(propertyId);
|
|
13022
|
+
setIsSearchClicked(true);
|
|
12833
13023
|
}
|
|
12834
13024
|
};
|
|
13025
|
+
const handlePropertyChange = e => {
|
|
13026
|
+
setPropertyId(e.target.value);
|
|
13027
|
+
setValue(e.target.value, propertyIdInput.name);
|
|
13028
|
+
setIsSearchClicked(false);
|
|
13029
|
+
setNoDue(false);
|
|
13030
|
+
setCheckStats(false);
|
|
13031
|
+
};
|
|
12835
13032
|
if (isEditScreen) {
|
|
12836
13033
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null);
|
|
12837
13034
|
}
|
|
@@ -12858,47 +13055,85 @@ const PropertySearchNSummary = _ref => {
|
|
|
12858
13055
|
[input]: value
|
|
12859
13056
|
}));
|
|
12860
13057
|
}
|
|
12861
|
-
function
|
|
12862
|
-
|
|
13058
|
+
function redirectToPayBill(billData, index, isEdit) {
|
|
13059
|
+
var _formData$cpt0, _formData$cpt1, _formData$cpt1$detail;
|
|
13060
|
+
const userType = window.location.href.includes("employee") ? "employee" : "citizen";
|
|
13061
|
+
const payUrl = "https://sdc-uat.lgpunjab.gov.in" + ("/" + userType + "/egov-common/pay?consumerCode=" + (formData === null || formData === void 0 ? void 0 : (_formData$cpt0 = formData.cpt) === null || _formData$cpt0 === void 0 ? void 0 : _formData$cpt0.id) + "&tenantId=" + (formData === null || formData === void 0 ? void 0 : (_formData$cpt1 = formData.cpt) === null || _formData$cpt1 === void 0 ? void 0 : (_formData$cpt1$detail = _formData$cpt1.details) === null || _formData$cpt1$detail === void 0 ? void 0 : _formData$cpt1$detail.tenantId) + "&businessService=PT");
|
|
13062
|
+
window.open(payUrl, "_blank");
|
|
13063
|
+
setPropertyDues({});
|
|
12863
13064
|
}
|
|
12864
|
-
|
|
13065
|
+
React.useEffect(() => {
|
|
13066
|
+
if (showToast) {
|
|
13067
|
+
const timer = setTimeout(() => {
|
|
13068
|
+
setShowToast(null);
|
|
13069
|
+
}, 3000);
|
|
13070
|
+
return () => clearTimeout(timer);
|
|
13071
|
+
}
|
|
13072
|
+
}, [showToast]);
|
|
13073
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, isLoading && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null), /*#__PURE__*/React__default.createElement("div", {
|
|
12865
13074
|
style: {
|
|
12866
13075
|
marginBottom: "16px"
|
|
12867
13076
|
}
|
|
12868
13077
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, {
|
|
12869
|
-
className: "card-label-smaller",
|
|
13078
|
+
className: "card-label-smaller ndc_card_labels",
|
|
12870
13079
|
style: getInputStyles()
|
|
12871
13080
|
}, "" + t(propertyIdInput.label), null), /*#__PURE__*/React__default.createElement("div", {
|
|
12872
|
-
className: "field",
|
|
13081
|
+
className: "field ndc_property_search",
|
|
12873
13082
|
style: {
|
|
12874
13083
|
marginTop: "20px",
|
|
12875
|
-
display: "flex"
|
|
13084
|
+
display: "flex",
|
|
13085
|
+
gap: "16px",
|
|
13086
|
+
alignItems: "baseline",
|
|
13087
|
+
width: "100%"
|
|
12876
13088
|
},
|
|
12877
13089
|
ref: myElementRef,
|
|
12878
13090
|
id: "search-property-field"
|
|
12879
13091
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, _extends({
|
|
12880
13092
|
key: propertyIdInput.name,
|
|
12881
|
-
value:
|
|
12882
|
-
onChange:
|
|
12883
|
-
setPropertyId(e.target.value);
|
|
12884
|
-
setValue(e.target.value, propertyIdInput.name);
|
|
12885
|
-
},
|
|
13093
|
+
value: propertyId,
|
|
13094
|
+
onChange: handlePropertyChange,
|
|
12886
13095
|
disable: false,
|
|
12887
13096
|
maxlength: 16,
|
|
12888
|
-
defaultValue: undefined
|
|
13097
|
+
defaultValue: undefined
|
|
13098
|
+
}, propertyIdInput.validation)), !isSearchClicked && /*#__PURE__*/React__default.createElement("button", {
|
|
13099
|
+
className: "submit-bar",
|
|
13100
|
+
type: "button",
|
|
12889
13101
|
style: {
|
|
12890
|
-
|
|
12891
|
-
|
|
12892
|
-
|
|
13102
|
+
color: "white",
|
|
13103
|
+
width: "100%",
|
|
13104
|
+
maxWidth: "100px"
|
|
13105
|
+
},
|
|
13106
|
+
onClick: searchProperty
|
|
13107
|
+
}, "" + t("PT_SEARCH")), !(apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$2 = apiDataCheck[0]) !== null && _apiDataCheck$2 !== void 0 && _apiDataCheck$2.NdcDetails) && getCheckStatus && /*#__PURE__*/React__default.createElement("button", {
|
|
13108
|
+
className: "submit-bar",
|
|
13109
|
+
type: "button",
|
|
13110
|
+
style: {
|
|
13111
|
+
color: "white",
|
|
13112
|
+
fontSize: "13px",
|
|
13113
|
+
width: "100%",
|
|
13114
|
+
maxWidth: "180px"
|
|
13115
|
+
},
|
|
13116
|
+
onClick: () => {
|
|
13117
|
+
fetchBill();
|
|
12893
13118
|
}
|
|
12894
|
-
},
|
|
13119
|
+
}, "" + t("CHECK_STATUS_PROPERTY")), (formData === null || formData === void 0 ? void 0 : (_formData$cpt11 = formData.cpt) === null || _formData$cpt11 === void 0 ? void 0 : _formData$cpt11.id) && (formData === null || formData === void 0 ? void 0 : (_formData$cpt12 = formData.cpt) === null || _formData$cpt12 === void 0 ? void 0 : (_formData$cpt12$dues = _formData$cpt12.dues) === null || _formData$cpt12$dues === void 0 ? void 0 : _formData$cpt12$dues.totalAmount) > 0 && !isSearchClicked && /*#__PURE__*/React__default.createElement("button", {
|
|
12895
13120
|
className: "submit-bar",
|
|
12896
13121
|
type: "button",
|
|
12897
13122
|
style: {
|
|
12898
|
-
color: "white"
|
|
13123
|
+
color: "white",
|
|
13124
|
+
width: "100%",
|
|
13125
|
+
maxWidth: "100px"
|
|
12899
13126
|
},
|
|
12900
|
-
onClick:
|
|
12901
|
-
|
|
13127
|
+
onClick: () => {
|
|
13128
|
+
redirectToPayBill();
|
|
13129
|
+
}
|
|
13130
|
+
}, "" + t("PAY_DUES")), getNoDue && /*#__PURE__*/React__default.createElement("div", {
|
|
13131
|
+
style: {
|
|
13132
|
+
color: "green",
|
|
13133
|
+
width: "100%",
|
|
13134
|
+
maxWidth: "75px"
|
|
13135
|
+
}
|
|
13136
|
+
}, t("NO_DUES_FOUND_FOR_PROPERTY")))), showToast && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Toast, {
|
|
12902
13137
|
isDleteBtn: true,
|
|
12903
13138
|
labelstyle: {
|
|
12904
13139
|
width: "100%"
|
|
@@ -12965,6 +13200,7 @@ const SelectNDCDocuments = _ref => {
|
|
|
12965
13200
|
formState: formState
|
|
12966
13201
|
});
|
|
12967
13202
|
}), error && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Toast, {
|
|
13203
|
+
isDleteBtn: true,
|
|
12968
13204
|
label: error,
|
|
12969
13205
|
onClose: () => setError(null),
|
|
12970
13206
|
error: true
|
|
@@ -13641,8 +13877,8 @@ const PayWSBillModal = _ref => {
|
|
|
13641
13877
|
};
|
|
13642
13878
|
|
|
13643
13879
|
const createEmployeeConfig$2 = [{
|
|
13644
|
-
head: "
|
|
13645
|
-
stepLabel: "
|
|
13880
|
+
head: "Applicant Details",
|
|
13881
|
+
stepLabel: "Applicant Details",
|
|
13646
13882
|
stepNumber: 1,
|
|
13647
13883
|
isStepEnabled: true,
|
|
13648
13884
|
type: "component",
|
|
@@ -13689,6 +13925,18 @@ const NewNDCStepForm$1 = () => {
|
|
|
13689
13925
|
const formState = reactRedux.useSelector(state => state.ndc.NDCForm);
|
|
13690
13926
|
const step = formState.step;
|
|
13691
13927
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
13928
|
+
const id = window.location.pathname.split("/").pop();
|
|
13929
|
+
const {
|
|
13930
|
+
isLoading,
|
|
13931
|
+
data: applicationDetails
|
|
13932
|
+
} = Digit.Hooks.ndc.useSearchEmployeeApplication({
|
|
13933
|
+
uuid: id
|
|
13934
|
+
}, tenantId);
|
|
13935
|
+
React.useEffect(() => {
|
|
13936
|
+
if (applicationDetails !== null && applicationDetails !== void 0 && applicationDetails.Applications.length) {
|
|
13937
|
+
dispatch(updateNDCForm("responseData", applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.Applications));
|
|
13938
|
+
}
|
|
13939
|
+
}, [applicationDetails]);
|
|
13692
13940
|
const setStep = updatedStepNumber => {
|
|
13693
13941
|
dispatch(setNDCStep(updatedStepNumber));
|
|
13694
13942
|
};
|
|
@@ -13702,7 +13950,7 @@ const NewNDCStepForm$1 = () => {
|
|
|
13702
13950
|
color: "#1C1D1F"
|
|
13703
13951
|
},
|
|
13704
13952
|
divider: true
|
|
13705
|
-
}, t("
|
|
13953
|
+
}, t("ndc_header_application")), /*#__PURE__*/React__default.createElement(Stepper, {
|
|
13706
13954
|
stepsList: updatedCreateEmployeeconfig$2,
|
|
13707
13955
|
onSubmit: handleSubmit,
|
|
13708
13956
|
step: step,
|
|
@@ -13850,12 +14098,42 @@ const NewNDCStepFormOne$1 = _ref => {
|
|
|
13850
14098
|
}
|
|
13851
14099
|
};
|
|
13852
14100
|
function validateStepData(data) {
|
|
14101
|
+
var _data$cpt6, _data$cpt6$dues, _data$cpt7, _data$cpt7$dues, _data$dues, _propertyDetails$wate, _propertyDetails$sewe;
|
|
14102
|
+
console.log("data", data);
|
|
13853
14103
|
const missingFields = [];
|
|
13854
14104
|
const invalidFields = [];
|
|
13855
14105
|
const cpt = (data === null || data === void 0 ? void 0 : data.cpt) || {};
|
|
13856
14106
|
const cptDetails = (cpt === null || cpt === void 0 ? void 0 : cpt.details) || {};
|
|
13857
14107
|
const propertyDetails = (data === null || data === void 0 ? void 0 : data.PropertyDetails) || {};
|
|
13858
14108
|
const NDCReason = (data === null || data === void 0 ? void 0 : data.NDCReason) || {};
|
|
14109
|
+
if ((data === null || data === void 0 ? void 0 : (_data$cpt6 = data.cpt) === null || _data$cpt6 === void 0 ? void 0 : (_data$cpt6$dues = _data$cpt6.dues) === null || _data$cpt6$dues === void 0 ? void 0 : _data$cpt6$dues.totalAmount) != 0) {
|
|
14110
|
+
invalidFields.push(t("NDC_MESSAGE_PLEASE_CHECK_STATUS_OF_PROPERTY_TAX") + " " + (cpt === null || cpt === void 0 ? void 0 : cpt.id));
|
|
14111
|
+
}
|
|
14112
|
+
if (data !== null && data !== void 0 && (_data$cpt7 = data.cpt) !== null && _data$cpt7 !== void 0 && (_data$cpt7$dues = _data$cpt7.dues) !== null && _data$cpt7$dues !== void 0 && _data$cpt7$dues.id && (data === null || data === void 0 ? void 0 : (_data$dues = data.dues) === null || _data$dues === void 0 ? void 0 : _data$dues.totalAmount) > 0) {
|
|
14113
|
+
invalidFields.push(t("NDC_MESSAGE_PLEASE_PAY_DUES_OF_PROPERTY_TAX") + " " + (cpt === null || cpt === void 0 ? void 0 : cpt.id));
|
|
14114
|
+
}
|
|
14115
|
+
if ((propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$wate = propertyDetails.waterConnection) === null || _propertyDetails$wate === void 0 ? void 0 : _propertyDetails$wate.length) > 0) {
|
|
14116
|
+
propertyDetails.waterConnection.forEach(value => {
|
|
14117
|
+
var _value$billData, _value$billData2, _value$billData3;
|
|
14118
|
+
if ((value === null || value === void 0 ? void 0 : (_value$billData = value.billData) === null || _value$billData === void 0 ? void 0 : _value$billData.totalAmount) != 0) {
|
|
14119
|
+
invalidFields.push(t("NDC_MESSAGE_PLEASE_CHECK_STATUS_OF_WATER_CONNECTION") + " " + (value === null || value === void 0 ? void 0 : value.connectionNo));
|
|
14120
|
+
}
|
|
14121
|
+
if (value !== null && value !== void 0 && (_value$billData2 = value.billData) !== null && _value$billData2 !== void 0 && _value$billData2.id && (value === null || value === void 0 ? void 0 : (_value$billData3 = value.billData) === null || _value$billData3 === void 0 ? void 0 : _value$billData3.totalAmount) > 0) {
|
|
14122
|
+
invalidFields.push(t("NDC_MESSAGE_PLEASE_PAY_DUES_OF_WATER_CONNECTION") + " " + (value === null || value === void 0 ? void 0 : value.connectionNo));
|
|
14123
|
+
}
|
|
14124
|
+
});
|
|
14125
|
+
}
|
|
14126
|
+
if ((propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$sewe = propertyDetails.sewerageConnection) === null || _propertyDetails$sewe === void 0 ? void 0 : _propertyDetails$sewe.length) > 0) {
|
|
14127
|
+
propertyDetails.sewerageConnection.forEach(value => {
|
|
14128
|
+
var _value$billData4, _value$billData5, _value$billData6;
|
|
14129
|
+
if ((value === null || value === void 0 ? void 0 : (_value$billData4 = value.billData) === null || _value$billData4 === void 0 ? void 0 : _value$billData4.totalAmount) != 0) {
|
|
14130
|
+
invalidFields.push(t("NDC_MESSAGE_PLEASE_CHECK_STATUS_OF_SEWERAGE_CONNECTION") + " " + (value === null || value === void 0 ? void 0 : value.connectionNo));
|
|
14131
|
+
}
|
|
14132
|
+
if (value !== null && value !== void 0 && (_value$billData5 = value.billData) !== null && _value$billData5 !== void 0 && _value$billData5.id && (value === null || value === void 0 ? void 0 : (_value$billData6 = value.billData) === null || _value$billData6 === void 0 ? void 0 : _value$billData6.totalAmount) > 0) {
|
|
14133
|
+
invalidFields.push(t("NDC_MESSAGE_PLEASE_PAY_DUES_OF_SEWERAGE_CONNECTION") + " " + (value === null || value === void 0 ? void 0 : value.connectionNo));
|
|
14134
|
+
}
|
|
14135
|
+
});
|
|
14136
|
+
}
|
|
13859
14137
|
if (!(cpt !== null && cpt !== void 0 && cpt.id)) missingFields.push(t("NDC_MESSAGE_PROPERTY_ID"));
|
|
13860
14138
|
if (!cptDetails || Object.keys(cptDetails).length === 0) missingFields.push(t("NDC_MESSAGE_PLEASE_SEARCH_PROPERTY_ID"));
|
|
13861
14139
|
if (!(propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.firstName)) missingFields.push(t("NDC_MESSAGE_FIRST_NAME"));
|