@mseva/digit-ui-module-ndc 1.0.20 → 1.0.22
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 +14615 -1
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +372 -170
- 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,
|
|
@@ -8731,49 +8731,74 @@ 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, _appData$NdcDetails, _appData$
|
|
8735
|
-
const appData =
|
|
8734
|
+
var _application$Applicat, _appData$owners, _tenantInfo$city, _appData$auditDetails, _appData$NdcDetails, _appData$NdcDetails$, _appData$NdcDetails$$, _appData$NdcDetails2, _appData$NdcDetails2$, _appData$NdcDetails3, _appData$NdcDetails3$, _appData$additionalDe;
|
|
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")}`;
|
|
8767
8737
|
return {
|
|
8768
|
-
t,
|
|
8738
|
+
t: t,
|
|
8769
8739
|
tenantId: tenantInfo === null || tenantInfo === void 0 ? void 0 : tenantInfo.code,
|
|
8770
8740
|
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(".", "_")}`))}`,
|
|
8771
8741
|
email: tenantInfo === null || tenantInfo === void 0 ? void 0 : tenantInfo.emailId,
|
|
8772
8742
|
phoneNumber: tenantInfo === null || tenantInfo === void 0 ? void 0 : tenantInfo.contactNumber,
|
|
8773
8743
|
heading: t("NDC_CERTIFICATE"),
|
|
8774
|
-
applicationNumber,
|
|
8744
|
+
applicationNumber: (appData === null || appData === void 0 ? void 0 : appData.uuid) || "NA",
|
|
8775
8745
|
details: [{
|
|
8776
|
-
|
|
8746
|
+
title: t("CS_APPLICATION_DETAILS"),
|
|
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
|
+
}]
|
|
8777
8802
|
}]
|
|
8778
8803
|
};
|
|
8779
8804
|
};
|
|
@@ -8816,13 +8841,14 @@ const getTimelineCaptions$1 = (checkpoint, index, arr, t) => {
|
|
|
8816
8841
|
}, caption.date && /*#__PURE__*/React.createElement("p", null, caption.date), caption.name && /*#__PURE__*/React.createElement("p", null, caption.name), caption.mobileNumber , caption.source && /*#__PURE__*/React.createElement("p", null, t("ES_COMMON_FILED_VIA_" + caption.source.toUpperCase()))));
|
|
8817
8842
|
};
|
|
8818
8843
|
const CitizenApplicationOverview = () => {
|
|
8819
|
-
var _user, _user$info, _user$info$roles, _applicationDetails$A3, _applicationDetails$A4, _Object$entries, _displayData$NdcDetai, _displayData$Document, _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _workflowDetails$data4, _workflowDetails$data5;
|
|
8844
|
+
var _user, _user$info, _user$info$roles, _applicationDetails$A3, _applicationDetails$A4, _applicationDetails$A5, _applicationDetails$A6, _Object$entries, _displayData$NdcDetai, _displayData$Document, _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _workflowDetails$data4, _workflowDetails$data5;
|
|
8820
8845
|
const {
|
|
8821
8846
|
id
|
|
8822
8847
|
} = useParams();
|
|
8823
8848
|
const {
|
|
8824
8849
|
t
|
|
8825
8850
|
} = useTranslation();
|
|
8851
|
+
const history = useHistory();
|
|
8826
8852
|
const tenantId = window.localStorage.getItem("CITIZEN.CITY");
|
|
8827
8853
|
const state = tenantId === null || tenantId === void 0 ? void 0 : tenantId.split(".")[0];
|
|
8828
8854
|
const [appDetails, setAppDetails] = useState({});
|
|
@@ -8875,12 +8901,12 @@ const CitizenApplicationOverview = () => {
|
|
|
8875
8901
|
var _applicationDetails$A;
|
|
8876
8902
|
const ndcObject = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A = applicationDetails.Applications) === null || _applicationDetails$A === void 0 ? void 0 : _applicationDetails$A[0];
|
|
8877
8903
|
if (ndcObject) {
|
|
8878
|
-
var _ndcObject$
|
|
8904
|
+
var _ndcObject$owners, _ndcObject$owners$, _ndcObject$owners2, _ndcObject$owners2$, _ndcObject$owners3, _ndcObject$owners3$, _ndcObject$NdcDetails, _ndcObject$NdcDetails2, _ndcObject$NdcDetails3, _removeDuplicatesByUU;
|
|
8879
8905
|
const applicantData = {
|
|
8880
|
-
|
|
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,
|
|
8906
|
+
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,
|
|
8882
8907
|
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
|
-
|
|
8908
|
+
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,
|
|
8909
|
+
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,
|
|
8884
8910
|
applicationNo: ndcObject === null || ndcObject === void 0 ? void 0 : ndcObject.uuid
|
|
8885
8911
|
};
|
|
8886
8912
|
const Documents = removeDuplicatesByUUID((ndcObject === null || ndcObject === void 0 ? void 0 : ndcObject.Documents) || []);
|
|
@@ -8902,7 +8928,6 @@ const CitizenApplicationOverview = () => {
|
|
|
8902
8928
|
}
|
|
8903
8929
|
}, [applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.Applications]);
|
|
8904
8930
|
useEffect(() => {
|
|
8905
|
-
console.log("applicationDetails", applicationDetails);
|
|
8906
8931
|
if (applicationDetails) {
|
|
8907
8932
|
setIsDetailsLoading(true);
|
|
8908
8933
|
setAppDetails({
|
|
@@ -8916,12 +8941,9 @@ const CitizenApplicationOverview = () => {
|
|
|
8916
8941
|
}, [applicationDetails]);
|
|
8917
8942
|
const handleDownloadPdf = async () => {
|
|
8918
8943
|
const Property = applicationDetails;
|
|
8919
|
-
|
|
8920
|
-
console.log("tenants", tenants);
|
|
8921
|
-
const tenantInfo = tenants.find(tenant => tenant.code === Property.tenantId);
|
|
8944
|
+
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));
|
|
8922
8945
|
const acknowledgementData = await getAcknowledgementData(Property, tenantInfo, t);
|
|
8923
|
-
|
|
8924
|
-
Digit.Utils.pdf.generateNDC(acknowledgementData);
|
|
8946
|
+
Digit.Utils.pdf.generate(acknowledgementData);
|
|
8925
8947
|
};
|
|
8926
8948
|
if (isLoading || isDetailsLoading) {
|
|
8927
8949
|
return /*#__PURE__*/React.createElement(Loader, null);
|
|
@@ -8931,25 +8953,34 @@ const CitizenApplicationOverview = () => {
|
|
|
8931
8953
|
}, /*#__PURE__*/React.createElement("div", {
|
|
8932
8954
|
style: {
|
|
8933
8955
|
display: "flex",
|
|
8934
|
-
justifyContent: "
|
|
8956
|
+
justifyContent: "end",
|
|
8935
8957
|
alignItems: "center",
|
|
8936
8958
|
padding: "16px"
|
|
8937
8959
|
}
|
|
8938
|
-
}, /*#__PURE__*/React.createElement(
|
|
8939
|
-
|
|
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, {
|
|
8960
|
+
}, (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, {
|
|
8961
|
+
className: "downLoadButton",
|
|
8943
8962
|
label: t("DOWNLOAD_CERTIFICATE"),
|
|
8944
|
-
style: {
|
|
8945
|
-
color: "#A52A2A"
|
|
8946
|
-
},
|
|
8947
8963
|
onClick: handleDownloadPdf
|
|
8948
|
-
})
|
|
8964
|
+
}), (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, {
|
|
8965
|
+
label: t("COMMON_EDIT"),
|
|
8966
|
+
onSubmit: () => {
|
|
8967
|
+
var _applicationDetails$A7, _applicationDetails$A8;
|
|
8968
|
+
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;
|
|
8969
|
+
history.push(`/digit-ui/citizen/ndc/new-application/${id}`);
|
|
8970
|
+
}
|
|
8971
|
+
}))), /*#__PURE__*/React.createElement(Card, {
|
|
8972
|
+
className: "ndc_card_main"
|
|
8973
|
+
}, /*#__PURE__*/React.createElement(CardSubHeader, {
|
|
8974
|
+
className: "ndc_label"
|
|
8975
|
+
}, 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, {
|
|
8949
8976
|
key: key,
|
|
8950
8977
|
label: t(`${key === null || key === void 0 ? void 0 : key.toUpperCase()}`),
|
|
8951
8978
|
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")
|
|
8952
|
-
}))))), /*#__PURE__*/React.createElement(Card,
|
|
8979
|
+
}))))), /*#__PURE__*/React.createElement(Card, {
|
|
8980
|
+
className: "ndc_card_main"
|
|
8981
|
+
}, /*#__PURE__*/React.createElement(CardSubHeader, {
|
|
8982
|
+
className: "ndc_label"
|
|
8983
|
+
}, 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) => {
|
|
8953
8984
|
var _detail$dueAmount;
|
|
8954
8985
|
return /*#__PURE__*/React.createElement("div", {
|
|
8955
8986
|
key: index,
|
|
@@ -8972,7 +9003,11 @@ const CitizenApplicationOverview = () => {
|
|
|
8972
9003
|
label: t("NDC_PROPERTY_TYPE"),
|
|
8973
9004
|
text: t(detail.propertyType) || detail.propertyType
|
|
8974
9005
|
})));
|
|
8975
|
-
})), /*#__PURE__*/React.createElement(Card,
|
|
9006
|
+
})), /*#__PURE__*/React.createElement(Card, {
|
|
9007
|
+
className: "ndc_card_main"
|
|
9008
|
+
}, /*#__PURE__*/React.createElement(CardSubHeader, {
|
|
9009
|
+
className: "ndc_label"
|
|
9010
|
+
}, t("NDC_APPLICATION_DOCUMENTS_OVERVIEW")), /*#__PURE__*/React.createElement("div", {
|
|
8976
9011
|
style: {
|
|
8977
9012
|
display: "flex",
|
|
8978
9013
|
gap: "16px"
|
|
@@ -8981,13 +9016,17 @@ const CitizenApplicationOverview = () => {
|
|
|
8981
9016
|
value: {
|
|
8982
9017
|
workflowDocs: displayData === null || displayData === void 0 ? void 0 : displayData.Documents
|
|
8983
9018
|
}
|
|
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,
|
|
9019
|
+
}) : /*#__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, {
|
|
9020
|
+
className: "ndc_card_main"
|
|
9021
|
+
}, /*#__PURE__*/React.createElement(CardSubHeader, {
|
|
9022
|
+
className: "ndc_label"
|
|
9023
|
+
}, 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, {
|
|
8985
9024
|
isCompleted: true,
|
|
8986
|
-
label: t(
|
|
9025
|
+
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)
|
|
8987
9026
|
}) : /*#__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, {
|
|
8988
9027
|
keyValue: index,
|
|
8989
9028
|
isCompleted: index === 0,
|
|
8990
|
-
label: t(
|
|
9029
|
+
label: t(checkpoint.status),
|
|
8991
9030
|
customChild: getTimelineCaptions$1(checkpoint, index, arr, t)
|
|
8992
9031
|
})))));
|
|
8993
9032
|
};
|
|
@@ -9518,7 +9557,7 @@ const Inbox = ({
|
|
|
9518
9557
|
}, [data]);
|
|
9519
9558
|
const PropsForInboxLinks = {
|
|
9520
9559
|
logoIcon: /*#__PURE__*/React.createElement(ComplaintIcon, null),
|
|
9521
|
-
headerText: "
|
|
9560
|
+
headerText: `${t("MODULE_NKS_NO_DUE_CERTIFICATE_FEES")}`,
|
|
9522
9561
|
links: [{
|
|
9523
9562
|
text: "Create NDC Application",
|
|
9524
9563
|
link: "/digit-ui/employee/ndc/create"
|
|
@@ -11414,6 +11453,12 @@ const config = [{
|
|
|
11414
11453
|
head: "",
|
|
11415
11454
|
stepNumber: 1,
|
|
11416
11455
|
body: [{
|
|
11456
|
+
name: "NDC_COMMON_NDC_REASON",
|
|
11457
|
+
type: "component",
|
|
11458
|
+
component: "SelectNDCReason",
|
|
11459
|
+
key: "NDCReason",
|
|
11460
|
+
withoutLabel: true
|
|
11461
|
+
}, {
|
|
11417
11462
|
name: "",
|
|
11418
11463
|
type: "component",
|
|
11419
11464
|
component: "NDCPropertySearch",
|
|
@@ -11425,12 +11470,6 @@ const config = [{
|
|
|
11425
11470
|
component: "PropertyDetailsFormCitizen",
|
|
11426
11471
|
key: "PropertyDetails",
|
|
11427
11472
|
withoutLabel: true
|
|
11428
|
-
}, {
|
|
11429
|
-
name: "NDC_COMMON_NDC_REASON",
|
|
11430
|
-
type: "component",
|
|
11431
|
-
component: "SelectNDCReason",
|
|
11432
|
-
key: "NDCReason",
|
|
11433
|
-
withoutLabel: true
|
|
11434
11473
|
}]
|
|
11435
11474
|
}, {
|
|
11436
11475
|
head: "NDC_COMMON_DOCUMENTS_REQUIRED",
|
|
@@ -11505,10 +11544,29 @@ const NewNDCStepForm = () => {
|
|
|
11505
11544
|
const formState = useSelector(state => state.ndc.NDCForm);
|
|
11506
11545
|
const step = formState.step;
|
|
11507
11546
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
11547
|
+
const id = window.location.pathname.split("/").pop();
|
|
11548
|
+
const {
|
|
11549
|
+
isLoading,
|
|
11550
|
+
data: applicationDetails
|
|
11551
|
+
} = Digit.Hooks.ndc.useSearchEmployeeApplication({
|
|
11552
|
+
uuid: id
|
|
11553
|
+
}, tenantId);
|
|
11554
|
+
useEffect(() => {
|
|
11555
|
+
if (applicationDetails !== null && applicationDetails !== void 0 && applicationDetails.Applications.length) {
|
|
11556
|
+
dispatch(updateNDCForm("responseData", applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.Applications));
|
|
11557
|
+
}
|
|
11558
|
+
}, [applicationDetails]);
|
|
11508
11559
|
const setStep = updatedStepNumber => {
|
|
11509
11560
|
dispatch(setNDCStep(updatedStepNumber));
|
|
11510
11561
|
};
|
|
11511
11562
|
const handleSubmit = () => {};
|
|
11563
|
+
useEffect(() => {
|
|
11564
|
+
const unlisten = history.listen(() => {
|
|
11565
|
+
console.log("route changes guys");
|
|
11566
|
+
dispatch(resetNDCForm());
|
|
11567
|
+
});
|
|
11568
|
+
return () => unlisten();
|
|
11569
|
+
}, [history, dispatch]);
|
|
11512
11570
|
return /*#__PURE__*/React.createElement("div", {
|
|
11513
11571
|
className: "pageCard"
|
|
11514
11572
|
}, /*#__PURE__*/React.createElement(CardHeader, {
|
|
@@ -11695,7 +11753,7 @@ const NewNDCStepFormOne = ({
|
|
|
11695
11753
|
if (!(propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.email)) missingFields.push(t("NDC_MESSAGE_EMAIL"));
|
|
11696
11754
|
if (!(NDCReason !== null && NDCReason !== void 0 && NDCReason.code)) missingFields.push(t("NDC_MESSAGE_NDC_REASON"));
|
|
11697
11755
|
const nameRegex = /^[A-Za-z\s]+$/;
|
|
11698
|
-
const emailRegex = /^[
|
|
11756
|
+
const emailRegex = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9-]+\.[a-zA-Z]{2,}$/;
|
|
11699
11757
|
const mobileRegex = /^[6-9]\d{9}$/;
|
|
11700
11758
|
if (propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.firstName && !nameRegex.test(propertyDetails.firstName)) {
|
|
11701
11759
|
invalidFields.push(t("NDC_MESSAGE_FIRST_NAME_ONLY_ALPHABETS_ALLOWED"));
|
|
@@ -11768,6 +11826,10 @@ function SelectNDCReason({
|
|
|
11768
11826
|
const {
|
|
11769
11827
|
t
|
|
11770
11828
|
} = useTranslation();
|
|
11829
|
+
const apiDataCheck = useSelector(state => {
|
|
11830
|
+
var _state$ndc$NDCForm, _state$ndc$NDCForm$fo;
|
|
11831
|
+
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;
|
|
11832
|
+
});
|
|
11771
11833
|
const {
|
|
11772
11834
|
data: menuList,
|
|
11773
11835
|
isLoading
|
|
@@ -11791,6 +11853,18 @@ function SelectNDCReason({
|
|
|
11791
11853
|
useEffect(() => {
|
|
11792
11854
|
onSelect("NDCReason", ndcReason, config);
|
|
11793
11855
|
}, [ndcReason]);
|
|
11856
|
+
useEffect(() => {
|
|
11857
|
+
if (apiDataCheck && (ndcReasonOptions === null || ndcReasonOptions === void 0 ? void 0 : ndcReasonOptions.length) > 0) {
|
|
11858
|
+
const matchedOption = ndcReasonOptions.find(opt => {
|
|
11859
|
+
var _apiDataCheck$;
|
|
11860
|
+
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);
|
|
11861
|
+
});
|
|
11862
|
+
if (matchedOption) {
|
|
11863
|
+
setNDCReason(matchedOption);
|
|
11864
|
+
setValue("NDCReason", matchedOption);
|
|
11865
|
+
}
|
|
11866
|
+
}
|
|
11867
|
+
}, [apiDataCheck, ndcReasonOptions]);
|
|
11794
11868
|
if (isLoading) {
|
|
11795
11869
|
return /*#__PURE__*/React.createElement(Loader, null);
|
|
11796
11870
|
}
|
|
@@ -11802,10 +11876,10 @@ function SelectNDCReason({
|
|
|
11802
11876
|
};
|
|
11803
11877
|
return /*#__PURE__*/React.createElement("div", {
|
|
11804
11878
|
style: {
|
|
11805
|
-
|
|
11879
|
+
paddingBottom: "16px"
|
|
11806
11880
|
}
|
|
11807
11881
|
}, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
11808
|
-
className: "card-label-smaller"
|
|
11882
|
+
className: "card-label-smaller ndc_card_labels"
|
|
11809
11883
|
}, `${t("NDC_NEW_NDC_APPLICATION_NDC_REASON")} * `), /*#__PURE__*/React.createElement(Controller, {
|
|
11810
11884
|
name: "NDCReason",
|
|
11811
11885
|
rules: {
|
|
@@ -11819,6 +11893,7 @@ function SelectNDCReason({
|
|
|
11819
11893
|
option: ndcReasonOptions,
|
|
11820
11894
|
select: e => {
|
|
11821
11895
|
setNDCReason(e);
|
|
11896
|
+
props.onChange(e);
|
|
11822
11897
|
},
|
|
11823
11898
|
optionKey: "i18nKey",
|
|
11824
11899
|
onBlur: props.onBlur,
|
|
@@ -11837,7 +11912,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
11837
11912
|
formState,
|
|
11838
11913
|
clearErrors
|
|
11839
11914
|
}) => {
|
|
11840
|
-
var _formData$cpt, _formData$cpt$details, _formData$cpt3, _Digit, _Digit$ComponentRegis, _formData$
|
|
11915
|
+
var _formData$cpt, _formData$cpt$details, _formData$cpt3, _Digit, _Digit$ComponentRegis, _formData$cpt6, _formData$cpt6$detail, _formData$cpt7, _apiDataCheck$6, _propertyDetails$wate, _propertyDetails$sewe;
|
|
11841
11916
|
const {
|
|
11842
11917
|
control,
|
|
11843
11918
|
formState: localFormState,
|
|
@@ -11850,6 +11925,10 @@ const PropertyDetailsForm$1 = ({
|
|
|
11850
11925
|
t
|
|
11851
11926
|
} = useTranslation();
|
|
11852
11927
|
const tenantId = window.location.href.includes("citizen") ? window.localStorage.getItem("CITIZEN.CITY") : window.localStorage.getItem("Employee.tenant-id");
|
|
11928
|
+
const apiDataCheck = useSelector(state => {
|
|
11929
|
+
var _state$ndc$NDCForm, _state$ndc$NDCForm$fo;
|
|
11930
|
+
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;
|
|
11931
|
+
});
|
|
11853
11932
|
const [showToast, setShowToast] = useState(null);
|
|
11854
11933
|
const [propertyLoader, setPropertyLoader] = useState(false);
|
|
11855
11934
|
const [showPayModal, setShowPayModal] = useState(false);
|
|
@@ -11918,39 +11997,63 @@ const PropertyDetailsForm$1 = ({
|
|
|
11918
11997
|
});
|
|
11919
11998
|
}, [formData === null || formData === void 0 ? void 0 : (_formData$cpt3 = formData.cpt) === null || _formData$cpt3 === void 0 ? void 0 : _formData$cpt3.details]);
|
|
11920
11999
|
useEffect(() => {
|
|
11921
|
-
var
|
|
11922
|
-
|
|
11923
|
-
|
|
11924
|
-
|
|
11925
|
-
|
|
11926
|
-
|
|
11927
|
-
|
|
11928
|
-
|
|
11929
|
-
|
|
11930
|
-
|
|
11931
|
-
|
|
11932
|
-
|
|
11933
|
-
}
|
|
11934
|
-
|
|
12000
|
+
var _apiDataCheck$;
|
|
12001
|
+
let waterConnection;
|
|
12002
|
+
if (apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$ = apiDataCheck[0]) !== null && _apiDataCheck$ !== void 0 && _apiDataCheck$.NdcDetails) {
|
|
12003
|
+
var _apiDataCheck$2;
|
|
12004
|
+
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 => {
|
|
12005
|
+
return item.businessService == "WS";
|
|
12006
|
+
});
|
|
12007
|
+
waterConnection = (resData === null || resData === void 0 ? void 0 : resData.map(item => ({
|
|
12008
|
+
connectionNo: item === null || item === void 0 ? void 0 : item.consumerCode,
|
|
12009
|
+
isEdit: false,
|
|
12010
|
+
billData: {
|
|
12011
|
+
totalAmount: 0
|
|
12012
|
+
},
|
|
12013
|
+
isLoading: false
|
|
12014
|
+
}))) || [];
|
|
12015
|
+
} else {
|
|
12016
|
+
waterConnection = (waterConnectionData === null || waterConnectionData === void 0 ? void 0 : waterConnectionData.map(item => ({
|
|
12017
|
+
connectionNo: item === null || item === void 0 ? void 0 : item.connectionNo,
|
|
12018
|
+
isEdit: false,
|
|
12019
|
+
billData: {},
|
|
12020
|
+
isLoading: false
|
|
12021
|
+
}))) || [];
|
|
11935
12022
|
}
|
|
11936
|
-
|
|
12023
|
+
setPropertyDetails(prev => ({
|
|
12024
|
+
...prev,
|
|
12025
|
+
waterConnection
|
|
12026
|
+
}));
|
|
12027
|
+
}, [waterConnectionData, apiDataCheck]);
|
|
11937
12028
|
useEffect(() => {
|
|
11938
|
-
var
|
|
11939
|
-
|
|
11940
|
-
|
|
11941
|
-
|
|
11942
|
-
|
|
11943
|
-
|
|
11944
|
-
|
|
11945
|
-
|
|
11946
|
-
|
|
11947
|
-
|
|
11948
|
-
|
|
11949
|
-
|
|
11950
|
-
}
|
|
11951
|
-
|
|
12029
|
+
var _apiDataCheck$3;
|
|
12030
|
+
let sewerageConnection;
|
|
12031
|
+
if (apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$3 = apiDataCheck[0]) !== null && _apiDataCheck$3 !== void 0 && _apiDataCheck$3.NdcDetails) {
|
|
12032
|
+
var _apiDataCheck$4;
|
|
12033
|
+
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 => {
|
|
12034
|
+
return item.businessService == "SW";
|
|
12035
|
+
});
|
|
12036
|
+
sewerageConnection = (resData === null || resData === void 0 ? void 0 : resData.map(item => ({
|
|
12037
|
+
connectionNo: item === null || item === void 0 ? void 0 : item.consumerCode,
|
|
12038
|
+
isEdit: false,
|
|
12039
|
+
billData: {
|
|
12040
|
+
totalAmount: 0
|
|
12041
|
+
},
|
|
12042
|
+
isLoading: false
|
|
12043
|
+
}))) || [];
|
|
12044
|
+
} else {
|
|
12045
|
+
sewerageConnection = (sewerageConnectionData === null || sewerageConnectionData === void 0 ? void 0 : sewerageConnectionData.map(item => ({
|
|
12046
|
+
connectionNo: item === null || item === void 0 ? void 0 : item.connectionNo,
|
|
12047
|
+
isEdit: false,
|
|
12048
|
+
billData: {},
|
|
12049
|
+
isLoading: false
|
|
12050
|
+
}))) || [];
|
|
11952
12051
|
}
|
|
11953
|
-
|
|
12052
|
+
setPropertyDetails(prev => ({
|
|
12053
|
+
...prev,
|
|
12054
|
+
sewerageConnection
|
|
12055
|
+
}));
|
|
12056
|
+
}, [sewerageConnectionData, apiDataCheck]);
|
|
11954
12057
|
useEffect(() => {
|
|
11955
12058
|
onSelect("PropertyDetails", propertyDetails, config);
|
|
11956
12059
|
}, [propertyDetails]);
|
|
@@ -12005,7 +12108,6 @@ const PropertyDetailsForm$1 = ({
|
|
|
12005
12108
|
consumerCode: consumercodes
|
|
12006
12109
|
});
|
|
12007
12110
|
setPropertyLoader(false);
|
|
12008
|
-
console.log("result======???????", result);
|
|
12009
12111
|
if ((result === null || result === void 0 ? void 0 : (_result$Bill = result.Bill) === null || _result$Bill === void 0 ? void 0 : _result$Bill.length) > 0) {
|
|
12010
12112
|
var _result$Bill$;
|
|
12011
12113
|
if ((result === null || result === void 0 ? void 0 : (_result$Bill$ = result.Bill[0]) === null || _result$Bill$ === void 0 ? void 0 : _result$Bill$.totalAmount) > 0) {
|
|
@@ -12047,10 +12149,6 @@ const PropertyDetailsForm$1 = ({
|
|
|
12047
12149
|
}));
|
|
12048
12150
|
}
|
|
12049
12151
|
} 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
|
-
});
|
|
12054
12152
|
if (bussinessService === "WS") {
|
|
12055
12153
|
const updated = [...propertyDetails.waterConnection];
|
|
12056
12154
|
updated[index].billData = {
|
|
@@ -12061,6 +12159,10 @@ const PropertyDetailsForm$1 = ({
|
|
|
12061
12159
|
...prev,
|
|
12062
12160
|
waterConnection: updated
|
|
12063
12161
|
}));
|
|
12162
|
+
setShowToast({
|
|
12163
|
+
error: false,
|
|
12164
|
+
label: t("NDC_NO_BILLS_FOUND_WS")
|
|
12165
|
+
});
|
|
12064
12166
|
} else if (bussinessService === "SW") {
|
|
12065
12167
|
const updated = [...propertyDetails.sewerageConnection];
|
|
12066
12168
|
updated[index].billData = {
|
|
@@ -12071,6 +12173,10 @@ const PropertyDetailsForm$1 = ({
|
|
|
12071
12173
|
...prev,
|
|
12072
12174
|
sewerageConnection: updated
|
|
12073
12175
|
}));
|
|
12176
|
+
setShowToast({
|
|
12177
|
+
error: false,
|
|
12178
|
+
label: t("NDC_NO_BILLS_FOUND_SW")
|
|
12179
|
+
});
|
|
12074
12180
|
} else if (bussinessService === "PT") {
|
|
12075
12181
|
let updated = {
|
|
12076
12182
|
...propertyDetails.propertyBillData
|
|
@@ -12080,12 +12186,12 @@ const PropertyDetailsForm$1 = ({
|
|
|
12080
12186
|
...prev,
|
|
12081
12187
|
propertyBillData: updated
|
|
12082
12188
|
}));
|
|
12189
|
+
setShowToast({
|
|
12190
|
+
error: false,
|
|
12191
|
+
label: t("NDC_NO_BILLS_FOUND_PROPERTY")
|
|
12192
|
+
});
|
|
12083
12193
|
}
|
|
12084
12194
|
} else {
|
|
12085
|
-
setShowToast({
|
|
12086
|
-
error: false,
|
|
12087
|
-
label: t("NDC_MESSAGE_NO_BILLS_FOUND_FOR_THIS_CONSUMER_NUMBER")
|
|
12088
|
-
});
|
|
12089
12195
|
if (bussinessService === "WS") {
|
|
12090
12196
|
const updated = [...propertyDetails.waterConnection];
|
|
12091
12197
|
updated[index].isLoading = false;
|
|
@@ -12096,6 +12202,10 @@ const PropertyDetailsForm$1 = ({
|
|
|
12096
12202
|
...prev,
|
|
12097
12203
|
waterConnection: updated
|
|
12098
12204
|
}));
|
|
12205
|
+
setShowToast({
|
|
12206
|
+
error: false,
|
|
12207
|
+
label: t("NDC_NO_BILLS_FOUND_WS")
|
|
12208
|
+
});
|
|
12099
12209
|
} else if (bussinessService === "SW") {
|
|
12100
12210
|
const updated = [...propertyDetails.sewerageConnection];
|
|
12101
12211
|
updated[index].isLoading = false;
|
|
@@ -12106,6 +12216,10 @@ const PropertyDetailsForm$1 = ({
|
|
|
12106
12216
|
...prev,
|
|
12107
12217
|
sewerageConnection: updated
|
|
12108
12218
|
}));
|
|
12219
|
+
setShowToast({
|
|
12220
|
+
error: false,
|
|
12221
|
+
label: t("NDC_NO_BILLS_FOUND_SW")
|
|
12222
|
+
});
|
|
12109
12223
|
} else if (bussinessService === "PT") {
|
|
12110
12224
|
let updated = {
|
|
12111
12225
|
...propertyDetails.propertyBillData
|
|
@@ -12115,6 +12229,10 @@ const PropertyDetailsForm$1 = ({
|
|
|
12115
12229
|
...prev,
|
|
12116
12230
|
propertyBillData: updated
|
|
12117
12231
|
}));
|
|
12232
|
+
setShowToast({
|
|
12233
|
+
error: false,
|
|
12234
|
+
label: t("NDC_NO_BILLS_FOUND_PROPERTY")
|
|
12235
|
+
});
|
|
12118
12236
|
}
|
|
12119
12237
|
}
|
|
12120
12238
|
} catch (error) {
|
|
@@ -12186,16 +12304,48 @@ const PropertyDetailsForm$1 = ({
|
|
|
12186
12304
|
}
|
|
12187
12305
|
}
|
|
12188
12306
|
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");
|
|
12307
|
+
useEffect(() => {
|
|
12308
|
+
if (showToast) {
|
|
12309
|
+
const timer = setTimeout(() => {
|
|
12310
|
+
setShowToast(null);
|
|
12311
|
+
}, 3000);
|
|
12312
|
+
return () => clearTimeout(timer);
|
|
12313
|
+
}
|
|
12314
|
+
}, [showToast]);
|
|
12315
|
+
useEffect(() => {
|
|
12316
|
+
if (apiDataCheck) {
|
|
12317
|
+
var _apiDataCheck$5, _apiDataCheck$5$owner, _apiDataCheck$5$owner2;
|
|
12318
|
+
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) || "";
|
|
12319
|
+
setValue("email", apiEmail);
|
|
12320
|
+
setPropertyDetails(prev => ({
|
|
12321
|
+
...prev,
|
|
12322
|
+
email: apiEmail
|
|
12323
|
+
}));
|
|
12324
|
+
}
|
|
12325
|
+
}, [apiDataCheck]);
|
|
12326
|
+
useEffect(() => {
|
|
12327
|
+
var _formData$cpt4, _formData$cpt4$detail;
|
|
12328
|
+
if (formData !== null && formData !== void 0 && (_formData$cpt4 = formData.cpt) !== null && _formData$cpt4 !== void 0 && (_formData$cpt4$detail = _formData$cpt4.details) !== null && _formData$cpt4$detail !== void 0 && _formData$cpt4$detail.owners) {
|
|
12329
|
+
var _formData$cpt5, _formData$cpt5$detail, _formData$cpt5$detail2, _formData$cpt5$detail3;
|
|
12330
|
+
const formDataEmail = formData === null || formData === void 0 ? void 0 : (_formData$cpt5 = formData.cpt) === null || _formData$cpt5 === void 0 ? void 0 : (_formData$cpt5$detail = _formData$cpt5.details) === null || _formData$cpt5$detail === void 0 ? void 0 : (_formData$cpt5$detail2 = _formData$cpt5$detail.owners) === null || _formData$cpt5$detail2 === void 0 ? void 0 : (_formData$cpt5$detail3 = _formData$cpt5$detail2[0]) === null || _formData$cpt5$detail3 === void 0 ? void 0 : _formData$cpt5$detail3.emailId;
|
|
12331
|
+
setValue("email", formDataEmail);
|
|
12332
|
+
setPropertyDetails(prev => ({
|
|
12333
|
+
...prev,
|
|
12334
|
+
email: formDataEmail
|
|
12335
|
+
}));
|
|
12336
|
+
}
|
|
12337
|
+
}, [formData === null || formData === void 0 ? void 0 : (_formData$cpt6 = formData.cpt) === null || _formData$cpt6 === void 0 ? void 0 : (_formData$cpt6$detail = _formData$cpt6.details) === null || _formData$cpt6$detail === void 0 ? void 0 : _formData$cpt6$detail.owners]);
|
|
12338
|
+
console.log("propertyDetails====", propertyDetails, formData);
|
|
12189
12339
|
return /*#__PURE__*/React.createElement("div", {
|
|
12190
12340
|
style: {
|
|
12191
12341
|
marginBottom: "16px"
|
|
12192
12342
|
}
|
|
12193
|
-
}, (formData === null || formData === void 0 ? void 0 : (_formData$
|
|
12343
|
+
}, ((formData === null || formData === void 0 ? void 0 : (_formData$cpt7 = formData.cpt) === null || _formData$cpt7 === void 0 ? void 0 : _formData$cpt7.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, {
|
|
12194
12344
|
style: {
|
|
12195
12345
|
marginTop: "40px"
|
|
12196
12346
|
}
|
|
12197
12347
|
}, /*#__PURE__*/React.createElement(CardLabel, {
|
|
12198
|
-
className: "card-label-smaller"
|
|
12348
|
+
className: "card-label-smaller ndc_card_labels"
|
|
12199
12349
|
}, `${t("NDC_WATER_CONNECTION")}`), waterConnectionLoading ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement("div", {
|
|
12200
12350
|
className: "field",
|
|
12201
12351
|
style: {
|
|
@@ -12205,7 +12355,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12205
12355
|
width: "100%"
|
|
12206
12356
|
}
|
|
12207
12357
|
}, propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$wate = propertyDetails.waterConnection) === null || _propertyDetails$wate === void 0 ? void 0 : _propertyDetails$wate.map((item, index) => {
|
|
12208
|
-
var _item$billData, _item$billData2, _item$billData3, _item$billData4;
|
|
12358
|
+
var _apiDataCheck$7, _item$billData, _item$billData2, _item$billData3, _item$billData4;
|
|
12209
12359
|
return /*#__PURE__*/React.createElement("div", {
|
|
12210
12360
|
className: "ndc_property_search",
|
|
12211
12361
|
key: index,
|
|
@@ -12246,7 +12396,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12246
12396
|
alignItems: "center",
|
|
12247
12397
|
gap: "12px"
|
|
12248
12398
|
}
|
|
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", {
|
|
12399
|
+
}, !(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", {
|
|
12250
12400
|
className: "submit-bar",
|
|
12251
12401
|
type: "button",
|
|
12252
12402
|
style: {
|
|
@@ -12303,7 +12453,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12303
12453
|
marginTop: "40px"
|
|
12304
12454
|
}
|
|
12305
12455
|
}, /*#__PURE__*/React.createElement(CardLabel, {
|
|
12306
|
-
className: "card-label-smaller"
|
|
12456
|
+
className: "card-label-smaller ndc_card_labels"
|
|
12307
12457
|
}, `${t("NDC_SEWERAGE_CONNECTION")} `), sewerageConnectionLoading ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement("div", {
|
|
12308
12458
|
className: "field",
|
|
12309
12459
|
style: {
|
|
@@ -12313,7 +12463,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12313
12463
|
width: "100%"
|
|
12314
12464
|
}
|
|
12315
12465
|
}, propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$sewe = propertyDetails.sewerageConnection) === null || _propertyDetails$sewe === void 0 ? void 0 : _propertyDetails$sewe.map((item, index) => {
|
|
12316
|
-
var _item$billData5, _item$billData6, _item$billData7, _item$billData8;
|
|
12466
|
+
var _apiDataCheck$8, _item$billData5, _item$billData6, _item$billData7, _item$billData8;
|
|
12317
12467
|
return /*#__PURE__*/React.createElement("div", {
|
|
12318
12468
|
className: "ndc_property_search",
|
|
12319
12469
|
key: index,
|
|
@@ -12354,7 +12504,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12354
12504
|
alignItems: "center",
|
|
12355
12505
|
gap: "12px"
|
|
12356
12506
|
}
|
|
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", {
|
|
12507
|
+
}, !(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", {
|
|
12358
12508
|
className: "submit-bar",
|
|
12359
12509
|
type: "button",
|
|
12360
12510
|
style: {
|
|
@@ -12411,7 +12561,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12411
12561
|
marginTop: "40px"
|
|
12412
12562
|
}
|
|
12413
12563
|
}, /*#__PURE__*/React.createElement(CardLabel, {
|
|
12414
|
-
className: "card-label-smaller"
|
|
12564
|
+
className: "card-label-smaller ndc_card_labels"
|
|
12415
12565
|
}, `${t("NDC_FIRST_NAME")} * `), /*#__PURE__*/React.createElement("div", {
|
|
12416
12566
|
className: "field"
|
|
12417
12567
|
}, /*#__PURE__*/React.createElement(Controller, {
|
|
@@ -12425,7 +12575,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12425
12575
|
}
|
|
12426
12576
|
},
|
|
12427
12577
|
render: props => {
|
|
12428
|
-
var _formData$
|
|
12578
|
+
var _formData$cpt8, _formData$cpt8$detail, _formData$cpt8$detail2, _formData$cpt8$detail3, _formData$cpt8$detail4, _formData$cpt8$detail5, _formData$cpt8$detail6;
|
|
12429
12579
|
return /*#__PURE__*/React.createElement(TextInput, {
|
|
12430
12580
|
value: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.firstName) || "",
|
|
12431
12581
|
onChange: e => {
|
|
@@ -12438,11 +12588,11 @@ const PropertyDetailsForm$1 = ({
|
|
|
12438
12588
|
onBlur: e => {
|
|
12439
12589
|
props.onBlur(e);
|
|
12440
12590
|
},
|
|
12441
|
-
disabled: (formData === null || formData === void 0 ? void 0 : (_formData$
|
|
12591
|
+
disabled: (formData === null || formData === void 0 ? void 0 : (_formData$cpt8 = formData.cpt) === null || _formData$cpt8 === void 0 ? void 0 : (_formData$cpt8$detail = _formData$cpt8.details) === null || _formData$cpt8$detail === void 0 ? void 0 : (_formData$cpt8$detail2 = _formData$cpt8$detail.owners) === null || _formData$cpt8$detail2 === void 0 ? void 0 : (_formData$cpt8$detail3 = _formData$cpt8$detail2[0]) === null || _formData$cpt8$detail3 === void 0 ? void 0 : (_formData$cpt8$detail4 = _formData$cpt8$detail3.name) === null || _formData$cpt8$detail4 === void 0 ? void 0 : (_formData$cpt8$detail5 = _formData$cpt8$detail4.split(" ")) === null || _formData$cpt8$detail5 === void 0 ? void 0 : (_formData$cpt8$detail6 = _formData$cpt8$detail5[0]) === null || _formData$cpt8$detail6 === void 0 ? void 0 : _formData$cpt8$detail6.length) > 0
|
|
12442
12592
|
});
|
|
12443
12593
|
}
|
|
12444
12594
|
}))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
12445
|
-
className: "card-label-smaller"
|
|
12595
|
+
className: "card-label-smaller ndc_card_labels"
|
|
12446
12596
|
}, `${t("NDC_LAST_NAME")} * `), /*#__PURE__*/React.createElement("div", {
|
|
12447
12597
|
className: "field"
|
|
12448
12598
|
}, /*#__PURE__*/React.createElement(Controller, {
|
|
@@ -12456,7 +12606,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12456
12606
|
}
|
|
12457
12607
|
},
|
|
12458
12608
|
render: props => {
|
|
12459
|
-
var _formData$
|
|
12609
|
+
var _formData$cpt9, _formData$cpt9$detail, _formData$cpt9$detail2, _formData$cpt9$detail3, _formData$cpt9$detail4, _formData$cpt9$detail5, _formData$cpt9$detail6;
|
|
12460
12610
|
return /*#__PURE__*/React.createElement(TextInput, {
|
|
12461
12611
|
value: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.lastName) || "",
|
|
12462
12612
|
onChange: e => {
|
|
@@ -12469,21 +12619,21 @@ const PropertyDetailsForm$1 = ({
|
|
|
12469
12619
|
onBlur: e => {
|
|
12470
12620
|
props.onBlur(e);
|
|
12471
12621
|
},
|
|
12472
|
-
disabled: (formData === null || formData === void 0 ? void 0 : (_formData$
|
|
12622
|
+
disabled: (formData === null || formData === void 0 ? void 0 : (_formData$cpt9 = formData.cpt) === null || _formData$cpt9 === void 0 ? void 0 : (_formData$cpt9$detail = _formData$cpt9.details) === null || _formData$cpt9$detail === void 0 ? void 0 : (_formData$cpt9$detail2 = _formData$cpt9$detail.owners) === null || _formData$cpt9$detail2 === void 0 ? void 0 : (_formData$cpt9$detail3 = _formData$cpt9$detail2[0]) === null || _formData$cpt9$detail3 === void 0 ? void 0 : (_formData$cpt9$detail4 = _formData$cpt9$detail3.name) === null || _formData$cpt9$detail4 === void 0 ? void 0 : (_formData$cpt9$detail5 = _formData$cpt9$detail4.split(" ")) === null || _formData$cpt9$detail5 === void 0 ? void 0 : (_formData$cpt9$detail6 = _formData$cpt9$detail5[1]) === null || _formData$cpt9$detail6 === void 0 ? void 0 : _formData$cpt9$detail6.length) > 0
|
|
12473
12623
|
});
|
|
12474
12624
|
}
|
|
12475
12625
|
}))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
12476
|
-
className: "card-label-smaller"
|
|
12626
|
+
className: "card-label-smaller ndc_card_labels"
|
|
12477
12627
|
}, `${t("NDC_EMAIL")} * `), /*#__PURE__*/React.createElement("div", {
|
|
12478
12628
|
className: "field"
|
|
12479
12629
|
}, /*#__PURE__*/React.createElement(Controller, {
|
|
12480
12630
|
control: control,
|
|
12481
12631
|
name: "email",
|
|
12482
|
-
defaultValue:
|
|
12632
|
+
defaultValue: propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.email,
|
|
12483
12633
|
render: props => {
|
|
12484
|
-
var _formData$
|
|
12634
|
+
var _formData$cpt0, _formData$cpt0$detail, _formData$cpt0$detail2, _formData$cpt0$detail3;
|
|
12485
12635
|
return /*#__PURE__*/React.createElement(TextInput, {
|
|
12486
|
-
value:
|
|
12636
|
+
value: props === null || props === void 0 ? void 0 : props.value,
|
|
12487
12637
|
onChange: e => {
|
|
12488
12638
|
setPropertyDetails(prev => ({
|
|
12489
12639
|
...prev,
|
|
@@ -12494,11 +12644,11 @@ const PropertyDetailsForm$1 = ({
|
|
|
12494
12644
|
onBlur: e => {
|
|
12495
12645
|
props.onBlur(e);
|
|
12496
12646
|
},
|
|
12497
|
-
disabled:
|
|
12647
|
+
disabled: formData === null || formData === void 0 ? void 0 : (_formData$cpt0 = formData.cpt) === null || _formData$cpt0 === void 0 ? void 0 : (_formData$cpt0$detail = _formData$cpt0.details) === null || _formData$cpt0$detail === void 0 ? void 0 : (_formData$cpt0$detail2 = _formData$cpt0$detail.owners) === null || _formData$cpt0$detail2 === void 0 ? void 0 : (_formData$cpt0$detail3 = _formData$cpt0$detail2[0]) === null || _formData$cpt0$detail3 === void 0 ? void 0 : _formData$cpt0$detail3.emailId
|
|
12498
12648
|
});
|
|
12499
12649
|
}
|
|
12500
12650
|
}))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
12501
|
-
className: "card-label-smaller"
|
|
12651
|
+
className: "card-label-smaller ndc_card_labels"
|
|
12502
12652
|
}, `${t("NDC_MOBILE_NUMBER")} * `), /*#__PURE__*/React.createElement("div", {
|
|
12503
12653
|
className: "field"
|
|
12504
12654
|
}, /*#__PURE__*/React.createElement(Controller, {
|
|
@@ -12519,7 +12669,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12519
12669
|
}
|
|
12520
12670
|
})
|
|
12521
12671
|
}))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
12522
|
-
className: "card-label-smaller"
|
|
12672
|
+
className: "card-label-smaller ndc_card_labels"
|
|
12523
12673
|
}, `${t("NDC_ADDRESS")} * `), /*#__PURE__*/React.createElement("div", {
|
|
12524
12674
|
className: "field"
|
|
12525
12675
|
}, /*#__PURE__*/React.createElement(Controller, {
|
|
@@ -12527,7 +12677,7 @@ const PropertyDetailsForm$1 = ({
|
|
|
12527
12677
|
name: "address",
|
|
12528
12678
|
defaultValue: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.address) || "",
|
|
12529
12679
|
render: props => {
|
|
12530
|
-
var _formData$
|
|
12680
|
+
var _formData$cpt1, _formData$cpt1$detail, _formData$cpt1$detail2, _formData$cpt1$detail3, _formData$cpt1$detail4;
|
|
12531
12681
|
return /*#__PURE__*/React.createElement(TextInput, {
|
|
12532
12682
|
value: propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.address,
|
|
12533
12683
|
onChange: e => {
|
|
@@ -12540,11 +12690,11 @@ const PropertyDetailsForm$1 = ({
|
|
|
12540
12690
|
onBlur: e => {
|
|
12541
12691
|
props.onBlur(e);
|
|
12542
12692
|
},
|
|
12543
|
-
disabled: (formData === null || formData === void 0 ? void 0 : (_formData$
|
|
12693
|
+
disabled: (formData === null || formData === void 0 ? void 0 : (_formData$cpt1 = formData.cpt) === null || _formData$cpt1 === void 0 ? void 0 : (_formData$cpt1$detail = _formData$cpt1.details) === null || _formData$cpt1$detail === void 0 ? void 0 : (_formData$cpt1$detail2 = _formData$cpt1$detail.owners) === null || _formData$cpt1$detail2 === void 0 ? void 0 : (_formData$cpt1$detail3 = _formData$cpt1$detail2[0]) === null || _formData$cpt1$detail3 === void 0 ? void 0 : (_formData$cpt1$detail4 = _formData$cpt1$detail3.permanentAddress) === null || _formData$cpt1$detail4 === void 0 ? void 0 : _formData$cpt1$detail4.length) > 0
|
|
12544
12694
|
});
|
|
12545
12695
|
}
|
|
12546
12696
|
})))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
12547
|
-
className: "card-label-smaller"
|
|
12697
|
+
className: "card-label-smaller ndc_card_labels"
|
|
12548
12698
|
}, `${t("NDC_TL_NUMBER")}`), /*#__PURE__*/React.createElement("div", {
|
|
12549
12699
|
className: "field"
|
|
12550
12700
|
}, /*#__PURE__*/React.createElement(Controller, {
|
|
@@ -12586,23 +12736,30 @@ const PropertySearchNSummary = ({
|
|
|
12586
12736
|
onSelect,
|
|
12587
12737
|
formData
|
|
12588
12738
|
}) => {
|
|
12589
|
-
var _formData$cpt, _formData$cpt2, _propertyDetails$Prop3,
|
|
12739
|
+
var _apiDataCheck$, _apiDataCheck$$NdcDet, _formData$cpt, _formData$cpt2, _propertyDetails$Prop3, _apiDataCheck$2, _formData$cpt13, _formData$cpt13$dues;
|
|
12590
12740
|
const {
|
|
12591
12741
|
t
|
|
12592
12742
|
} = useTranslation();
|
|
12593
12743
|
const myElementRef = useRef(null);
|
|
12744
|
+
const dispatch = useDispatch();
|
|
12594
12745
|
let {
|
|
12595
12746
|
pathname,
|
|
12596
12747
|
state
|
|
12597
12748
|
} = useLocation();
|
|
12598
12749
|
state = state && (typeof state === "string" || state instanceof String) ? JSON.parse(state) : state;
|
|
12750
|
+
const apiDataCheck = useSelector(state => {
|
|
12751
|
+
var _state$ndc$NDCForm, _state$ndc$NDCForm$fo;
|
|
12752
|
+
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;
|
|
12753
|
+
});
|
|
12599
12754
|
const isEditScreen = pathname.includes("/modify-application/");
|
|
12600
12755
|
const tenantId = window.location.href.includes("employee") ? Digit.ULBService.getCurrentPermanentCity() : localStorage.getItem("CITIZEN.CITY");
|
|
12601
12756
|
const search = useLocation().search;
|
|
12602
12757
|
const urlPropertyId = new URLSearchParams(search).get("propertyId");
|
|
12603
12758
|
const isfirstRender = useRef(true);
|
|
12604
|
-
const
|
|
12605
|
-
|
|
12759
|
+
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");
|
|
12760
|
+
console.log("ptFromApi", ptFromApi);
|
|
12761
|
+
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) || "");
|
|
12762
|
+
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) || "");
|
|
12606
12763
|
const [showToast, setShowToast] = useState(null);
|
|
12607
12764
|
const [propertyDetails, setPropertyDetails] = useState(() => {
|
|
12608
12765
|
var _formData$cpt3, _formData$cpt4;
|
|
@@ -12635,6 +12792,9 @@ const PropertySearchNSummary = ({
|
|
|
12635
12792
|
}
|
|
12636
12793
|
});
|
|
12637
12794
|
const [isSearchClicked, setIsSearchClicked] = useState(false);
|
|
12795
|
+
const [getNoDue, setNoDue] = useState(false);
|
|
12796
|
+
const [getCheckStatus, setCheckStats] = useState(false);
|
|
12797
|
+
const [getPayDuesButton, setPayDuesButton] = useState(false);
|
|
12638
12798
|
const {
|
|
12639
12799
|
isLoading,
|
|
12640
12800
|
isError,
|
|
@@ -12653,11 +12813,25 @@ const PropertySearchNSummary = ({
|
|
|
12653
12813
|
enabled: searchPropertyId ? true : false,
|
|
12654
12814
|
privacy: Digit.Utils.getPrivacyObject()
|
|
12655
12815
|
});
|
|
12816
|
+
console.log("apiDataCheck", apiDataCheck);
|
|
12817
|
+
useEffect(() => {
|
|
12818
|
+
if (ptFromApi !== null && ptFromApi !== void 0 && ptFromApi.consumerCode) {
|
|
12819
|
+
setIsSearchClicked(true);
|
|
12820
|
+
setPropertyId(ptFromApi.consumerCode);
|
|
12821
|
+
setSearchPropertyId(ptFromApi.consumerCode);
|
|
12822
|
+
setNoDue(true);
|
|
12823
|
+
onSelect(config.key, {
|
|
12824
|
+
...formData[config.key],
|
|
12825
|
+
id: ptFromApi.consumerCode
|
|
12826
|
+
});
|
|
12827
|
+
}
|
|
12828
|
+
}, [ptFromApi]);
|
|
12656
12829
|
useEffect(() => {
|
|
12657
12830
|
var _propertyDetailsFetch;
|
|
12658
12831
|
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) {
|
|
12659
12832
|
setPropertyDetails(propertyDetailsFetch);
|
|
12660
12833
|
setShowToast(null);
|
|
12834
|
+
setCheckStats(true);
|
|
12661
12835
|
} else {
|
|
12662
12836
|
var _formData$cpt9;
|
|
12663
12837
|
if (isfirstRender.current) {
|
|
@@ -12665,7 +12839,6 @@ const PropertySearchNSummary = ({
|
|
|
12665
12839
|
return;
|
|
12666
12840
|
}
|
|
12667
12841
|
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);
|
|
12669
12842
|
setPropertyDetails({});
|
|
12670
12843
|
setShowToast({
|
|
12671
12844
|
error: true,
|
|
@@ -12680,7 +12853,6 @@ const PropertySearchNSummary = ({
|
|
|
12680
12853
|
useEffect(() => {
|
|
12681
12854
|
var _propertyDetails$Prop;
|
|
12682
12855
|
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);
|
|
12684
12856
|
setShowToast({
|
|
12685
12857
|
error: true,
|
|
12686
12858
|
label: "PT_ENTER_VALID_PROPERTY_ID"
|
|
@@ -12720,6 +12892,9 @@ const PropertySearchNSummary = ({
|
|
|
12720
12892
|
setPropertyId(e.target.value);
|
|
12721
12893
|
setValue(e.target.value, propertyIdInput.name);
|
|
12722
12894
|
setIsSearchClicked(false);
|
|
12895
|
+
setNoDue(false);
|
|
12896
|
+
setCheckStats(false);
|
|
12897
|
+
setPayDuesButton(false);
|
|
12723
12898
|
};
|
|
12724
12899
|
if (isEditScreen) {
|
|
12725
12900
|
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
@@ -12748,9 +12923,6 @@ const PropertySearchNSummary = ({
|
|
|
12748
12923
|
[input]: value
|
|
12749
12924
|
});
|
|
12750
12925
|
}
|
|
12751
|
-
function getValue(input) {
|
|
12752
|
-
return formData && formData[config.key] ? formData[config.key][input] : undefined;
|
|
12753
|
-
}
|
|
12754
12926
|
async function fetchBill() {
|
|
12755
12927
|
try {
|
|
12756
12928
|
var _formData$cpt0, _result$Bill;
|
|
@@ -12765,11 +12937,14 @@ const PropertySearchNSummary = ({
|
|
|
12765
12937
|
error: true,
|
|
12766
12938
|
label: t("NDC_MESSAGE_DUES_FOUND_PLEASE_PAY")
|
|
12767
12939
|
});
|
|
12940
|
+
setPayDuesButton(true);
|
|
12768
12941
|
} else {
|
|
12769
12942
|
setShowToast({
|
|
12770
12943
|
error: false,
|
|
12771
|
-
label: t("
|
|
12944
|
+
label: t("NDC_NO_BILLS_FOUND_PROPERTY")
|
|
12772
12945
|
});
|
|
12946
|
+
setNoDue(true);
|
|
12947
|
+
setCheckStats(false);
|
|
12773
12948
|
}
|
|
12774
12949
|
setPropertyDues({
|
|
12775
12950
|
dues: result === null || result === void 0 ? void 0 : result.Bill[0]
|
|
@@ -12777,23 +12952,27 @@ const PropertySearchNSummary = ({
|
|
|
12777
12952
|
} else if (result !== null && result !== void 0 && result.Bill) {
|
|
12778
12953
|
setShowToast({
|
|
12779
12954
|
error: false,
|
|
12780
|
-
label: t("
|
|
12955
|
+
label: t("NDC_NO_BILLS_FOUND_PROPERTY")
|
|
12781
12956
|
});
|
|
12782
12957
|
setPropertyDues({
|
|
12783
12958
|
dues: {
|
|
12784
12959
|
totalAmount: 0
|
|
12785
12960
|
}
|
|
12786
12961
|
});
|
|
12962
|
+
setNoDue(true);
|
|
12963
|
+
setCheckStats(false);
|
|
12787
12964
|
} else {
|
|
12788
12965
|
setShowToast({
|
|
12789
12966
|
error: false,
|
|
12790
|
-
label: t("
|
|
12967
|
+
label: t("NDC_NO_BILLS_FOUND_PROPERTY")
|
|
12791
12968
|
});
|
|
12792
12969
|
setPropertyDues({
|
|
12793
12970
|
dues: {
|
|
12794
12971
|
totalAmount: 0
|
|
12795
12972
|
}
|
|
12796
12973
|
});
|
|
12974
|
+
setNoDue(true);
|
|
12975
|
+
setCheckStats(false);
|
|
12797
12976
|
}
|
|
12798
12977
|
} catch (error) {
|
|
12799
12978
|
setShowToast({
|
|
@@ -12809,12 +12988,20 @@ const PropertySearchNSummary = ({
|
|
|
12809
12988
|
window.open(payUrl, "_blank");
|
|
12810
12989
|
setPropertyDues({});
|
|
12811
12990
|
}
|
|
12991
|
+
useEffect(() => {
|
|
12992
|
+
if (showToast) {
|
|
12993
|
+
const timer = setTimeout(() => {
|
|
12994
|
+
setShowToast(null);
|
|
12995
|
+
}, 3000);
|
|
12996
|
+
return () => clearTimeout(timer);
|
|
12997
|
+
}
|
|
12998
|
+
}, [showToast]);
|
|
12812
12999
|
return /*#__PURE__*/React.createElement(React.Fragment, null, isLoading && /*#__PURE__*/React.createElement(Loader, null), /*#__PURE__*/React.createElement("div", {
|
|
12813
13000
|
style: {
|
|
12814
13001
|
marginBottom: "16px"
|
|
12815
13002
|
}
|
|
12816
13003
|
}, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
12817
|
-
className: "card-label-smaller",
|
|
13004
|
+
className: "card-label-smaller ndc_card_labels",
|
|
12818
13005
|
style: getInputStyles()
|
|
12819
13006
|
}, `${t(propertyIdInput.label)}`, null), /*#__PURE__*/React.createElement("div", {
|
|
12820
13007
|
className: "field ndc_property_search",
|
|
@@ -12829,7 +13016,7 @@ const PropertySearchNSummary = ({
|
|
|
12829
13016
|
id: "search-property-field"
|
|
12830
13017
|
}, /*#__PURE__*/React.createElement(TextInput, Object.assign({
|
|
12831
13018
|
key: propertyIdInput.name,
|
|
12832
|
-
value:
|
|
13019
|
+
value: propertyId,
|
|
12833
13020
|
onChange: handlePropertyChange,
|
|
12834
13021
|
disable: false,
|
|
12835
13022
|
maxlength: 16,
|
|
@@ -12843,7 +13030,7 @@ const PropertySearchNSummary = ({
|
|
|
12843
13030
|
maxWidth: "100px"
|
|
12844
13031
|
},
|
|
12845
13032
|
onClick: searchProperty
|
|
12846
|
-
}, `${t("PT_SEARCH")}`), (
|
|
13033
|
+
}, `${t("PT_SEARCH")}`), !(apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$2 = apiDataCheck[0]) !== null && _apiDataCheck$2 !== void 0 && _apiDataCheck$2.NdcDetails) && getCheckStatus && !getPayDuesButton && /*#__PURE__*/React.createElement("button", {
|
|
12847
13034
|
className: "submit-bar",
|
|
12848
13035
|
type: "button",
|
|
12849
13036
|
style: {
|
|
@@ -12855,18 +13042,19 @@ const PropertySearchNSummary = ({
|
|
|
12855
13042
|
onClick: () => {
|
|
12856
13043
|
fetchBill();
|
|
12857
13044
|
}
|
|
12858
|
-
}, `${t("CHECK_STATUS_PROPERTY")}`),
|
|
13045
|
+
}, `${t("CHECK_STATUS_PROPERTY")}`), getPayDuesButton && /*#__PURE__*/React.createElement("button", {
|
|
12859
13046
|
className: "submit-bar",
|
|
12860
13047
|
type: "button",
|
|
12861
13048
|
style: {
|
|
12862
13049
|
color: "white",
|
|
12863
13050
|
width: "100%",
|
|
12864
|
-
maxWidth: "
|
|
13051
|
+
maxWidth: "190px"
|
|
12865
13052
|
},
|
|
12866
13053
|
onClick: () => {
|
|
12867
13054
|
redirectToPayBill();
|
|
13055
|
+
setPayDuesButton(false);
|
|
12868
13056
|
}
|
|
12869
|
-
}, `${t("PAY_DUES")}
|
|
13057
|
+
}, `${t("PAY_DUES")} (Rs.${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})`), getNoDue && /*#__PURE__*/React.createElement("div", {
|
|
12870
13058
|
style: {
|
|
12871
13059
|
color: "green",
|
|
12872
13060
|
width: "100%",
|
|
@@ -12938,6 +13126,7 @@ const SelectNDCDocuments = ({
|
|
|
12938
13126
|
formState: formState
|
|
12939
13127
|
});
|
|
12940
13128
|
}), error && /*#__PURE__*/React.createElement(Toast, {
|
|
13129
|
+
isDleteBtn: true,
|
|
12941
13130
|
label: error,
|
|
12942
13131
|
onClose: () => setError(null),
|
|
12943
13132
|
error: true
|
|
@@ -13634,6 +13823,18 @@ const NewNDCStepForm$1 = () => {
|
|
|
13634
13823
|
const formState = useSelector(state => state.ndc.NDCForm);
|
|
13635
13824
|
const step = formState.step;
|
|
13636
13825
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
13826
|
+
const id = window.location.pathname.split("/").pop();
|
|
13827
|
+
const {
|
|
13828
|
+
isLoading,
|
|
13829
|
+
data: applicationDetails
|
|
13830
|
+
} = Digit.Hooks.ndc.useSearchEmployeeApplication({
|
|
13831
|
+
uuid: id
|
|
13832
|
+
}, tenantId);
|
|
13833
|
+
useEffect(() => {
|
|
13834
|
+
if (applicationDetails !== null && applicationDetails !== void 0 && applicationDetails.Applications.length) {
|
|
13835
|
+
dispatch(updateNDCForm("responseData", applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.Applications));
|
|
13836
|
+
}
|
|
13837
|
+
}, [applicationDetails]);
|
|
13637
13838
|
const setStep = updatedStepNumber => {
|
|
13638
13839
|
dispatch(setNDCStep(updatedStepNumber));
|
|
13639
13840
|
};
|
|
@@ -13788,6 +13989,7 @@ const NewNDCStepFormOne$1 = ({
|
|
|
13788
13989
|
};
|
|
13789
13990
|
function validateStepData(data) {
|
|
13790
13991
|
var _data$cpt6, _data$cpt6$dues, _data$cpt7, _data$cpt7$dues, _data$dues, _propertyDetails$wate, _propertyDetails$sewe;
|
|
13992
|
+
console.log("data", data);
|
|
13791
13993
|
const missingFields = [];
|
|
13792
13994
|
const invalidFields = [];
|
|
13793
13995
|
const cpt = (data === null || data === void 0 ? void 0 : data.cpt) || {};
|
|
@@ -13831,7 +14033,7 @@ const NewNDCStepFormOne$1 = ({
|
|
|
13831
14033
|
if (!(propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.email)) missingFields.push(t("NDC_MESSAGE_EMAIL"));
|
|
13832
14034
|
if (!(NDCReason !== null && NDCReason !== void 0 && NDCReason.code)) missingFields.push(t("NDC_MESSAGE_NDC_REASON"));
|
|
13833
14035
|
const nameRegex = /^[A-Za-z\s]+$/;
|
|
13834
|
-
const emailRegex = /^[
|
|
14036
|
+
const emailRegex = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9-]+\.[a-zA-Z]{2,}$/;
|
|
13835
14037
|
const mobileRegex = /^[6-9]\d{9}$/;
|
|
13836
14038
|
if (propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.firstName && !nameRegex.test(propertyDetails.firstName)) {
|
|
13837
14039
|
invalidFields.push(t("NDC_MESSAGE_FIRST_NAME_ONLY_ALPHABETS_ALLOWED"));
|