@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.modern.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Card, Banner, ActionBar, SubmitBar as SubmitBar$1, PrivateRoute, BreadCrumb, AppContainer, Loader, Dropdown, UploadFile, Modal, FormComposer, Toast, Header, CardSubHeader, StatusTable, Row, CheckPoint, ConnectingCheckPoints, DisplayPhotos, Menu, LinkButton, EmployeeModuleCard, SearchField, TextInput, FilterFormField, RadioButtons, CheckBox,
|
|
1
|
+
import { Card, Banner, ActionBar, SubmitBar as SubmitBar$1, PrivateRoute, BreadCrumb, BackButton, AppContainer, Loader, Dropdown, UploadFile, Modal, FormComposer, Toast, Header, CardSubHeader, StatusTable, Row, CheckPoint, ConnectingCheckPoints, DisplayPhotos, Menu, LinkButton, EmployeeModuleCard, SearchField, TextInput, FilterFormField, RadioButtons, CheckBox, ComplaintIcon, InboxComposer, MobileNumber, CardLabelError, SearchAction, PopUp, DetailsCard, SearchForm, CloseSvg, Table, CardHeader, LabelFieldPair, CardLabel, DeleteIcon, KeyNote } from '@mseva/digit-ui-react-components';
|
|
2
2
|
import React, { Fragment as Fragment$1, useState, useEffect, useRef, useMemo, useReducer, useCallback, forwardRef } from 'react';
|
|
3
3
|
import { useHistory, useLocation, Switch, Route, useRouteMatch, useParams, Link } from 'react-router-dom';
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
@@ -642,14 +642,16 @@ const App = () => {
|
|
|
642
642
|
url,
|
|
643
643
|
...match
|
|
644
644
|
} = useRouteMatch();
|
|
645
|
-
|
|
645
|
+
const {
|
|
646
|
+
t
|
|
647
|
+
} = useTranslation();
|
|
646
648
|
const NewNDCStepForm = Digit.ComponentRegistryService.getComponent("NewNDCStepFormCitizen");
|
|
647
649
|
const MyApplications = Digit.ComponentRegistryService.getComponent("MyApplications");
|
|
648
650
|
const NDCResponseCitizen = Digit.ComponentRegistryService.getComponent("NDCResponseCitizen");
|
|
649
651
|
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");
|
|
650
652
|
return /*#__PURE__*/React.createElement("span", {
|
|
651
653
|
className: "tl-citizen"
|
|
652
|
-
}, /*#__PURE__*/React.createElement(Switch, null, /*#__PURE__*/React.createElement(AppContainer, null, /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
654
|
+
}, /*#__PURE__*/React.createElement(BackButton, null, t("CS_COMMON_BACK")), /*#__PURE__*/React.createElement(Switch, null, /*#__PURE__*/React.createElement(AppContainer, null, /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
653
655
|
path: `${path}/new-application`,
|
|
654
656
|
component: NewNDCStepForm
|
|
655
657
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
@@ -1079,7 +1081,6 @@ const getTimelineCaptions = (checkpoint, index, arr, t) => {
|
|
|
1079
1081
|
thumbnailsToShow,
|
|
1080
1082
|
wfDocuments
|
|
1081
1083
|
} = checkpoint;
|
|
1082
|
-
console.log("wfDocuments", wfDocuments);
|
|
1083
1084
|
const caption = {
|
|
1084
1085
|
date: checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$auditDeta = checkpoint.auditDetails) === null || _checkpoint$auditDeta === void 0 ? void 0 : _checkpoint$auditDeta.lastModified,
|
|
1085
1086
|
name: checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$assigner = checkpoint.assigner) === null || _checkpoint$assigner === void 0 ? void 0 : _checkpoint$assigner.name,
|
|
@@ -1112,7 +1113,7 @@ const getTimelineCaptions = (checkpoint, index, arr, t) => {
|
|
|
1112
1113
|
}, caption.date && /*#__PURE__*/React.createElement("p", null, caption.date), caption.name && /*#__PURE__*/React.createElement("p", null, caption.name), caption.mobileNumber && /*#__PURE__*/React.createElement("p", null, caption.mobileNumber), caption.source && /*#__PURE__*/React.createElement("p", null, t("ES_COMMON_FILED_VIA_" + caption.source.toUpperCase()))));
|
|
1113
1114
|
};
|
|
1114
1115
|
const ApplicationOverview = () => {
|
|
1115
|
-
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;
|
|
1116
|
+
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;
|
|
1116
1117
|
const {
|
|
1117
1118
|
id
|
|
1118
1119
|
} = useParams();
|
|
@@ -1222,12 +1223,12 @@ const ApplicationOverview = () => {
|
|
|
1222
1223
|
var _applicationDetails$A;
|
|
1223
1224
|
const ndcObject = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A = applicationDetails.Applications) === null || _applicationDetails$A === void 0 ? void 0 : _applicationDetails$A[0];
|
|
1224
1225
|
if (ndcObject) {
|
|
1225
|
-
var _ndcObject$
|
|
1226
|
+
var _ndcObject$owners, _ndcObject$owners$, _ndcObject$owners2, _ndcObject$owners2$, _ndcObject$owners3, _ndcObject$owners3$, _ndcObject$NdcDetails, _ndcObject$NdcDetails2, _ndcObject$NdcDetails3, _removeDuplicatesByUU;
|
|
1226
1227
|
const applicantData = {
|
|
1227
|
-
|
|
1228
|
-
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,
|
|
1228
|
+
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,
|
|
1229
1229
|
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,
|
|
1230
|
-
|
|
1230
|
+
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,
|
|
1231
|
+
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,
|
|
1231
1232
|
applicationNo: ndcObject === null || ndcObject === void 0 ? void 0 : ndcObject.uuid
|
|
1232
1233
|
};
|
|
1233
1234
|
const Documents = removeDuplicatesByUUID((ndcObject === null || ndcObject === void 0 ? void 0 : ndcObject.Documents) || []);
|
|
@@ -1249,14 +1250,12 @@ const ApplicationOverview = () => {
|
|
|
1249
1250
|
}
|
|
1250
1251
|
}, [applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.Applications]);
|
|
1251
1252
|
useEffect(() => {
|
|
1252
|
-
console.log("applicationDetails", applicationDetails);
|
|
1253
1253
|
if (applicationDetails) {
|
|
1254
1254
|
setIsDetailsLoading(true);
|
|
1255
1255
|
setIsDetailsLoading(false);
|
|
1256
1256
|
}
|
|
1257
1257
|
}, [applicationDetails]);
|
|
1258
1258
|
function onActionSelect(action) {
|
|
1259
|
-
console.log("action", action);
|
|
1260
1259
|
const payload = {
|
|
1261
1260
|
Licenses: [action]
|
|
1262
1261
|
};
|
|
@@ -1274,7 +1273,6 @@ const ApplicationOverview = () => {
|
|
|
1274
1273
|
const submitAction = async data => {
|
|
1275
1274
|
var _data$Licenses;
|
|
1276
1275
|
const payloadData = applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.Applications[0];
|
|
1277
|
-
console.log("data", data);
|
|
1278
1276
|
const updatedApplicant = {
|
|
1279
1277
|
...payloadData,
|
|
1280
1278
|
workflow: {}
|
|
@@ -1286,7 +1284,6 @@ const ApplicationOverview = () => {
|
|
|
1286
1284
|
comment: filtData === null || filtData === void 0 ? void 0 : filtData.comment,
|
|
1287
1285
|
documents: filtData === null || filtData === void 0 ? void 0 : filtData.wfDocuments
|
|
1288
1286
|
};
|
|
1289
|
-
console.log("filtData", filtData);
|
|
1290
1287
|
if (!(filtData !== null && filtData !== void 0 && filtData.assignee) && filtData.action == "FORWARD") {
|
|
1291
1288
|
setShowToast({
|
|
1292
1289
|
key: "error"
|
|
@@ -1375,15 +1372,15 @@ const ApplicationOverview = () => {
|
|
|
1375
1372
|
value: {
|
|
1376
1373
|
workflowDocs: displayData === null || displayData === void 0 ? void 0 : displayData.Documents
|
|
1377
1374
|
}
|
|
1378
|
-
}) : /*#__PURE__*/React.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.createElement(Card, null, /*#__PURE__*/React.createElement(CardSubHeader, null, t("
|
|
1375
|
+
}) : /*#__PURE__*/React.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.createElement(Card, null, /*#__PURE__*/React.createElement(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.createElement(CheckPoint, {
|
|
1379
1376
|
isCompleted: true,
|
|
1380
|
-
label: t(
|
|
1377
|
+
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)
|
|
1381
1378
|
}) : /*#__PURE__*/React.createElement(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.createElement(CheckPoint, {
|
|
1382
1379
|
keyValue: index,
|
|
1383
1380
|
isCompleted: index === 0,
|
|
1384
|
-
label: t(
|
|
1381
|
+
label: t(checkpoint.status),
|
|
1385
1382
|
customChild: getTimelineCaptions(checkpoint, index, arr, t)
|
|
1386
|
-
})))), actions && /*#__PURE__*/React.createElement(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.createElement(Menu, {
|
|
1383
|
+
})))), (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.createElement(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.createElement(Menu, {
|
|
1387
1384
|
localeKeyPrefix: `WF_EMPLOYEE_${"NDC"}`,
|
|
1388
1385
|
options: actions,
|
|
1389
1386
|
optionKey: "action",
|
|
@@ -1393,6 +1390,13 @@ const ApplicationOverview = () => {
|
|
|
1393
1390
|
ref: menuRef,
|
|
1394
1391
|
label: t("WF_TAKE_ACTION"),
|
|
1395
1392
|
onSubmit: () => setDisplayMenu(!displayMenu)
|
|
1393
|
+
})), (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.createElement(ActionBar, null, /*#__PURE__*/React.createElement(SubmitBar$1, {
|
|
1394
|
+
label: t("COMMON_EDIT"),
|
|
1395
|
+
onSubmit: () => {
|
|
1396
|
+
var _applicationDetails$A7, _applicationDetails$A8;
|
|
1397
|
+
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;
|
|
1398
|
+
history.push(`/digit-ui/employee/ndc/create/${id}`);
|
|
1399
|
+
}
|
|
1396
1400
|
})), showModal ? /*#__PURE__*/React.createElement(NDCModal, {
|
|
1397
1401
|
t: t,
|
|
1398
1402
|
action: selectedAction,
|
|
@@ -9005,7 +9009,7 @@ const CitizenApplicationOverview = () => {
|
|
|
9005
9009
|
value: {
|
|
9006
9010
|
workflowDocs: displayData === null || displayData === void 0 ? void 0 : displayData.Documents
|
|
9007
9011
|
}
|
|
9008
|
-
}) : /*#__PURE__*/React.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.createElement(Card, null, /*#__PURE__*/React.createElement(CardSubHeader, null, t("
|
|
9012
|
+
}) : /*#__PURE__*/React.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.createElement(Card, null, /*#__PURE__*/React.createElement(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.createElement(CheckPoint, {
|
|
9009
9013
|
isCompleted: true,
|
|
9010
9014
|
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))
|
|
9011
9015
|
}) : /*#__PURE__*/React.createElement(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.createElement(CheckPoint, {
|
|
@@ -9542,7 +9546,7 @@ const Inbox = ({
|
|
|
9542
9546
|
}, [data]);
|
|
9543
9547
|
const PropsForInboxLinks = {
|
|
9544
9548
|
logoIcon: /*#__PURE__*/React.createElement(ComplaintIcon, null),
|
|
9545
|
-
headerText: "
|
|
9549
|
+
headerText: `${t("MODULE_NKS_NO_DUE_CERTIFICATE_FEES")}`,
|
|
9546
9550
|
links: [{
|
|
9547
9551
|
text: "Create NDC Application",
|
|
9548
9552
|
link: "/digit-ui/employee/ndc/create"
|
|
@@ -11435,9 +11439,15 @@ const PropertyDetailsStep2 = ({
|
|
|
11435
11439
|
};
|
|
11436
11440
|
|
|
11437
11441
|
const config = [{
|
|
11438
|
-
head: "
|
|
11442
|
+
head: "",
|
|
11439
11443
|
stepNumber: 1,
|
|
11440
11444
|
body: [{
|
|
11445
|
+
name: "NDC_COMMON_NDC_REASON",
|
|
11446
|
+
type: "component",
|
|
11447
|
+
component: "SelectNDCReason",
|
|
11448
|
+
key: "NDCReason",
|
|
11449
|
+
withoutLabel: true
|
|
11450
|
+
}, {
|
|
11441
11451
|
name: "",
|
|
11442
11452
|
type: "component",
|
|
11443
11453
|
component: "NDCPropertySearch",
|
|
@@ -11449,12 +11459,6 @@ const config = [{
|
|
|
11449
11459
|
component: "PropertyDetailsFormCitizen",
|
|
11450
11460
|
key: "PropertyDetails",
|
|
11451
11461
|
withoutLabel: true
|
|
11452
|
-
}, {
|
|
11453
|
-
name: "NDC_COMMON_NDC_REASON",
|
|
11454
|
-
type: "component",
|
|
11455
|
-
component: "SelectNDCReason",
|
|
11456
|
-
key: "NDCReason",
|
|
11457
|
-
withoutLabel: true
|
|
11458
11462
|
}]
|
|
11459
11463
|
}, {
|
|
11460
11464
|
head: "NDC_COMMON_DOCUMENTS_REQUIRED",
|
|
@@ -11477,8 +11481,8 @@ const config = [{
|
|
|
11477
11481
|
}];
|
|
11478
11482
|
|
|
11479
11483
|
const createEmployeeConfig = [{
|
|
11480
|
-
head: "
|
|
11481
|
-
stepLabel: "
|
|
11484
|
+
head: "Applicant Details",
|
|
11485
|
+
stepLabel: "Applicant Details",
|
|
11482
11486
|
stepNumber: 1,
|
|
11483
11487
|
isStepEnabled: true,
|
|
11484
11488
|
type: "component",
|
|
@@ -11542,7 +11546,7 @@ const NewNDCStepForm = () => {
|
|
|
11542
11546
|
color: "#1C1D1F"
|
|
11543
11547
|
},
|
|
11544
11548
|
divider: true
|
|
11545
|
-
}, t("
|
|
11549
|
+
}, t("ndc_header_application")), /*#__PURE__*/React.createElement(Stepper, {
|
|
11546
11550
|
stepsList: updatedCreateEmployeeconfig,
|
|
11547
11551
|
onSubmit: handleSubmit,
|
|
11548
11552
|
step: step,
|
|
@@ -11572,7 +11576,6 @@ const NewNDCStepFormOne = ({
|
|
|
11572
11576
|
const tenantId = window.localStorage.getItem("CITIZEN.CITY");
|
|
11573
11577
|
function goNext(data) {
|
|
11574
11578
|
var _checkFormData$apiDat, _checkFormData$apiDat2, _checkFormData$apiDat3;
|
|
11575
|
-
console.log(`Data in step ${config.currStepNumber} is: \n`, data);
|
|
11576
11579
|
const missingFields = validateStepData(currentStepData);
|
|
11577
11580
|
if (missingFields.length > 0) {
|
|
11578
11581
|
setError(`${missingFields[0]}`);
|
|
@@ -11675,19 +11678,43 @@ const NewNDCStepFormOne = ({
|
|
|
11675
11678
|
};
|
|
11676
11679
|
}
|
|
11677
11680
|
};
|
|
11678
|
-
const validatePropertyId = value => {
|
|
11679
|
-
const regex = /^PT-\d{4}-\d{7,8}$/;
|
|
11680
|
-
return regex.test(value);
|
|
11681
|
-
};
|
|
11682
11681
|
function validateStepData(data) {
|
|
11682
|
+
var _data$cpt6, _data$cpt6$dues, _data$cpt7, _data$cpt7$dues, _data$dues, _propertyDetails$wate, _propertyDetails$sewe;
|
|
11683
11683
|
const missingFields = [];
|
|
11684
11684
|
const invalidFields = [];
|
|
11685
11685
|
const cpt = (data === null || data === void 0 ? void 0 : data.cpt) || {};
|
|
11686
11686
|
const cptDetails = (cpt === null || cpt === void 0 ? void 0 : cpt.details) || {};
|
|
11687
11687
|
const propertyDetails = (data === null || data === void 0 ? void 0 : data.PropertyDetails) || {};
|
|
11688
11688
|
const NDCReason = (data === null || data === void 0 ? void 0 : data.NDCReason) || {};
|
|
11689
|
+
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) {
|
|
11690
|
+
missingFields.push(`${t("NDC_MESSAGE_PLEASE_CHECK_STATUS_OF_PROPERTY_TAX")} ${cpt === null || cpt === void 0 ? void 0 : cpt.id}`);
|
|
11691
|
+
}
|
|
11692
|
+
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) {
|
|
11693
|
+
missingFields.push(`${t("NDC_MESSAGE_PLEASE_PAY_DUES_OF_PROPERTY_TAX")} ${cpt === null || cpt === void 0 ? void 0 : cpt.id}`);
|
|
11694
|
+
}
|
|
11695
|
+
if ((propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$wate = propertyDetails.waterConnection) === null || _propertyDetails$wate === void 0 ? void 0 : _propertyDetails$wate.length) > 0) {
|
|
11696
|
+
propertyDetails.waterConnection.forEach(value => {
|
|
11697
|
+
var _value$billData, _value$billData2, _value$billData3;
|
|
11698
|
+
if ((value === null || value === void 0 ? void 0 : (_value$billData = value.billData) === null || _value$billData === void 0 ? void 0 : _value$billData.totalAmount) != 0) {
|
|
11699
|
+
missingFields.push(`${t("NDC_MESSAGE_PLEASE_CHECK_STATUS_OF_WATER_CONNECTION")} ${value === null || value === void 0 ? void 0 : value.connectionNo}`);
|
|
11700
|
+
}
|
|
11701
|
+
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) {
|
|
11702
|
+
missingFields.push(`${t("NDC_MESSAGE_PLEASE_PAY_DUES_OF_WATER_CONNECTION")} ${value === null || value === void 0 ? void 0 : value.connectionNo}`);
|
|
11703
|
+
}
|
|
11704
|
+
});
|
|
11705
|
+
}
|
|
11706
|
+
if ((propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$sewe = propertyDetails.sewerageConnection) === null || _propertyDetails$sewe === void 0 ? void 0 : _propertyDetails$sewe.length) > 0) {
|
|
11707
|
+
propertyDetails.sewerageConnection.forEach(value => {
|
|
11708
|
+
var _value$billData4, _value$billData5, _value$billData6;
|
|
11709
|
+
if ((value === null || value === void 0 ? void 0 : (_value$billData4 = value.billData) === null || _value$billData4 === void 0 ? void 0 : _value$billData4.totalAmount) != 0) {
|
|
11710
|
+
missingFields.push(`${t("NDC_MESSAGE_PLEASE_CHECK_STATUS_OF_SEWERAGE_CONNECTION")} ${value === null || value === void 0 ? void 0 : value.connectionNo}`);
|
|
11711
|
+
}
|
|
11712
|
+
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) {
|
|
11713
|
+
missingFields.push(`${t("NDC_MESSAGE_PLEASE_PAY_DUES_OF_SEWERAGE_CONNECTION")} ${value === null || value === void 0 ? void 0 : value.connectionNo}`);
|
|
11714
|
+
}
|
|
11715
|
+
});
|
|
11716
|
+
}
|
|
11689
11717
|
if (!(cpt !== null && cpt !== void 0 && cpt.id)) missingFields.push(t("NDC_MESSAGE_PROPERTY_ID"));
|
|
11690
|
-
if (!validatePropertyId(cpt === null || cpt === void 0 ? void 0 : cpt.id)) missingFields.push(t("PT_PROPERTY_ID_INVALID"));
|
|
11691
11718
|
if (!cptDetails || Object.keys(cptDetails).length === 0) missingFields.push(t("NDC_MESSAGE_PLEASE_SEARCH_PROPERTY_ID"));
|
|
11692
11719
|
if (!(propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.firstName)) missingFields.push(t("NDC_MESSAGE_FIRST_NAME"));
|
|
11693
11720
|
if (!(propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.lastName)) missingFields.push(t("NDC_MESSAGE_LAST_NAME"));
|
|
@@ -11701,8 +11728,12 @@ const NewNDCStepFormOne = ({
|
|
|
11701
11728
|
if (propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.firstName && !nameRegex.test(propertyDetails.firstName)) {
|
|
11702
11729
|
invalidFields.push(t("NDC_MESSAGE_FIRST_NAME_ONLY_ALPHABETS_ALLOWED"));
|
|
11703
11730
|
}
|
|
11704
|
-
if (propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.lastName
|
|
11705
|
-
|
|
11731
|
+
if (propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.lastName) {
|
|
11732
|
+
if (!nameRegex.test(propertyDetails.lastName)) {
|
|
11733
|
+
invalidFields.push(t("NDC_MESSAGE_LAST_NAME_ONLY_ALPHABETS_ALLOWED"));
|
|
11734
|
+
} else if (propertyDetails.lastName.length > 100) {
|
|
11735
|
+
invalidFields.push(t("NDC_MESSAGE_LAST_NAME_MAX_100_CHARACTERS"));
|
|
11736
|
+
}
|
|
11706
11737
|
}
|
|
11707
11738
|
if (propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.email && !emailRegex.test(propertyDetails.email)) {
|
|
11708
11739
|
invalidFields.push(t("NDC_MESSAGE_EMAIL_INVALID_FORMAT"));
|
|
@@ -11765,6 +11796,10 @@ function SelectNDCReason({
|
|
|
11765
11796
|
const {
|
|
11766
11797
|
t
|
|
11767
11798
|
} = useTranslation();
|
|
11799
|
+
const apiDataCheck = useSelector(state => {
|
|
11800
|
+
var _state$ndc$NDCForm, _state$ndc$NDCForm$fo;
|
|
11801
|
+
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;
|
|
11802
|
+
});
|
|
11768
11803
|
const {
|
|
11769
11804
|
data: menuList,
|
|
11770
11805
|
isLoading
|
|
@@ -11788,6 +11823,18 @@ function SelectNDCReason({
|
|
|
11788
11823
|
useEffect(() => {
|
|
11789
11824
|
onSelect("NDCReason", ndcReason, config);
|
|
11790
11825
|
}, [ndcReason]);
|
|
11826
|
+
useEffect(() => {
|
|
11827
|
+
if (apiDataCheck && (ndcReasonOptions === null || ndcReasonOptions === void 0 ? void 0 : ndcReasonOptions.length) > 0) {
|
|
11828
|
+
const matchedOption = ndcReasonOptions.find(opt => {
|
|
11829
|
+
var _apiDataCheck$;
|
|
11830
|
+
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);
|
|
11831
|
+
});
|
|
11832
|
+
if (matchedOption) {
|
|
11833
|
+
setNDCReason(matchedOption);
|
|
11834
|
+
setValue("NDCReason", matchedOption);
|
|
11835
|
+
}
|
|
11836
|
+
}
|
|
11837
|
+
}, [apiDataCheck, ndcReasonOptions]);
|
|
11791
11838
|
if (isLoading) {
|
|
11792
11839
|
return /*#__PURE__*/React.createElement(Loader, null);
|
|
11793
11840
|
}
|
|
@@ -11799,10 +11846,10 @@ function SelectNDCReason({
|
|
|
11799
11846
|
};
|
|
11800
11847
|
return /*#__PURE__*/React.createElement("div", {
|
|
11801
11848
|
style: {
|
|
11802
|
-
|
|
11849
|
+
paddingBottom: "16px"
|
|
11803
11850
|
}
|
|
11804
11851
|
}, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
11805
|
-
className: "card-label-smaller"
|
|
11852
|
+
className: "card-label-smaller ndc_card_labels"
|
|
11806
11853
|
}, `${t("NDC_NEW_NDC_APPLICATION_NDC_REASON")} * `), /*#__PURE__*/React.createElement(Controller, {
|
|
11807
11854
|
name: "NDCReason",
|
|
11808
11855
|
rules: {
|
|
@@ -11816,6 +11863,7 @@ function SelectNDCReason({
|
|
|
11816
11863
|
option: ndcReasonOptions,
|
|
11817
11864
|
select: e => {
|
|
11818
11865
|
setNDCReason(e);
|
|
11866
|
+
props.onChange(e);
|
|
11819
11867
|
},
|
|
11820
11868
|
optionKey: "i18nKey",
|
|
11821
11869
|
onBlur: props.onBlur,
|
|
@@ -11834,7 +11882,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
11834
11882
|
formState,
|
|
11835
11883
|
clearErrors
|
|
11836
11884
|
}) => {
|
|
11837
|
-
var _formData$cpt, _formData$cpt$details, _formData$cpt3, _Digit, _Digit$ComponentRegis, _formData$cpt4,
|
|
11885
|
+
var _formData$cpt, _formData$cpt$details, _formData$cpt3, _Digit, _Digit$ComponentRegis, _formData$cpt4, _apiDataCheck$6, _propertyDetails$wate, _propertyDetails$sewe;
|
|
11838
11886
|
const {
|
|
11839
11887
|
control,
|
|
11840
11888
|
formState: localFormState,
|
|
@@ -11847,6 +11895,10 @@ const PropertyDetailsForm$1 = ({
|
|
|
11847
11895
|
t
|
|
11848
11896
|
} = useTranslation();
|
|
11849
11897
|
const tenantId = window.location.href.includes("citizen") ? window.localStorage.getItem("CITIZEN.CITY") : window.localStorage.getItem("Employee.tenant-id");
|
|
11898
|
+
const apiDataCheck = useSelector(state => {
|
|
11899
|
+
var _state$ndc$NDCForm, _state$ndc$NDCForm$fo;
|
|
11900
|
+
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;
|
|
11901
|
+
});
|
|
11850
11902
|
const [showToast, setShowToast] = useState(null);
|
|
11851
11903
|
const [propertyLoader, setPropertyLoader] = useState(false);
|
|
11852
11904
|
const [showPayModal, setShowPayModal] = useState(false);
|
|
@@ -11915,39 +11967,63 @@ const PropertyDetailsForm$1 = ({
|
|
|
11915
11967
|
});
|
|
11916
11968
|
}, [formData === null || formData === void 0 ? void 0 : (_formData$cpt3 = formData.cpt) === null || _formData$cpt3 === void 0 ? void 0 : _formData$cpt3.details]);
|
|
11917
11969
|
useEffect(() => {
|
|
11918
|
-
var
|
|
11919
|
-
|
|
11920
|
-
|
|
11921
|
-
|
|
11922
|
-
|
|
11923
|
-
|
|
11924
|
-
|
|
11925
|
-
|
|
11926
|
-
|
|
11927
|
-
|
|
11928
|
-
|
|
11929
|
-
|
|
11930
|
-
}
|
|
11931
|
-
|
|
11970
|
+
var _apiDataCheck$;
|
|
11971
|
+
let waterConnection;
|
|
11972
|
+
if (apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$ = apiDataCheck[0]) !== null && _apiDataCheck$ !== void 0 && _apiDataCheck$.NdcDetails) {
|
|
11973
|
+
var _apiDataCheck$2;
|
|
11974
|
+
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 => {
|
|
11975
|
+
return item.businessService == "WS";
|
|
11976
|
+
});
|
|
11977
|
+
waterConnection = (resData === null || resData === void 0 ? void 0 : resData.map(item => ({
|
|
11978
|
+
connectionNo: item === null || item === void 0 ? void 0 : item.consumerCode,
|
|
11979
|
+
isEdit: false,
|
|
11980
|
+
billData: {
|
|
11981
|
+
totalAmount: 0
|
|
11982
|
+
},
|
|
11983
|
+
isLoading: false
|
|
11984
|
+
}))) || [];
|
|
11985
|
+
} else {
|
|
11986
|
+
waterConnection = (waterConnectionData === null || waterConnectionData === void 0 ? void 0 : waterConnectionData.map(item => ({
|
|
11987
|
+
connectionNo: item === null || item === void 0 ? void 0 : item.connectionNo,
|
|
11988
|
+
isEdit: false,
|
|
11989
|
+
billData: {},
|
|
11990
|
+
isLoading: false
|
|
11991
|
+
}))) || [];
|
|
11932
11992
|
}
|
|
11933
|
-
|
|
11993
|
+
setPropertyDetails(prev => ({
|
|
11994
|
+
...prev,
|
|
11995
|
+
waterConnection
|
|
11996
|
+
}));
|
|
11997
|
+
}, [waterConnectionData, apiDataCheck]);
|
|
11934
11998
|
useEffect(() => {
|
|
11935
|
-
var
|
|
11936
|
-
|
|
11937
|
-
|
|
11938
|
-
|
|
11939
|
-
|
|
11940
|
-
|
|
11941
|
-
|
|
11942
|
-
|
|
11943
|
-
|
|
11944
|
-
|
|
11945
|
-
|
|
11946
|
-
|
|
11947
|
-
}
|
|
11948
|
-
|
|
11999
|
+
var _apiDataCheck$3;
|
|
12000
|
+
let sewerageConnection;
|
|
12001
|
+
if (apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$3 = apiDataCheck[0]) !== null && _apiDataCheck$3 !== void 0 && _apiDataCheck$3.NdcDetails) {
|
|
12002
|
+
var _apiDataCheck$4;
|
|
12003
|
+
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 => {
|
|
12004
|
+
return item.businessService == "SW";
|
|
12005
|
+
});
|
|
12006
|
+
sewerageConnection = (resData === null || resData === void 0 ? void 0 : resData.map(item => ({
|
|
12007
|
+
connectionNo: item === null || item === void 0 ? void 0 : item.consumerCode,
|
|
12008
|
+
isEdit: false,
|
|
12009
|
+
billData: {
|
|
12010
|
+
totalAmount: 0
|
|
12011
|
+
},
|
|
12012
|
+
isLoading: false
|
|
12013
|
+
}))) || [];
|
|
12014
|
+
} else {
|
|
12015
|
+
sewerageConnection = (sewerageConnectionData === null || sewerageConnectionData === void 0 ? void 0 : sewerageConnectionData.map(item => ({
|
|
12016
|
+
connectionNo: item === null || item === void 0 ? void 0 : item.connectionNo,
|
|
12017
|
+
isEdit: false,
|
|
12018
|
+
billData: {},
|
|
12019
|
+
isLoading: false
|
|
12020
|
+
}))) || [];
|
|
11949
12021
|
}
|
|
11950
|
-
|
|
12022
|
+
setPropertyDetails(prev => ({
|
|
12023
|
+
...prev,
|
|
12024
|
+
sewerageConnection
|
|
12025
|
+
}));
|
|
12026
|
+
}, [sewerageConnectionData, apiDataCheck]);
|
|
11951
12027
|
useEffect(() => {
|
|
11952
12028
|
onSelect("PropertyDetails", propertyDetails, config);
|
|
11953
12029
|
}, [propertyDetails]);
|
|
@@ -12043,24 +12119,34 @@ const PropertyDetailsForm$1 = ({
|
|
|
12043
12119
|
}));
|
|
12044
12120
|
}
|
|
12045
12121
|
} else if (result !== null && result !== void 0 && result.Bill) {
|
|
12046
|
-
setShowToast({
|
|
12047
|
-
error: true,
|
|
12048
|
-
label: t("NDC_MESSAGE_NO_BILLS_FOUND_FOR_THIS_CONSUMER_NUMBER")
|
|
12049
|
-
});
|
|
12050
12122
|
if (bussinessService === "WS") {
|
|
12051
12123
|
const updated = [...propertyDetails.waterConnection];
|
|
12124
|
+
updated[index].billData = {
|
|
12125
|
+
totalAmount: 0
|
|
12126
|
+
};
|
|
12052
12127
|
updated[index].isLoading = false;
|
|
12053
12128
|
setPropertyDetails(prev => ({
|
|
12054
12129
|
...prev,
|
|
12055
12130
|
waterConnection: updated
|
|
12056
12131
|
}));
|
|
12132
|
+
setShowToast({
|
|
12133
|
+
error: false,
|
|
12134
|
+
label: t("NDC_NO_BILLS_FOUND_WS")
|
|
12135
|
+
});
|
|
12057
12136
|
} else if (bussinessService === "SW") {
|
|
12058
12137
|
const updated = [...propertyDetails.sewerageConnection];
|
|
12138
|
+
updated[index].billData = {
|
|
12139
|
+
totalAmount: 0
|
|
12140
|
+
};
|
|
12059
12141
|
updated[index].isLoading = false;
|
|
12060
12142
|
setPropertyDetails(prev => ({
|
|
12061
12143
|
...prev,
|
|
12062
12144
|
sewerageConnection: updated
|
|
12063
12145
|
}));
|
|
12146
|
+
setShowToast({
|
|
12147
|
+
error: false,
|
|
12148
|
+
label: t("NDC_NO_BILLS_FOUND_SW")
|
|
12149
|
+
});
|
|
12064
12150
|
} else if (bussinessService === "PT") {
|
|
12065
12151
|
let updated = {
|
|
12066
12152
|
...propertyDetails.propertyBillData
|
|
@@ -12070,26 +12156,40 @@ const PropertyDetailsForm$1 = ({
|
|
|
12070
12156
|
...prev,
|
|
12071
12157
|
propertyBillData: updated
|
|
12072
12158
|
}));
|
|
12159
|
+
setShowToast({
|
|
12160
|
+
error: false,
|
|
12161
|
+
label: t("NDC_NO_BILLS_FOUND_PROPERTY")
|
|
12162
|
+
});
|
|
12073
12163
|
}
|
|
12074
12164
|
} else {
|
|
12075
|
-
setShowToast({
|
|
12076
|
-
error: true,
|
|
12077
|
-
label: t("INVALID_CONSUMER_NUMBER")
|
|
12078
|
-
});
|
|
12079
12165
|
if (bussinessService === "WS") {
|
|
12080
12166
|
const updated = [...propertyDetails.waterConnection];
|
|
12081
12167
|
updated[index].isLoading = false;
|
|
12168
|
+
updated[index].billData = {
|
|
12169
|
+
totalAmount: 0
|
|
12170
|
+
};
|
|
12082
12171
|
setPropertyDetails(prev => ({
|
|
12083
12172
|
...prev,
|
|
12084
12173
|
waterConnection: updated
|
|
12085
12174
|
}));
|
|
12175
|
+
setShowToast({
|
|
12176
|
+
error: false,
|
|
12177
|
+
label: t("NDC_NO_BILLS_FOUND_WS")
|
|
12178
|
+
});
|
|
12086
12179
|
} else if (bussinessService === "SW") {
|
|
12087
12180
|
const updated = [...propertyDetails.sewerageConnection];
|
|
12088
12181
|
updated[index].isLoading = false;
|
|
12182
|
+
updated[index].billData = {
|
|
12183
|
+
totalAmount: 0
|
|
12184
|
+
};
|
|
12089
12185
|
setPropertyDetails(prev => ({
|
|
12090
12186
|
...prev,
|
|
12091
12187
|
sewerageConnection: updated
|
|
12092
12188
|
}));
|
|
12189
|
+
setShowToast({
|
|
12190
|
+
error: false,
|
|
12191
|
+
label: t("NDC_NO_BILLS_FOUND_SW")
|
|
12192
|
+
});
|
|
12093
12193
|
} else if (bussinessService === "PT") {
|
|
12094
12194
|
let updated = {
|
|
12095
12195
|
...propertyDetails.propertyBillData
|
|
@@ -12099,6 +12199,10 @@ const PropertyDetailsForm$1 = ({
|
|
|
12099
12199
|
...prev,
|
|
12100
12200
|
propertyBillData: updated
|
|
12101
12201
|
}));
|
|
12202
|
+
setShowToast({
|
|
12203
|
+
error: false,
|
|
12204
|
+
label: t("NDC_NO_BILLS_FOUND_PROPERTY")
|
|
12205
|
+
});
|
|
12102
12206
|
}
|
|
12103
12207
|
}
|
|
12104
12208
|
} catch (error) {
|
|
@@ -12170,63 +12274,47 @@ const PropertyDetailsForm$1 = ({
|
|
|
12170
12274
|
}
|
|
12171
12275
|
}
|
|
12172
12276
|
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");
|
|
12173
|
-
|
|
12174
|
-
|
|
12175
|
-
|
|
12176
|
-
|
|
12177
|
-
|
|
12178
|
-
|
|
12179
|
-
style: {
|
|
12180
|
-
display: "flex",
|
|
12181
|
-
flexDirection: "column",
|
|
12182
|
-
gap: "4px"
|
|
12183
|
-
}
|
|
12184
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
12185
|
-
style: {
|
|
12186
|
-
display: "flex",
|
|
12187
|
-
flexDirection: "row"
|
|
12188
|
-
}
|
|
12189
|
-
}, propertyLoader ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.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.createElement("button", {
|
|
12190
|
-
className: "submit-bar",
|
|
12191
|
-
type: "button",
|
|
12192
|
-
style: {
|
|
12193
|
-
color: "white",
|
|
12194
|
-
fontSize: "13px"
|
|
12195
|
-
},
|
|
12196
|
-
onClick: () => {
|
|
12197
|
-
var _formData$cpt6;
|
|
12198
|
-
fetchBill("PT", formData === null || formData === void 0 ? void 0 : (_formData$cpt6 = formData.cpt) === null || _formData$cpt6 === void 0 ? void 0 : _formData$cpt6.id);
|
|
12277
|
+
useEffect(() => {
|
|
12278
|
+
if (showToast) {
|
|
12279
|
+
const timer = setTimeout(() => {
|
|
12280
|
+
setShowToast(null);
|
|
12281
|
+
}, 3000);
|
|
12282
|
+
return () => clearTimeout(timer);
|
|
12199
12283
|
}
|
|
12200
|
-
},
|
|
12201
|
-
|
|
12202
|
-
|
|
12203
|
-
|
|
12204
|
-
|
|
12205
|
-
|
|
12206
|
-
|
|
12207
|
-
|
|
12208
|
-
|
|
12284
|
+
}, [showToast]);
|
|
12285
|
+
useEffect(() => {
|
|
12286
|
+
if (apiDataCheck) {
|
|
12287
|
+
var _apiDataCheck$5, _apiDataCheck$5$owner, _apiDataCheck$5$owner2;
|
|
12288
|
+
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) || "";
|
|
12289
|
+
setValue("email", apiEmail);
|
|
12290
|
+
setPropertyDetails(prev => ({
|
|
12291
|
+
...prev,
|
|
12292
|
+
email: apiEmail
|
|
12293
|
+
}));
|
|
12209
12294
|
}
|
|
12210
|
-
},
|
|
12295
|
+
}, [apiDataCheck]);
|
|
12296
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
12211
12297
|
style: {
|
|
12212
|
-
|
|
12298
|
+
marginBottom: "16px"
|
|
12213
12299
|
}
|
|
12214
|
-
},
|
|
12300
|
+
}, ((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.createElement("div", null, /*#__PURE__*/React.createElement(LabelFieldPair, {
|
|
12215
12301
|
style: {
|
|
12216
12302
|
marginTop: "40px"
|
|
12217
12303
|
}
|
|
12218
12304
|
}, /*#__PURE__*/React.createElement(CardLabel, {
|
|
12219
|
-
className: "card-label-smaller"
|
|
12305
|
+
className: "card-label-smaller ndc_card_labels"
|
|
12220
12306
|
}, `${t("NDC_WATER_CONNECTION")}`), waterConnectionLoading ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement("div", {
|
|
12221
12307
|
className: "field",
|
|
12222
12308
|
style: {
|
|
12223
12309
|
display: "flex",
|
|
12224
12310
|
flexDirection: "column",
|
|
12225
|
-
gap: "8px"
|
|
12311
|
+
gap: "8px",
|
|
12312
|
+
width: "100%"
|
|
12226
12313
|
}
|
|
12227
12314
|
}, propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$wate = propertyDetails.waterConnection) === null || _propertyDetails$wate === void 0 ? void 0 : _propertyDetails$wate.map((item, index) => {
|
|
12228
|
-
var _item$billData, _item$billData2, _item$billData3;
|
|
12315
|
+
var _apiDataCheck$7, _item$billData, _item$billData2, _item$billData3, _item$billData4;
|
|
12229
12316
|
return /*#__PURE__*/React.createElement("div", {
|
|
12317
|
+
className: "ndc_property_search",
|
|
12230
12318
|
key: index,
|
|
12231
12319
|
style: {
|
|
12232
12320
|
display: "flex",
|
|
@@ -12265,7 +12353,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12265
12353
|
alignItems: "center",
|
|
12266
12354
|
gap: "12px"
|
|
12267
12355
|
}
|
|
12268
|
-
}, (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.createElement("button", {
|
|
12356
|
+
}, !(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.createElement("button", {
|
|
12269
12357
|
className: "submit-bar",
|
|
12270
12358
|
type: "button",
|
|
12271
12359
|
style: {
|
|
@@ -12275,7 +12363,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12275
12363
|
onClick: () => {
|
|
12276
12364
|
fetchBill("WS", item.connectionNo, index);
|
|
12277
12365
|
}
|
|
12278
|
-
}, "
|
|
12366
|
+
}, `${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.createElement("button", {
|
|
12279
12367
|
className: "submit-bar",
|
|
12280
12368
|
type: "button",
|
|
12281
12369
|
style: {
|
|
@@ -12284,7 +12372,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12284
12372
|
onClick: () => {
|
|
12285
12373
|
redirectToPayBill(item === null || item === void 0 ? void 0 : item.billData, index, item.isEdit);
|
|
12286
12374
|
}
|
|
12287
|
-
}, `${t("PAY_DUES")}`), (item === null || item === void 0 ? void 0 : item.connectionNo) && (item === null || item === void 0 ? void 0 : (_item$
|
|
12375
|
+
}, `${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.createElement("div", {
|
|
12288
12376
|
style: {
|
|
12289
12377
|
color: "green"
|
|
12290
12378
|
}
|
|
@@ -12311,7 +12399,8 @@ const PropertyDetailsForm$1 = ({
|
|
|
12311
12399
|
className: "submit-bar",
|
|
12312
12400
|
type: "button",
|
|
12313
12401
|
style: {
|
|
12314
|
-
color: "white"
|
|
12402
|
+
color: "white",
|
|
12403
|
+
fontSize: "12px"
|
|
12315
12404
|
},
|
|
12316
12405
|
onClick: () => {
|
|
12317
12406
|
addWaterConnection();
|
|
@@ -12321,17 +12410,19 @@ const PropertyDetailsForm$1 = ({
|
|
|
12321
12410
|
marginTop: "40px"
|
|
12322
12411
|
}
|
|
12323
12412
|
}, /*#__PURE__*/React.createElement(CardLabel, {
|
|
12324
|
-
className: "card-label-smaller"
|
|
12413
|
+
className: "card-label-smaller ndc_card_labels"
|
|
12325
12414
|
}, `${t("NDC_SEWERAGE_CONNECTION")} `), sewerageConnectionLoading ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement("div", {
|
|
12326
12415
|
className: "field",
|
|
12327
12416
|
style: {
|
|
12328
12417
|
display: "flex",
|
|
12329
12418
|
flexDirection: "column",
|
|
12330
|
-
gap: "8px"
|
|
12419
|
+
gap: "8px",
|
|
12420
|
+
width: "100%"
|
|
12331
12421
|
}
|
|
12332
12422
|
}, propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$sewe = propertyDetails.sewerageConnection) === null || _propertyDetails$sewe === void 0 ? void 0 : _propertyDetails$sewe.map((item, index) => {
|
|
12333
|
-
var
|
|
12423
|
+
var _apiDataCheck$8, _item$billData5, _item$billData6, _item$billData7, _item$billData8;
|
|
12334
12424
|
return /*#__PURE__*/React.createElement("div", {
|
|
12425
|
+
className: "ndc_property_search",
|
|
12335
12426
|
key: index,
|
|
12336
12427
|
style: {
|
|
12337
12428
|
display: "flex",
|
|
@@ -12370,7 +12461,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12370
12461
|
alignItems: "center",
|
|
12371
12462
|
gap: "12px"
|
|
12372
12463
|
}
|
|
12373
|
-
}, (item === null || item === void 0 ? void 0 : item.connectionNo) && !(item !== null && item !== void 0 && (_item$
|
|
12464
|
+
}, !(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.createElement("button", {
|
|
12374
12465
|
className: "submit-bar",
|
|
12375
12466
|
type: "button",
|
|
12376
12467
|
style: {
|
|
@@ -12380,7 +12471,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12380
12471
|
onClick: () => {
|
|
12381
12472
|
fetchBill("SW", item.connectionNo, index);
|
|
12382
12473
|
}
|
|
12383
|
-
}, "
|
|
12474
|
+
}, `${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.createElement("button", {
|
|
12384
12475
|
className: "submit-bar",
|
|
12385
12476
|
type: "button",
|
|
12386
12477
|
style: {
|
|
@@ -12389,7 +12480,11 @@ const PropertyDetailsForm$1 = ({
|
|
|
12389
12480
|
onClick: () => {
|
|
12390
12481
|
redirectToPayBill(item === null || item === void 0 ? void 0 : item.billData, index);
|
|
12391
12482
|
}
|
|
12392
|
-
}, `${t("PAY_DUES")}`), (item === null || item === void 0 ? void 0 : item.connectionNo) && (item === null || item === void 0 ? void 0 : (_item$
|
|
12483
|
+
}, `${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.createElement("div", {
|
|
12484
|
+
style: {
|
|
12485
|
+
color: "green"
|
|
12486
|
+
}
|
|
12487
|
+
}, t("NO_DUES")), (item === null || item === void 0 ? void 0 : item.isEdit) && /*#__PURE__*/React.createElement("button", {
|
|
12393
12488
|
onClick: () => {
|
|
12394
12489
|
let updated = [...propertyDetails.sewerageConnection];
|
|
12395
12490
|
updated.splice(index, 1);
|
|
@@ -12412,7 +12507,8 @@ const PropertyDetailsForm$1 = ({
|
|
|
12412
12507
|
className: "submit-bar",
|
|
12413
12508
|
type: "button",
|
|
12414
12509
|
style: {
|
|
12415
|
-
color: "white"
|
|
12510
|
+
color: "white",
|
|
12511
|
+
fontSize: " 12px"
|
|
12416
12512
|
},
|
|
12417
12513
|
onClick: () => {
|
|
12418
12514
|
addSewerageConnection();
|
|
@@ -12422,7 +12518,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12422
12518
|
marginTop: "40px"
|
|
12423
12519
|
}
|
|
12424
12520
|
}, /*#__PURE__*/React.createElement(CardLabel, {
|
|
12425
|
-
className: "card-label-smaller"
|
|
12521
|
+
className: "card-label-smaller ndc_card_labels"
|
|
12426
12522
|
}, `${t("NDC_FIRST_NAME")} * `), /*#__PURE__*/React.createElement("div", {
|
|
12427
12523
|
className: "field"
|
|
12428
12524
|
}, /*#__PURE__*/React.createElement(Controller, {
|
|
@@ -12436,7 +12532,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12436
12532
|
}
|
|
12437
12533
|
},
|
|
12438
12534
|
render: props => {
|
|
12439
|
-
var _formData$
|
|
12535
|
+
var _formData$cpt5, _formData$cpt5$detail, _formData$cpt5$detail2, _formData$cpt5$detail3, _formData$cpt5$detail4, _formData$cpt5$detail5, _formData$cpt5$detail6;
|
|
12440
12536
|
return /*#__PURE__*/React.createElement(TextInput, {
|
|
12441
12537
|
value: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.firstName) || "",
|
|
12442
12538
|
onChange: e => {
|
|
@@ -12449,11 +12545,11 @@ const PropertyDetailsForm$1 = ({
|
|
|
12449
12545
|
onBlur: e => {
|
|
12450
12546
|
props.onBlur(e);
|
|
12451
12547
|
},
|
|
12452
|
-
disabled: (formData === null || formData === void 0 ? void 0 : (_formData$
|
|
12548
|
+
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
|
|
12453
12549
|
});
|
|
12454
12550
|
}
|
|
12455
12551
|
}))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
12456
|
-
className: "card-label-smaller"
|
|
12552
|
+
className: "card-label-smaller ndc_card_labels"
|
|
12457
12553
|
}, `${t("NDC_LAST_NAME")} * `), /*#__PURE__*/React.createElement("div", {
|
|
12458
12554
|
className: "field"
|
|
12459
12555
|
}, /*#__PURE__*/React.createElement(Controller, {
|
|
@@ -12467,7 +12563,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12467
12563
|
}
|
|
12468
12564
|
},
|
|
12469
12565
|
render: props => {
|
|
12470
|
-
var _formData$
|
|
12566
|
+
var _formData$cpt6, _formData$cpt6$detail, _formData$cpt6$detail2, _formData$cpt6$detail3, _formData$cpt6$detail4, _formData$cpt6$detail5, _formData$cpt6$detail6;
|
|
12471
12567
|
return /*#__PURE__*/React.createElement(TextInput, {
|
|
12472
12568
|
value: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.lastName) || "",
|
|
12473
12569
|
onChange: e => {
|
|
@@ -12480,36 +12576,36 @@ const PropertyDetailsForm$1 = ({
|
|
|
12480
12576
|
onBlur: e => {
|
|
12481
12577
|
props.onBlur(e);
|
|
12482
12578
|
},
|
|
12483
|
-
disabled: (formData === null || formData === void 0 ? void 0 : (_formData$
|
|
12579
|
+
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
|
|
12484
12580
|
});
|
|
12485
12581
|
}
|
|
12486
12582
|
}))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
12487
|
-
className: "card-label-smaller"
|
|
12583
|
+
className: "card-label-smaller ndc_card_labels"
|
|
12488
12584
|
}, `${t("NDC_EMAIL")} * `), /*#__PURE__*/React.createElement("div", {
|
|
12489
12585
|
className: "field"
|
|
12490
12586
|
}, /*#__PURE__*/React.createElement(Controller, {
|
|
12491
12587
|
control: control,
|
|
12492
12588
|
name: "email",
|
|
12493
|
-
defaultValue:
|
|
12589
|
+
defaultValue: "",
|
|
12494
12590
|
render: props => {
|
|
12495
|
-
var _formData$
|
|
12591
|
+
var _formData$cpt7, _formData$cpt7$detail, _formData$cpt7$detail2, _formData$cpt7$detail3, _formData$cpt7$detail4;
|
|
12496
12592
|
return /*#__PURE__*/React.createElement(TextInput, {
|
|
12497
|
-
value:
|
|
12593
|
+
value: props === null || props === void 0 ? void 0 : props.value,
|
|
12498
12594
|
onChange: e => {
|
|
12595
|
+
props.onChange(e.target.value);
|
|
12499
12596
|
setPropertyDetails(prev => ({
|
|
12500
12597
|
...prev,
|
|
12501
12598
|
email: e.target.value
|
|
12502
12599
|
}));
|
|
12503
|
-
props.onChange(e.target.value);
|
|
12504
12600
|
},
|
|
12505
12601
|
onBlur: e => {
|
|
12506
12602
|
props.onBlur(e);
|
|
12507
12603
|
},
|
|
12508
|
-
disabled: (formData === null || formData === void 0 ? void 0 : (_formData$
|
|
12604
|
+
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
|
|
12509
12605
|
});
|
|
12510
12606
|
}
|
|
12511
12607
|
}))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
12512
|
-
className: "card-label-smaller"
|
|
12608
|
+
className: "card-label-smaller ndc_card_labels"
|
|
12513
12609
|
}, `${t("NDC_MOBILE_NUMBER")} * `), /*#__PURE__*/React.createElement("div", {
|
|
12514
12610
|
className: "field"
|
|
12515
12611
|
}, /*#__PURE__*/React.createElement(Controller, {
|
|
@@ -12530,7 +12626,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12530
12626
|
}
|
|
12531
12627
|
})
|
|
12532
12628
|
}))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
12533
|
-
className: "card-label-smaller"
|
|
12629
|
+
className: "card-label-smaller ndc_card_labels"
|
|
12534
12630
|
}, `${t("NDC_ADDRESS")} * `), /*#__PURE__*/React.createElement("div", {
|
|
12535
12631
|
className: "field"
|
|
12536
12632
|
}, /*#__PURE__*/React.createElement(Controller, {
|
|
@@ -12538,7 +12634,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12538
12634
|
name: "address",
|
|
12539
12635
|
defaultValue: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.address) || "",
|
|
12540
12636
|
render: props => {
|
|
12541
|
-
var _formData$
|
|
12637
|
+
var _formData$cpt8, _formData$cpt8$detail, _formData$cpt8$detail2, _formData$cpt8$detail3, _formData$cpt8$detail4;
|
|
12542
12638
|
return /*#__PURE__*/React.createElement(TextInput, {
|
|
12543
12639
|
value: propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.address,
|
|
12544
12640
|
onChange: e => {
|
|
@@ -12551,11 +12647,11 @@ const PropertyDetailsForm$1 = ({
|
|
|
12551
12647
|
onBlur: e => {
|
|
12552
12648
|
props.onBlur(e);
|
|
12553
12649
|
},
|
|
12554
|
-
disabled: (formData === null || formData === void 0 ? void 0 : (_formData$
|
|
12650
|
+
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
|
|
12555
12651
|
});
|
|
12556
12652
|
}
|
|
12557
12653
|
})))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
12558
|
-
className: "card-label-smaller"
|
|
12654
|
+
className: "card-label-smaller ndc_card_labels"
|
|
12559
12655
|
}, `${t("NDC_TL_NUMBER")}`), /*#__PURE__*/React.createElement("div", {
|
|
12560
12656
|
className: "field"
|
|
12561
12657
|
}, /*#__PURE__*/React.createElement(Controller, {
|
|
@@ -12595,30 +12691,32 @@ const getAddress = (address, t) => {
|
|
|
12595
12691
|
const PropertySearchNSummary = ({
|
|
12596
12692
|
config,
|
|
12597
12693
|
onSelect,
|
|
12598
|
-
|
|
12599
|
-
formData,
|
|
12600
|
-
setError,
|
|
12601
|
-
formState,
|
|
12602
|
-
clearErrors
|
|
12694
|
+
formData
|
|
12603
12695
|
}) => {
|
|
12604
|
-
var _formData$cpt, _formData$cpt2, _propertyDetails$Prop3;
|
|
12696
|
+
var _apiDataCheck$, _apiDataCheck$$NdcDet, _formData$cpt, _formData$cpt2, _propertyDetails$Prop3, _apiDataCheck$2, _formData$cpt12, _formData$cpt13, _formData$cpt13$dues;
|
|
12605
12697
|
const {
|
|
12606
12698
|
t
|
|
12607
12699
|
} = useTranslation();
|
|
12608
|
-
const
|
|
12700
|
+
const myElementRef = useRef(null);
|
|
12701
|
+
const dispatch = useDispatch();
|
|
12609
12702
|
let {
|
|
12610
12703
|
pathname,
|
|
12611
12704
|
state
|
|
12612
12705
|
} = useLocation();
|
|
12613
12706
|
state = state && (typeof state === "string" || state instanceof String) ? JSON.parse(state) : state;
|
|
12707
|
+
const apiDataCheck = useSelector(state => {
|
|
12708
|
+
var _state$ndc$NDCForm, _state$ndc$NDCForm$fo;
|
|
12709
|
+
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;
|
|
12710
|
+
});
|
|
12614
12711
|
const isEditScreen = pathname.includes("/modify-application/");
|
|
12615
|
-
const tenantId = Digit.ULBService.getCurrentPermanentCity();
|
|
12616
|
-
const isEmpNewApplication = window.location.href.includes("/employee/tl/new-application") || window.location.href.includes("/citizen/tl/tradelicence/new-application");
|
|
12617
|
-
const isEmpRenewLicense = window.location.href.includes("/employee/tl/renew-application-details") || window.location.href.includes("/employee/tl/edit-application-details");
|
|
12712
|
+
const tenantId = window.location.href.includes("employee") ? Digit.ULBService.getCurrentPermanentCity() : localStorage.getItem("CITIZEN.CITY");
|
|
12618
12713
|
const search = useLocation().search;
|
|
12619
12714
|
const urlPropertyId = new URLSearchParams(search).get("propertyId");
|
|
12620
|
-
const
|
|
12621
|
-
const
|
|
12715
|
+
const isfirstRender = useRef(true);
|
|
12716
|
+
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");
|
|
12717
|
+
console.log("ptFromApi", ptFromApi);
|
|
12718
|
+
const [propertyId, setPropertyId] = 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) || "");
|
|
12719
|
+
const [searchPropertyId, setSearchPropertyId] = 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) || "");
|
|
12622
12720
|
const [showToast, setShowToast] = useState(null);
|
|
12623
12721
|
const [propertyDetails, setPropertyDetails] = useState(() => {
|
|
12624
12722
|
var _formData$cpt3, _formData$cpt4;
|
|
@@ -12635,9 +12733,24 @@ const PropertySearchNSummary = ({
|
|
|
12635
12733
|
};
|
|
12636
12734
|
}
|
|
12637
12735
|
});
|
|
12638
|
-
const
|
|
12639
|
-
|
|
12640
|
-
|
|
12736
|
+
const [propertyDues, setPropertyDues] = useState(() => {
|
|
12737
|
+
var _formData$cpt6, _formData$cpt7;
|
|
12738
|
+
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) {
|
|
12739
|
+
var _formData$cpt8;
|
|
12740
|
+
return {
|
|
12741
|
+
dues: {
|
|
12742
|
+
...(formData === null || formData === void 0 ? void 0 : (_formData$cpt8 = formData.cpt) === null || _formData$cpt8 === void 0 ? void 0 : _formData$cpt8.dues)
|
|
12743
|
+
}
|
|
12744
|
+
};
|
|
12745
|
+
} else {
|
|
12746
|
+
return {
|
|
12747
|
+
dues: {}
|
|
12748
|
+
};
|
|
12749
|
+
}
|
|
12750
|
+
});
|
|
12751
|
+
const [isSearchClicked, setIsSearchClicked] = useState(false);
|
|
12752
|
+
const [getNoDue, setNoDue] = useState(false);
|
|
12753
|
+
const [getCheckStatus, setCheckStats] = useState(false);
|
|
12641
12754
|
const {
|
|
12642
12755
|
isLoading,
|
|
12643
12756
|
isError,
|
|
@@ -12656,20 +12769,32 @@ const PropertySearchNSummary = ({
|
|
|
12656
12769
|
enabled: searchPropertyId ? true : false,
|
|
12657
12770
|
privacy: Digit.Utils.getPrivacyObject()
|
|
12658
12771
|
});
|
|
12659
|
-
|
|
12772
|
+
console.log("apiDataCheck", apiDataCheck);
|
|
12773
|
+
useEffect(() => {
|
|
12774
|
+
if (ptFromApi !== null && ptFromApi !== void 0 && ptFromApi.consumerCode) {
|
|
12775
|
+
setIsSearchClicked(true);
|
|
12776
|
+
setPropertyId(ptFromApi.consumerCode);
|
|
12777
|
+
setSearchPropertyId(ptFromApi.consumerCode);
|
|
12778
|
+
setNoDue(true);
|
|
12779
|
+
onSelect(config.key, {
|
|
12780
|
+
...formData[config.key],
|
|
12781
|
+
id: ptFromApi.consumerCode
|
|
12782
|
+
});
|
|
12783
|
+
}
|
|
12784
|
+
}, [ptFromApi]);
|
|
12660
12785
|
useEffect(() => {
|
|
12661
12786
|
var _propertyDetailsFetch;
|
|
12662
12787
|
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) {
|
|
12663
12788
|
setPropertyDetails(propertyDetailsFetch);
|
|
12664
12789
|
setShowToast(null);
|
|
12790
|
+
setCheckStats(true);
|
|
12665
12791
|
} else {
|
|
12666
|
-
var _formData$
|
|
12792
|
+
var _formData$cpt9;
|
|
12667
12793
|
if (isfirstRender.current) {
|
|
12668
12794
|
isfirstRender.current = false;
|
|
12669
12795
|
return;
|
|
12670
12796
|
}
|
|
12671
|
-
if (!(formData !== null && formData !== void 0 && (_formData$
|
|
12672
|
-
console.log("Property Id not found in response", propertyId);
|
|
12797
|
+
if (!(formData !== null && formData !== void 0 && (_formData$cpt9 = formData.cpt) !== null && _formData$cpt9 !== void 0 && _formData$cpt9.details)) {
|
|
12673
12798
|
setPropertyDetails({});
|
|
12674
12799
|
setShowToast({
|
|
12675
12800
|
error: true,
|
|
@@ -12684,7 +12809,6 @@ const PropertySearchNSummary = ({
|
|
|
12684
12809
|
useEffect(() => {
|
|
12685
12810
|
var _propertyDetails$Prop;
|
|
12686
12811
|
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) {
|
|
12687
|
-
console.log("Error Caught", error, propertyDetails);
|
|
12688
12812
|
setShowToast({
|
|
12689
12813
|
error: true,
|
|
12690
12814
|
label: "PT_ENTER_VALID_PROPERTY_ID"
|
|
@@ -12698,6 +12822,12 @@ const PropertySearchNSummary = ({
|
|
|
12698
12822
|
details: propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop2 = propertyDetails.Properties) === null || _propertyDetails$Prop2 === void 0 ? void 0 : _propertyDetails$Prop2[0]
|
|
12699
12823
|
});
|
|
12700
12824
|
}, [propertyDetails, pathname]);
|
|
12825
|
+
useEffect(() => {
|
|
12826
|
+
onSelect(config.key, {
|
|
12827
|
+
...formData[config.key],
|
|
12828
|
+
dues: propertyDues === null || propertyDues === void 0 ? void 0 : propertyDues.dues
|
|
12829
|
+
});
|
|
12830
|
+
}, [propertyDues, pathname]);
|
|
12701
12831
|
const searchProperty = () => {
|
|
12702
12832
|
if (!propertyId) {
|
|
12703
12833
|
setShowToast({
|
|
@@ -12711,8 +12841,16 @@ const PropertySearchNSummary = ({
|
|
|
12711
12841
|
Properties: []
|
|
12712
12842
|
});
|
|
12713
12843
|
setSearchPropertyId(propertyId);
|
|
12844
|
+
setIsSearchClicked(true);
|
|
12714
12845
|
}
|
|
12715
12846
|
};
|
|
12847
|
+
const handlePropertyChange = e => {
|
|
12848
|
+
setPropertyId(e.target.value);
|
|
12849
|
+
setValue(e.target.value, propertyIdInput.name);
|
|
12850
|
+
setIsSearchClicked(false);
|
|
12851
|
+
setNoDue(false);
|
|
12852
|
+
setCheckStats(false);
|
|
12853
|
+
};
|
|
12716
12854
|
if (isEditScreen) {
|
|
12717
12855
|
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
12718
12856
|
}
|
|
@@ -12740,47 +12878,142 @@ const PropertySearchNSummary = ({
|
|
|
12740
12878
|
[input]: value
|
|
12741
12879
|
});
|
|
12742
12880
|
}
|
|
12743
|
-
function
|
|
12744
|
-
|
|
12881
|
+
async function fetchBill() {
|
|
12882
|
+
try {
|
|
12883
|
+
var _formData$cpt0, _result$Bill;
|
|
12884
|
+
const result = await Digit.PaymentService.fetchBill(tenantId, {
|
|
12885
|
+
businessService: "PT",
|
|
12886
|
+
consumerCode: formData === null || formData === void 0 ? void 0 : (_formData$cpt0 = formData.cpt) === null || _formData$cpt0 === void 0 ? void 0 : _formData$cpt0.id
|
|
12887
|
+
});
|
|
12888
|
+
if ((result === null || result === void 0 ? void 0 : (_result$Bill = result.Bill) === null || _result$Bill === void 0 ? void 0 : _result$Bill.length) > 0) {
|
|
12889
|
+
var _result$Bill$;
|
|
12890
|
+
if ((result === null || result === void 0 ? void 0 : (_result$Bill$ = result.Bill[0]) === null || _result$Bill$ === void 0 ? void 0 : _result$Bill$.totalAmount) > 0) {
|
|
12891
|
+
setShowToast({
|
|
12892
|
+
error: true,
|
|
12893
|
+
label: t("NDC_MESSAGE_DUES_FOUND_PLEASE_PAY")
|
|
12894
|
+
});
|
|
12895
|
+
} else {
|
|
12896
|
+
setShowToast({
|
|
12897
|
+
error: false,
|
|
12898
|
+
label: t("NDC_NO_BILLS_FOUND_PROPERTY")
|
|
12899
|
+
});
|
|
12900
|
+
setNoDue(true);
|
|
12901
|
+
setCheckStats(false);
|
|
12902
|
+
}
|
|
12903
|
+
setPropertyDues({
|
|
12904
|
+
dues: result === null || result === void 0 ? void 0 : result.Bill[0]
|
|
12905
|
+
});
|
|
12906
|
+
} else if (result !== null && result !== void 0 && result.Bill) {
|
|
12907
|
+
setShowToast({
|
|
12908
|
+
error: false,
|
|
12909
|
+
label: t("NDC_NO_BILLS_FOUND_PROPERTY")
|
|
12910
|
+
});
|
|
12911
|
+
setPropertyDues({
|
|
12912
|
+
dues: {
|
|
12913
|
+
totalAmount: 0
|
|
12914
|
+
}
|
|
12915
|
+
});
|
|
12916
|
+
setNoDue(true);
|
|
12917
|
+
setCheckStats(false);
|
|
12918
|
+
} else {
|
|
12919
|
+
setShowToast({
|
|
12920
|
+
error: false,
|
|
12921
|
+
label: t("NDC_NO_BILLS_FOUND_PROPERTY")
|
|
12922
|
+
});
|
|
12923
|
+
setPropertyDues({
|
|
12924
|
+
dues: {
|
|
12925
|
+
totalAmount: 0
|
|
12926
|
+
}
|
|
12927
|
+
});
|
|
12928
|
+
setNoDue(true);
|
|
12929
|
+
setCheckStats(false);
|
|
12930
|
+
}
|
|
12931
|
+
} catch (error) {
|
|
12932
|
+
setShowToast({
|
|
12933
|
+
error: true,
|
|
12934
|
+
label: t("NDC_MESSAGE_FETCH_FAILED")
|
|
12935
|
+
});
|
|
12936
|
+
}
|
|
12745
12937
|
}
|
|
12746
|
-
|
|
12938
|
+
function redirectToPayBill(billData, index, isEdit) {
|
|
12939
|
+
var _formData$cpt1, _formData$cpt10, _formData$cpt10$detai;
|
|
12940
|
+
const userType = window.location.href.includes("employee") ? "employee" : "citizen";
|
|
12941
|
+
const payUrl = "https://sdc-uat.lgpunjab.gov.in" + `/${userType}/egov-common/pay?consumerCode=${formData === null || formData === void 0 ? void 0 : (_formData$cpt1 = formData.cpt) === null || _formData$cpt1 === void 0 ? void 0 : _formData$cpt1.id}&tenantId=${formData === null || formData === void 0 ? void 0 : (_formData$cpt10 = formData.cpt) === null || _formData$cpt10 === void 0 ? void 0 : (_formData$cpt10$detai = _formData$cpt10.details) === null || _formData$cpt10$detai === void 0 ? void 0 : _formData$cpt10$detai.tenantId}&businessService=PT`;
|
|
12942
|
+
window.open(payUrl, "_blank");
|
|
12943
|
+
setPropertyDues({});
|
|
12944
|
+
}
|
|
12945
|
+
useEffect(() => {
|
|
12946
|
+
if (showToast) {
|
|
12947
|
+
const timer = setTimeout(() => {
|
|
12948
|
+
setShowToast(null);
|
|
12949
|
+
}, 3000);
|
|
12950
|
+
return () => clearTimeout(timer);
|
|
12951
|
+
}
|
|
12952
|
+
}, [showToast]);
|
|
12953
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, isLoading && /*#__PURE__*/React.createElement(Loader, null), /*#__PURE__*/React.createElement("div", {
|
|
12747
12954
|
style: {
|
|
12748
12955
|
marginBottom: "16px"
|
|
12749
12956
|
}
|
|
12750
12957
|
}, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
12751
|
-
className: "card-label-smaller",
|
|
12958
|
+
className: "card-label-smaller ndc_card_labels",
|
|
12752
12959
|
style: getInputStyles()
|
|
12753
12960
|
}, `${t(propertyIdInput.label)}`, null), /*#__PURE__*/React.createElement("div", {
|
|
12754
|
-
className: "field",
|
|
12961
|
+
className: "field ndc_property_search",
|
|
12755
12962
|
style: {
|
|
12756
12963
|
marginTop: "20px",
|
|
12757
|
-
display: "flex"
|
|
12964
|
+
display: "flex",
|
|
12965
|
+
gap: "16px",
|
|
12966
|
+
alignItems: "baseline",
|
|
12967
|
+
width: "100%"
|
|
12758
12968
|
},
|
|
12759
12969
|
ref: myElementRef,
|
|
12760
12970
|
id: "search-property-field"
|
|
12761
12971
|
}, /*#__PURE__*/React.createElement(TextInput, Object.assign({
|
|
12762
12972
|
key: propertyIdInput.name,
|
|
12763
|
-
value:
|
|
12764
|
-
onChange:
|
|
12765
|
-
setPropertyId(e.target.value);
|
|
12766
|
-
setValue(e.target.value, propertyIdInput.name);
|
|
12767
|
-
},
|
|
12973
|
+
value: propertyId,
|
|
12974
|
+
onChange: handlePropertyChange,
|
|
12768
12975
|
disable: false,
|
|
12769
12976
|
maxlength: 16,
|
|
12770
|
-
defaultValue: undefined
|
|
12977
|
+
defaultValue: undefined
|
|
12978
|
+
}, propertyIdInput.validation)), !isSearchClicked && /*#__PURE__*/React.createElement("button", {
|
|
12979
|
+
className: "submit-bar",
|
|
12980
|
+
type: "button",
|
|
12981
|
+
style: {
|
|
12982
|
+
color: "white",
|
|
12983
|
+
width: "100%",
|
|
12984
|
+
maxWidth: "100px"
|
|
12985
|
+
},
|
|
12986
|
+
onClick: searchProperty
|
|
12987
|
+
}, `${t("PT_SEARCH")}`), !(apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$2 = apiDataCheck[0]) !== null && _apiDataCheck$2 !== void 0 && _apiDataCheck$2.NdcDetails) && getCheckStatus && /*#__PURE__*/React.createElement("button", {
|
|
12988
|
+
className: "submit-bar",
|
|
12989
|
+
type: "button",
|
|
12771
12990
|
style: {
|
|
12772
|
-
|
|
12773
|
-
|
|
12774
|
-
|
|
12991
|
+
color: "white",
|
|
12992
|
+
fontSize: "13px",
|
|
12993
|
+
width: "100%",
|
|
12994
|
+
maxWidth: "180px"
|
|
12995
|
+
},
|
|
12996
|
+
onClick: () => {
|
|
12997
|
+
fetchBill();
|
|
12775
12998
|
}
|
|
12776
|
-
},
|
|
12999
|
+
}, `${t("CHECK_STATUS_PROPERTY")}`), (formData === null || formData === void 0 ? void 0 : (_formData$cpt12 = formData.cpt) === null || _formData$cpt12 === void 0 ? void 0 : _formData$cpt12.id) && (formData === null || formData === void 0 ? void 0 : (_formData$cpt13 = formData.cpt) === null || _formData$cpt13 === void 0 ? void 0 : (_formData$cpt13$dues = _formData$cpt13.dues) === null || _formData$cpt13$dues === void 0 ? void 0 : _formData$cpt13$dues.totalAmount) > 0 && !isSearchClicked && /*#__PURE__*/React.createElement("button", {
|
|
12777
13000
|
className: "submit-bar",
|
|
12778
13001
|
type: "button",
|
|
12779
13002
|
style: {
|
|
12780
|
-
color: "white"
|
|
13003
|
+
color: "white",
|
|
13004
|
+
width: "100%",
|
|
13005
|
+
maxWidth: "100px"
|
|
12781
13006
|
},
|
|
12782
|
-
onClick:
|
|
12783
|
-
|
|
13007
|
+
onClick: () => {
|
|
13008
|
+
redirectToPayBill();
|
|
13009
|
+
}
|
|
13010
|
+
}, `${t("PAY_DUES")}`), getNoDue && /*#__PURE__*/React.createElement("div", {
|
|
13011
|
+
style: {
|
|
13012
|
+
color: "green",
|
|
13013
|
+
width: "100%",
|
|
13014
|
+
maxWidth: "75px"
|
|
13015
|
+
}
|
|
13016
|
+
}, t("NO_DUES_FOUND_FOR_PROPERTY")))), showToast && /*#__PURE__*/React.createElement(Toast, {
|
|
12784
13017
|
isDleteBtn: true,
|
|
12785
13018
|
labelstyle: {
|
|
12786
13019
|
width: "100%"
|
|
@@ -12846,6 +13079,7 @@ const SelectNDCDocuments = ({
|
|
|
12846
13079
|
formState: formState
|
|
12847
13080
|
});
|
|
12848
13081
|
}), error && /*#__PURE__*/React.createElement(Toast, {
|
|
13082
|
+
isDleteBtn: true,
|
|
12849
13083
|
label: error,
|
|
12850
13084
|
onClose: () => setError(null),
|
|
12851
13085
|
error: true
|
|
@@ -13493,8 +13727,8 @@ const PayWSBillModal = ({
|
|
|
13493
13727
|
};
|
|
13494
13728
|
|
|
13495
13729
|
const createEmployeeConfig$1 = [{
|
|
13496
|
-
head: "
|
|
13497
|
-
stepLabel: "
|
|
13730
|
+
head: "Applicant Details",
|
|
13731
|
+
stepLabel: "Applicant Details",
|
|
13498
13732
|
stepNumber: 1,
|
|
13499
13733
|
isStepEnabled: true,
|
|
13500
13734
|
type: "component",
|
|
@@ -13542,6 +13776,18 @@ const NewNDCStepForm$1 = () => {
|
|
|
13542
13776
|
const formState = useSelector(state => state.ndc.NDCForm);
|
|
13543
13777
|
const step = formState.step;
|
|
13544
13778
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
13779
|
+
const id = window.location.pathname.split("/").pop();
|
|
13780
|
+
const {
|
|
13781
|
+
isLoading,
|
|
13782
|
+
data: applicationDetails
|
|
13783
|
+
} = Digit.Hooks.ndc.useSearchEmployeeApplication({
|
|
13784
|
+
uuid: id
|
|
13785
|
+
}, tenantId);
|
|
13786
|
+
useEffect(() => {
|
|
13787
|
+
if (applicationDetails !== null && applicationDetails !== void 0 && applicationDetails.Applications.length) {
|
|
13788
|
+
dispatch(updateNDCForm("responseData", applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.Applications));
|
|
13789
|
+
}
|
|
13790
|
+
}, [applicationDetails]);
|
|
13545
13791
|
const setStep = updatedStepNumber => {
|
|
13546
13792
|
dispatch(setNDCStep(updatedStepNumber));
|
|
13547
13793
|
};
|
|
@@ -13555,7 +13801,7 @@ const NewNDCStepForm$1 = () => {
|
|
|
13555
13801
|
color: "#1C1D1F"
|
|
13556
13802
|
},
|
|
13557
13803
|
divider: true
|
|
13558
|
-
}, t("
|
|
13804
|
+
}, t("ndc_header_application")), /*#__PURE__*/React.createElement(Stepper, {
|
|
13559
13805
|
stepsList: updatedCreateEmployeeconfig$1,
|
|
13560
13806
|
onSubmit: handleSubmit,
|
|
13561
13807
|
step: step,
|
|
@@ -13695,12 +13941,42 @@ const NewNDCStepFormOne$1 = ({
|
|
|
13695
13941
|
}
|
|
13696
13942
|
};
|
|
13697
13943
|
function validateStepData(data) {
|
|
13944
|
+
var _data$cpt6, _data$cpt6$dues, _data$cpt7, _data$cpt7$dues, _data$dues, _propertyDetails$wate, _propertyDetails$sewe;
|
|
13945
|
+
console.log("data", data);
|
|
13698
13946
|
const missingFields = [];
|
|
13699
13947
|
const invalidFields = [];
|
|
13700
13948
|
const cpt = (data === null || data === void 0 ? void 0 : data.cpt) || {};
|
|
13701
13949
|
const cptDetails = (cpt === null || cpt === void 0 ? void 0 : cpt.details) || {};
|
|
13702
13950
|
const propertyDetails = (data === null || data === void 0 ? void 0 : data.PropertyDetails) || {};
|
|
13703
13951
|
const NDCReason = (data === null || data === void 0 ? void 0 : data.NDCReason) || {};
|
|
13952
|
+
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) {
|
|
13953
|
+
invalidFields.push(`${t("NDC_MESSAGE_PLEASE_CHECK_STATUS_OF_PROPERTY_TAX")} ${cpt === null || cpt === void 0 ? void 0 : cpt.id}`);
|
|
13954
|
+
}
|
|
13955
|
+
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) {
|
|
13956
|
+
invalidFields.push(`${t("NDC_MESSAGE_PLEASE_PAY_DUES_OF_PROPERTY_TAX")} ${cpt === null || cpt === void 0 ? void 0 : cpt.id}`);
|
|
13957
|
+
}
|
|
13958
|
+
if ((propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$wate = propertyDetails.waterConnection) === null || _propertyDetails$wate === void 0 ? void 0 : _propertyDetails$wate.length) > 0) {
|
|
13959
|
+
propertyDetails.waterConnection.forEach(value => {
|
|
13960
|
+
var _value$billData, _value$billData2, _value$billData3;
|
|
13961
|
+
if ((value === null || value === void 0 ? void 0 : (_value$billData = value.billData) === null || _value$billData === void 0 ? void 0 : _value$billData.totalAmount) != 0) {
|
|
13962
|
+
invalidFields.push(`${t("NDC_MESSAGE_PLEASE_CHECK_STATUS_OF_WATER_CONNECTION")} ${value === null || value === void 0 ? void 0 : value.connectionNo}`);
|
|
13963
|
+
}
|
|
13964
|
+
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) {
|
|
13965
|
+
invalidFields.push(`${t("NDC_MESSAGE_PLEASE_PAY_DUES_OF_WATER_CONNECTION")} ${value === null || value === void 0 ? void 0 : value.connectionNo}`);
|
|
13966
|
+
}
|
|
13967
|
+
});
|
|
13968
|
+
}
|
|
13969
|
+
if ((propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$sewe = propertyDetails.sewerageConnection) === null || _propertyDetails$sewe === void 0 ? void 0 : _propertyDetails$sewe.length) > 0) {
|
|
13970
|
+
propertyDetails.sewerageConnection.forEach(value => {
|
|
13971
|
+
var _value$billData4, _value$billData5, _value$billData6;
|
|
13972
|
+
if ((value === null || value === void 0 ? void 0 : (_value$billData4 = value.billData) === null || _value$billData4 === void 0 ? void 0 : _value$billData4.totalAmount) != 0) {
|
|
13973
|
+
invalidFields.push(`${t("NDC_MESSAGE_PLEASE_CHECK_STATUS_OF_SEWERAGE_CONNECTION")} ${value === null || value === void 0 ? void 0 : value.connectionNo}`);
|
|
13974
|
+
}
|
|
13975
|
+
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) {
|
|
13976
|
+
invalidFields.push(`${t("NDC_MESSAGE_PLEASE_PAY_DUES_OF_SEWERAGE_CONNECTION")} ${value === null || value === void 0 ? void 0 : value.connectionNo}`);
|
|
13977
|
+
}
|
|
13978
|
+
});
|
|
13979
|
+
}
|
|
13704
13980
|
if (!(cpt !== null && cpt !== void 0 && cpt.id)) missingFields.push(t("NDC_MESSAGE_PROPERTY_ID"));
|
|
13705
13981
|
if (!cptDetails || Object.keys(cptDetails).length === 0) missingFields.push(t("NDC_MESSAGE_PLEASE_SEARCH_PROPERTY_ID"));
|
|
13706
13982
|
if (!(propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.firstName)) missingFields.push(t("NDC_MESSAGE_FIRST_NAME"));
|