@mseva/digit-ui-module-ndc 1.0.18 → 1.0.20
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 +1 -14576
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +155 -317
- 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,
|
|
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, InboxComposer, ComplaintIcon, 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,16 +642,14 @@ const App = () => {
|
|
|
642
642
|
url,
|
|
643
643
|
...match
|
|
644
644
|
} = useRouteMatch();
|
|
645
|
-
|
|
646
|
-
t
|
|
647
|
-
} = useTranslation();
|
|
645
|
+
console.log("NDC Citizen App Loaded", path);
|
|
648
646
|
const NewNDCStepForm = Digit.ComponentRegistryService.getComponent("NewNDCStepFormCitizen");
|
|
649
647
|
const MyApplications = Digit.ComponentRegistryService.getComponent("MyApplications");
|
|
650
648
|
const NDCResponseCitizen = Digit.ComponentRegistryService.getComponent("NDCResponseCitizen");
|
|
651
649
|
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");
|
|
652
650
|
return /*#__PURE__*/React.createElement("span", {
|
|
653
651
|
className: "tl-citizen"
|
|
654
|
-
}, /*#__PURE__*/React.createElement(
|
|
652
|
+
}, /*#__PURE__*/React.createElement(Switch, null, /*#__PURE__*/React.createElement(AppContainer, null, /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
655
653
|
path: `${path}/new-application`,
|
|
656
654
|
component: NewNDCStepForm
|
|
657
655
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
@@ -1027,7 +1025,6 @@ const NDCModal = ({
|
|
|
1027
1025
|
Licenses: [applicationData]
|
|
1028
1026
|
});
|
|
1029
1027
|
}
|
|
1030
|
-
console.log("config.label.submit", config);
|
|
1031
1028
|
useEffect(() => {
|
|
1032
1029
|
if (action) {
|
|
1033
1030
|
setConfig(ModalConfig({
|
|
@@ -1082,6 +1079,7 @@ const getTimelineCaptions = (checkpoint, index, arr, t) => {
|
|
|
1082
1079
|
thumbnailsToShow,
|
|
1083
1080
|
wfDocuments
|
|
1084
1081
|
} = checkpoint;
|
|
1082
|
+
console.log("wfDocuments", wfDocuments);
|
|
1085
1083
|
const caption = {
|
|
1086
1084
|
date: checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$auditDeta = checkpoint.auditDetails) === null || _checkpoint$auditDeta === void 0 ? void 0 : _checkpoint$auditDeta.lastModified,
|
|
1087
1085
|
name: checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$assigner = checkpoint.assigner) === null || _checkpoint$assigner === void 0 ? void 0 : _checkpoint$assigner.name,
|
|
@@ -1114,7 +1112,7 @@ const getTimelineCaptions = (checkpoint, index, arr, t) => {
|
|
|
1114
1112
|
}, 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()))));
|
|
1115
1113
|
};
|
|
1116
1114
|
const ApplicationOverview = () => {
|
|
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,
|
|
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;
|
|
1118
1116
|
const {
|
|
1119
1117
|
id
|
|
1120
1118
|
} = useParams();
|
|
@@ -1223,6 +1221,7 @@ const ApplicationOverview = () => {
|
|
|
1223
1221
|
useEffect(() => {
|
|
1224
1222
|
var _applicationDetails$A;
|
|
1225
1223
|
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);
|
|
1226
1225
|
if (ndcObject) {
|
|
1227
1226
|
var _ndcObject$owners, _ndcObject$owners$, _ndcObject$owners2, _ndcObject$owners2$, _ndcObject$owners3, _ndcObject$owners3$, _ndcObject$NdcDetails, _ndcObject$NdcDetails2, _ndcObject$NdcDetails3, _removeDuplicatesByUU;
|
|
1228
1227
|
const applicantData = {
|
|
@@ -1251,12 +1250,14 @@ const ApplicationOverview = () => {
|
|
|
1251
1250
|
}
|
|
1252
1251
|
}, [applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.Applications]);
|
|
1253
1252
|
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);
|
|
1260
1261
|
const payload = {
|
|
1261
1262
|
Licenses: [action]
|
|
1262
1263
|
};
|
|
@@ -1274,6 +1275,7 @@ const ApplicationOverview = () => {
|
|
|
1274
1275
|
const submitAction = async data => {
|
|
1275
1276
|
var _data$Licenses;
|
|
1276
1277
|
const payloadData = applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.Applications[0];
|
|
1278
|
+
console.log("data", data);
|
|
1277
1279
|
const updatedApplicant = {
|
|
1278
1280
|
...payloadData,
|
|
1279
1281
|
workflow: {}
|
|
@@ -1285,6 +1287,7 @@ const ApplicationOverview = () => {
|
|
|
1285
1287
|
comment: filtData === null || filtData === void 0 ? void 0 : filtData.comment,
|
|
1286
1288
|
documents: filtData === null || filtData === void 0 ? void 0 : filtData.wfDocuments
|
|
1287
1289
|
};
|
|
1290
|
+
console.log("filtData", filtData);
|
|
1288
1291
|
if (!(filtData !== null && filtData !== void 0 && filtData.assignee) && filtData.action == "FORWARD") {
|
|
1289
1292
|
setShowToast({
|
|
1290
1293
|
key: "error"
|
|
@@ -1333,7 +1336,11 @@ const ApplicationOverview = () => {
|
|
|
1333
1336
|
}
|
|
1334
1337
|
return /*#__PURE__*/React.createElement("div", {
|
|
1335
1338
|
className: "employee-main-application-details"
|
|
1336
|
-
}, /*#__PURE__*/React.createElement(
|
|
1339
|
+
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Header, {
|
|
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, {
|
|
1337
1344
|
key: key,
|
|
1338
1345
|
label: t(`${key === null || key === void 0 ? void 0 : key.toUpperCase()}`),
|
|
1339
1346
|
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")
|
|
@@ -1375,10 +1382,10 @@ const ApplicationOverview = () => {
|
|
|
1375
1382
|
}) : /*#__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, {
|
|
1376
1383
|
keyValue: index,
|
|
1377
1384
|
isCompleted: index === 0,
|
|
1378
|
-
label: t(checkpoint.status),
|
|
1385
|
+
label: t("NDC_STATUS_" + checkpoint.status),
|
|
1379
1386
|
customChild: getTimelineCaptions(checkpoint, index, arr, t)
|
|
1380
|
-
})))),
|
|
1381
|
-
localeKeyPrefix: `
|
|
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: `WF_EMPLOYEE_${"NDC"}`,
|
|
1382
1389
|
options: actions,
|
|
1383
1390
|
optionKey: "action",
|
|
1384
1391
|
t: t,
|
|
@@ -1387,13 +1394,6 @@ const ApplicationOverview = () => {
|
|
|
1387
1394
|
ref: menuRef,
|
|
1388
1395
|
label: t("WF_TAKE_ACTION"),
|
|
1389
1396
|
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,
|
|
@@ -8731,74 +8731,49 @@ function cleanEscapedString(input) {
|
|
|
8731
8731
|
const capitalize = text => text.substr(0, 1).toUpperCase() + text.substr(1);
|
|
8732
8732
|
const ulbCamel = ulb => ulb.toLowerCase().split(" ").map(capitalize).join(" ");
|
|
8733
8733
|
const getAcknowledgementData = async (application, tenantInfo, t) => {
|
|
8734
|
-
var _application$Applicat, _appData$owners,
|
|
8735
|
-
const appData = application === null || application === void 0 ? void 0 : (_application$Applicat = application.Applications) === null || _application$Applicat === void 0 ? void 0 : _application$Applicat[0];
|
|
8734
|
+
var _application$Applicat, _appData$owners, _appData$NdcDetails, _appData$additionalDe, _tenantInfo$city;
|
|
8735
|
+
const appData = (application === null || application === void 0 ? void 0 : (_application$Applicat = application.Applications) === null || _application$Applicat === void 0 ? void 0 : _application$Applicat[0]) || {};
|
|
8736
8736
|
const owner = (appData === null || appData === void 0 ? void 0 : (_appData$owners = appData.owners) === null || _appData$owners === void 0 ? void 0 : _appData$owners[0]) || {};
|
|
8737
|
+
const ndc = (appData === null || appData === void 0 ? void 0 : (_appData$NdcDetails = appData.NdcDetails) === null || _appData$NdcDetails === void 0 ? void 0 : _appData$NdcDetails[0]) || {};
|
|
8738
|
+
const add = (ndc === null || ndc === void 0 ? void 0 : ndc.additionalDetails) || {};
|
|
8739
|
+
const applicationNumber = (appData === null || appData === void 0 ? void 0 : appData.uuid) || "NA";
|
|
8740
|
+
const propertyId = (ndc === null || ndc === void 0 ? void 0 : ndc.consumerCode) || "NA";
|
|
8741
|
+
const propertyType = add !== null && add !== void 0 && add.propertyType ? t(add.propertyType) : "NA";
|
|
8742
|
+
const applicantName = (owner === null || owner === void 0 ? void 0 : owner.name) || "NA";
|
|
8743
|
+
const address = (owner === null || owner === void 0 ? void 0 : owner.permanentAddress) || (owner === null || owner === void 0 ? void 0 : owner.correspondenceAddress) || "NA";
|
|
8744
|
+
const ulbName = (tenantInfo === null || tenantInfo === void 0 ? void 0 : tenantInfo.name) || (appData === null || appData === void 0 ? void 0 : appData.tenantId) || "NA";
|
|
8745
|
+
const duesAmount = (add === null || add === void 0 ? void 0 : add.duesAmount) || (appData === null || appData === void 0 ? void 0 : (_appData$additionalDe = appData.additionalDetails) === null || _appData$additionalDe === void 0 ? void 0 : _appData$additionalDe.duesAmount) || "0";
|
|
8746
|
+
const certificateBody = `${t("NDC_MSG_INTRO")}
|
|
8747
|
+
|
|
8748
|
+
${t("NDC_MSG_APPLICATION_LABEL")}: ${applicationNumber}
|
|
8749
|
+
|
|
8750
|
+
${t("NDC_MSG_PROPERTY_LABEL")}: ${propertyId} ${t("NDC_MSG_PROPERTY_TYPE_LABEL")} ${propertyType}
|
|
8751
|
+
|
|
8752
|
+
${t("NDC_MSG_APPLICANT_LABEL")}: ${applicantName} ${t("NDC_MSG_FOR_LAND")} ${address}
|
|
8753
|
+
|
|
8754
|
+
${t("NDC_MSG_FALLING_CLAUSE_PART1")} ${t("NDC_MSG_FALLING_CLAUSE_PART2")} ${ulbName} ${t("NDC_MSG_AFTER_RECOVERY")} ${duesAmount} ${t("NDC_MSG_DUES_LIST")}
|
|
8755
|
+
|
|
8756
|
+
${t("NDC_MSG_DECLARATION_TITLE")}
|
|
8757
|
+
${t("NDC_MSG_DECL_A")}
|
|
8758
|
+
${t("NDC_MSG_DECL_B")}
|
|
8759
|
+
${t("NDC_MSG_DECL_C")}
|
|
8760
|
+
${t("NDC_MSG_DECL_D")}
|
|
8761
|
+
${t("NDC_MSG_DECL_E")}
|
|
8762
|
+
|
|
8763
|
+
${t("NDC_MSG_DISCLAIMER_TITLE")}
|
|
8764
|
+
${t("NDC_MSG_DISCLAIMER_BODY")}
|
|
8765
|
+
|
|
8766
|
+
${t("NDC_MSG_NOTE")} ${t("NDC_MSG_VERIFICATION_LINK_LABEL")}`;
|
|
8737
8767
|
return {
|
|
8738
|
-
t
|
|
8768
|
+
t,
|
|
8739
8769
|
tenantId: tenantInfo === null || tenantInfo === void 0 ? void 0 : tenantInfo.code,
|
|
8740
8770
|
name: `${t(tenantInfo === null || tenantInfo === void 0 ? void 0 : tenantInfo.i18nKey)} ${ulbCamel(t(`ULBGRADE_${tenantInfo === null || tenantInfo === void 0 ? void 0 : (_tenantInfo$city = tenantInfo.city) === null || _tenantInfo$city === void 0 ? void 0 : _tenantInfo$city.ulbGrade.toUpperCase().replace(" ", "_").replace(".", "_")}`))}`,
|
|
8741
8771
|
email: tenantInfo === null || tenantInfo === void 0 ? void 0 : tenantInfo.emailId,
|
|
8742
8772
|
phoneNumber: tenantInfo === null || tenantInfo === void 0 ? void 0 : tenantInfo.contactNumber,
|
|
8743
8773
|
heading: t("NDC_CERTIFICATE"),
|
|
8744
|
-
applicationNumber
|
|
8774
|
+
applicationNumber,
|
|
8745
8775
|
details: [{
|
|
8746
|
-
|
|
8747
|
-
values: [{
|
|
8748
|
-
title: t("REGISTRATION_FILED_DATE"),
|
|
8749
|
-
value: Digit.DateUtils.ConvertTimestampToDate(appData === null || appData === void 0 ? void 0 : (_appData$auditDetails = appData.auditDetails) === null || _appData$auditDetails === void 0 ? void 0 : _appData$auditDetails.createdTime, "dd/MM/yyyy") || "NA"
|
|
8750
|
-
}, {
|
|
8751
|
-
title: t("NDC_REASON"),
|
|
8752
|
-
value: (appData === null || appData === void 0 ? void 0 : appData.reason) || "NA"
|
|
8753
|
-
}]
|
|
8754
|
-
}, {
|
|
8755
|
-
title: t("NDC_LICENSE_DETAILS_LABEL"),
|
|
8756
|
-
values: [{
|
|
8757
|
-
title: t("NDC_LICENSE_TYPE"),
|
|
8758
|
-
value: t(appData === null || appData === void 0 ? void 0 : (_appData$NdcDetails = appData.NdcDetails) === null || _appData$NdcDetails === void 0 ? void 0 : (_appData$NdcDetails$ = _appData$NdcDetails[0]) === null || _appData$NdcDetails$ === void 0 ? void 0 : (_appData$NdcDetails$$ = _appData$NdcDetails$.additionalDetails) === null || _appData$NdcDetails$$ === void 0 ? void 0 : _appData$NdcDetails$$.propertyType) || "NA"
|
|
8759
|
-
}, {
|
|
8760
|
-
title: t("NDC_COUNCIL_NUMBER"),
|
|
8761
|
-
value: (appData === null || appData === void 0 ? void 0 : (_appData$NdcDetails2 = appData.NdcDetails) === null || _appData$NdcDetails2 === void 0 ? void 0 : (_appData$NdcDetails2$ = _appData$NdcDetails2[0]) === null || _appData$NdcDetails2$ === void 0 ? void 0 : _appData$NdcDetails2$.consumerCode) || "NA"
|
|
8762
|
-
}, {
|
|
8763
|
-
title: t("NDC_TRADE_TYPE_LABEL"),
|
|
8764
|
-
value: (appData === null || appData === void 0 ? void 0 : (_appData$NdcDetails3 = appData.NdcDetails) === null || _appData$NdcDetails3 === void 0 ? void 0 : (_appData$NdcDetails3$ = _appData$NdcDetails3[0]) === null || _appData$NdcDetails3$ === void 0 ? void 0 : _appData$NdcDetails3$.businessService) || "NA"
|
|
8765
|
-
}, {
|
|
8766
|
-
title: t("NDC_QUALIFICATION_TYPE"),
|
|
8767
|
-
value: (appData === null || appData === void 0 ? void 0 : (_appData$additionalDe = appData.additionalDetails) === null || _appData$additionalDe === void 0 ? void 0 : _appData$additionalDe.qualificationType) || "NA"
|
|
8768
|
-
}]
|
|
8769
|
-
}, {
|
|
8770
|
-
title: t("NDC_LICENSEE_DETAILS_HEADER_OWNER_INFO"),
|
|
8771
|
-
values: [{
|
|
8772
|
-
title: t("NDC_APPLICANT_NAME_LABEL"),
|
|
8773
|
-
value: (owner === null || owner === void 0 ? void 0 : owner.name) || "NA"
|
|
8774
|
-
}, {
|
|
8775
|
-
title: t("NDC_OWNER_MOBILE_NO_LABEL"),
|
|
8776
|
-
value: (owner === null || owner === void 0 ? void 0 : owner.mobileNumber) || "NA"
|
|
8777
|
-
}, {
|
|
8778
|
-
title: t("NDC_APPLICANT_GENDER_LABEL"),
|
|
8779
|
-
value: owner !== null && owner !== void 0 && owner.gender ? t(owner.gender) : "NA"
|
|
8780
|
-
}, {
|
|
8781
|
-
title: t("NDC_APPLICANT_EMAIL_LABEL"),
|
|
8782
|
-
value: (owner === null || owner === void 0 ? void 0 : owner.emailId) || "NA"
|
|
8783
|
-
}, {
|
|
8784
|
-
title: t("NDC_APPLICANT_DOB_LABEL"),
|
|
8785
|
-
value: owner !== null && owner !== void 0 && owner.dob ? Digit.DateUtils.ConvertTimestampToDate(owner.dob, "dd/MM/yyyy") : "NA"
|
|
8786
|
-
}]
|
|
8787
|
-
}, {
|
|
8788
|
-
title: t("NDC_NEW_ADDRESS_HEADER_DETAILS"),
|
|
8789
|
-
values: [{
|
|
8790
|
-
title: t("NDC_PERMANANT_ADDRESS_LABEL"),
|
|
8791
|
-
value: (owner === null || owner === void 0 ? void 0 : owner.permanentAddress) || "NA"
|
|
8792
|
-
}, {
|
|
8793
|
-
title: t("NDC_APPLICANT_CORRESPONDENCE_ADDRESS_LABEL"),
|
|
8794
|
-
value: (owner === null || owner === void 0 ? void 0 : owner.correspondenceAddress) || "NA"
|
|
8795
|
-
}, {
|
|
8796
|
-
title: t("NDC_PINCODE_LABEL"),
|
|
8797
|
-
value: (owner === null || owner === void 0 ? void 0 : owner.permanentPinCode) || (owner === null || owner === void 0 ? void 0 : owner.correspondencePinCode) || "NA"
|
|
8798
|
-
}, {
|
|
8799
|
-
title: t("NDC_SELECT_ULB"),
|
|
8800
|
-
value: (tenantInfo === null || tenantInfo === void 0 ? void 0 : tenantInfo.name) || (appData === null || appData === void 0 ? void 0 : appData.tenantId) || "NA"
|
|
8801
|
-
}]
|
|
8776
|
+
value: certificateBody
|
|
8802
8777
|
}]
|
|
8803
8778
|
};
|
|
8804
8779
|
};
|
|
@@ -8900,12 +8875,12 @@ const CitizenApplicationOverview = () => {
|
|
|
8900
8875
|
var _applicationDetails$A;
|
|
8901
8876
|
const ndcObject = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A = applicationDetails.Applications) === null || _applicationDetails$A === void 0 ? void 0 : _applicationDetails$A[0];
|
|
8902
8877
|
if (ndcObject) {
|
|
8903
|
-
var _ndcObject$owners, _ndcObject$owners$, _ndcObject$owners2, _ndcObject$owners2$, _ndcObject$owners3, _ndcObject$owners3$,
|
|
8878
|
+
var _ndcObject$NdcDetails, _ndcObject$NdcDetails2, _ndcObject$NdcDetails3, _ndcObject$owners, _ndcObject$owners$, _ndcObject$owners2, _ndcObject$owners2$, _ndcObject$owners3, _ndcObject$owners3$, _removeDuplicatesByUU;
|
|
8904
8879
|
const applicantData = {
|
|
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,
|
|
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,
|
|
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
8880
|
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,
|
|
8881
|
+
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,
|
|
8882
|
+
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,
|
|
8883
|
+
name: 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$.name,
|
|
8909
8884
|
applicationNo: ndcObject === null || ndcObject === void 0 ? void 0 : ndcObject.uuid
|
|
8910
8885
|
};
|
|
8911
8886
|
const Documents = removeDuplicatesByUUID((ndcObject === null || ndcObject === void 0 ? void 0 : ndcObject.Documents) || []);
|
|
@@ -8943,10 +8918,10 @@ const CitizenApplicationOverview = () => {
|
|
|
8943
8918
|
const Property = applicationDetails;
|
|
8944
8919
|
console.log("applicationDetails in StakeholderAck", applicationDetails);
|
|
8945
8920
|
console.log("tenants", tenants);
|
|
8946
|
-
const tenantInfo = tenants
|
|
8921
|
+
const tenantInfo = tenants.find(tenant => tenant.code === Property.tenantId);
|
|
8947
8922
|
const acknowledgementData = await getAcknowledgementData(Property, tenantInfo, t);
|
|
8948
8923
|
console.log("acknowledgementData", acknowledgementData);
|
|
8949
|
-
Digit.Utils.pdf.
|
|
8924
|
+
Digit.Utils.pdf.generateNDC(acknowledgementData);
|
|
8950
8925
|
};
|
|
8951
8926
|
if (isLoading || isDetailsLoading) {
|
|
8952
8927
|
return /*#__PURE__*/React.createElement(Loader, null);
|
|
@@ -8956,27 +8931,25 @@ const CitizenApplicationOverview = () => {
|
|
|
8956
8931
|
}, /*#__PURE__*/React.createElement("div", {
|
|
8957
8932
|
style: {
|
|
8958
8933
|
display: "flex",
|
|
8959
|
-
justifyContent: "
|
|
8934
|
+
justifyContent: "space-between",
|
|
8960
8935
|
alignItems: "center",
|
|
8961
8936
|
padding: "16px"
|
|
8962
8937
|
}
|
|
8963
|
-
},
|
|
8964
|
-
|
|
8938
|
+
}, /*#__PURE__*/React.createElement(Header, {
|
|
8939
|
+
styles: {
|
|
8940
|
+
fontSize: "32px"
|
|
8941
|
+
}
|
|
8942
|
+
}, 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, {
|
|
8965
8943
|
label: t("DOWNLOAD_CERTIFICATE"),
|
|
8944
|
+
style: {
|
|
8945
|
+
color: "#A52A2A"
|
|
8946
|
+
},
|
|
8966
8947
|
onClick: handleDownloadPdf
|
|
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, {
|
|
8948
|
+
})), /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(CardSubHeader, null, 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, {
|
|
8972
8949
|
key: key,
|
|
8973
8950
|
label: t(`${key === null || key === void 0 ? void 0 : key.toUpperCase()}`),
|
|
8974
8951
|
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")
|
|
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) => {
|
|
8952
|
+
}))))), /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(CardSubHeader, null, 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) => {
|
|
8980
8953
|
var _detail$dueAmount;
|
|
8981
8954
|
return /*#__PURE__*/React.createElement("div", {
|
|
8982
8955
|
key: index,
|
|
@@ -8999,11 +8972,7 @@ const CitizenApplicationOverview = () => {
|
|
|
8999
8972
|
label: t("NDC_PROPERTY_TYPE"),
|
|
9000
8973
|
text: t(detail.propertyType) || detail.propertyType
|
|
9001
8974
|
})));
|
|
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", {
|
|
8975
|
+
})), /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(CardSubHeader, null, t("NDC_APPLICATION_DOCUMENTS_OVERVIEW")), /*#__PURE__*/React.createElement("div", {
|
|
9007
8976
|
style: {
|
|
9008
8977
|
display: "flex",
|
|
9009
8978
|
gap: "16px"
|
|
@@ -9012,17 +8981,13 @@ const CitizenApplicationOverview = () => {
|
|
|
9012
8981
|
value: {
|
|
9013
8982
|
workflowDocs: displayData === null || displayData === void 0 ? void 0 : displayData.Documents
|
|
9014
8983
|
}
|
|
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, {
|
|
8984
|
+
}) : /*#__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, {
|
|
9020
8985
|
isCompleted: true,
|
|
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)
|
|
8986
|
+
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))
|
|
9022
8987
|
}) : /*#__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, {
|
|
9023
8988
|
keyValue: index,
|
|
9024
8989
|
isCompleted: index === 0,
|
|
9025
|
-
label: t(checkpoint.status),
|
|
8990
|
+
label: t("NDC_STATUS_" + checkpoint.status),
|
|
9026
8991
|
customChild: getTimelineCaptions$1(checkpoint, index, arr, t)
|
|
9027
8992
|
})))));
|
|
9028
8993
|
};
|
|
@@ -9553,7 +9518,7 @@ const Inbox = ({
|
|
|
9553
9518
|
}, [data]);
|
|
9554
9519
|
const PropsForInboxLinks = {
|
|
9555
9520
|
logoIcon: /*#__PURE__*/React.createElement(ComplaintIcon, null),
|
|
9556
|
-
headerText:
|
|
9521
|
+
headerText: "NDC Module",
|
|
9557
9522
|
links: [{
|
|
9558
9523
|
text: "Create NDC Application",
|
|
9559
9524
|
link: "/digit-ui/employee/ndc/create"
|
|
@@ -11449,12 +11414,6 @@ const config = [{
|
|
|
11449
11414
|
head: "",
|
|
11450
11415
|
stepNumber: 1,
|
|
11451
11416
|
body: [{
|
|
11452
|
-
name: "NDC_COMMON_NDC_REASON",
|
|
11453
|
-
type: "component",
|
|
11454
|
-
component: "SelectNDCReason",
|
|
11455
|
-
key: "NDCReason",
|
|
11456
|
-
withoutLabel: true
|
|
11457
|
-
}, {
|
|
11458
11417
|
name: "",
|
|
11459
11418
|
type: "component",
|
|
11460
11419
|
component: "NDCPropertySearch",
|
|
@@ -11466,6 +11425,12 @@ const config = [{
|
|
|
11466
11425
|
component: "PropertyDetailsFormCitizen",
|
|
11467
11426
|
key: "PropertyDetails",
|
|
11468
11427
|
withoutLabel: true
|
|
11428
|
+
}, {
|
|
11429
|
+
name: "NDC_COMMON_NDC_REASON",
|
|
11430
|
+
type: "component",
|
|
11431
|
+
component: "SelectNDCReason",
|
|
11432
|
+
key: "NDCReason",
|
|
11433
|
+
withoutLabel: true
|
|
11469
11434
|
}]
|
|
11470
11435
|
}, {
|
|
11471
11436
|
head: "NDC_COMMON_DOCUMENTS_REQUIRED",
|
|
@@ -11803,10 +11768,6 @@ function SelectNDCReason({
|
|
|
11803
11768
|
const {
|
|
11804
11769
|
t
|
|
11805
11770
|
} = 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
|
-
});
|
|
11810
11771
|
const {
|
|
11811
11772
|
data: menuList,
|
|
11812
11773
|
isLoading
|
|
@@ -11830,18 +11791,6 @@ function SelectNDCReason({
|
|
|
11830
11791
|
useEffect(() => {
|
|
11831
11792
|
onSelect("NDCReason", ndcReason, config);
|
|
11832
11793
|
}, [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]);
|
|
11845
11794
|
if (isLoading) {
|
|
11846
11795
|
return /*#__PURE__*/React.createElement(Loader, null);
|
|
11847
11796
|
}
|
|
@@ -11853,10 +11802,10 @@ function SelectNDCReason({
|
|
|
11853
11802
|
};
|
|
11854
11803
|
return /*#__PURE__*/React.createElement("div", {
|
|
11855
11804
|
style: {
|
|
11856
|
-
|
|
11805
|
+
marginBottom: "16px"
|
|
11857
11806
|
}
|
|
11858
11807
|
}, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
11859
|
-
className: "card-label-smaller
|
|
11808
|
+
className: "card-label-smaller"
|
|
11860
11809
|
}, `${t("NDC_NEW_NDC_APPLICATION_NDC_REASON")} * `), /*#__PURE__*/React.createElement(Controller, {
|
|
11861
11810
|
name: "NDCReason",
|
|
11862
11811
|
rules: {
|
|
@@ -11870,7 +11819,6 @@ function SelectNDCReason({
|
|
|
11870
11819
|
option: ndcReasonOptions,
|
|
11871
11820
|
select: e => {
|
|
11872
11821
|
setNDCReason(e);
|
|
11873
|
-
props.onChange(e);
|
|
11874
11822
|
},
|
|
11875
11823
|
optionKey: "i18nKey",
|
|
11876
11824
|
onBlur: props.onBlur,
|
|
@@ -11889,7 +11837,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
11889
11837
|
formState,
|
|
11890
11838
|
clearErrors
|
|
11891
11839
|
}) => {
|
|
11892
|
-
var _formData$cpt, _formData$cpt$details, _formData$cpt3, _Digit, _Digit$ComponentRegis, _formData$cpt4,
|
|
11840
|
+
var _formData$cpt, _formData$cpt$details, _formData$cpt3, _Digit, _Digit$ComponentRegis, _formData$cpt4, _propertyDetails$wate, _propertyDetails$sewe;
|
|
11893
11841
|
const {
|
|
11894
11842
|
control,
|
|
11895
11843
|
formState: localFormState,
|
|
@@ -11902,10 +11850,6 @@ const PropertyDetailsForm$1 = ({
|
|
|
11902
11850
|
t
|
|
11903
11851
|
} = useTranslation();
|
|
11904
11852
|
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
|
-
});
|
|
11909
11853
|
const [showToast, setShowToast] = useState(null);
|
|
11910
11854
|
const [propertyLoader, setPropertyLoader] = useState(false);
|
|
11911
11855
|
const [showPayModal, setShowPayModal] = useState(false);
|
|
@@ -11974,63 +11918,39 @@ const PropertyDetailsForm$1 = ({
|
|
|
11974
11918
|
});
|
|
11975
11919
|
}, [formData === null || formData === void 0 ? void 0 : (_formData$cpt3 = formData.cpt) === null || _formData$cpt3 === void 0 ? void 0 : _formData$cpt3.details]);
|
|
11976
11920
|
useEffect(() => {
|
|
11977
|
-
var
|
|
11978
|
-
|
|
11979
|
-
|
|
11980
|
-
|
|
11981
|
-
|
|
11982
|
-
|
|
11983
|
-
|
|
11984
|
-
|
|
11985
|
-
|
|
11986
|
-
|
|
11987
|
-
|
|
11988
|
-
|
|
11989
|
-
}
|
|
11990
|
-
|
|
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
|
-
}))) || [];
|
|
11921
|
+
var _formData$PropertyDet3, _formData$PropertyDet4;
|
|
11922
|
+
if (!(formData !== null && formData !== void 0 && (_formData$PropertyDet3 = formData.PropertyDetails) !== null && _formData$PropertyDet3 !== void 0 && (_formData$PropertyDet4 = _formData$PropertyDet3.waterConnection) !== null && _formData$PropertyDet4 !== void 0 && _formData$PropertyDet4.length) > 0) {
|
|
11923
|
+
setPropertyDetails(prev => {
|
|
11924
|
+
const waterConnection = waterConnectionData === null || waterConnectionData === void 0 ? void 0 : waterConnectionData.map(item => ({
|
|
11925
|
+
connectionNo: item === null || item === void 0 ? void 0 : item.connectionNo,
|
|
11926
|
+
isEdit: false,
|
|
11927
|
+
billData: {},
|
|
11928
|
+
isLoading: false
|
|
11929
|
+
}));
|
|
11930
|
+
return {
|
|
11931
|
+
...prev,
|
|
11932
|
+
waterConnection: waterConnection
|
|
11933
|
+
};
|
|
11934
|
+
});
|
|
11999
11935
|
}
|
|
12000
|
-
|
|
12001
|
-
...prev,
|
|
12002
|
-
waterConnection
|
|
12003
|
-
}));
|
|
12004
|
-
}, [waterConnectionData, apiDataCheck]);
|
|
11936
|
+
}, [waterConnectionData, waterConnectionLoading]);
|
|
12005
11937
|
useEffect(() => {
|
|
12006
|
-
var
|
|
12007
|
-
|
|
12008
|
-
|
|
12009
|
-
|
|
12010
|
-
|
|
12011
|
-
|
|
12012
|
-
|
|
12013
|
-
|
|
12014
|
-
|
|
12015
|
-
|
|
12016
|
-
|
|
12017
|
-
|
|
12018
|
-
}
|
|
12019
|
-
|
|
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
|
-
}))) || [];
|
|
11938
|
+
var _formData$PropertyDet5, _formData$PropertyDet6;
|
|
11939
|
+
if (!(formData !== null && formData !== void 0 && (_formData$PropertyDet5 = formData.PropertyDetails) !== null && _formData$PropertyDet5 !== void 0 && (_formData$PropertyDet6 = _formData$PropertyDet5.sewerageConnection) !== null && _formData$PropertyDet6 !== void 0 && _formData$PropertyDet6.length) > 0) {
|
|
11940
|
+
setPropertyDetails(prev => {
|
|
11941
|
+
const sewerageConnection = sewerageConnectionData === null || sewerageConnectionData === void 0 ? void 0 : sewerageConnectionData.map(item => ({
|
|
11942
|
+
connectionNo: item === null || item === void 0 ? void 0 : item.connectionNo,
|
|
11943
|
+
isEdit: false,
|
|
11944
|
+
billData: {},
|
|
11945
|
+
isLoading: false
|
|
11946
|
+
}));
|
|
11947
|
+
return {
|
|
11948
|
+
...prev,
|
|
11949
|
+
sewerageConnection: sewerageConnection
|
|
11950
|
+
};
|
|
11951
|
+
});
|
|
12028
11952
|
}
|
|
12029
|
-
|
|
12030
|
-
...prev,
|
|
12031
|
-
sewerageConnection
|
|
12032
|
-
}));
|
|
12033
|
-
}, [sewerageConnectionData, apiDataCheck]);
|
|
11953
|
+
}, [sewerageConnectionData, sewerageConnectionLoading]);
|
|
12034
11954
|
useEffect(() => {
|
|
12035
11955
|
onSelect("PropertyDetails", propertyDetails, config);
|
|
12036
11956
|
}, [propertyDetails]);
|
|
@@ -12085,6 +12005,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12085
12005
|
consumerCode: consumercodes
|
|
12086
12006
|
});
|
|
12087
12007
|
setPropertyLoader(false);
|
|
12008
|
+
console.log("result======???????", result);
|
|
12088
12009
|
if ((result === null || result === void 0 ? void 0 : (_result$Bill = result.Bill) === null || _result$Bill === void 0 ? void 0 : _result$Bill.length) > 0) {
|
|
12089
12010
|
var _result$Bill$;
|
|
12090
12011
|
if ((result === null || result === void 0 ? void 0 : (_result$Bill$ = result.Bill[0]) === null || _result$Bill$ === void 0 ? void 0 : _result$Bill$.totalAmount) > 0) {
|
|
@@ -12126,6 +12047,10 @@ const PropertyDetailsForm$1 = ({
|
|
|
12126
12047
|
}));
|
|
12127
12048
|
}
|
|
12128
12049
|
} else if (result !== null && result !== void 0 && result.Bill) {
|
|
12050
|
+
setShowToast({
|
|
12051
|
+
error: false,
|
|
12052
|
+
label: t("NDC_MESSAGE_NO_BILLS_FOUND_FOR_THIS_CONSUMER_NUMBER")
|
|
12053
|
+
});
|
|
12129
12054
|
if (bussinessService === "WS") {
|
|
12130
12055
|
const updated = [...propertyDetails.waterConnection];
|
|
12131
12056
|
updated[index].billData = {
|
|
@@ -12136,10 +12061,6 @@ const PropertyDetailsForm$1 = ({
|
|
|
12136
12061
|
...prev,
|
|
12137
12062
|
waterConnection: updated
|
|
12138
12063
|
}));
|
|
12139
|
-
setShowToast({
|
|
12140
|
-
error: false,
|
|
12141
|
-
label: t("NDC_NO_BILLS_FOUND_WS")
|
|
12142
|
-
});
|
|
12143
12064
|
} else if (bussinessService === "SW") {
|
|
12144
12065
|
const updated = [...propertyDetails.sewerageConnection];
|
|
12145
12066
|
updated[index].billData = {
|
|
@@ -12150,10 +12071,6 @@ const PropertyDetailsForm$1 = ({
|
|
|
12150
12071
|
...prev,
|
|
12151
12072
|
sewerageConnection: updated
|
|
12152
12073
|
}));
|
|
12153
|
-
setShowToast({
|
|
12154
|
-
error: false,
|
|
12155
|
-
label: t("NDC_NO_BILLS_FOUND_SW")
|
|
12156
|
-
});
|
|
12157
12074
|
} else if (bussinessService === "PT") {
|
|
12158
12075
|
let updated = {
|
|
12159
12076
|
...propertyDetails.propertyBillData
|
|
@@ -12163,12 +12080,12 @@ const PropertyDetailsForm$1 = ({
|
|
|
12163
12080
|
...prev,
|
|
12164
12081
|
propertyBillData: updated
|
|
12165
12082
|
}));
|
|
12166
|
-
setShowToast({
|
|
12167
|
-
error: false,
|
|
12168
|
-
label: t("NDC_NO_BILLS_FOUND_PROPERTY")
|
|
12169
|
-
});
|
|
12170
12083
|
}
|
|
12171
12084
|
} else {
|
|
12085
|
+
setShowToast({
|
|
12086
|
+
error: false,
|
|
12087
|
+
label: t("NDC_MESSAGE_NO_BILLS_FOUND_FOR_THIS_CONSUMER_NUMBER")
|
|
12088
|
+
});
|
|
12172
12089
|
if (bussinessService === "WS") {
|
|
12173
12090
|
const updated = [...propertyDetails.waterConnection];
|
|
12174
12091
|
updated[index].isLoading = false;
|
|
@@ -12179,10 +12096,6 @@ const PropertyDetailsForm$1 = ({
|
|
|
12179
12096
|
...prev,
|
|
12180
12097
|
waterConnection: updated
|
|
12181
12098
|
}));
|
|
12182
|
-
setShowToast({
|
|
12183
|
-
error: false,
|
|
12184
|
-
label: t("NDC_NO_BILLS_FOUND_WS")
|
|
12185
|
-
});
|
|
12186
12099
|
} else if (bussinessService === "SW") {
|
|
12187
12100
|
const updated = [...propertyDetails.sewerageConnection];
|
|
12188
12101
|
updated[index].isLoading = false;
|
|
@@ -12193,10 +12106,6 @@ const PropertyDetailsForm$1 = ({
|
|
|
12193
12106
|
...prev,
|
|
12194
12107
|
sewerageConnection: updated
|
|
12195
12108
|
}));
|
|
12196
|
-
setShowToast({
|
|
12197
|
-
error: false,
|
|
12198
|
-
label: t("NDC_NO_BILLS_FOUND_SW")
|
|
12199
|
-
});
|
|
12200
12109
|
} else if (bussinessService === "PT") {
|
|
12201
12110
|
let updated = {
|
|
12202
12111
|
...propertyDetails.propertyBillData
|
|
@@ -12206,10 +12115,6 @@ const PropertyDetailsForm$1 = ({
|
|
|
12206
12115
|
...prev,
|
|
12207
12116
|
propertyBillData: updated
|
|
12208
12117
|
}));
|
|
12209
|
-
setShowToast({
|
|
12210
|
-
error: false,
|
|
12211
|
-
label: t("NDC_NO_BILLS_FOUND_PROPERTY")
|
|
12212
|
-
});
|
|
12213
12118
|
}
|
|
12214
12119
|
}
|
|
12215
12120
|
} catch (error) {
|
|
@@ -12281,35 +12186,16 @@ const PropertyDetailsForm$1 = ({
|
|
|
12281
12186
|
}
|
|
12282
12187
|
}
|
|
12283
12188
|
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]);
|
|
12303
12189
|
return /*#__PURE__*/React.createElement("div", {
|
|
12304
12190
|
style: {
|
|
12305
12191
|
marginBottom: "16px"
|
|
12306
12192
|
}
|
|
12307
|
-
}, (
|
|
12193
|
+
}, (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, {
|
|
12308
12194
|
style: {
|
|
12309
12195
|
marginTop: "40px"
|
|
12310
12196
|
}
|
|
12311
12197
|
}, /*#__PURE__*/React.createElement(CardLabel, {
|
|
12312
|
-
className: "card-label-smaller
|
|
12198
|
+
className: "card-label-smaller"
|
|
12313
12199
|
}, `${t("NDC_WATER_CONNECTION")}`), waterConnectionLoading ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement("div", {
|
|
12314
12200
|
className: "field",
|
|
12315
12201
|
style: {
|
|
@@ -12319,7 +12205,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12319
12205
|
width: "100%"
|
|
12320
12206
|
}
|
|
12321
12207
|
}, propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$wate = propertyDetails.waterConnection) === null || _propertyDetails$wate === void 0 ? void 0 : _propertyDetails$wate.map((item, index) => {
|
|
12322
|
-
var
|
|
12208
|
+
var _item$billData, _item$billData2, _item$billData3, _item$billData4;
|
|
12323
12209
|
return /*#__PURE__*/React.createElement("div", {
|
|
12324
12210
|
className: "ndc_property_search",
|
|
12325
12211
|
key: index,
|
|
@@ -12360,7 +12246,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12360
12246
|
alignItems: "center",
|
|
12361
12247
|
gap: "12px"
|
|
12362
12248
|
}
|
|
12363
|
-
},
|
|
12249
|
+
}, (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", {
|
|
12364
12250
|
className: "submit-bar",
|
|
12365
12251
|
type: "button",
|
|
12366
12252
|
style: {
|
|
@@ -12417,7 +12303,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12417
12303
|
marginTop: "40px"
|
|
12418
12304
|
}
|
|
12419
12305
|
}, /*#__PURE__*/React.createElement(CardLabel, {
|
|
12420
|
-
className: "card-label-smaller
|
|
12306
|
+
className: "card-label-smaller"
|
|
12421
12307
|
}, `${t("NDC_SEWERAGE_CONNECTION")} `), sewerageConnectionLoading ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement("div", {
|
|
12422
12308
|
className: "field",
|
|
12423
12309
|
style: {
|
|
@@ -12427,7 +12313,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12427
12313
|
width: "100%"
|
|
12428
12314
|
}
|
|
12429
12315
|
}, propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$sewe = propertyDetails.sewerageConnection) === null || _propertyDetails$sewe === void 0 ? void 0 : _propertyDetails$sewe.map((item, index) => {
|
|
12430
|
-
var
|
|
12316
|
+
var _item$billData5, _item$billData6, _item$billData7, _item$billData8;
|
|
12431
12317
|
return /*#__PURE__*/React.createElement("div", {
|
|
12432
12318
|
className: "ndc_property_search",
|
|
12433
12319
|
key: index,
|
|
@@ -12468,7 +12354,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12468
12354
|
alignItems: "center",
|
|
12469
12355
|
gap: "12px"
|
|
12470
12356
|
}
|
|
12471
|
-
},
|
|
12357
|
+
}, (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", {
|
|
12472
12358
|
className: "submit-bar",
|
|
12473
12359
|
type: "button",
|
|
12474
12360
|
style: {
|
|
@@ -12525,7 +12411,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12525
12411
|
marginTop: "40px"
|
|
12526
12412
|
}
|
|
12527
12413
|
}, /*#__PURE__*/React.createElement(CardLabel, {
|
|
12528
|
-
className: "card-label-smaller
|
|
12414
|
+
className: "card-label-smaller"
|
|
12529
12415
|
}, `${t("NDC_FIRST_NAME")} * `), /*#__PURE__*/React.createElement("div", {
|
|
12530
12416
|
className: "field"
|
|
12531
12417
|
}, /*#__PURE__*/React.createElement(Controller, {
|
|
@@ -12556,7 +12442,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12556
12442
|
});
|
|
12557
12443
|
}
|
|
12558
12444
|
}))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
12559
|
-
className: "card-label-smaller
|
|
12445
|
+
className: "card-label-smaller"
|
|
12560
12446
|
}, `${t("NDC_LAST_NAME")} * `), /*#__PURE__*/React.createElement("div", {
|
|
12561
12447
|
className: "field"
|
|
12562
12448
|
}, /*#__PURE__*/React.createElement(Controller, {
|
|
@@ -12587,23 +12473,23 @@ const PropertyDetailsForm$1 = ({
|
|
|
12587
12473
|
});
|
|
12588
12474
|
}
|
|
12589
12475
|
}))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
12590
|
-
className: "card-label-smaller
|
|
12476
|
+
className: "card-label-smaller"
|
|
12591
12477
|
}, `${t("NDC_EMAIL")} * `), /*#__PURE__*/React.createElement("div", {
|
|
12592
12478
|
className: "field"
|
|
12593
12479
|
}, /*#__PURE__*/React.createElement(Controller, {
|
|
12594
12480
|
control: control,
|
|
12595
12481
|
name: "email",
|
|
12596
|
-
defaultValue: "",
|
|
12482
|
+
defaultValue: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.email) || "",
|
|
12597
12483
|
render: props => {
|
|
12598
12484
|
var _formData$cpt7, _formData$cpt7$detail, _formData$cpt7$detail2, _formData$cpt7$detail3, _formData$cpt7$detail4;
|
|
12599
12485
|
return /*#__PURE__*/React.createElement(TextInput, {
|
|
12600
|
-
value:
|
|
12486
|
+
value: propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.email,
|
|
12601
12487
|
onChange: e => {
|
|
12602
|
-
props.onChange(e.target.value);
|
|
12603
12488
|
setPropertyDetails(prev => ({
|
|
12604
12489
|
...prev,
|
|
12605
12490
|
email: e.target.value
|
|
12606
12491
|
}));
|
|
12492
|
+
props.onChange(e.target.value);
|
|
12607
12493
|
},
|
|
12608
12494
|
onBlur: e => {
|
|
12609
12495
|
props.onBlur(e);
|
|
@@ -12612,7 +12498,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12612
12498
|
});
|
|
12613
12499
|
}
|
|
12614
12500
|
}))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
12615
|
-
className: "card-label-smaller
|
|
12501
|
+
className: "card-label-smaller"
|
|
12616
12502
|
}, `${t("NDC_MOBILE_NUMBER")} * `), /*#__PURE__*/React.createElement("div", {
|
|
12617
12503
|
className: "field"
|
|
12618
12504
|
}, /*#__PURE__*/React.createElement(Controller, {
|
|
@@ -12633,7 +12519,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12633
12519
|
}
|
|
12634
12520
|
})
|
|
12635
12521
|
}))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
12636
|
-
className: "card-label-smaller
|
|
12522
|
+
className: "card-label-smaller"
|
|
12637
12523
|
}, `${t("NDC_ADDRESS")} * `), /*#__PURE__*/React.createElement("div", {
|
|
12638
12524
|
className: "field"
|
|
12639
12525
|
}, /*#__PURE__*/React.createElement(Controller, {
|
|
@@ -12658,7 +12544,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12658
12544
|
});
|
|
12659
12545
|
}
|
|
12660
12546
|
})))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
12661
|
-
className: "card-label-smaller
|
|
12547
|
+
className: "card-label-smaller"
|
|
12662
12548
|
}, `${t("NDC_TL_NUMBER")}`), /*#__PURE__*/React.createElement("div", {
|
|
12663
12549
|
className: "field"
|
|
12664
12550
|
}, /*#__PURE__*/React.createElement(Controller, {
|
|
@@ -12700,30 +12586,23 @@ const PropertySearchNSummary = ({
|
|
|
12700
12586
|
onSelect,
|
|
12701
12587
|
formData
|
|
12702
12588
|
}) => {
|
|
12703
|
-
var
|
|
12589
|
+
var _formData$cpt, _formData$cpt2, _propertyDetails$Prop3, _formData$cpt11, _formData$cpt12, _formData$cpt14, _formData$cpt15, _formData$cpt15$dues, _formData$cpt17, _formData$cpt18, _formData$cpt18$dues;
|
|
12704
12590
|
const {
|
|
12705
12591
|
t
|
|
12706
12592
|
} = useTranslation();
|
|
12707
12593
|
const myElementRef = useRef(null);
|
|
12708
|
-
const dispatch = useDispatch();
|
|
12709
12594
|
let {
|
|
12710
12595
|
pathname,
|
|
12711
12596
|
state
|
|
12712
12597
|
} = useLocation();
|
|
12713
12598
|
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
|
-
});
|
|
12718
12599
|
const isEditScreen = pathname.includes("/modify-application/");
|
|
12719
12600
|
const tenantId = window.location.href.includes("employee") ? Digit.ULBService.getCurrentPermanentCity() : localStorage.getItem("CITIZEN.CITY");
|
|
12720
12601
|
const search = useLocation().search;
|
|
12721
12602
|
const urlPropertyId = new URLSearchParams(search).get("propertyId");
|
|
12722
12603
|
const isfirstRender = useRef(true);
|
|
12723
|
-
const
|
|
12724
|
-
|
|
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) || "");
|
|
12604
|
+
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 : "") || "");
|
|
12605
|
+
const [searchPropertyId, setSearchPropertyId] = useState(formData !== null && formData !== void 0 && (_formData$cpt2 = formData.cpt) !== null && _formData$cpt2 !== void 0 && _formData$cpt2.id || urlPropertyId !== "null" ? urlPropertyId : "");
|
|
12727
12606
|
const [showToast, setShowToast] = useState(null);
|
|
12728
12607
|
const [propertyDetails, setPropertyDetails] = useState(() => {
|
|
12729
12608
|
var _formData$cpt3, _formData$cpt4;
|
|
@@ -12756,8 +12635,6 @@ const PropertySearchNSummary = ({
|
|
|
12756
12635
|
}
|
|
12757
12636
|
});
|
|
12758
12637
|
const [isSearchClicked, setIsSearchClicked] = useState(false);
|
|
12759
|
-
const [getNoDue, setNoDue] = useState(false);
|
|
12760
|
-
const [getCheckStatus, setCheckStats] = useState(false);
|
|
12761
12638
|
const {
|
|
12762
12639
|
isLoading,
|
|
12763
12640
|
isError,
|
|
@@ -12776,25 +12653,11 @@ const PropertySearchNSummary = ({
|
|
|
12776
12653
|
enabled: searchPropertyId ? true : false,
|
|
12777
12654
|
privacy: Digit.Utils.getPrivacyObject()
|
|
12778
12655
|
});
|
|
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]);
|
|
12792
12656
|
useEffect(() => {
|
|
12793
12657
|
var _propertyDetailsFetch;
|
|
12794
12658
|
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) {
|
|
12795
12659
|
setPropertyDetails(propertyDetailsFetch);
|
|
12796
12660
|
setShowToast(null);
|
|
12797
|
-
setCheckStats(true);
|
|
12798
12661
|
} else {
|
|
12799
12662
|
var _formData$cpt9;
|
|
12800
12663
|
if (isfirstRender.current) {
|
|
@@ -12802,6 +12665,7 @@ const PropertySearchNSummary = ({
|
|
|
12802
12665
|
return;
|
|
12803
12666
|
}
|
|
12804
12667
|
if (!(formData !== null && formData !== void 0 && (_formData$cpt9 = formData.cpt) !== null && _formData$cpt9 !== void 0 && _formData$cpt9.details)) {
|
|
12668
|
+
console.log("Property Id not found in response", propertyId);
|
|
12805
12669
|
setPropertyDetails({});
|
|
12806
12670
|
setShowToast({
|
|
12807
12671
|
error: true,
|
|
@@ -12816,6 +12680,7 @@ const PropertySearchNSummary = ({
|
|
|
12816
12680
|
useEffect(() => {
|
|
12817
12681
|
var _propertyDetails$Prop;
|
|
12818
12682
|
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) {
|
|
12683
|
+
console.log("Error Caught", error, propertyDetails);
|
|
12819
12684
|
setShowToast({
|
|
12820
12685
|
error: true,
|
|
12821
12686
|
label: "PT_ENTER_VALID_PROPERTY_ID"
|
|
@@ -12855,8 +12720,6 @@ const PropertySearchNSummary = ({
|
|
|
12855
12720
|
setPropertyId(e.target.value);
|
|
12856
12721
|
setValue(e.target.value, propertyIdInput.name);
|
|
12857
12722
|
setIsSearchClicked(false);
|
|
12858
|
-
setNoDue(false);
|
|
12859
|
-
setCheckStats(false);
|
|
12860
12723
|
};
|
|
12861
12724
|
if (isEditScreen) {
|
|
12862
12725
|
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
@@ -12885,6 +12748,9 @@ const PropertySearchNSummary = ({
|
|
|
12885
12748
|
[input]: value
|
|
12886
12749
|
});
|
|
12887
12750
|
}
|
|
12751
|
+
function getValue(input) {
|
|
12752
|
+
return formData && formData[config.key] ? formData[config.key][input] : undefined;
|
|
12753
|
+
}
|
|
12888
12754
|
async function fetchBill() {
|
|
12889
12755
|
try {
|
|
12890
12756
|
var _formData$cpt0, _result$Bill;
|
|
@@ -12902,10 +12768,8 @@ const PropertySearchNSummary = ({
|
|
|
12902
12768
|
} else {
|
|
12903
12769
|
setShowToast({
|
|
12904
12770
|
error: false,
|
|
12905
|
-
label: t("
|
|
12771
|
+
label: t("NDC_MESSAGE_NO_DUES_FOUND")
|
|
12906
12772
|
});
|
|
12907
|
-
setNoDue(true);
|
|
12908
|
-
setCheckStats(false);
|
|
12909
12773
|
}
|
|
12910
12774
|
setPropertyDues({
|
|
12911
12775
|
dues: result === null || result === void 0 ? void 0 : result.Bill[0]
|
|
@@ -12913,27 +12777,23 @@ const PropertySearchNSummary = ({
|
|
|
12913
12777
|
} else if (result !== null && result !== void 0 && result.Bill) {
|
|
12914
12778
|
setShowToast({
|
|
12915
12779
|
error: false,
|
|
12916
|
-
label: t("
|
|
12780
|
+
label: t("NDC_MESSAGE_NO_BILLS_FOUND_FOR_THIS_CONSUMER_NUMBER")
|
|
12917
12781
|
});
|
|
12918
12782
|
setPropertyDues({
|
|
12919
12783
|
dues: {
|
|
12920
12784
|
totalAmount: 0
|
|
12921
12785
|
}
|
|
12922
12786
|
});
|
|
12923
|
-
setNoDue(true);
|
|
12924
|
-
setCheckStats(false);
|
|
12925
12787
|
} else {
|
|
12926
12788
|
setShowToast({
|
|
12927
12789
|
error: false,
|
|
12928
|
-
label: t("
|
|
12790
|
+
label: t("NDC_MESSAGE_NO_BILLS_FOUND_FOR_THIS_CONSUMER_NUMBER")
|
|
12929
12791
|
});
|
|
12930
12792
|
setPropertyDues({
|
|
12931
12793
|
dues: {
|
|
12932
12794
|
totalAmount: 0
|
|
12933
12795
|
}
|
|
12934
12796
|
});
|
|
12935
|
-
setNoDue(true);
|
|
12936
|
-
setCheckStats(false);
|
|
12937
12797
|
}
|
|
12938
12798
|
} catch (error) {
|
|
12939
12799
|
setShowToast({
|
|
@@ -12949,20 +12809,12 @@ const PropertySearchNSummary = ({
|
|
|
12949
12809
|
window.open(payUrl, "_blank");
|
|
12950
12810
|
setPropertyDues({});
|
|
12951
12811
|
}
|
|
12952
|
-
useEffect(() => {
|
|
12953
|
-
if (showToast) {
|
|
12954
|
-
const timer = setTimeout(() => {
|
|
12955
|
-
setShowToast(null);
|
|
12956
|
-
}, 3000);
|
|
12957
|
-
return () => clearTimeout(timer);
|
|
12958
|
-
}
|
|
12959
|
-
}, [showToast]);
|
|
12960
12812
|
return /*#__PURE__*/React.createElement(React.Fragment, null, isLoading && /*#__PURE__*/React.createElement(Loader, null), /*#__PURE__*/React.createElement("div", {
|
|
12961
12813
|
style: {
|
|
12962
12814
|
marginBottom: "16px"
|
|
12963
12815
|
}
|
|
12964
12816
|
}, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
12965
|
-
className: "card-label-smaller
|
|
12817
|
+
className: "card-label-smaller",
|
|
12966
12818
|
style: getInputStyles()
|
|
12967
12819
|
}, `${t(propertyIdInput.label)}`, null), /*#__PURE__*/React.createElement("div", {
|
|
12968
12820
|
className: "field ndc_property_search",
|
|
@@ -12977,7 +12829,7 @@ const PropertySearchNSummary = ({
|
|
|
12977
12829
|
id: "search-property-field"
|
|
12978
12830
|
}, /*#__PURE__*/React.createElement(TextInput, Object.assign({
|
|
12979
12831
|
key: propertyIdInput.name,
|
|
12980
|
-
value:
|
|
12832
|
+
value: getValue(propertyIdInput.name),
|
|
12981
12833
|
onChange: handlePropertyChange,
|
|
12982
12834
|
disable: false,
|
|
12983
12835
|
maxlength: 16,
|
|
@@ -12991,7 +12843,7 @@ const PropertySearchNSummary = ({
|
|
|
12991
12843
|
maxWidth: "100px"
|
|
12992
12844
|
},
|
|
12993
12845
|
onClick: searchProperty
|
|
12994
|
-
}, `${t("PT_SEARCH")}`), !(
|
|
12846
|
+
}, `${t("PT_SEARCH")}`), (formData === null || formData === void 0 ? void 0 : (_formData$cpt11 = formData.cpt) === null || _formData$cpt11 === void 0 ? void 0 : _formData$cpt11.details) && !(formData !== null && formData !== void 0 && (_formData$cpt12 = formData.cpt) !== null && _formData$cpt12 !== void 0 && _formData$cpt12.dues) && /*#__PURE__*/React.createElement("button", {
|
|
12995
12847
|
className: "submit-bar",
|
|
12996
12848
|
type: "button",
|
|
12997
12849
|
style: {
|
|
@@ -13003,7 +12855,7 @@ const PropertySearchNSummary = ({
|
|
|
13003
12855
|
onClick: () => {
|
|
13004
12856
|
fetchBill();
|
|
13005
12857
|
}
|
|
13006
|
-
}, `${t("CHECK_STATUS_PROPERTY")}`), (formData === null || formData === void 0 ? void 0 : (_formData$
|
|
12858
|
+
}, `${t("CHECK_STATUS_PROPERTY")}`), (formData === null || formData === void 0 ? void 0 : (_formData$cpt14 = formData.cpt) === null || _formData$cpt14 === void 0 ? void 0 : _formData$cpt14.id) && (formData === null || formData === void 0 ? void 0 : (_formData$cpt15 = formData.cpt) === null || _formData$cpt15 === void 0 ? void 0 : (_formData$cpt15$dues = _formData$cpt15.dues) === null || _formData$cpt15$dues === void 0 ? void 0 : _formData$cpt15$dues.totalAmount) > 0 && /*#__PURE__*/React.createElement("button", {
|
|
13007
12859
|
className: "submit-bar",
|
|
13008
12860
|
type: "button",
|
|
13009
12861
|
style: {
|
|
@@ -13014,7 +12866,7 @@ const PropertySearchNSummary = ({
|
|
|
13014
12866
|
onClick: () => {
|
|
13015
12867
|
redirectToPayBill();
|
|
13016
12868
|
}
|
|
13017
|
-
}, `${t("PAY_DUES")}`),
|
|
12869
|
+
}, `${t("PAY_DUES")}`), (formData === null || formData === void 0 ? void 0 : (_formData$cpt17 = formData.cpt) === null || _formData$cpt17 === void 0 ? void 0 : _formData$cpt17.id) && (formData === null || formData === void 0 ? void 0 : (_formData$cpt18 = formData.cpt) === null || _formData$cpt18 === void 0 ? void 0 : (_formData$cpt18$dues = _formData$cpt18.dues) === null || _formData$cpt18$dues === void 0 ? void 0 : _formData$cpt18$dues.totalAmount) == 0 && /*#__PURE__*/React.createElement("div", {
|
|
13018
12870
|
style: {
|
|
13019
12871
|
color: "green",
|
|
13020
12872
|
width: "100%",
|
|
@@ -13086,7 +12938,6 @@ const SelectNDCDocuments = ({
|
|
|
13086
12938
|
formState: formState
|
|
13087
12939
|
});
|
|
13088
12940
|
}), error && /*#__PURE__*/React.createElement(Toast, {
|
|
13089
|
-
isDleteBtn: true,
|
|
13090
12941
|
label: error,
|
|
13091
12942
|
onClose: () => setError(null),
|
|
13092
12943
|
error: true
|
|
@@ -13783,18 +13634,6 @@ const NewNDCStepForm$1 = () => {
|
|
|
13783
13634
|
const formState = useSelector(state => state.ndc.NDCForm);
|
|
13784
13635
|
const step = formState.step;
|
|
13785
13636
|
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]);
|
|
13798
13637
|
const setStep = updatedStepNumber => {
|
|
13799
13638
|
dispatch(setNDCStep(updatedStepNumber));
|
|
13800
13639
|
};
|
|
@@ -13949,7 +13788,6 @@ const NewNDCStepFormOne$1 = ({
|
|
|
13949
13788
|
};
|
|
13950
13789
|
function validateStepData(data) {
|
|
13951
13790
|
var _data$cpt6, _data$cpt6$dues, _data$cpt7, _data$cpt7$dues, _data$dues, _propertyDetails$wate, _propertyDetails$sewe;
|
|
13952
|
-
console.log("data", data);
|
|
13953
13791
|
const missingFields = [];
|
|
13954
13792
|
const invalidFields = [];
|
|
13955
13793
|
const cpt = (data === null || data === void 0 ? void 0 : data.cpt) || {};
|