@mseva/digit-ui-module-ndc 1.0.16 → 1.0.18
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 +14576 -1
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +256 -119
- 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,
|
|
1
|
+
import { Card, Banner, ActionBar, SubmitBar as SubmitBar$1, PrivateRoute, BreadCrumb, BackButton, AppContainer, Loader, Dropdown, UploadFile, Modal, FormComposer, Toast, CardSubHeader, StatusTable, Row, CheckPoint, ConnectingCheckPoints, DisplayPhotos, Menu, LinkButton, EmployeeModuleCard, SearchField, TextInput, FilterFormField, RadioButtons, CheckBox, ComplaintIcon, Header, 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, {
|
|
@@ -1025,6 +1027,7 @@ const NDCModal = ({
|
|
|
1025
1027
|
Licenses: [applicationData]
|
|
1026
1028
|
});
|
|
1027
1029
|
}
|
|
1030
|
+
console.log("config.label.submit", config);
|
|
1028
1031
|
useEffect(() => {
|
|
1029
1032
|
if (action) {
|
|
1030
1033
|
setConfig(ModalConfig({
|
|
@@ -1079,7 +1082,6 @@ const getTimelineCaptions = (checkpoint, index, arr, t) => {
|
|
|
1079
1082
|
thumbnailsToShow,
|
|
1080
1083
|
wfDocuments
|
|
1081
1084
|
} = checkpoint;
|
|
1082
|
-
console.log("wfDocuments", wfDocuments);
|
|
1083
1085
|
const caption = {
|
|
1084
1086
|
date: checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$auditDeta = checkpoint.auditDetails) === null || _checkpoint$auditDeta === void 0 ? void 0 : _checkpoint$auditDeta.lastModified,
|
|
1085
1087
|
name: checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$assigner = checkpoint.assigner) === null || _checkpoint$assigner === void 0 ? void 0 : _checkpoint$assigner.name,
|
|
@@ -1112,7 +1114,7 @@ const getTimelineCaptions = (checkpoint, index, arr, t) => {
|
|
|
1112
1114
|
}, 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
1115
|
};
|
|
1114
1116
|
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;
|
|
1117
|
+
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
1118
|
const {
|
|
1117
1119
|
id
|
|
1118
1120
|
} = useParams();
|
|
@@ -1221,7 +1223,6 @@ const ApplicationOverview = () => {
|
|
|
1221
1223
|
useEffect(() => {
|
|
1222
1224
|
var _applicationDetails$A;
|
|
1223
1225
|
const ndcObject = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A = applicationDetails.Applications) === null || _applicationDetails$A === void 0 ? void 0 : _applicationDetails$A[0];
|
|
1224
|
-
console.log("ndcObject", ndcObject);
|
|
1225
1226
|
if (ndcObject) {
|
|
1226
1227
|
var _ndcObject$owners, _ndcObject$owners$, _ndcObject$owners2, _ndcObject$owners2$, _ndcObject$owners3, _ndcObject$owners3$, _ndcObject$NdcDetails, _ndcObject$NdcDetails2, _ndcObject$NdcDetails3, _removeDuplicatesByUU;
|
|
1227
1228
|
const applicantData = {
|
|
@@ -1250,14 +1251,12 @@ const ApplicationOverview = () => {
|
|
|
1250
1251
|
}
|
|
1251
1252
|
}, [applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.Applications]);
|
|
1252
1253
|
useEffect(() => {
|
|
1253
|
-
console.log("applicationDetails", applicationDetails);
|
|
1254
1254
|
if (applicationDetails) {
|
|
1255
1255
|
setIsDetailsLoading(true);
|
|
1256
1256
|
setIsDetailsLoading(false);
|
|
1257
1257
|
}
|
|
1258
1258
|
}, [applicationDetails]);
|
|
1259
1259
|
function onActionSelect(action) {
|
|
1260
|
-
console.log("action", action);
|
|
1261
1260
|
const payload = {
|
|
1262
1261
|
Licenses: [action]
|
|
1263
1262
|
};
|
|
@@ -1275,7 +1274,6 @@ const ApplicationOverview = () => {
|
|
|
1275
1274
|
const submitAction = async data => {
|
|
1276
1275
|
var _data$Licenses;
|
|
1277
1276
|
const payloadData = applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.Applications[0];
|
|
1278
|
-
console.log("data", data);
|
|
1279
1277
|
const updatedApplicant = {
|
|
1280
1278
|
...payloadData,
|
|
1281
1279
|
workflow: {}
|
|
@@ -1287,7 +1285,6 @@ const ApplicationOverview = () => {
|
|
|
1287
1285
|
comment: filtData === null || filtData === void 0 ? void 0 : filtData.comment,
|
|
1288
1286
|
documents: filtData === null || filtData === void 0 ? void 0 : filtData.wfDocuments
|
|
1289
1287
|
};
|
|
1290
|
-
console.log("filtData", filtData);
|
|
1291
1288
|
if (!(filtData !== null && filtData !== void 0 && filtData.assignee) && filtData.action == "FORWARD") {
|
|
1292
1289
|
setShowToast({
|
|
1293
1290
|
key: "error"
|
|
@@ -1336,11 +1333,7 @@ const ApplicationOverview = () => {
|
|
|
1336
1333
|
}
|
|
1337
1334
|
return /*#__PURE__*/React.createElement("div", {
|
|
1338
1335
|
className: "employee-main-application-details"
|
|
1339
|
-
}, /*#__PURE__*/React.createElement("
|
|
1340
|
-
styles: {
|
|
1341
|
-
fontSize: "32px"
|
|
1342
|
-
}
|
|
1343
|
-
}, t("NDC_APP_OVER_VIEW_HEADER"))), /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(CardSubHeader, null, t("NDC_APPLICATION_DETAILS_OVERVIEW")), /*#__PURE__*/React.createElement(StatusTable, null, (displayData === null || displayData === void 0 ? void 0 : displayData.applicantData) && ((_Object$entries = Object.entries(displayData === null || displayData === void 0 ? void 0 : displayData.applicantData)) === null || _Object$entries === void 0 ? void 0 : _Object$entries.map(([key, value]) => /*#__PURE__*/React.createElement(Row, {
|
|
1336
|
+
}, /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(CardSubHeader, null, t("NDC_APPLICATION_DETAILS_OVERVIEW")), /*#__PURE__*/React.createElement(StatusTable, null, (displayData === null || displayData === void 0 ? void 0 : displayData.applicantData) && ((_Object$entries = Object.entries(displayData === null || displayData === void 0 ? void 0 : displayData.applicantData)) === null || _Object$entries === void 0 ? void 0 : _Object$entries.map(([key, value]) => /*#__PURE__*/React.createElement(Row, {
|
|
1344
1337
|
key: key,
|
|
1345
1338
|
label: t(`${key === null || key === void 0 ? void 0 : key.toUpperCase()}`),
|
|
1346
1339
|
text: Array.isArray(value) ? value.map(item => typeof item === "object" ? t((item === null || item === void 0 ? void 0 : item.code) || "N/A") : t(item || "N/A")).join(", ") : typeof value === "object" ? t((value === null || value === void 0 ? void 0 : value.code) || "N/A") : t(value || "N/A")
|
|
@@ -1382,10 +1375,10 @@ const ApplicationOverview = () => {
|
|
|
1382
1375
|
}) : /*#__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, {
|
|
1383
1376
|
keyValue: index,
|
|
1384
1377
|
isCompleted: index === 0,
|
|
1385
|
-
label: t(
|
|
1378
|
+
label: t(checkpoint.status),
|
|
1386
1379
|
customChild: getTimelineCaptions(checkpoint, index, arr, t)
|
|
1387
|
-
})))), 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, {
|
|
1388
|
-
localeKeyPrefix: `
|
|
1380
|
+
})))), (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, {
|
|
1381
|
+
localeKeyPrefix: `WF_EDITRENEWAL`,
|
|
1389
1382
|
options: actions,
|
|
1390
1383
|
optionKey: "action",
|
|
1391
1384
|
t: t,
|
|
@@ -1394,6 +1387,13 @@ const ApplicationOverview = () => {
|
|
|
1394
1387
|
ref: menuRef,
|
|
1395
1388
|
label: t("WF_TAKE_ACTION"),
|
|
1396
1389
|
onSubmit: () => setDisplayMenu(!displayMenu)
|
|
1390
|
+
})), (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, {
|
|
1391
|
+
label: t("COMMON_EDIT"),
|
|
1392
|
+
onSubmit: () => {
|
|
1393
|
+
var _applicationDetails$A7, _applicationDetails$A8;
|
|
1394
|
+
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;
|
|
1395
|
+
history.push(`/digit-ui/employee/ndc/create/${id}`);
|
|
1396
|
+
}
|
|
1397
1397
|
})), showModal ? /*#__PURE__*/React.createElement(NDCModal, {
|
|
1398
1398
|
t: t,
|
|
1399
1399
|
action: selectedAction,
|
|
@@ -8900,12 +8900,12 @@ const CitizenApplicationOverview = () => {
|
|
|
8900
8900
|
var _applicationDetails$A;
|
|
8901
8901
|
const ndcObject = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A = applicationDetails.Applications) === null || _applicationDetails$A === void 0 ? void 0 : _applicationDetails$A[0];
|
|
8902
8902
|
if (ndcObject) {
|
|
8903
|
-
var _ndcObject$
|
|
8903
|
+
var _ndcObject$owners, _ndcObject$owners$, _ndcObject$owners2, _ndcObject$owners2$, _ndcObject$owners3, _ndcObject$owners3$, _ndcObject$NdcDetails, _ndcObject$NdcDetails2, _ndcObject$NdcDetails3, _removeDuplicatesByUU;
|
|
8904
8904
|
const applicantData = {
|
|
8905
|
-
|
|
8906
|
-
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,
|
|
8905
|
+
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,
|
|
8907
8906
|
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,
|
|
8908
|
-
|
|
8907
|
+
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,
|
|
8908
|
+
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,
|
|
8909
8909
|
applicationNo: ndcObject === null || ndcObject === void 0 ? void 0 : ndcObject.uuid
|
|
8910
8910
|
};
|
|
8911
8911
|
const Documents = removeDuplicatesByUUID((ndcObject === null || ndcObject === void 0 ? void 0 : ndcObject.Documents) || []);
|
|
@@ -8943,7 +8943,7 @@ const CitizenApplicationOverview = () => {
|
|
|
8943
8943
|
const Property = applicationDetails;
|
|
8944
8944
|
console.log("applicationDetails in StakeholderAck", applicationDetails);
|
|
8945
8945
|
console.log("tenants", tenants);
|
|
8946
|
-
const tenantInfo = tenants.find(tenant => tenant.code === Property.tenantId);
|
|
8946
|
+
const tenantInfo = tenants === null || tenants === void 0 ? void 0 : tenants.find(tenant => (tenant === null || tenant === void 0 ? void 0 : tenant.code) === (Property === null || Property === void 0 ? void 0 : Property.tenantId));
|
|
8947
8947
|
const acknowledgementData = await getAcknowledgementData(Property, tenantInfo, t);
|
|
8948
8948
|
console.log("acknowledgementData", acknowledgementData);
|
|
8949
8949
|
Digit.Utils.pdf.generate(acknowledgementData);
|
|
@@ -8956,25 +8956,27 @@ const CitizenApplicationOverview = () => {
|
|
|
8956
8956
|
}, /*#__PURE__*/React.createElement("div", {
|
|
8957
8957
|
style: {
|
|
8958
8958
|
display: "flex",
|
|
8959
|
-
justifyContent: "
|
|
8959
|
+
justifyContent: "end",
|
|
8960
8960
|
alignItems: "center",
|
|
8961
8961
|
padding: "16px"
|
|
8962
8962
|
}
|
|
8963
|
-
}, /*#__PURE__*/React.createElement(
|
|
8964
|
-
|
|
8965
|
-
fontSize: "32px"
|
|
8966
|
-
}
|
|
8967
|
-
}, t("NDC_APP_OVER_VIEW_HEADER")), (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A3 = applicationDetails.Applications) === null || _applicationDetails$A3 === void 0 ? void 0 : (_applicationDetails$A4 = _applicationDetails$A3[0]) === null || _applicationDetails$A4 === void 0 ? void 0 : _applicationDetails$A4.applicationStatus) === "APPROVED" && /*#__PURE__*/React.createElement(LinkButton, {
|
|
8963
|
+
}, (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A3 = applicationDetails.Applications) === null || _applicationDetails$A3 === void 0 ? void 0 : (_applicationDetails$A4 = _applicationDetails$A3[0]) === null || _applicationDetails$A4 === void 0 ? void 0 : _applicationDetails$A4.applicationStatus) === "APPROVED" && /*#__PURE__*/React.createElement(LinkButton, {
|
|
8964
|
+
className: "downLoadButton",
|
|
8968
8965
|
label: t("DOWNLOAD_CERTIFICATE"),
|
|
8969
|
-
style: {
|
|
8970
|
-
color: "#A52A2A"
|
|
8971
|
-
},
|
|
8972
8966
|
onClick: handleDownloadPdf
|
|
8973
|
-
})), /*#__PURE__*/React.createElement(Card,
|
|
8967
|
+
})), /*#__PURE__*/React.createElement(Card, {
|
|
8968
|
+
className: "ndc_card_main"
|
|
8969
|
+
}, /*#__PURE__*/React.createElement(CardSubHeader, {
|
|
8970
|
+
className: "ndc_label"
|
|
8971
|
+
}, t("NDC_APPLICATION_DETAILS_OVERVIEW")), /*#__PURE__*/React.createElement(StatusTable, null, console.log("displayData?.applicantData", displayData === null || displayData === void 0 ? void 0 : displayData.applicantData), (displayData === null || displayData === void 0 ? void 0 : displayData.applicantData) && ((_Object$entries = Object.entries(displayData === null || displayData === void 0 ? void 0 : displayData.applicantData)) === null || _Object$entries === void 0 ? void 0 : _Object$entries.map(([key, value]) => /*#__PURE__*/React.createElement(Row, {
|
|
8974
8972
|
key: key,
|
|
8975
8973
|
label: t(`${key === null || key === void 0 ? void 0 : key.toUpperCase()}`),
|
|
8976
8974
|
text: Array.isArray(value) ? value.map(item => typeof item === "object" ? t((item === null || item === void 0 ? void 0 : item.code) || "N/A") : t(item || "N/A")).join(", ") : typeof value === "object" ? t((value === null || value === void 0 ? void 0 : value.code) || "N/A") : t(value || "N/A")
|
|
8977
|
-
}))))), /*#__PURE__*/React.createElement(Card,
|
|
8975
|
+
}))))), /*#__PURE__*/React.createElement(Card, {
|
|
8976
|
+
className: "ndc_card_main"
|
|
8977
|
+
}, /*#__PURE__*/React.createElement(CardSubHeader, {
|
|
8978
|
+
className: "ndc_label"
|
|
8979
|
+
}, t("NDC_APPLICATION_NDC_DETAILS_OVERVIEW")), displayData === null || displayData === void 0 ? void 0 : (_displayData$NdcDetai = displayData.NdcDetails) === null || _displayData$NdcDetai === void 0 ? void 0 : _displayData$NdcDetai.map((detail, index) => {
|
|
8978
8980
|
var _detail$dueAmount;
|
|
8979
8981
|
return /*#__PURE__*/React.createElement("div", {
|
|
8980
8982
|
key: index,
|
|
@@ -8997,7 +8999,11 @@ const CitizenApplicationOverview = () => {
|
|
|
8997
8999
|
label: t("NDC_PROPERTY_TYPE"),
|
|
8998
9000
|
text: t(detail.propertyType) || detail.propertyType
|
|
8999
9001
|
})));
|
|
9000
|
-
})), /*#__PURE__*/React.createElement(Card,
|
|
9002
|
+
})), /*#__PURE__*/React.createElement(Card, {
|
|
9003
|
+
className: "ndc_card_main"
|
|
9004
|
+
}, /*#__PURE__*/React.createElement(CardSubHeader, {
|
|
9005
|
+
className: "ndc_label"
|
|
9006
|
+
}, t("NDC_APPLICATION_DOCUMENTS_OVERVIEW")), /*#__PURE__*/React.createElement("div", {
|
|
9001
9007
|
style: {
|
|
9002
9008
|
display: "flex",
|
|
9003
9009
|
gap: "16px"
|
|
@@ -9006,13 +9012,17 @@ const CitizenApplicationOverview = () => {
|
|
|
9006
9012
|
value: {
|
|
9007
9013
|
workflowDocs: displayData === null || displayData === void 0 ? void 0 : displayData.Documents
|
|
9008
9014
|
}
|
|
9009
|
-
}) : /*#__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,
|
|
9015
|
+
}) : /*#__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, {
|
|
9016
|
+
className: "ndc_card_main"
|
|
9017
|
+
}, /*#__PURE__*/React.createElement(CardSubHeader, {
|
|
9018
|
+
className: "ndc_label"
|
|
9019
|
+
}, 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, {
|
|
9010
9020
|
isCompleted: true,
|
|
9011
|
-
label: t(
|
|
9021
|
+
label: t(workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data3 = workflowDetails.data) === null || _workflowDetails$data3 === void 0 ? void 0 : (_workflowDetails$data4 = _workflowDetails$data3.timeline[0]) === null || _workflowDetails$data4 === void 0 ? void 0 : _workflowDetails$data4.status)
|
|
9012
9022
|
}) : /*#__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, {
|
|
9013
9023
|
keyValue: index,
|
|
9014
9024
|
isCompleted: index === 0,
|
|
9015
|
-
label: t(
|
|
9025
|
+
label: t(checkpoint.status),
|
|
9016
9026
|
customChild: getTimelineCaptions$1(checkpoint, index, arr, t)
|
|
9017
9027
|
})))));
|
|
9018
9028
|
};
|
|
@@ -9543,7 +9553,7 @@ const Inbox = ({
|
|
|
9543
9553
|
}, [data]);
|
|
9544
9554
|
const PropsForInboxLinks = {
|
|
9545
9555
|
logoIcon: /*#__PURE__*/React.createElement(ComplaintIcon, null),
|
|
9546
|
-
headerText: "
|
|
9556
|
+
headerText: `${t("MODULE_NKS_NO_DUE_CERTIFICATE_FEES")}`,
|
|
9547
9557
|
links: [{
|
|
9548
9558
|
text: "Create NDC Application",
|
|
9549
9559
|
link: "/digit-ui/employee/ndc/create"
|
|
@@ -11439,6 +11449,12 @@ const config = [{
|
|
|
11439
11449
|
head: "",
|
|
11440
11450
|
stepNumber: 1,
|
|
11441
11451
|
body: [{
|
|
11452
|
+
name: "NDC_COMMON_NDC_REASON",
|
|
11453
|
+
type: "component",
|
|
11454
|
+
component: "SelectNDCReason",
|
|
11455
|
+
key: "NDCReason",
|
|
11456
|
+
withoutLabel: true
|
|
11457
|
+
}, {
|
|
11442
11458
|
name: "",
|
|
11443
11459
|
type: "component",
|
|
11444
11460
|
component: "NDCPropertySearch",
|
|
@@ -11450,12 +11466,6 @@ const config = [{
|
|
|
11450
11466
|
component: "PropertyDetailsFormCitizen",
|
|
11451
11467
|
key: "PropertyDetails",
|
|
11452
11468
|
withoutLabel: true
|
|
11453
|
-
}, {
|
|
11454
|
-
name: "NDC_COMMON_NDC_REASON",
|
|
11455
|
-
type: "component",
|
|
11456
|
-
component: "SelectNDCReason",
|
|
11457
|
-
key: "NDCReason",
|
|
11458
|
-
withoutLabel: true
|
|
11459
11469
|
}]
|
|
11460
11470
|
}, {
|
|
11461
11471
|
head: "NDC_COMMON_DOCUMENTS_REQUIRED",
|
|
@@ -11793,6 +11803,10 @@ function SelectNDCReason({
|
|
|
11793
11803
|
const {
|
|
11794
11804
|
t
|
|
11795
11805
|
} = useTranslation();
|
|
11806
|
+
const apiDataCheck = useSelector(state => {
|
|
11807
|
+
var _state$ndc$NDCForm, _state$ndc$NDCForm$fo;
|
|
11808
|
+
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;
|
|
11809
|
+
});
|
|
11796
11810
|
const {
|
|
11797
11811
|
data: menuList,
|
|
11798
11812
|
isLoading
|
|
@@ -11816,6 +11830,18 @@ function SelectNDCReason({
|
|
|
11816
11830
|
useEffect(() => {
|
|
11817
11831
|
onSelect("NDCReason", ndcReason, config);
|
|
11818
11832
|
}, [ndcReason]);
|
|
11833
|
+
useEffect(() => {
|
|
11834
|
+
if (apiDataCheck && (ndcReasonOptions === null || ndcReasonOptions === void 0 ? void 0 : ndcReasonOptions.length) > 0) {
|
|
11835
|
+
const matchedOption = ndcReasonOptions.find(opt => {
|
|
11836
|
+
var _apiDataCheck$;
|
|
11837
|
+
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);
|
|
11838
|
+
});
|
|
11839
|
+
if (matchedOption) {
|
|
11840
|
+
setNDCReason(matchedOption);
|
|
11841
|
+
setValue("NDCReason", matchedOption);
|
|
11842
|
+
}
|
|
11843
|
+
}
|
|
11844
|
+
}, [apiDataCheck, ndcReasonOptions]);
|
|
11819
11845
|
if (isLoading) {
|
|
11820
11846
|
return /*#__PURE__*/React.createElement(Loader, null);
|
|
11821
11847
|
}
|
|
@@ -11827,10 +11853,10 @@ function SelectNDCReason({
|
|
|
11827
11853
|
};
|
|
11828
11854
|
return /*#__PURE__*/React.createElement("div", {
|
|
11829
11855
|
style: {
|
|
11830
|
-
|
|
11856
|
+
paddingBottom: "16px"
|
|
11831
11857
|
}
|
|
11832
11858
|
}, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
11833
|
-
className: "card-label-smaller"
|
|
11859
|
+
className: "card-label-smaller ndc_card_labels"
|
|
11834
11860
|
}, `${t("NDC_NEW_NDC_APPLICATION_NDC_REASON")} * `), /*#__PURE__*/React.createElement(Controller, {
|
|
11835
11861
|
name: "NDCReason",
|
|
11836
11862
|
rules: {
|
|
@@ -11844,6 +11870,7 @@ function SelectNDCReason({
|
|
|
11844
11870
|
option: ndcReasonOptions,
|
|
11845
11871
|
select: e => {
|
|
11846
11872
|
setNDCReason(e);
|
|
11873
|
+
props.onChange(e);
|
|
11847
11874
|
},
|
|
11848
11875
|
optionKey: "i18nKey",
|
|
11849
11876
|
onBlur: props.onBlur,
|
|
@@ -11862,7 +11889,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
11862
11889
|
formState,
|
|
11863
11890
|
clearErrors
|
|
11864
11891
|
}) => {
|
|
11865
|
-
var _formData$cpt, _formData$cpt$details, _formData$cpt3, _Digit, _Digit$ComponentRegis, _formData$cpt4, _propertyDetails$wate, _propertyDetails$sewe;
|
|
11892
|
+
var _formData$cpt, _formData$cpt$details, _formData$cpt3, _Digit, _Digit$ComponentRegis, _formData$cpt4, _apiDataCheck$6, _propertyDetails$wate, _propertyDetails$sewe;
|
|
11866
11893
|
const {
|
|
11867
11894
|
control,
|
|
11868
11895
|
formState: localFormState,
|
|
@@ -11875,6 +11902,10 @@ const PropertyDetailsForm$1 = ({
|
|
|
11875
11902
|
t
|
|
11876
11903
|
} = useTranslation();
|
|
11877
11904
|
const tenantId = window.location.href.includes("citizen") ? window.localStorage.getItem("CITIZEN.CITY") : window.localStorage.getItem("Employee.tenant-id");
|
|
11905
|
+
const apiDataCheck = useSelector(state => {
|
|
11906
|
+
var _state$ndc$NDCForm, _state$ndc$NDCForm$fo;
|
|
11907
|
+
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;
|
|
11908
|
+
});
|
|
11878
11909
|
const [showToast, setShowToast] = useState(null);
|
|
11879
11910
|
const [propertyLoader, setPropertyLoader] = useState(false);
|
|
11880
11911
|
const [showPayModal, setShowPayModal] = useState(false);
|
|
@@ -11943,39 +11974,63 @@ const PropertyDetailsForm$1 = ({
|
|
|
11943
11974
|
});
|
|
11944
11975
|
}, [formData === null || formData === void 0 ? void 0 : (_formData$cpt3 = formData.cpt) === null || _formData$cpt3 === void 0 ? void 0 : _formData$cpt3.details]);
|
|
11945
11976
|
useEffect(() => {
|
|
11946
|
-
var
|
|
11947
|
-
|
|
11948
|
-
|
|
11949
|
-
|
|
11950
|
-
|
|
11951
|
-
|
|
11952
|
-
|
|
11953
|
-
|
|
11954
|
-
|
|
11955
|
-
|
|
11956
|
-
|
|
11957
|
-
|
|
11958
|
-
}
|
|
11959
|
-
|
|
11977
|
+
var _apiDataCheck$;
|
|
11978
|
+
let waterConnection;
|
|
11979
|
+
if (apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$ = apiDataCheck[0]) !== null && _apiDataCheck$ !== void 0 && _apiDataCheck$.NdcDetails) {
|
|
11980
|
+
var _apiDataCheck$2;
|
|
11981
|
+
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 => {
|
|
11982
|
+
return item.businessService == "WS";
|
|
11983
|
+
});
|
|
11984
|
+
waterConnection = (resData === null || resData === void 0 ? void 0 : resData.map(item => ({
|
|
11985
|
+
connectionNo: item === null || item === void 0 ? void 0 : item.consumerCode,
|
|
11986
|
+
isEdit: false,
|
|
11987
|
+
billData: {
|
|
11988
|
+
totalAmount: 0
|
|
11989
|
+
},
|
|
11990
|
+
isLoading: false
|
|
11991
|
+
}))) || [];
|
|
11992
|
+
} else {
|
|
11993
|
+
waterConnection = (waterConnectionData === null || waterConnectionData === void 0 ? void 0 : waterConnectionData.map(item => ({
|
|
11994
|
+
connectionNo: item === null || item === void 0 ? void 0 : item.connectionNo,
|
|
11995
|
+
isEdit: false,
|
|
11996
|
+
billData: {},
|
|
11997
|
+
isLoading: false
|
|
11998
|
+
}))) || [];
|
|
11960
11999
|
}
|
|
11961
|
-
|
|
12000
|
+
setPropertyDetails(prev => ({
|
|
12001
|
+
...prev,
|
|
12002
|
+
waterConnection
|
|
12003
|
+
}));
|
|
12004
|
+
}, [waterConnectionData, apiDataCheck]);
|
|
11962
12005
|
useEffect(() => {
|
|
11963
|
-
var
|
|
11964
|
-
|
|
11965
|
-
|
|
11966
|
-
|
|
11967
|
-
|
|
11968
|
-
|
|
11969
|
-
|
|
11970
|
-
|
|
11971
|
-
|
|
11972
|
-
|
|
11973
|
-
|
|
11974
|
-
|
|
11975
|
-
}
|
|
11976
|
-
|
|
12006
|
+
var _apiDataCheck$3;
|
|
12007
|
+
let sewerageConnection;
|
|
12008
|
+
if (apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$3 = apiDataCheck[0]) !== null && _apiDataCheck$3 !== void 0 && _apiDataCheck$3.NdcDetails) {
|
|
12009
|
+
var _apiDataCheck$4;
|
|
12010
|
+
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 => {
|
|
12011
|
+
return item.businessService == "SW";
|
|
12012
|
+
});
|
|
12013
|
+
sewerageConnection = (resData === null || resData === void 0 ? void 0 : resData.map(item => ({
|
|
12014
|
+
connectionNo: item === null || item === void 0 ? void 0 : item.consumerCode,
|
|
12015
|
+
isEdit: false,
|
|
12016
|
+
billData: {
|
|
12017
|
+
totalAmount: 0
|
|
12018
|
+
},
|
|
12019
|
+
isLoading: false
|
|
12020
|
+
}))) || [];
|
|
12021
|
+
} else {
|
|
12022
|
+
sewerageConnection = (sewerageConnectionData === null || sewerageConnectionData === void 0 ? void 0 : sewerageConnectionData.map(item => ({
|
|
12023
|
+
connectionNo: item === null || item === void 0 ? void 0 : item.connectionNo,
|
|
12024
|
+
isEdit: false,
|
|
12025
|
+
billData: {},
|
|
12026
|
+
isLoading: false
|
|
12027
|
+
}))) || [];
|
|
11977
12028
|
}
|
|
11978
|
-
|
|
12029
|
+
setPropertyDetails(prev => ({
|
|
12030
|
+
...prev,
|
|
12031
|
+
sewerageConnection
|
|
12032
|
+
}));
|
|
12033
|
+
}, [sewerageConnectionData, apiDataCheck]);
|
|
11979
12034
|
useEffect(() => {
|
|
11980
12035
|
onSelect("PropertyDetails", propertyDetails, config);
|
|
11981
12036
|
}, [propertyDetails]);
|
|
@@ -12030,7 +12085,6 @@ const PropertyDetailsForm$1 = ({
|
|
|
12030
12085
|
consumerCode: consumercodes
|
|
12031
12086
|
});
|
|
12032
12087
|
setPropertyLoader(false);
|
|
12033
|
-
console.log("result======???????", result);
|
|
12034
12088
|
if ((result === null || result === void 0 ? void 0 : (_result$Bill = result.Bill) === null || _result$Bill === void 0 ? void 0 : _result$Bill.length) > 0) {
|
|
12035
12089
|
var _result$Bill$;
|
|
12036
12090
|
if ((result === null || result === void 0 ? void 0 : (_result$Bill$ = result.Bill[0]) === null || _result$Bill$ === void 0 ? void 0 : _result$Bill$.totalAmount) > 0) {
|
|
@@ -12072,10 +12126,6 @@ const PropertyDetailsForm$1 = ({
|
|
|
12072
12126
|
}));
|
|
12073
12127
|
}
|
|
12074
12128
|
} else if (result !== null && result !== void 0 && result.Bill) {
|
|
12075
|
-
setShowToast({
|
|
12076
|
-
error: false,
|
|
12077
|
-
label: t("NDC_MESSAGE_NO_BILLS_FOUND_FOR_THIS_CONSUMER_NUMBER")
|
|
12078
|
-
});
|
|
12079
12129
|
if (bussinessService === "WS") {
|
|
12080
12130
|
const updated = [...propertyDetails.waterConnection];
|
|
12081
12131
|
updated[index].billData = {
|
|
@@ -12086,6 +12136,10 @@ const PropertyDetailsForm$1 = ({
|
|
|
12086
12136
|
...prev,
|
|
12087
12137
|
waterConnection: updated
|
|
12088
12138
|
}));
|
|
12139
|
+
setShowToast({
|
|
12140
|
+
error: false,
|
|
12141
|
+
label: t("NDC_NO_BILLS_FOUND_WS")
|
|
12142
|
+
});
|
|
12089
12143
|
} else if (bussinessService === "SW") {
|
|
12090
12144
|
const updated = [...propertyDetails.sewerageConnection];
|
|
12091
12145
|
updated[index].billData = {
|
|
@@ -12096,6 +12150,10 @@ const PropertyDetailsForm$1 = ({
|
|
|
12096
12150
|
...prev,
|
|
12097
12151
|
sewerageConnection: updated
|
|
12098
12152
|
}));
|
|
12153
|
+
setShowToast({
|
|
12154
|
+
error: false,
|
|
12155
|
+
label: t("NDC_NO_BILLS_FOUND_SW")
|
|
12156
|
+
});
|
|
12099
12157
|
} else if (bussinessService === "PT") {
|
|
12100
12158
|
let updated = {
|
|
12101
12159
|
...propertyDetails.propertyBillData
|
|
@@ -12105,12 +12163,12 @@ const PropertyDetailsForm$1 = ({
|
|
|
12105
12163
|
...prev,
|
|
12106
12164
|
propertyBillData: updated
|
|
12107
12165
|
}));
|
|
12166
|
+
setShowToast({
|
|
12167
|
+
error: false,
|
|
12168
|
+
label: t("NDC_NO_BILLS_FOUND_PROPERTY")
|
|
12169
|
+
});
|
|
12108
12170
|
}
|
|
12109
12171
|
} else {
|
|
12110
|
-
setShowToast({
|
|
12111
|
-
error: false,
|
|
12112
|
-
label: t("NDC_MESSAGE_NO_BILLS_FOUND_FOR_THIS_CONSUMER_NUMBER")
|
|
12113
|
-
});
|
|
12114
12172
|
if (bussinessService === "WS") {
|
|
12115
12173
|
const updated = [...propertyDetails.waterConnection];
|
|
12116
12174
|
updated[index].isLoading = false;
|
|
@@ -12121,6 +12179,10 @@ const PropertyDetailsForm$1 = ({
|
|
|
12121
12179
|
...prev,
|
|
12122
12180
|
waterConnection: updated
|
|
12123
12181
|
}));
|
|
12182
|
+
setShowToast({
|
|
12183
|
+
error: false,
|
|
12184
|
+
label: t("NDC_NO_BILLS_FOUND_WS")
|
|
12185
|
+
});
|
|
12124
12186
|
} else if (bussinessService === "SW") {
|
|
12125
12187
|
const updated = [...propertyDetails.sewerageConnection];
|
|
12126
12188
|
updated[index].isLoading = false;
|
|
@@ -12131,6 +12193,10 @@ const PropertyDetailsForm$1 = ({
|
|
|
12131
12193
|
...prev,
|
|
12132
12194
|
sewerageConnection: updated
|
|
12133
12195
|
}));
|
|
12196
|
+
setShowToast({
|
|
12197
|
+
error: false,
|
|
12198
|
+
label: t("NDC_NO_BILLS_FOUND_SW")
|
|
12199
|
+
});
|
|
12134
12200
|
} else if (bussinessService === "PT") {
|
|
12135
12201
|
let updated = {
|
|
12136
12202
|
...propertyDetails.propertyBillData
|
|
@@ -12140,6 +12206,10 @@ const PropertyDetailsForm$1 = ({
|
|
|
12140
12206
|
...prev,
|
|
12141
12207
|
propertyBillData: updated
|
|
12142
12208
|
}));
|
|
12209
|
+
setShowToast({
|
|
12210
|
+
error: false,
|
|
12211
|
+
label: t("NDC_NO_BILLS_FOUND_PROPERTY")
|
|
12212
|
+
});
|
|
12143
12213
|
}
|
|
12144
12214
|
}
|
|
12145
12215
|
} catch (error) {
|
|
@@ -12211,16 +12281,35 @@ const PropertyDetailsForm$1 = ({
|
|
|
12211
12281
|
}
|
|
12212
12282
|
}
|
|
12213
12283
|
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");
|
|
12284
|
+
useEffect(() => {
|
|
12285
|
+
if (showToast) {
|
|
12286
|
+
const timer = setTimeout(() => {
|
|
12287
|
+
setShowToast(null);
|
|
12288
|
+
}, 3000);
|
|
12289
|
+
return () => clearTimeout(timer);
|
|
12290
|
+
}
|
|
12291
|
+
}, [showToast]);
|
|
12292
|
+
useEffect(() => {
|
|
12293
|
+
if (apiDataCheck) {
|
|
12294
|
+
var _apiDataCheck$5, _apiDataCheck$5$owner, _apiDataCheck$5$owner2;
|
|
12295
|
+
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) || "";
|
|
12296
|
+
setValue("email", apiEmail);
|
|
12297
|
+
setPropertyDetails(prev => ({
|
|
12298
|
+
...prev,
|
|
12299
|
+
email: apiEmail
|
|
12300
|
+
}));
|
|
12301
|
+
}
|
|
12302
|
+
}, [apiDataCheck]);
|
|
12214
12303
|
return /*#__PURE__*/React.createElement("div", {
|
|
12215
12304
|
style: {
|
|
12216
12305
|
marginBottom: "16px"
|
|
12217
12306
|
}
|
|
12218
|
-
}, (formData === null || formData === void 0 ? void 0 : (_formData$cpt4 = formData.cpt) === null || _formData$cpt4 === void 0 ? void 0 : _formData$cpt4.details) && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(LabelFieldPair, {
|
|
12307
|
+
}, ((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, {
|
|
12219
12308
|
style: {
|
|
12220
12309
|
marginTop: "40px"
|
|
12221
12310
|
}
|
|
12222
12311
|
}, /*#__PURE__*/React.createElement(CardLabel, {
|
|
12223
|
-
className: "card-label-smaller"
|
|
12312
|
+
className: "card-label-smaller ndc_card_labels"
|
|
12224
12313
|
}, `${t("NDC_WATER_CONNECTION")}`), waterConnectionLoading ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement("div", {
|
|
12225
12314
|
className: "field",
|
|
12226
12315
|
style: {
|
|
@@ -12230,7 +12319,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12230
12319
|
width: "100%"
|
|
12231
12320
|
}
|
|
12232
12321
|
}, propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$wate = propertyDetails.waterConnection) === null || _propertyDetails$wate === void 0 ? void 0 : _propertyDetails$wate.map((item, index) => {
|
|
12233
|
-
var _item$billData, _item$billData2, _item$billData3, _item$billData4;
|
|
12322
|
+
var _apiDataCheck$7, _item$billData, _item$billData2, _item$billData3, _item$billData4;
|
|
12234
12323
|
return /*#__PURE__*/React.createElement("div", {
|
|
12235
12324
|
className: "ndc_property_search",
|
|
12236
12325
|
key: index,
|
|
@@ -12271,7 +12360,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12271
12360
|
alignItems: "center",
|
|
12272
12361
|
gap: "12px"
|
|
12273
12362
|
}
|
|
12274
|
-
}, (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", {
|
|
12363
|
+
}, !(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", {
|
|
12275
12364
|
className: "submit-bar",
|
|
12276
12365
|
type: "button",
|
|
12277
12366
|
style: {
|
|
@@ -12328,7 +12417,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12328
12417
|
marginTop: "40px"
|
|
12329
12418
|
}
|
|
12330
12419
|
}, /*#__PURE__*/React.createElement(CardLabel, {
|
|
12331
|
-
className: "card-label-smaller"
|
|
12420
|
+
className: "card-label-smaller ndc_card_labels"
|
|
12332
12421
|
}, `${t("NDC_SEWERAGE_CONNECTION")} `), sewerageConnectionLoading ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement("div", {
|
|
12333
12422
|
className: "field",
|
|
12334
12423
|
style: {
|
|
@@ -12338,7 +12427,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12338
12427
|
width: "100%"
|
|
12339
12428
|
}
|
|
12340
12429
|
}, propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$sewe = propertyDetails.sewerageConnection) === null || _propertyDetails$sewe === void 0 ? void 0 : _propertyDetails$sewe.map((item, index) => {
|
|
12341
|
-
var _item$billData5, _item$billData6, _item$billData7, _item$billData8;
|
|
12430
|
+
var _apiDataCheck$8, _item$billData5, _item$billData6, _item$billData7, _item$billData8;
|
|
12342
12431
|
return /*#__PURE__*/React.createElement("div", {
|
|
12343
12432
|
className: "ndc_property_search",
|
|
12344
12433
|
key: index,
|
|
@@ -12379,7 +12468,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12379
12468
|
alignItems: "center",
|
|
12380
12469
|
gap: "12px"
|
|
12381
12470
|
}
|
|
12382
|
-
}, (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", {
|
|
12471
|
+
}, !(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", {
|
|
12383
12472
|
className: "submit-bar",
|
|
12384
12473
|
type: "button",
|
|
12385
12474
|
style: {
|
|
@@ -12436,7 +12525,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12436
12525
|
marginTop: "40px"
|
|
12437
12526
|
}
|
|
12438
12527
|
}, /*#__PURE__*/React.createElement(CardLabel, {
|
|
12439
|
-
className: "card-label-smaller"
|
|
12528
|
+
className: "card-label-smaller ndc_card_labels"
|
|
12440
12529
|
}, `${t("NDC_FIRST_NAME")} * `), /*#__PURE__*/React.createElement("div", {
|
|
12441
12530
|
className: "field"
|
|
12442
12531
|
}, /*#__PURE__*/React.createElement(Controller, {
|
|
@@ -12467,7 +12556,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12467
12556
|
});
|
|
12468
12557
|
}
|
|
12469
12558
|
}))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
12470
|
-
className: "card-label-smaller"
|
|
12559
|
+
className: "card-label-smaller ndc_card_labels"
|
|
12471
12560
|
}, `${t("NDC_LAST_NAME")} * `), /*#__PURE__*/React.createElement("div", {
|
|
12472
12561
|
className: "field"
|
|
12473
12562
|
}, /*#__PURE__*/React.createElement(Controller, {
|
|
@@ -12498,23 +12587,23 @@ const PropertyDetailsForm$1 = ({
|
|
|
12498
12587
|
});
|
|
12499
12588
|
}
|
|
12500
12589
|
}))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
12501
|
-
className: "card-label-smaller"
|
|
12590
|
+
className: "card-label-smaller ndc_card_labels"
|
|
12502
12591
|
}, `${t("NDC_EMAIL")} * `), /*#__PURE__*/React.createElement("div", {
|
|
12503
12592
|
className: "field"
|
|
12504
12593
|
}, /*#__PURE__*/React.createElement(Controller, {
|
|
12505
12594
|
control: control,
|
|
12506
12595
|
name: "email",
|
|
12507
|
-
defaultValue:
|
|
12596
|
+
defaultValue: "",
|
|
12508
12597
|
render: props => {
|
|
12509
12598
|
var _formData$cpt7, _formData$cpt7$detail, _formData$cpt7$detail2, _formData$cpt7$detail3, _formData$cpt7$detail4;
|
|
12510
12599
|
return /*#__PURE__*/React.createElement(TextInput, {
|
|
12511
|
-
value:
|
|
12600
|
+
value: props === null || props === void 0 ? void 0 : props.value,
|
|
12512
12601
|
onChange: e => {
|
|
12602
|
+
props.onChange(e.target.value);
|
|
12513
12603
|
setPropertyDetails(prev => ({
|
|
12514
12604
|
...prev,
|
|
12515
12605
|
email: e.target.value
|
|
12516
12606
|
}));
|
|
12517
|
-
props.onChange(e.target.value);
|
|
12518
12607
|
},
|
|
12519
12608
|
onBlur: e => {
|
|
12520
12609
|
props.onBlur(e);
|
|
@@ -12523,7 +12612,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12523
12612
|
});
|
|
12524
12613
|
}
|
|
12525
12614
|
}))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
12526
|
-
className: "card-label-smaller"
|
|
12615
|
+
className: "card-label-smaller ndc_card_labels"
|
|
12527
12616
|
}, `${t("NDC_MOBILE_NUMBER")} * `), /*#__PURE__*/React.createElement("div", {
|
|
12528
12617
|
className: "field"
|
|
12529
12618
|
}, /*#__PURE__*/React.createElement(Controller, {
|
|
@@ -12544,7 +12633,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12544
12633
|
}
|
|
12545
12634
|
})
|
|
12546
12635
|
}))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
12547
|
-
className: "card-label-smaller"
|
|
12636
|
+
className: "card-label-smaller ndc_card_labels"
|
|
12548
12637
|
}, `${t("NDC_ADDRESS")} * `), /*#__PURE__*/React.createElement("div", {
|
|
12549
12638
|
className: "field"
|
|
12550
12639
|
}, /*#__PURE__*/React.createElement(Controller, {
|
|
@@ -12569,7 +12658,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12569
12658
|
});
|
|
12570
12659
|
}
|
|
12571
12660
|
})))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
12572
|
-
className: "card-label-smaller"
|
|
12661
|
+
className: "card-label-smaller ndc_card_labels"
|
|
12573
12662
|
}, `${t("NDC_TL_NUMBER")}`), /*#__PURE__*/React.createElement("div", {
|
|
12574
12663
|
className: "field"
|
|
12575
12664
|
}, /*#__PURE__*/React.createElement(Controller, {
|
|
@@ -12611,23 +12700,30 @@ const PropertySearchNSummary = ({
|
|
|
12611
12700
|
onSelect,
|
|
12612
12701
|
formData
|
|
12613
12702
|
}) => {
|
|
12614
|
-
var _formData$cpt, _formData$cpt2, _propertyDetails$Prop3,
|
|
12703
|
+
var _apiDataCheck$, _apiDataCheck$$NdcDet, _formData$cpt, _formData$cpt2, _propertyDetails$Prop3, _apiDataCheck$2, _formData$cpt12, _formData$cpt13, _formData$cpt13$dues;
|
|
12615
12704
|
const {
|
|
12616
12705
|
t
|
|
12617
12706
|
} = useTranslation();
|
|
12618
12707
|
const myElementRef = useRef(null);
|
|
12708
|
+
const dispatch = useDispatch();
|
|
12619
12709
|
let {
|
|
12620
12710
|
pathname,
|
|
12621
12711
|
state
|
|
12622
12712
|
} = useLocation();
|
|
12623
12713
|
state = state && (typeof state === "string" || state instanceof String) ? JSON.parse(state) : state;
|
|
12714
|
+
const apiDataCheck = useSelector(state => {
|
|
12715
|
+
var _state$ndc$NDCForm, _state$ndc$NDCForm$fo;
|
|
12716
|
+
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;
|
|
12717
|
+
});
|
|
12624
12718
|
const isEditScreen = pathname.includes("/modify-application/");
|
|
12625
12719
|
const tenantId = window.location.href.includes("employee") ? Digit.ULBService.getCurrentPermanentCity() : localStorage.getItem("CITIZEN.CITY");
|
|
12626
12720
|
const search = useLocation().search;
|
|
12627
12721
|
const urlPropertyId = new URLSearchParams(search).get("propertyId");
|
|
12628
12722
|
const isfirstRender = useRef(true);
|
|
12629
|
-
const
|
|
12630
|
-
|
|
12723
|
+
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");
|
|
12724
|
+
console.log("ptFromApi", ptFromApi);
|
|
12725
|
+
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) || "");
|
|
12726
|
+
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) || "");
|
|
12631
12727
|
const [showToast, setShowToast] = useState(null);
|
|
12632
12728
|
const [propertyDetails, setPropertyDetails] = useState(() => {
|
|
12633
12729
|
var _formData$cpt3, _formData$cpt4;
|
|
@@ -12660,6 +12756,8 @@ const PropertySearchNSummary = ({
|
|
|
12660
12756
|
}
|
|
12661
12757
|
});
|
|
12662
12758
|
const [isSearchClicked, setIsSearchClicked] = useState(false);
|
|
12759
|
+
const [getNoDue, setNoDue] = useState(false);
|
|
12760
|
+
const [getCheckStatus, setCheckStats] = useState(false);
|
|
12663
12761
|
const {
|
|
12664
12762
|
isLoading,
|
|
12665
12763
|
isError,
|
|
@@ -12678,11 +12776,25 @@ const PropertySearchNSummary = ({
|
|
|
12678
12776
|
enabled: searchPropertyId ? true : false,
|
|
12679
12777
|
privacy: Digit.Utils.getPrivacyObject()
|
|
12680
12778
|
});
|
|
12779
|
+
console.log("apiDataCheck", apiDataCheck);
|
|
12780
|
+
useEffect(() => {
|
|
12781
|
+
if (ptFromApi !== null && ptFromApi !== void 0 && ptFromApi.consumerCode) {
|
|
12782
|
+
setIsSearchClicked(true);
|
|
12783
|
+
setPropertyId(ptFromApi.consumerCode);
|
|
12784
|
+
setSearchPropertyId(ptFromApi.consumerCode);
|
|
12785
|
+
setNoDue(true);
|
|
12786
|
+
onSelect(config.key, {
|
|
12787
|
+
...formData[config.key],
|
|
12788
|
+
id: ptFromApi.consumerCode
|
|
12789
|
+
});
|
|
12790
|
+
}
|
|
12791
|
+
}, [ptFromApi]);
|
|
12681
12792
|
useEffect(() => {
|
|
12682
12793
|
var _propertyDetailsFetch;
|
|
12683
12794
|
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) {
|
|
12684
12795
|
setPropertyDetails(propertyDetailsFetch);
|
|
12685
12796
|
setShowToast(null);
|
|
12797
|
+
setCheckStats(true);
|
|
12686
12798
|
} else {
|
|
12687
12799
|
var _formData$cpt9;
|
|
12688
12800
|
if (isfirstRender.current) {
|
|
@@ -12690,7 +12802,6 @@ const PropertySearchNSummary = ({
|
|
|
12690
12802
|
return;
|
|
12691
12803
|
}
|
|
12692
12804
|
if (!(formData !== null && formData !== void 0 && (_formData$cpt9 = formData.cpt) !== null && _formData$cpt9 !== void 0 && _formData$cpt9.details)) {
|
|
12693
|
-
console.log("Property Id not found in response", propertyId);
|
|
12694
12805
|
setPropertyDetails({});
|
|
12695
12806
|
setShowToast({
|
|
12696
12807
|
error: true,
|
|
@@ -12705,7 +12816,6 @@ const PropertySearchNSummary = ({
|
|
|
12705
12816
|
useEffect(() => {
|
|
12706
12817
|
var _propertyDetails$Prop;
|
|
12707
12818
|
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) {
|
|
12708
|
-
console.log("Error Caught", error, propertyDetails);
|
|
12709
12819
|
setShowToast({
|
|
12710
12820
|
error: true,
|
|
12711
12821
|
label: "PT_ENTER_VALID_PROPERTY_ID"
|
|
@@ -12745,6 +12855,8 @@ const PropertySearchNSummary = ({
|
|
|
12745
12855
|
setPropertyId(e.target.value);
|
|
12746
12856
|
setValue(e.target.value, propertyIdInput.name);
|
|
12747
12857
|
setIsSearchClicked(false);
|
|
12858
|
+
setNoDue(false);
|
|
12859
|
+
setCheckStats(false);
|
|
12748
12860
|
};
|
|
12749
12861
|
if (isEditScreen) {
|
|
12750
12862
|
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
@@ -12773,9 +12885,6 @@ const PropertySearchNSummary = ({
|
|
|
12773
12885
|
[input]: value
|
|
12774
12886
|
});
|
|
12775
12887
|
}
|
|
12776
|
-
function getValue(input) {
|
|
12777
|
-
return formData && formData[config.key] ? formData[config.key][input] : undefined;
|
|
12778
|
-
}
|
|
12779
12888
|
async function fetchBill() {
|
|
12780
12889
|
try {
|
|
12781
12890
|
var _formData$cpt0, _result$Bill;
|
|
@@ -12793,8 +12902,10 @@ const PropertySearchNSummary = ({
|
|
|
12793
12902
|
} else {
|
|
12794
12903
|
setShowToast({
|
|
12795
12904
|
error: false,
|
|
12796
|
-
label: t("
|
|
12905
|
+
label: t("NDC_NO_BILLS_FOUND_PROPERTY")
|
|
12797
12906
|
});
|
|
12907
|
+
setNoDue(true);
|
|
12908
|
+
setCheckStats(false);
|
|
12798
12909
|
}
|
|
12799
12910
|
setPropertyDues({
|
|
12800
12911
|
dues: result === null || result === void 0 ? void 0 : result.Bill[0]
|
|
@@ -12802,23 +12913,27 @@ const PropertySearchNSummary = ({
|
|
|
12802
12913
|
} else if (result !== null && result !== void 0 && result.Bill) {
|
|
12803
12914
|
setShowToast({
|
|
12804
12915
|
error: false,
|
|
12805
|
-
label: t("
|
|
12916
|
+
label: t("NDC_NO_BILLS_FOUND_PROPERTY")
|
|
12806
12917
|
});
|
|
12807
12918
|
setPropertyDues({
|
|
12808
12919
|
dues: {
|
|
12809
12920
|
totalAmount: 0
|
|
12810
12921
|
}
|
|
12811
12922
|
});
|
|
12923
|
+
setNoDue(true);
|
|
12924
|
+
setCheckStats(false);
|
|
12812
12925
|
} else {
|
|
12813
12926
|
setShowToast({
|
|
12814
12927
|
error: false,
|
|
12815
|
-
label: t("
|
|
12928
|
+
label: t("NDC_NO_BILLS_FOUND_PROPERTY")
|
|
12816
12929
|
});
|
|
12817
12930
|
setPropertyDues({
|
|
12818
12931
|
dues: {
|
|
12819
12932
|
totalAmount: 0
|
|
12820
12933
|
}
|
|
12821
12934
|
});
|
|
12935
|
+
setNoDue(true);
|
|
12936
|
+
setCheckStats(false);
|
|
12822
12937
|
}
|
|
12823
12938
|
} catch (error) {
|
|
12824
12939
|
setShowToast({
|
|
@@ -12834,12 +12949,20 @@ const PropertySearchNSummary = ({
|
|
|
12834
12949
|
window.open(payUrl, "_blank");
|
|
12835
12950
|
setPropertyDues({});
|
|
12836
12951
|
}
|
|
12952
|
+
useEffect(() => {
|
|
12953
|
+
if (showToast) {
|
|
12954
|
+
const timer = setTimeout(() => {
|
|
12955
|
+
setShowToast(null);
|
|
12956
|
+
}, 3000);
|
|
12957
|
+
return () => clearTimeout(timer);
|
|
12958
|
+
}
|
|
12959
|
+
}, [showToast]);
|
|
12837
12960
|
return /*#__PURE__*/React.createElement(React.Fragment, null, isLoading && /*#__PURE__*/React.createElement(Loader, null), /*#__PURE__*/React.createElement("div", {
|
|
12838
12961
|
style: {
|
|
12839
12962
|
marginBottom: "16px"
|
|
12840
12963
|
}
|
|
12841
12964
|
}, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
12842
|
-
className: "card-label-smaller",
|
|
12965
|
+
className: "card-label-smaller ndc_card_labels",
|
|
12843
12966
|
style: getInputStyles()
|
|
12844
12967
|
}, `${t(propertyIdInput.label)}`, null), /*#__PURE__*/React.createElement("div", {
|
|
12845
12968
|
className: "field ndc_property_search",
|
|
@@ -12854,7 +12977,7 @@ const PropertySearchNSummary = ({
|
|
|
12854
12977
|
id: "search-property-field"
|
|
12855
12978
|
}, /*#__PURE__*/React.createElement(TextInput, Object.assign({
|
|
12856
12979
|
key: propertyIdInput.name,
|
|
12857
|
-
value:
|
|
12980
|
+
value: propertyId,
|
|
12858
12981
|
onChange: handlePropertyChange,
|
|
12859
12982
|
disable: false,
|
|
12860
12983
|
maxlength: 16,
|
|
@@ -12868,7 +12991,7 @@ const PropertySearchNSummary = ({
|
|
|
12868
12991
|
maxWidth: "100px"
|
|
12869
12992
|
},
|
|
12870
12993
|
onClick: searchProperty
|
|
12871
|
-
}, `${t("PT_SEARCH")}`),
|
|
12994
|
+
}, `${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", {
|
|
12872
12995
|
className: "submit-bar",
|
|
12873
12996
|
type: "button",
|
|
12874
12997
|
style: {
|
|
@@ -12880,7 +13003,7 @@ const PropertySearchNSummary = ({
|
|
|
12880
13003
|
onClick: () => {
|
|
12881
13004
|
fetchBill();
|
|
12882
13005
|
}
|
|
12883
|
-
}, `${t("CHECK_STATUS_PROPERTY")}`), (formData === null || formData === void 0 ? void 0 : (_formData$
|
|
13006
|
+
}, `${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", {
|
|
12884
13007
|
className: "submit-bar",
|
|
12885
13008
|
type: "button",
|
|
12886
13009
|
style: {
|
|
@@ -12891,7 +13014,7 @@ const PropertySearchNSummary = ({
|
|
|
12891
13014
|
onClick: () => {
|
|
12892
13015
|
redirectToPayBill();
|
|
12893
13016
|
}
|
|
12894
|
-
}, `${t("PAY_DUES")}`),
|
|
13017
|
+
}, `${t("PAY_DUES")}`), getNoDue && /*#__PURE__*/React.createElement("div", {
|
|
12895
13018
|
style: {
|
|
12896
13019
|
color: "green",
|
|
12897
13020
|
width: "100%",
|
|
@@ -12963,6 +13086,7 @@ const SelectNDCDocuments = ({
|
|
|
12963
13086
|
formState: formState
|
|
12964
13087
|
});
|
|
12965
13088
|
}), error && /*#__PURE__*/React.createElement(Toast, {
|
|
13089
|
+
isDleteBtn: true,
|
|
12966
13090
|
label: error,
|
|
12967
13091
|
onClose: () => setError(null),
|
|
12968
13092
|
error: true
|
|
@@ -13659,6 +13783,18 @@ const NewNDCStepForm$1 = () => {
|
|
|
13659
13783
|
const formState = useSelector(state => state.ndc.NDCForm);
|
|
13660
13784
|
const step = formState.step;
|
|
13661
13785
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
13786
|
+
const id = window.location.pathname.split("/").pop();
|
|
13787
|
+
const {
|
|
13788
|
+
isLoading,
|
|
13789
|
+
data: applicationDetails
|
|
13790
|
+
} = Digit.Hooks.ndc.useSearchEmployeeApplication({
|
|
13791
|
+
uuid: id
|
|
13792
|
+
}, tenantId);
|
|
13793
|
+
useEffect(() => {
|
|
13794
|
+
if (applicationDetails !== null && applicationDetails !== void 0 && applicationDetails.Applications.length) {
|
|
13795
|
+
dispatch(updateNDCForm("responseData", applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.Applications));
|
|
13796
|
+
}
|
|
13797
|
+
}, [applicationDetails]);
|
|
13662
13798
|
const setStep = updatedStepNumber => {
|
|
13663
13799
|
dispatch(setNDCStep(updatedStepNumber));
|
|
13664
13800
|
};
|
|
@@ -13813,6 +13949,7 @@ const NewNDCStepFormOne$1 = ({
|
|
|
13813
13949
|
};
|
|
13814
13950
|
function validateStepData(data) {
|
|
13815
13951
|
var _data$cpt6, _data$cpt6$dues, _data$cpt7, _data$cpt7$dues, _data$dues, _propertyDetails$wate, _propertyDetails$sewe;
|
|
13952
|
+
console.log("data", data);
|
|
13816
13953
|
const missingFields = [];
|
|
13817
13954
|
const invalidFields = [];
|
|
13818
13955
|
const cpt = (data === null || data === void 0 ? void 0 : data.cpt) || {};
|