@mseva/digit-ui-module-ndc 1.0.25 → 1.0.27

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.
@@ -547,7 +547,7 @@ const Response = props => {
547
547
  label: t("CORE_COMMON_GO_TO_NDC"),
548
548
  onSubmit: onGoToNDC
549
549
  }), /*#__PURE__*/React.createElement(SubmitBar$1, {
550
- label: t("COMMON_MAKE_PAYMENT"),
550
+ label: t("CS_APPLICATION_DETAILS_MAKE_PAYMENT"),
551
551
  onSubmit: handlePayment
552
552
  }))));
553
553
  };
@@ -849,7 +849,7 @@ const ModalConfig = ({
849
849
  selected: selectedApprover
850
850
  })
851
851
  }, {
852
- label: `${t("WF_COMMON_COMMENTS")} *`,
852
+ label: `${t("CS_COMMON_COMMENTS")} *`,
853
853
  type: "textarea",
854
854
  populators: {
855
855
  name: "comments"
@@ -1101,7 +1101,7 @@ const getTimelineCaptions = (checkpoint, index, arr, t) => {
1101
1101
  }, 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()))));
1102
1102
  };
1103
1103
  const ApplicationOverview = () => {
1104
- 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;
1104
+ 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$NdcDetai2, _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;
1105
1105
  const {
1106
1106
  id
1107
1107
  } = useParams();
@@ -1117,6 +1117,24 @@ const ApplicationOverview = () => {
1117
1117
  const [errorOne, setErrorOne] = useState(null);
1118
1118
  const [displayData, setDisplayData] = useState({});
1119
1119
  const [isDetailsLoading, setIsDetailsLoading] = useState(false);
1120
+ const [markedPending, setMarkedPending] = useState({});
1121
+ const handleMarkPending = consumerCode => {
1122
+ setMarkedPending(prev => {
1123
+ const updated = {
1124
+ ...prev,
1125
+ [consumerCode]: !prev[consumerCode]
1126
+ };
1127
+ if (updated[consumerCode]) {
1128
+ console.log("✅ Marked dues pending for", consumerCode);
1129
+ } else {
1130
+ console.log("↩️ Undo marking dues pending for", consumerCode);
1131
+ }
1132
+ return updated;
1133
+ });
1134
+ };
1135
+ useEffect(() => {
1136
+ console.log("markedPending", markedPending);
1137
+ }, [markedPending]);
1120
1138
  const {
1121
1139
  isLoading,
1122
1140
  data: applicationDetails
@@ -1263,8 +1281,13 @@ const ApplicationOverview = () => {
1263
1281
  const payloadData = applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.Applications[0];
1264
1282
  const updatedApplicant = {
1265
1283
  ...payloadData,
1284
+ NdcDetails: payloadData.NdcDetails.map(detail => ({
1285
+ ...detail,
1286
+ isDuePending: markedPending[detail.consumerCode] || false
1287
+ })),
1266
1288
  workflow: {}
1267
1289
  };
1290
+ console.log("updatedApplicant", updatedApplicant);
1268
1291
  const filtData = data === null || data === void 0 ? void 0 : (_data$Licenses = data.Licenses) === null || _data$Licenses === void 0 ? void 0 : _data$Licenses[0];
1269
1292
  updatedApplicant.workflow = {
1270
1293
  action: filtData.action,
@@ -1272,48 +1295,49 @@ const ApplicationOverview = () => {
1272
1295
  comment: filtData === null || filtData === void 0 ? void 0 : filtData.comment,
1273
1296
  documents: filtData === null || filtData === void 0 ? void 0 : filtData.wfDocuments
1274
1297
  };
1275
- if (!(filtData !== null && filtData !== void 0 && filtData.assignee) && filtData.action == "FORWARD") {
1298
+ console.log("filtData action", filtData.action);
1299
+ if (!(filtData !== null && filtData !== void 0 && filtData.assignee) && filtData.action !== "SENDBACKTOCITIZEN" && filtData.action !== "APPROVE" && filtData.action !== "REJECT" && filtData.action !== "SENDBACK") {
1276
1300
  setErrorOne("Assignee is Mandatory");
1277
1301
  setShowErrorToastt(true);
1278
1302
  return;
1279
- } else if (!(filtData !== null && filtData !== void 0 && filtData.comment) && ((filtData === null || filtData === void 0 ? void 0 : filtData.action) == "FORWARD" || (filtData === null || filtData === void 0 ? void 0 : filtData.action) == "REJECT")) {
1303
+ } else if (!(filtData !== null && filtData !== void 0 && filtData.comment)) {
1280
1304
  setErrorOne("Comment is Mandatory");
1281
1305
  setShowErrorToastt(true);
1282
1306
  return;
1283
1307
  }
1284
- const finalPayload = {
1285
- Applications: [updatedApplicant]
1286
- };
1287
- try {
1288
- const response = await Digit.NDCService.NDCUpdate({
1289
- tenantId,
1290
- details: finalPayload
1291
- });
1292
- setShowToast({
1293
- key: "success",
1294
- message: "Successfully updated the status"
1295
- });
1296
- setError("Successfully updated the status");
1297
- workflowDetails.revalidate();
1298
- setTimeout(() => {
1299
- history.push("/digit-ui/employee/ndc/inbox");
1300
- window.location.reload();
1301
- }, 2000);
1302
- setSelectedAction(null);
1303
- setShowModal(false);
1304
- } catch (err) {
1305
- setShowToast({
1306
- key: "error",
1307
- message: "Something went wrong"
1308
- });
1309
- setError("Something went wrong");
1310
- }
1308
+ return;
1311
1309
  };
1312
1310
  const closeModal = () => {
1313
1311
  setSelectedAction(null);
1314
1312
  setShowModal(false);
1315
1313
  };
1316
- if (isLoading || isDetailsLoading) {
1314
+ const [getPropertyId, setPropertyId] = useState(null);
1315
+ useEffect(() => {
1316
+ if (displayData) {
1317
+ var _displayData$NdcDetai, _checkProperty$;
1318
+ const checkProperty = displayData === null || displayData === void 0 ? void 0 : (_displayData$NdcDetai = displayData.NdcDetails) === null || _displayData$NdcDetai === void 0 ? void 0 : _displayData$NdcDetai.filter(item => (item === null || item === void 0 ? void 0 : item.businessService) == "NDC_PROPERTY_TAX");
1319
+ setPropertyId(checkProperty === null || checkProperty === void 0 ? void 0 : (_checkProperty$ = checkProperty[0]) === null || _checkProperty$ === void 0 ? void 0 : _checkProperty$.consumerCode);
1320
+ }
1321
+ }, [displayData]);
1322
+ const {
1323
+ isLoading: checkLoading,
1324
+ isError,
1325
+ error: checkError,
1326
+ data: propertyDetailsFetch
1327
+ } = Digit.Hooks.pt.usePropertySearch({
1328
+ filters: {
1329
+ propertyIds: getPropertyId
1330
+ },
1331
+ tenantId: tenantId
1332
+ }, {
1333
+ filters: {
1334
+ propertyIds: getPropertyId
1335
+ },
1336
+ tenantId: tenantId,
1337
+ enabled: getPropertyId ? true : false,
1338
+ privacy: Digit.Utils.getPrivacyObject()
1339
+ });
1340
+ if (isLoading || isDetailsLoading || checkLoading) {
1317
1341
  return /*#__PURE__*/React.createElement(Loader, null);
1318
1342
  }
1319
1343
  return /*#__PURE__*/React.createElement("div", {
@@ -1322,8 +1346,13 @@ const ApplicationOverview = () => {
1322
1346
  key: key,
1323
1347
  label: t(`${key === null || key === void 0 ? void 0 : key.toUpperCase()}`),
1324
1348
  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")
1325
- }))))), /*#__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) => {
1326
- var _detail$dueAmount;
1349
+ }))))), /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(CardSubHeader, null, t("NDC_APPLICATION_NDC_DETAILS_OVERVIEW")), displayData === null || displayData === void 0 ? void 0 : (_displayData$NdcDetai2 = displayData.NdcDetails) === null || _displayData$NdcDetai2 === void 0 ? void 0 : _displayData$NdcDetai2.map((detail, index) => {
1350
+ var _detail$dueAmount, _propertyDetailsFetch, _propertyDetailsFetch2, _propertyDetailsFetch3, _propertyDetailsFetch4, _propertyDetailsFetch5, _propertyDetailsFetch6, _propertyDetailsFetch7, _propertyDetailsFetch8, _propertyDetailsFetch9, _propertyDetailsFetch0, _propertyDetailsFetch1, _propertyDetailsFetch10, _propertyDetailsFetch11, _propertyDetailsFetch12, _propertyDetailsFetch13, _propertyDetailsFetch14, _propertyDetailsFetch15, _propertyDetailsFetch16, _propertyDetailsFetch17, _propertyDetailsFetch18;
1351
+ const isPT = (detail === null || detail === void 0 ? void 0 : detail.businessService) === "NDC_PROPERTY_TAX";
1352
+ const isSW = (detail === null || detail === void 0 ? void 0 : detail.businessService) === "NDC_SEWERAGE_SERVICE_CONNECTION";
1353
+ const isWS = (detail === null || detail === void 0 ? void 0 : detail.businessService) === "NDC_WATER_SERVICE_CONNECTION";
1354
+ const canRaiseFlag = isPT && (userRoles === null || userRoles === void 0 ? void 0 : userRoles.includes("NDC_PT_VERIFIER")) || (isSW || isWS) && (userRoles === null || userRoles === void 0 ? void 0 : userRoles.includes("NDC_WS_SW_VERIFIER"));
1355
+ const isMarked = markedPending[detail.consumerCode];
1327
1356
  return /*#__PURE__*/React.createElement("div", {
1328
1357
  key: index,
1329
1358
  style: {
@@ -1344,6 +1373,36 @@ const ApplicationOverview = () => {
1344
1373
  }), /*#__PURE__*/React.createElement(Row, {
1345
1374
  label: t("NDC_PROPERTY_TYPE"),
1346
1375
  text: t(detail.propertyType) || detail.propertyType
1376
+ }), isPT && (propertyDetailsFetch === null || propertyDetailsFetch === void 0 ? void 0 : propertyDetailsFetch.Properties) && /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(Row, {
1377
+ label: t("City"),
1378
+ text: propertyDetailsFetch === null || propertyDetailsFetch === void 0 ? void 0 : (_propertyDetailsFetch = propertyDetailsFetch.Properties) === null || _propertyDetailsFetch === void 0 ? void 0 : (_propertyDetailsFetch2 = _propertyDetailsFetch[0]) === null || _propertyDetailsFetch2 === void 0 ? void 0 : (_propertyDetailsFetch3 = _propertyDetailsFetch2.address) === null || _propertyDetailsFetch3 === void 0 ? void 0 : _propertyDetailsFetch3.city
1379
+ }), /*#__PURE__*/React.createElement(Row, {
1380
+ label: t("House No"),
1381
+ text: propertyDetailsFetch === null || propertyDetailsFetch === void 0 ? void 0 : (_propertyDetailsFetch4 = propertyDetailsFetch.Properties) === null || _propertyDetailsFetch4 === void 0 ? void 0 : (_propertyDetailsFetch5 = _propertyDetailsFetch4[0]) === null || _propertyDetailsFetch5 === void 0 ? void 0 : (_propertyDetailsFetch6 = _propertyDetailsFetch5.address) === null || _propertyDetailsFetch6 === void 0 ? void 0 : _propertyDetailsFetch6.doorNo
1382
+ }), /*#__PURE__*/React.createElement(Row, {
1383
+ label: t("Colony Name"),
1384
+ text: propertyDetailsFetch === null || propertyDetailsFetch === void 0 ? void 0 : (_propertyDetailsFetch7 = propertyDetailsFetch.Properties) === null || _propertyDetailsFetch7 === void 0 ? void 0 : (_propertyDetailsFetch8 = _propertyDetailsFetch7[0]) === null || _propertyDetailsFetch8 === void 0 ? void 0 : (_propertyDetailsFetch9 = _propertyDetailsFetch8.address) === null || _propertyDetailsFetch9 === void 0 ? void 0 : _propertyDetailsFetch9.buildingName
1385
+ }), /*#__PURE__*/React.createElement(Row, {
1386
+ label: t("Street Name"),
1387
+ text: propertyDetailsFetch === null || propertyDetailsFetch === void 0 ? void 0 : (_propertyDetailsFetch0 = propertyDetailsFetch.Properties) === null || _propertyDetailsFetch0 === void 0 ? void 0 : (_propertyDetailsFetch1 = _propertyDetailsFetch0[0]) === null || _propertyDetailsFetch1 === void 0 ? void 0 : (_propertyDetailsFetch10 = _propertyDetailsFetch1.address) === null || _propertyDetailsFetch10 === void 0 ? void 0 : _propertyDetailsFetch10.street
1388
+ }), /*#__PURE__*/React.createElement(Row, {
1389
+ label: t("Pincode"),
1390
+ text: (propertyDetailsFetch === null || propertyDetailsFetch === void 0 ? void 0 : (_propertyDetailsFetch11 = propertyDetailsFetch.Properties) === null || _propertyDetailsFetch11 === void 0 ? void 0 : (_propertyDetailsFetch12 = _propertyDetailsFetch11[0]) === null || _propertyDetailsFetch12 === void 0 ? void 0 : (_propertyDetailsFetch13 = _propertyDetailsFetch12.address) === null || _propertyDetailsFetch13 === void 0 ? void 0 : _propertyDetailsFetch13.pincode) || "N/A"
1391
+ }), /*#__PURE__*/React.createElement(Row, {
1392
+ label: t("Survey Id/UID"),
1393
+ text: propertyDetailsFetch === null || propertyDetailsFetch === void 0 ? void 0 : (_propertyDetailsFetch14 = propertyDetailsFetch.Properties) === null || _propertyDetailsFetch14 === void 0 ? void 0 : (_propertyDetailsFetch15 = _propertyDetailsFetch14[0]) === null || _propertyDetailsFetch15 === void 0 ? void 0 : _propertyDetailsFetch15.surveyId
1394
+ }), /*#__PURE__*/React.createElement(Row, {
1395
+ label: t("Year of creation of Property"),
1396
+ text: propertyDetailsFetch === null || propertyDetailsFetch === void 0 ? void 0 : (_propertyDetailsFetch16 = propertyDetailsFetch.Properties) === null || _propertyDetailsFetch16 === void 0 ? void 0 : (_propertyDetailsFetch17 = _propertyDetailsFetch16[0]) === null || _propertyDetailsFetch17 === void 0 ? void 0 : (_propertyDetailsFetch18 = _propertyDetailsFetch17.additionalDetails) === null || _propertyDetailsFetch18 === void 0 ? void 0 : _propertyDetailsFetch18.yearConstruction
1397
+ }))), canRaiseFlag && /*#__PURE__*/React.createElement("div", {
1398
+ style: {
1399
+ marginTop: "16px",
1400
+ display: "flex",
1401
+ justifyContent: "right"
1402
+ }
1403
+ }, /*#__PURE__*/React.createElement(SubmitBar$1, {
1404
+ label: isMarked ? "Undo Mark Pending" : "Mark Dues Pending",
1405
+ onSubmit: () => handleMarkPending(detail === null || detail === void 0 ? void 0 : detail.consumerCode)
1347
1406
  })));
1348
1407
  })), /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(CardSubHeader, null, t("NDC_APPLICATION_DOCUMENTS_OVERVIEW")), /*#__PURE__*/React.createElement("div", {
1349
1408
  style: {
@@ -8801,7 +8860,7 @@ const getTimelineCaptions$1 = (checkpoint, index, arr, t) => {
8801
8860
  }, 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()))));
8802
8861
  };
8803
8862
  const CitizenApplicationOverview = () => {
8804
- 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;
8863
+ var _user, _user$info, _user$info$roles, _applicationDetails$A3, _applicationDetails$A4, _applicationDetails$A5, _applicationDetails$A6, _Object$entries, _displayData$NdcDetai2, _displayData$Document, _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _workflowDetails$data4, _workflowDetails$data5;
8805
8864
  const {
8806
8865
  id
8807
8866
  } = useParams();
@@ -8906,6 +8965,34 @@ const CitizenApplicationOverview = () => {
8906
8965
  console.log("acknowledgementData", acknowledgementData);
8907
8966
  Digit.Utils.pdf.generateNDC(acknowledgementData);
8908
8967
  };
8968
+ const [getPropertyId, setPropertyId] = useState(null);
8969
+ useEffect(() => {
8970
+ if (displayData) {
8971
+ var _displayData$NdcDetai, _checkProperty$;
8972
+ console.log("here");
8973
+ const checkProperty = displayData === null || displayData === void 0 ? void 0 : (_displayData$NdcDetai = displayData.NdcDetails) === null || _displayData$NdcDetai === void 0 ? void 0 : _displayData$NdcDetai.filter(item => (item === null || item === void 0 ? void 0 : item.businessService) == "NDC_PROPERTY_TAX");
8974
+ console.log("checkProperty", checkProperty);
8975
+ setPropertyId(checkProperty === null || checkProperty === void 0 ? void 0 : (_checkProperty$ = checkProperty[0]) === null || _checkProperty$ === void 0 ? void 0 : _checkProperty$.consumerCode);
8976
+ }
8977
+ }, [displayData]);
8978
+ const {
8979
+ isLoading: checkLoading,
8980
+ isError,
8981
+ error: checkError,
8982
+ data: propertyDetailsFetch
8983
+ } = Digit.Hooks.pt.usePropertySearch({
8984
+ filters: {
8985
+ propertyIds: getPropertyId
8986
+ },
8987
+ tenantId: tenantId
8988
+ }, {
8989
+ filters: {
8990
+ propertyIds: getPropertyId
8991
+ },
8992
+ tenantId: tenantId,
8993
+ enabled: getPropertyId ? true : false,
8994
+ privacy: Digit.Utils.getPrivacyObject()
8995
+ });
8909
8996
  if (isLoading || isDetailsLoading) {
8910
8997
  return /*#__PURE__*/React.createElement(Loader, null);
8911
8998
  }
@@ -8941,8 +9028,8 @@ const CitizenApplicationOverview = () => {
8941
9028
  className: "ndc_card_main"
8942
9029
  }, /*#__PURE__*/React.createElement(CardSubHeader, {
8943
9030
  className: "ndc_label"
8944
- }, 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) => {
8945
- var _detail$dueAmount;
9031
+ }, t("NDC_APPLICATION_NDC_DETAILS_OVERVIEW")), displayData === null || displayData === void 0 ? void 0 : (_displayData$NdcDetai2 = displayData.NdcDetails) === null || _displayData$NdcDetai2 === void 0 ? void 0 : _displayData$NdcDetai2.map((detail, index) => {
9032
+ var _detail$dueAmount, _propertyDetailsFetch, _propertyDetailsFetch2, _propertyDetailsFetch3, _propertyDetailsFetch4, _propertyDetailsFetch5, _propertyDetailsFetch6, _propertyDetailsFetch7, _propertyDetailsFetch8, _propertyDetailsFetch9, _propertyDetailsFetch0, _propertyDetailsFetch1, _propertyDetailsFetch10, _propertyDetailsFetch11, _propertyDetailsFetch12, _propertyDetailsFetch13, _propertyDetailsFetch14, _propertyDetailsFetch15, _propertyDetailsFetch16, _propertyDetailsFetch17, _propertyDetailsFetch18;
8946
9033
  return /*#__PURE__*/React.createElement("div", {
8947
9034
  key: index,
8948
9035
  style: {
@@ -8963,7 +9050,28 @@ const CitizenApplicationOverview = () => {
8963
9050
  }), /*#__PURE__*/React.createElement(Row, {
8964
9051
  label: t("NDC_PROPERTY_TYPE"),
8965
9052
  text: t(detail.propertyType) || detail.propertyType
8966
- })));
9053
+ }), (detail === null || detail === void 0 ? void 0 : detail.businessService) == "NDC_PROPERTY_TAX" && (propertyDetailsFetch === null || propertyDetailsFetch === void 0 ? void 0 : propertyDetailsFetch.Properties) && /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(Row, {
9054
+ label: t("City"),
9055
+ text: propertyDetailsFetch === null || propertyDetailsFetch === void 0 ? void 0 : (_propertyDetailsFetch = propertyDetailsFetch.Properties) === null || _propertyDetailsFetch === void 0 ? void 0 : (_propertyDetailsFetch2 = _propertyDetailsFetch[0]) === null || _propertyDetailsFetch2 === void 0 ? void 0 : (_propertyDetailsFetch3 = _propertyDetailsFetch2.address) === null || _propertyDetailsFetch3 === void 0 ? void 0 : _propertyDetailsFetch3.city
9056
+ }), /*#__PURE__*/React.createElement(Row, {
9057
+ label: t("House No"),
9058
+ text: propertyDetailsFetch === null || propertyDetailsFetch === void 0 ? void 0 : (_propertyDetailsFetch4 = propertyDetailsFetch.Properties) === null || _propertyDetailsFetch4 === void 0 ? void 0 : (_propertyDetailsFetch5 = _propertyDetailsFetch4[0]) === null || _propertyDetailsFetch5 === void 0 ? void 0 : (_propertyDetailsFetch6 = _propertyDetailsFetch5.address) === null || _propertyDetailsFetch6 === void 0 ? void 0 : _propertyDetailsFetch6.doorNo
9059
+ }), /*#__PURE__*/React.createElement(Row, {
9060
+ label: t("Colony Name"),
9061
+ text: propertyDetailsFetch === null || propertyDetailsFetch === void 0 ? void 0 : (_propertyDetailsFetch7 = propertyDetailsFetch.Properties) === null || _propertyDetailsFetch7 === void 0 ? void 0 : (_propertyDetailsFetch8 = _propertyDetailsFetch7[0]) === null || _propertyDetailsFetch8 === void 0 ? void 0 : (_propertyDetailsFetch9 = _propertyDetailsFetch8.address) === null || _propertyDetailsFetch9 === void 0 ? void 0 : _propertyDetailsFetch9.buildingName
9062
+ }), /*#__PURE__*/React.createElement(Row, {
9063
+ label: t("Street Name"),
9064
+ text: propertyDetailsFetch === null || propertyDetailsFetch === void 0 ? void 0 : (_propertyDetailsFetch0 = propertyDetailsFetch.Properties) === null || _propertyDetailsFetch0 === void 0 ? void 0 : (_propertyDetailsFetch1 = _propertyDetailsFetch0[0]) === null || _propertyDetailsFetch1 === void 0 ? void 0 : (_propertyDetailsFetch10 = _propertyDetailsFetch1.address) === null || _propertyDetailsFetch10 === void 0 ? void 0 : _propertyDetailsFetch10.street
9065
+ }), /*#__PURE__*/React.createElement(Row, {
9066
+ label: t("Pincode"),
9067
+ text: (propertyDetailsFetch === null || propertyDetailsFetch === void 0 ? void 0 : (_propertyDetailsFetch11 = propertyDetailsFetch.Properties) === null || _propertyDetailsFetch11 === void 0 ? void 0 : (_propertyDetailsFetch12 = _propertyDetailsFetch11[0]) === null || _propertyDetailsFetch12 === void 0 ? void 0 : (_propertyDetailsFetch13 = _propertyDetailsFetch12.address) === null || _propertyDetailsFetch13 === void 0 ? void 0 : _propertyDetailsFetch13.pincode) || "N/A"
9068
+ }), /*#__PURE__*/React.createElement(Row, {
9069
+ label: t("Survey Id/UID"),
9070
+ text: propertyDetailsFetch === null || propertyDetailsFetch === void 0 ? void 0 : (_propertyDetailsFetch14 = propertyDetailsFetch.Properties) === null || _propertyDetailsFetch14 === void 0 ? void 0 : (_propertyDetailsFetch15 = _propertyDetailsFetch14[0]) === null || _propertyDetailsFetch15 === void 0 ? void 0 : _propertyDetailsFetch15.surveyId
9071
+ }), /*#__PURE__*/React.createElement(Row, {
9072
+ label: t("Year of creation of Property"),
9073
+ text: propertyDetailsFetch === null || propertyDetailsFetch === void 0 ? void 0 : (_propertyDetailsFetch16 = propertyDetailsFetch.Properties) === null || _propertyDetailsFetch16 === void 0 ? void 0 : (_propertyDetailsFetch17 = _propertyDetailsFetch16[0]) === null || _propertyDetailsFetch17 === void 0 ? void 0 : (_propertyDetailsFetch18 = _propertyDetailsFetch17.additionalDetails) === null || _propertyDetailsFetch18 === void 0 ? void 0 : _propertyDetailsFetch18.yearConstruction
9074
+ }))));
8967
9075
  })), /*#__PURE__*/React.createElement(Card, {
8968
9076
  className: "ndc_card_main"
8969
9077
  }, /*#__PURE__*/React.createElement(CardSubHeader, {
@@ -9109,11 +9217,14 @@ const SearchFormFieldsComponents = ({
9109
9217
  textAlign: "start"
9110
9218
  }
9111
9219
  }, /*#__PURE__*/React.createElement(SearchField, null, /*#__PURE__*/React.createElement("label", null, t("NOC_HOME_SEARCH_RESULTS_APP_NO_LABEL")), /*#__PURE__*/React.createElement(TextInput, {
9112
- style: {
9113
- marginTop: "10px"
9114
- },
9115
9220
  name: "uuid",
9116
9221
  inputRef: registerRef({})
9222
+ })), /*#__PURE__*/React.createElement(SearchField, null, /*#__PURE__*/React.createElement("label", null, t("CORE_COMMON_PHONE_NUMBER")), /*#__PURE__*/React.createElement(TextInput, {
9223
+ name: "phoneNumber",
9224
+ inputRef: registerRef({})
9225
+ })), /*#__PURE__*/React.createElement(SearchField, null, /*#__PURE__*/React.createElement("label", null, t("NDC_MSG_PROPERTY_LABEL")), /*#__PURE__*/React.createElement(TextInput, {
9226
+ name: "propertyId",
9227
+ inputRef: registerRef({})
9117
9228
  })), /*#__PURE__*/React.createElement("div", {
9118
9229
  className: "search-action-wrapper",
9119
9230
  style: {
@@ -9521,7 +9632,8 @@ const Inbox = ({
9521
9632
  headerText: `${t("MODULE_NKS_NO_DUE_CERTIFICATE_FEES")}`,
9522
9633
  links: [{
9523
9634
  text: "Create NDC Application",
9524
- link: "/digit-ui/employee/ndc/create"
9635
+ link: "/digit-ui/employee/ndc/create",
9636
+ accessTo: [""]
9525
9637
  }]
9526
9638
  };
9527
9639
  const SearchFormFields = useCallback(({
@@ -11523,7 +11635,6 @@ const NewNDCStepForm = () => {
11523
11635
  const handleSubmit = () => {};
11524
11636
  useEffect(() => {
11525
11637
  const unlisten = history.listen(() => {
11526
- console.log("route changes guys");
11527
11638
  dispatch(resetNDCForm());
11528
11639
  });
11529
11640
  return () => unlisten();
@@ -11670,17 +11781,17 @@ const NewNDCStepFormOne = ({
11670
11781
  }
11671
11782
  };
11672
11783
  function validateStepData(data) {
11673
- var _data$cpt6, _data$cpt6$dues, _data$cpt7, _data$cpt7$dues, _data$dues, _propertyDetails$wate, _propertyDetails$sewe;
11784
+ var _data$cpt6, _data$cpt7, _data$cpt7$dues, _propertyDetails$wate, _propertyDetails$sewe;
11674
11785
  const missingFields = [];
11675
11786
  const invalidFields = [];
11676
11787
  const cpt = (data === null || data === void 0 ? void 0 : data.cpt) || {};
11677
11788
  const cptDetails = (cpt === null || cpt === void 0 ? void 0 : cpt.details) || {};
11678
11789
  const propertyDetails = (data === null || data === void 0 ? void 0 : data.PropertyDetails) || {};
11679
11790
  const NDCReason = (data === null || data === void 0 ? void 0 : data.NDCReason) || {};
11680
- if ((data === null || data === void 0 ? void 0 : (_data$cpt6 = data.cpt) === null || _data$cpt6 === void 0 ? void 0 : (_data$cpt6$dues = _data$cpt6.dues) === null || _data$cpt6$dues === void 0 ? void 0 : _data$cpt6$dues.totalAmount) != 0) {
11791
+ if (!(data !== null && data !== void 0 && (_data$cpt6 = data.cpt) !== null && _data$cpt6 !== void 0 && _data$cpt6.dues)) {
11681
11792
  missingFields.push(`${t("NDC_MESSAGE_PLEASE_CHECK_STATUS_OF_PROPERTY_TAX")} ${cpt === null || cpt === void 0 ? void 0 : cpt.id}`);
11682
11793
  }
11683
- if (data !== null && data !== void 0 && (_data$cpt7 = data.cpt) !== null && _data$cpt7 !== void 0 && (_data$cpt7$dues = _data$cpt7.dues) !== null && _data$cpt7$dues !== void 0 && _data$cpt7$dues.id && (data === null || data === void 0 ? void 0 : (_data$dues = data.dues) === null || _data$dues === void 0 ? void 0 : _data$dues.totalAmount) > 0) {
11794
+ if ((data === null || data === void 0 ? void 0 : (_data$cpt7 = data.cpt) === null || _data$cpt7 === void 0 ? void 0 : (_data$cpt7$dues = _data$cpt7.dues) === null || _data$cpt7$dues === void 0 ? void 0 : _data$cpt7$dues.totalAmount) > 0) {
11684
11795
  missingFields.push(`${t("NDC_MESSAGE_PLEASE_PAY_DUES_OF_PROPERTY_TAX")} ${cpt === null || cpt === void 0 ? void 0 : cpt.id}`);
11685
11796
  }
11686
11797
  if ((propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$wate = propertyDetails.waterConnection) === null || _propertyDetails$wate === void 0 ? void 0 : _propertyDetails$wate.length) > 0) {
@@ -11713,7 +11824,7 @@ const NewNDCStepFormOne = ({
11713
11824
  if (!(propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.email)) missingFields.push(t("NDC_MESSAGE_EMAIL"));
11714
11825
  if (!(NDCReason !== null && NDCReason !== void 0 && NDCReason.code)) missingFields.push(t("NDC_MESSAGE_NDC_REASON"));
11715
11826
  const nameRegex = /^[A-Za-z\s]+$/;
11716
- const emailRegex = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9-]+\.[a-zA-Z]{2,}$/;
11827
+ const emailRegex = /^(?!\.)(?!.*\.\.)[a-zA-Z0-9._%+-]+@[a-zA-Z0-9-]+(\.[a-zA-Z]{2,})+$/;
11717
11828
  const mobileRegex = /^[6-9]\d{9}$/;
11718
11829
  if (propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.firstName && !nameRegex.test(propertyDetails.firstName)) {
11719
11830
  invalidFields.push(t("NDC_MESSAGE_FIRST_NAME_ONLY_ALPHABETS_ALLOWED"));
@@ -11865,7 +11976,7 @@ const PropertyDetailsForm$1 = ({
11865
11976
  formState,
11866
11977
  clearErrors
11867
11978
  }) => {
11868
- var _formData$cpt, _formData$cpt$details, _formData$cpt3, _Digit, _Digit$ComponentRegis, _formData$cpt6, _formData$cpt6$detail, _formData$cpt7, _apiDataCheck$6, _propertyDetails$wate, _propertyDetails$sewe;
11979
+ var _formData$cpt, _formData$cpt$details, _formData$cpt3, _Digit, _Digit$ComponentRegis, _formData$cpt4, _apiDataCheck$5, _propertyDetails$wate, _propertyDetails$sewe;
11869
11980
  const {
11870
11981
  control,
11871
11982
  formState: localFormState,
@@ -11921,21 +12032,23 @@ const PropertyDetailsForm$1 = ({
11921
12032
  t
11922
12033
  });
11923
12034
  useEffect(() => {
11924
- var _formData$cpt2, _formData$cpt2$detail, _formData$cpt2$detail2, _owner$name, _formData$PropertyDet, _formData$PropertyDet2;
12035
+ var _formData$cpt2, _formData$cpt2$detail, _formData$cpt2$detail2, _owner$name, _formData$PropertyDet, _formData$PropertyDet2, _formData$PropertyDet3;
12036
+ console.log("coming here everytime", formData);
11925
12037
  const owner = formData === null || formData === void 0 ? void 0 : (_formData$cpt2 = formData.cpt) === null || _formData$cpt2 === void 0 ? void 0 : (_formData$cpt2$detail = _formData$cpt2.details) === null || _formData$cpt2$detail === void 0 ? void 0 : (_formData$cpt2$detail2 = _formData$cpt2$detail.owners) === null || _formData$cpt2$detail2 === void 0 ? void 0 : _formData$cpt2$detail2[0];
11926
12038
  const fullName = owner === null || owner === void 0 ? void 0 : (_owner$name = owner.name) === null || _owner$name === void 0 ? void 0 : _owner$name.split(" ");
11927
12039
  const firstName = owner === null || owner === void 0 ? void 0 : owner.name;
11928
- const email = owner === null || owner === void 0 ? void 0 : owner.email;
12040
+ console.log("ikiki email", owner === null || owner === void 0 ? void 0 : owner.emailId);
12041
+ const email = (owner === null || owner === void 0 ? void 0 : owner.emailId) || (formData === null || formData === void 0 ? void 0 : (_formData$PropertyDet = formData.PropertyDetails) === null || _formData$PropertyDet === void 0 ? void 0 : _formData$PropertyDet.email) || "";
11929
12042
  const mobileNumber = owner === null || owner === void 0 ? void 0 : owner.mobileNumber;
11930
12043
  const address = owner === null || owner === void 0 ? void 0 : owner.permanentAddress;
11931
12044
  const combinedObject = {};
11932
12045
  if (firstName) combinedObject.firstName = firstName;
11933
- if (email) combinedObject.email = email;
12046
+ combinedObject.email = email;
11934
12047
  if (mobileNumber) combinedObject.mobileNumber = mobileNumber;
11935
12048
  if (address) combinedObject.address = address;
11936
12049
  combinedObject.propertyBillData = {
11937
12050
  isLoading: false,
11938
- billData: (formData === null || formData === void 0 ? void 0 : (_formData$PropertyDet = formData.PropertyDetails) === null || _formData$PropertyDet === void 0 ? void 0 : (_formData$PropertyDet2 = _formData$PropertyDet.propertyBillData) === null || _formData$PropertyDet2 === void 0 ? void 0 : _formData$PropertyDet2.billData) || {}
12051
+ billData: (formData === null || formData === void 0 ? void 0 : (_formData$PropertyDet2 = formData.PropertyDetails) === null || _formData$PropertyDet2 === void 0 ? void 0 : (_formData$PropertyDet3 = _formData$PropertyDet2.propertyBillData) === null || _formData$PropertyDet3 === void 0 ? void 0 : _formData$PropertyDet3.billData) || {}
11939
12052
  };
11940
12053
  setPropertyDetails(prev => {
11941
12054
  return {
@@ -11944,6 +12057,9 @@ const PropertyDetailsForm$1 = ({
11944
12057
  };
11945
12058
  });
11946
12059
  }, [formData === null || formData === void 0 ? void 0 : (_formData$cpt3 = formData.cpt) === null || _formData$cpt3 === void 0 ? void 0 : _formData$cpt3.details]);
12060
+ useEffect(() => {
12061
+ console.log("updated propertyDetails", propertyDetails);
12062
+ }, [propertyDetails]);
11947
12063
  useEffect(() => {
11948
12064
  var _apiDataCheck$;
11949
12065
  let waterConnection;
@@ -12260,35 +12376,11 @@ const PropertyDetailsForm$1 = ({
12260
12376
  return () => clearTimeout(timer);
12261
12377
  }
12262
12378
  }, [showToast]);
12263
- useEffect(() => {
12264
- if (apiDataCheck) {
12265
- var _apiDataCheck$5, _apiDataCheck$5$owner, _apiDataCheck$5$owner2;
12266
- 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) || "";
12267
- setValue("email", apiEmail);
12268
- setPropertyDetails(prev => ({
12269
- ...prev,
12270
- email: apiEmail
12271
- }));
12272
- }
12273
- }, [apiDataCheck]);
12274
- useEffect(() => {
12275
- var _formData$cpt4, _formData$cpt4$detail;
12276
- 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) {
12277
- var _formData$cpt5, _formData$cpt5$detail, _formData$cpt5$detail2, _formData$cpt5$detail3;
12278
- 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;
12279
- setValue("email", formDataEmail);
12280
- setPropertyDetails(prev => ({
12281
- ...prev,
12282
- email: formDataEmail
12283
- }));
12284
- }
12285
- }, [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]);
12286
- console.log("propertyDetails====", propertyDetails, formData);
12287
12379
  return /*#__PURE__*/React.createElement("div", {
12288
12380
  style: {
12289
12381
  marginBottom: "16px"
12290
12382
  }
12291
- }, ((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, {
12383
+ }, ((formData === null || formData === void 0 ? void 0 : (_formData$cpt4 = formData.cpt) === null || _formData$cpt4 === void 0 ? void 0 : _formData$cpt4.details) || (apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$5 = apiDataCheck[0]) === null || _apiDataCheck$5 === void 0 ? void 0 : _apiDataCheck$5.NdcDetails)) && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(LabelFieldPair, {
12292
12384
  style: {
12293
12385
  marginTop: "40px"
12294
12386
  }
@@ -12303,7 +12395,7 @@ const PropertyDetailsForm$1 = ({
12303
12395
  width: "100%"
12304
12396
  }
12305
12397
  }, propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$wate = propertyDetails.waterConnection) === null || _propertyDetails$wate === void 0 ? void 0 : _propertyDetails$wate.map((item, index) => {
12306
- var _apiDataCheck$7, _item$billData, _item$billData2, _item$billData3, _item$billData4;
12398
+ var _apiDataCheck$6, _item$billData, _item$billData2, _item$billData3, _item$billData4;
12307
12399
  return /*#__PURE__*/React.createElement("div", {
12308
12400
  className: "ndc_property_search",
12309
12401
  key: index,
@@ -12344,7 +12436,7 @@ const PropertyDetailsForm$1 = ({
12344
12436
  alignItems: "center",
12345
12437
  gap: "12px"
12346
12438
  }
12347
- }, !(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", {
12439
+ }, !(apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$6 = apiDataCheck[0]) !== null && _apiDataCheck$6 !== void 0 && _apiDataCheck$6.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", {
12348
12440
  className: "submit-bar",
12349
12441
  type: "button",
12350
12442
  style: {
@@ -12411,7 +12503,7 @@ const PropertyDetailsForm$1 = ({
12411
12503
  width: "100%"
12412
12504
  }
12413
12505
  }, propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$sewe = propertyDetails.sewerageConnection) === null || _propertyDetails$sewe === void 0 ? void 0 : _propertyDetails$sewe.map((item, index) => {
12414
- var _apiDataCheck$8, _item$billData5, _item$billData6, _item$billData7, _item$billData8;
12506
+ var _apiDataCheck$7, _item$billData5, _item$billData6, _item$billData7, _item$billData8;
12415
12507
  return /*#__PURE__*/React.createElement("div", {
12416
12508
  className: "ndc_property_search",
12417
12509
  key: index,
@@ -12452,7 +12544,7 @@ const PropertyDetailsForm$1 = ({
12452
12544
  alignItems: "center",
12453
12545
  gap: "12px"
12454
12546
  }
12455
- }, !(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", {
12547
+ }, !(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$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", {
12456
12548
  className: "submit-bar",
12457
12549
  type: "button",
12458
12550
  style: {
@@ -12523,7 +12615,7 @@ const PropertyDetailsForm$1 = ({
12523
12615
  }
12524
12616
  },
12525
12617
  render: props => {
12526
- var _formData$cpt8, _formData$cpt8$detail, _formData$cpt8$detail2, _formData$cpt8$detail3, _formData$cpt8$detail4, _formData$cpt8$detail5, _formData$cpt8$detail6;
12618
+ var _formData$cpt5, _formData$cpt5$detail, _formData$cpt5$detail2, _formData$cpt5$detail3, _formData$cpt5$detail4, _formData$cpt5$detail5, _formData$cpt5$detail6;
12527
12619
  return /*#__PURE__*/React.createElement(TextInput, {
12528
12620
  value: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.firstName) || "",
12529
12621
  onChange: e => {
@@ -12536,7 +12628,7 @@ const PropertyDetailsForm$1 = ({
12536
12628
  onBlur: e => {
12537
12629
  props.onBlur(e);
12538
12630
  },
12539
- 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
12631
+ disabled: (formData === null || formData === void 0 ? void 0 : (_formData$cpt5 = formData.cpt) === null || _formData$cpt5 === void 0 ? void 0 : (_formData$cpt5$detail = _formData$cpt5.details) === null || _formData$cpt5$detail === void 0 ? void 0 : (_formData$cpt5$detail2 = _formData$cpt5$detail.owners) === null || _formData$cpt5$detail2 === void 0 ? void 0 : (_formData$cpt5$detail3 = _formData$cpt5$detail2[0]) === null || _formData$cpt5$detail3 === void 0 ? void 0 : (_formData$cpt5$detail4 = _formData$cpt5$detail3.name) === null || _formData$cpt5$detail4 === void 0 ? void 0 : (_formData$cpt5$detail5 = _formData$cpt5$detail4.split(" ")) === null || _formData$cpt5$detail5 === void 0 ? void 0 : (_formData$cpt5$detail6 = _formData$cpt5$detail5[0]) === null || _formData$cpt5$detail6 === void 0 ? void 0 : _formData$cpt5$detail6.length) > 0
12540
12632
  });
12541
12633
  }
12542
12634
  }))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
@@ -12546,24 +12638,20 @@ const PropertyDetailsForm$1 = ({
12546
12638
  }, /*#__PURE__*/React.createElement(Controller, {
12547
12639
  control: control,
12548
12640
  name: "email",
12549
- defaultValue: propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.email,
12550
- render: props => {
12551
- var _formData$cpt9, _formData$cpt9$detail, _formData$cpt9$detail2, _formData$cpt9$detail3;
12552
- return /*#__PURE__*/React.createElement(TextInput, {
12553
- value: props === null || props === void 0 ? void 0 : props.value,
12554
- onChange: e => {
12555
- setPropertyDetails(prev => ({
12556
- ...prev,
12557
- email: e.target.value
12558
- }));
12559
- props.onChange(e.target.value);
12560
- },
12561
- onBlur: e => {
12562
- props.onBlur(e);
12563
- },
12564
- 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$detail3.emailId
12565
- });
12566
- }
12641
+ defaultValue: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.email) || "",
12642
+ render: props => /*#__PURE__*/React.createElement(TextInput, {
12643
+ value: propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.email,
12644
+ onChange: e => {
12645
+ setPropertyDetails(prev => ({
12646
+ ...prev,
12647
+ email: e.target.value
12648
+ }));
12649
+ props.onChange(e.target.value);
12650
+ },
12651
+ onBlur: e => {
12652
+ props.onBlur(e);
12653
+ }
12654
+ })
12567
12655
  }))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
12568
12656
  className: "card-label-smaller ndc_card_labels"
12569
12657
  }, `${t("NDC_MOBILE_NUMBER")} * `), /*#__PURE__*/React.createElement("div", {
@@ -12594,7 +12682,7 @@ const PropertyDetailsForm$1 = ({
12594
12682
  name: "address",
12595
12683
  defaultValue: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.address) || "",
12596
12684
  render: props => {
12597
- var _formData$cpt0, _formData$cpt0$detail, _formData$cpt0$detail2, _formData$cpt0$detail3, _formData$cpt0$detail4;
12685
+ var _formData$cpt6, _formData$cpt6$detail, _formData$cpt6$detail2, _formData$cpt6$detail3, _formData$cpt6$detail4;
12598
12686
  return /*#__PURE__*/React.createElement(TextInput, {
12599
12687
  value: propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.address,
12600
12688
  onChange: e => {
@@ -12607,7 +12695,7 @@ const PropertyDetailsForm$1 = ({
12607
12695
  onBlur: e => {
12608
12696
  props.onBlur(e);
12609
12697
  },
12610
- 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$detail4 = _formData$cpt0$detail3.permanentAddress) === null || _formData$cpt0$detail4 === void 0 ? void 0 : _formData$cpt0$detail4.length) > 0
12698
+ disabled: (formData === null || formData === void 0 ? void 0 : (_formData$cpt6 = formData.cpt) === null || _formData$cpt6 === void 0 ? void 0 : (_formData$cpt6$detail = _formData$cpt6.details) === null || _formData$cpt6$detail === void 0 ? void 0 : (_formData$cpt6$detail2 = _formData$cpt6$detail.owners) === null || _formData$cpt6$detail2 === void 0 ? void 0 : (_formData$cpt6$detail3 = _formData$cpt6$detail2[0]) === null || _formData$cpt6$detail3 === void 0 ? void 0 : (_formData$cpt6$detail4 = _formData$cpt6$detail3.permanentAddress) === null || _formData$cpt6$detail4 === void 0 ? void 0 : _formData$cpt6$detail4.length) > 0
12611
12699
  });
12612
12700
  }
12613
12701
  })))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
@@ -12653,7 +12741,7 @@ const PropertySearchNSummary = ({
12653
12741
  onSelect,
12654
12742
  formData
12655
12743
  }) => {
12656
- var _apiDataCheck$, _apiDataCheck$$NdcDet, _formData$cpt, _formData$cpt2, _propertyDetails$Prop3, _apiDataCheck$2, _formData$cpt13, _formData$cpt13$dues;
12744
+ var _apiDataCheck$, _apiDataCheck$$NdcDet, _formData$cpt, _formData$cpt2, _propertyDetails$Prop3, _apiDataCheck$2, _formData$cpt12, _formData$cpt12$dues;
12657
12745
  const {
12658
12746
  t
12659
12747
  } = useTranslation();
@@ -12674,7 +12762,6 @@ const PropertySearchNSummary = ({
12674
12762
  const urlPropertyId = new URLSearchParams(search).get("propertyId");
12675
12763
  const isfirstRender = useRef(true);
12676
12764
  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");
12677
- console.log("ptFromApi", ptFromApi);
12678
12765
  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) || "");
12679
12766
  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) || "");
12680
12767
  const [showToast, setShowToast] = useState(null);
@@ -12730,7 +12817,6 @@ const PropertySearchNSummary = ({
12730
12817
  enabled: searchPropertyId ? true : false,
12731
12818
  privacy: Digit.Utils.getPrivacyObject()
12732
12819
  });
12733
- console.log("apiDataCheck", apiDataCheck);
12734
12820
  useEffect(() => {
12735
12821
  if (ptFromApi !== null && ptFromApi !== void 0 && ptFromApi.consumerCode) {
12736
12822
  setIsSearchClicked(true);
@@ -12759,7 +12845,7 @@ const PropertySearchNSummary = ({
12759
12845
  setPropertyDetails({});
12760
12846
  setShowToast({
12761
12847
  error: true,
12762
- label: "PT_ENTER_VALID_PROPERTY_ID"
12848
+ label: "CS_PT_NO_PROPERTIES_FOUND"
12763
12849
  });
12764
12850
  }
12765
12851
  }
@@ -12772,7 +12858,7 @@ const PropertySearchNSummary = ({
12772
12858
  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) {
12773
12859
  setShowToast({
12774
12860
  error: true,
12775
- label: "PT_ENTER_VALID_PROPERTY_ID"
12861
+ label: "CS_PT_NO_PROPERTIES_FOUND"
12776
12862
  });
12777
12863
  }
12778
12864
  }, [error, propertyDetails]);
@@ -12803,6 +12889,22 @@ const PropertySearchNSummary = ({
12803
12889
  });
12804
12890
  setSearchPropertyId(propertyId);
12805
12891
  setIsSearchClicked(true);
12892
+ setPropertyDues({
12893
+ dues: null
12894
+ });
12895
+ onSelect("PropertyDetails", {
12896
+ email: "",
12897
+ propertyBillData: {
12898
+ isLoading: false,
12899
+ billData: {}
12900
+ },
12901
+ waterConnection: [],
12902
+ sewerageConnection: [],
12903
+ firstName: "",
12904
+ mobileNumber: "",
12905
+ address: ""
12906
+ });
12907
+ dispatch(resetNDCForm());
12806
12908
  }
12807
12909
  };
12808
12910
  const handlePropertyChange = e => {
@@ -12936,7 +13038,6 @@ const PropertySearchNSummary = ({
12936
13038
  value: propertyId,
12937
13039
  onChange: handlePropertyChange,
12938
13040
  disable: false,
12939
- maxlength: 16,
12940
13041
  defaultValue: undefined
12941
13042
  }, propertyIdInput.validation)), !isSearchClicked && /*#__PURE__*/React.createElement("button", {
12942
13043
  className: "submit-bar",
@@ -12959,19 +13060,25 @@ const PropertySearchNSummary = ({
12959
13060
  onClick: () => {
12960
13061
  fetchBill();
12961
13062
  }
12962
- }, `${t("CHECK_STATUS_PROPERTY")}`), getPayDuesButton && /*#__PURE__*/React.createElement("button", {
13063
+ }, `${t("CHECK_STATUS_PROPERTY")}`), getPayDuesButton && /*#__PURE__*/React.createElement("div", {
13064
+ style: {
13065
+ color: "red",
13066
+ width: "100%",
13067
+ maxWidth: "70px"
13068
+ }
13069
+ }, "Rs. ", formData === null || formData === void 0 ? void 0 : (_formData$cpt12 = formData.cpt) === null || _formData$cpt12 === void 0 ? void 0 : (_formData$cpt12$dues = _formData$cpt12.dues) === null || _formData$cpt12$dues === void 0 ? void 0 : _formData$cpt12$dues.totalAmount, " "), getPayDuesButton && /*#__PURE__*/React.createElement("button", {
12963
13070
  className: "submit-bar",
12964
13071
  type: "button",
12965
13072
  style: {
12966
13073
  color: "white",
12967
13074
  width: "100%",
12968
- maxWidth: "190px"
13075
+ maxWidth: "115px"
12969
13076
  },
12970
13077
  onClick: () => {
12971
13078
  redirectToPayBill();
12972
13079
  setPayDuesButton(false);
12973
13080
  }
12974
- }, `${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", {
13081
+ }, `${t("PAY_DUES")} `), getNoDue && /*#__PURE__*/React.createElement("div", {
12975
13082
  style: {
12976
13083
  color: "green",
12977
13084
  width: "100%",
@@ -13756,6 +13863,12 @@ const NewNDCStepForm$1 = () => {
13756
13863
  dispatch(setNDCStep(updatedStepNumber));
13757
13864
  };
13758
13865
  const handleSubmit = () => {};
13866
+ useEffect(() => {
13867
+ const unlisten = history.listen(() => {
13868
+ dispatch(resetNDCForm());
13869
+ });
13870
+ return () => unlisten();
13871
+ }, [history, dispatch]);
13759
13872
  return /*#__PURE__*/React.createElement("div", {
13760
13873
  className: "pageCard"
13761
13874
  }, /*#__PURE__*/React.createElement(CardHeader, {
@@ -13809,64 +13922,64 @@ const NewNDCStepFormOne$1 = ({
13809
13922
  } else createApplication(data);
13810
13923
  }
13811
13924
  const createApplication = async data => {
13812
- var _Digit$UserService$ge, _data$PropertyDetails, _data$PropertyDetails2, _data$PropertyDetails3, _data$PropertyDetails4, _data$PropertyDetails5, _data$PropertyDetails6, _data$PropertyDetails8, _data$PropertyDetails0, _data$PropertyDetails10, _data$PropertyDetails11, _data$NDCReason, _response$ResponseInf;
13925
+ var _Digit$UserService$ge, _data$PropertyDetails, _data$PropertyDetails2, _data$PropertyDetails3, _data$PropertyDetails4, _data$PropertyDetails5, _data$PropertyDetails7, _data$PropertyDetails9, _data$PropertyDetails1, _data$PropertyDetails10, _data$NDCReason, _response$ResponseInf;
13813
13926
  const applicant = ((_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : _Digit$UserService$ge.info) || {};
13814
13927
  const applicantId = applicant === null || applicant === void 0 ? void 0 : applicant.uuid;
13815
13928
  const owners = [{
13816
- name: `${data === null || data === void 0 ? void 0 : (_data$PropertyDetails = data.PropertyDetails) === null || _data$PropertyDetails === void 0 ? void 0 : _data$PropertyDetails.firstName} ${data === null || data === void 0 ? void 0 : (_data$PropertyDetails2 = data.PropertyDetails) === null || _data$PropertyDetails2 === void 0 ? void 0 : _data$PropertyDetails2.lastName}`.trim(),
13817
- mobileNumber: data === null || data === void 0 ? void 0 : (_data$PropertyDetails3 = data.PropertyDetails) === null || _data$PropertyDetails3 === void 0 ? void 0 : _data$PropertyDetails3.mobileNumber,
13818
- gender: data === null || data === void 0 ? void 0 : (_data$PropertyDetails4 = data.PropertyDetails) === null || _data$PropertyDetails4 === void 0 ? void 0 : _data$PropertyDetails4.gender,
13819
- emailId: data === null || data === void 0 ? void 0 : (_data$PropertyDetails5 = data.PropertyDetails) === null || _data$PropertyDetails5 === void 0 ? void 0 : _data$PropertyDetails5.email,
13929
+ name: data === null || data === void 0 ? void 0 : (_data$PropertyDetails = data.PropertyDetails) === null || _data$PropertyDetails === void 0 ? void 0 : _data$PropertyDetails.firstName,
13930
+ mobileNumber: data === null || data === void 0 ? void 0 : (_data$PropertyDetails2 = data.PropertyDetails) === null || _data$PropertyDetails2 === void 0 ? void 0 : _data$PropertyDetails2.mobileNumber,
13931
+ gender: data === null || data === void 0 ? void 0 : (_data$PropertyDetails3 = data.PropertyDetails) === null || _data$PropertyDetails3 === void 0 ? void 0 : _data$PropertyDetails3.gender,
13932
+ emailId: data === null || data === void 0 ? void 0 : (_data$PropertyDetails4 = data.PropertyDetails) === null || _data$PropertyDetails4 === void 0 ? void 0 : _data$PropertyDetails4.email,
13820
13933
  type: "CITIZEN"
13821
13934
  }];
13822
13935
  const ndcDetails = [];
13823
- ((data === null || data === void 0 ? void 0 : (_data$PropertyDetails6 = data.PropertyDetails) === null || _data$PropertyDetails6 === void 0 ? void 0 : _data$PropertyDetails6.waterConnection) || []).forEach(wc => {
13824
- var _wc$billData, _data$PropertyDetails7, _data$cpt2, _data$cpt2$details, _wc$billData2, _wc$billData3;
13936
+ ((data === null || data === void 0 ? void 0 : (_data$PropertyDetails5 = data.PropertyDetails) === null || _data$PropertyDetails5 === void 0 ? void 0 : _data$PropertyDetails5.waterConnection) || []).forEach(wc => {
13937
+ var _wc$billData, _data$PropertyDetails6, _data$cpt2, _data$cpt2$details, _wc$billData2, _wc$billData3;
13825
13938
  ndcDetails.push({
13826
13939
  uuid: wc === null || wc === void 0 ? void 0 : (_wc$billData = wc.billData) === null || _wc$billData === void 0 ? void 0 : _wc$billData.id,
13827
13940
  applicantId: applicantId,
13828
13941
  businessService: "WS",
13829
13942
  consumerCode: wc === null || wc === void 0 ? void 0 : wc.connectionNo,
13830
13943
  additionalDetails: {
13831
- propertyAddress: data === null || data === void 0 ? void 0 : (_data$PropertyDetails7 = data.PropertyDetails) === null || _data$PropertyDetails7 === void 0 ? void 0 : _data$PropertyDetails7.address,
13944
+ propertyAddress: data === null || data === void 0 ? void 0 : (_data$PropertyDetails6 = data.PropertyDetails) === null || _data$PropertyDetails6 === void 0 ? void 0 : _data$PropertyDetails6.address,
13832
13945
  propertyType: data === null || data === void 0 ? void 0 : (_data$cpt2 = data.cpt) === null || _data$cpt2 === void 0 ? void 0 : (_data$cpt2$details = _data$cpt2.details) === null || _data$cpt2$details === void 0 ? void 0 : _data$cpt2$details.usageCategory
13833
13946
  },
13834
13947
  dueAmount: (wc === null || wc === void 0 ? void 0 : (_wc$billData2 = wc.billData) === null || _wc$billData2 === void 0 ? void 0 : _wc$billData2.totalAmount) || 0,
13835
13948
  status: wc === null || wc === void 0 ? void 0 : (_wc$billData3 = wc.billData) === null || _wc$billData3 === void 0 ? void 0 : _wc$billData3.status
13836
13949
  });
13837
13950
  });
13838
- ((data === null || data === void 0 ? void 0 : (_data$PropertyDetails8 = data.PropertyDetails) === null || _data$PropertyDetails8 === void 0 ? void 0 : _data$PropertyDetails8.sewerageConnection) || []).forEach(sc => {
13839
- var _sc$billData, _data$PropertyDetails9, _data$cpt3, _data$cpt3$details, _sc$billData2, _sc$billData3;
13951
+ ((data === null || data === void 0 ? void 0 : (_data$PropertyDetails7 = data.PropertyDetails) === null || _data$PropertyDetails7 === void 0 ? void 0 : _data$PropertyDetails7.sewerageConnection) || []).forEach(sc => {
13952
+ var _sc$billData, _data$PropertyDetails8, _data$cpt3, _data$cpt3$details, _sc$billData2, _sc$billData3;
13840
13953
  ndcDetails.push({
13841
13954
  uuid: sc === null || sc === void 0 ? void 0 : (_sc$billData = sc.billData) === null || _sc$billData === void 0 ? void 0 : _sc$billData.id,
13842
13955
  applicantId: applicantId,
13843
13956
  businessService: "SW",
13844
13957
  consumerCode: sc === null || sc === void 0 ? void 0 : sc.connectionNo,
13845
13958
  additionalDetails: {
13846
- propertyAddress: data === null || data === void 0 ? void 0 : (_data$PropertyDetails9 = data.PropertyDetails) === null || _data$PropertyDetails9 === void 0 ? void 0 : _data$PropertyDetails9.address,
13959
+ propertyAddress: data === null || data === void 0 ? void 0 : (_data$PropertyDetails8 = data.PropertyDetails) === null || _data$PropertyDetails8 === void 0 ? void 0 : _data$PropertyDetails8.address,
13847
13960
  propertyType: data === null || data === void 0 ? void 0 : (_data$cpt3 = data.cpt) === null || _data$cpt3 === void 0 ? void 0 : (_data$cpt3$details = _data$cpt3.details) === null || _data$cpt3$details === void 0 ? void 0 : _data$cpt3$details.usageCategory
13848
13961
  },
13849
13962
  dueAmount: (sc === null || sc === void 0 ? void 0 : (_sc$billData2 = sc.billData) === null || _sc$billData2 === void 0 ? void 0 : _sc$billData2.totalAmount) || 0,
13850
13963
  status: sc === null || sc === void 0 ? void 0 : (_sc$billData3 = sc.billData) === null || _sc$billData3 === void 0 ? void 0 : _sc$billData3.status
13851
13964
  });
13852
13965
  });
13853
- if (data !== null && data !== void 0 && (_data$PropertyDetails0 = data.PropertyDetails) !== null && _data$PropertyDetails0 !== void 0 && _data$PropertyDetails0.tlNumber) {
13854
- var _data$PropertyDetails1;
13966
+ if (data !== null && data !== void 0 && (_data$PropertyDetails9 = data.PropertyDetails) !== null && _data$PropertyDetails9 !== void 0 && _data$PropertyDetails9.tlNumber) {
13967
+ var _data$PropertyDetails0;
13855
13968
  ndcDetails.push({
13856
13969
  businessService: "TL",
13857
- consumerCode: data === null || data === void 0 ? void 0 : (_data$PropertyDetails1 = data.PropertyDetails) === null || _data$PropertyDetails1 === void 0 ? void 0 : _data$PropertyDetails1.tlNumber
13970
+ consumerCode: data === null || data === void 0 ? void 0 : (_data$PropertyDetails0 = data.PropertyDetails) === null || _data$PropertyDetails0 === void 0 ? void 0 : _data$PropertyDetails0.tlNumber
13858
13971
  });
13859
13972
  }
13860
- if (data !== null && data !== void 0 && (_data$PropertyDetails10 = data.PropertyDetails) !== null && _data$PropertyDetails10 !== void 0 && (_data$PropertyDetails11 = _data$PropertyDetails10.propertyBillData) !== null && _data$PropertyDetails11 !== void 0 && _data$PropertyDetails11.billData) {
13861
- var _data$PropertyDetails12, _data$PropertyDetails13, _data$cpt4, _data$PropertyDetails14, _data$cpt5, _data$cpt5$details;
13862
- const billData = data === null || data === void 0 ? void 0 : (_data$PropertyDetails12 = data.PropertyDetails) === null || _data$PropertyDetails12 === void 0 ? void 0 : (_data$PropertyDetails13 = _data$PropertyDetails12.propertyBillData) === null || _data$PropertyDetails13 === void 0 ? void 0 : _data$PropertyDetails13.billData;
13973
+ if (data !== null && data !== void 0 && (_data$PropertyDetails1 = data.PropertyDetails) !== null && _data$PropertyDetails1 !== void 0 && (_data$PropertyDetails10 = _data$PropertyDetails1.propertyBillData) !== null && _data$PropertyDetails10 !== void 0 && _data$PropertyDetails10.billData) {
13974
+ var _data$PropertyDetails11, _data$PropertyDetails12, _data$cpt4, _data$PropertyDetails13, _data$cpt5, _data$cpt5$details;
13975
+ const billData = data === null || data === void 0 ? void 0 : (_data$PropertyDetails11 = data.PropertyDetails) === null || _data$PropertyDetails11 === void 0 ? void 0 : (_data$PropertyDetails12 = _data$PropertyDetails11.propertyBillData) === null || _data$PropertyDetails12 === void 0 ? void 0 : _data$PropertyDetails12.billData;
13863
13976
  ndcDetails.push({
13864
13977
  uuid: billData === null || billData === void 0 ? void 0 : billData.id,
13865
13978
  applicantId: applicantId,
13866
13979
  businessService: "PT",
13867
13980
  consumerCode: data === null || data === void 0 ? void 0 : (_data$cpt4 = data.cpt) === null || _data$cpt4 === void 0 ? void 0 : _data$cpt4.id,
13868
13981
  additionalDetails: {
13869
- propertyAddress: data === null || data === void 0 ? void 0 : (_data$PropertyDetails14 = data.PropertyDetails) === null || _data$PropertyDetails14 === void 0 ? void 0 : _data$PropertyDetails14.address,
13982
+ propertyAddress: data === null || data === void 0 ? void 0 : (_data$PropertyDetails13 = data.PropertyDetails) === null || _data$PropertyDetails13 === void 0 ? void 0 : _data$PropertyDetails13.address,
13870
13983
  propertyType: data === null || data === void 0 ? void 0 : (_data$cpt5 = data.cpt) === null || _data$cpt5 === void 0 ? void 0 : (_data$cpt5$details = _data$cpt5.details) === null || _data$cpt5$details === void 0 ? void 0 : _data$cpt5$details.usageCategory
13871
13984
  },
13872
13985
  dueAmount: (billData === null || billData === void 0 ? void 0 : billData.totalAmount) || 0,
@@ -13905,7 +14018,7 @@ const NewNDCStepFormOne$1 = ({
13905
14018
  }
13906
14019
  };
13907
14020
  function validateStepData(data) {
13908
- var _data$cpt6, _data$cpt6$dues, _data$cpt7, _data$cpt7$dues, _data$dues, _propertyDetails$wate, _propertyDetails$sewe;
14021
+ var _data$cpt6, _data$cpt7, _data$cpt7$dues, _propertyDetails$wate, _propertyDetails$sewe;
13909
14022
  console.log("data", data);
13910
14023
  const missingFields = [];
13911
14024
  const invalidFields = [];
@@ -13913,10 +14026,10 @@ const NewNDCStepFormOne$1 = ({
13913
14026
  const cptDetails = (cpt === null || cpt === void 0 ? void 0 : cpt.details) || {};
13914
14027
  const propertyDetails = (data === null || data === void 0 ? void 0 : data.PropertyDetails) || {};
13915
14028
  const NDCReason = (data === null || data === void 0 ? void 0 : data.NDCReason) || {};
13916
- if ((data === null || data === void 0 ? void 0 : (_data$cpt6 = data.cpt) === null || _data$cpt6 === void 0 ? void 0 : (_data$cpt6$dues = _data$cpt6.dues) === null || _data$cpt6$dues === void 0 ? void 0 : _data$cpt6$dues.totalAmount) != 0) {
14029
+ if (!(data !== null && data !== void 0 && (_data$cpt6 = data.cpt) !== null && _data$cpt6 !== void 0 && _data$cpt6.dues)) {
13917
14030
  invalidFields.push(`${t("NDC_MESSAGE_PLEASE_CHECK_STATUS_OF_PROPERTY_TAX")} ${cpt === null || cpt === void 0 ? void 0 : cpt.id}`);
13918
14031
  }
13919
- if (data !== null && data !== void 0 && (_data$cpt7 = data.cpt) !== null && _data$cpt7 !== void 0 && (_data$cpt7$dues = _data$cpt7.dues) !== null && _data$cpt7$dues !== void 0 && _data$cpt7$dues.id && (data === null || data === void 0 ? void 0 : (_data$dues = data.dues) === null || _data$dues === void 0 ? void 0 : _data$dues.totalAmount) > 0) {
14032
+ if ((data === null || data === void 0 ? void 0 : (_data$cpt7 = data.cpt) === null || _data$cpt7 === void 0 ? void 0 : (_data$cpt7$dues = _data$cpt7.dues) === null || _data$cpt7$dues === void 0 ? void 0 : _data$cpt7$dues.totalAmount) > 0) {
13920
14033
  invalidFields.push(`${t("NDC_MESSAGE_PLEASE_PAY_DUES_OF_PROPERTY_TAX")} ${cpt === null || cpt === void 0 ? void 0 : cpt.id}`);
13921
14034
  }
13922
14035
  if ((propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$wate = propertyDetails.waterConnection) === null || _propertyDetails$wate === void 0 ? void 0 : _propertyDetails$wate.length) > 0) {
@@ -13944,24 +14057,16 @@ const NewNDCStepFormOne$1 = ({
13944
14057
  if (!(cpt !== null && cpt !== void 0 && cpt.id)) missingFields.push(t("NDC_MESSAGE_PROPERTY_ID"));
13945
14058
  if (!cptDetails || Object.keys(cptDetails).length === 0) missingFields.push(t("NDC_MESSAGE_PLEASE_SEARCH_PROPERTY_ID"));
13946
14059
  if (!(propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.firstName)) missingFields.push(t("NDC_MESSAGE_FIRST_NAME"));
13947
- if (!(propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.lastName)) missingFields.push(t("NDC_MESSAGE_LAST_NAME"));
13948
14060
  if (!(propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.mobileNumber)) missingFields.push(t("NDC_MESSAGE_MOBILE_NUMBER"));
13949
14061
  if (!(propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.address)) missingFields.push(t("NDC_MESSAGE_ADDRESS"));
13950
14062
  if (!(propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.email)) missingFields.push(t("NDC_MESSAGE_EMAIL"));
13951
14063
  if (!(NDCReason !== null && NDCReason !== void 0 && NDCReason.code)) missingFields.push(t("NDC_MESSAGE_NDC_REASON"));
13952
14064
  const nameRegex = /^[A-Za-z\s]+$/;
13953
- const emailRegex = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9-]+\.[a-zA-Z]{2,}$/;
14065
+ const emailRegex = /^(?!\.)(?!.*\.\.)[a-zA-Z0-9._%+-]+@[a-zA-Z0-9-]+(\.[a-zA-Z]{2,})+$/;
13954
14066
  const mobileRegex = /^[6-9]\d{9}$/;
13955
14067
  if (propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.firstName && !nameRegex.test(propertyDetails.firstName)) {
13956
14068
  invalidFields.push(t("NDC_MESSAGE_FIRST_NAME_ONLY_ALPHABETS_ALLOWED"));
13957
14069
  }
13958
- if (propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.lastName) {
13959
- if (!nameRegex.test(propertyDetails.lastName)) {
13960
- invalidFields.push(t("NDC_MESSAGE_LAST_NAME_ONLY_ALPHABETS_ALLOWED"));
13961
- } else if (propertyDetails.lastName.length > 100) {
13962
- invalidFields.push(t("NDC_MESSAGE_LAST_NAME_MAX_100_CHARACTERS"));
13963
- }
13964
- }
13965
14070
  if (propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.email && !emailRegex.test(propertyDetails.email)) {
13966
14071
  invalidFields.push(t("NDC_MESSAGE_EMAIL_INVALID_FORMAT"));
13967
14072
  }