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

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.
@@ -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();
@@ -1313,7 +1313,35 @@ const ApplicationOverview = () => {
1313
1313
  setSelectedAction(null);
1314
1314
  setShowModal(false);
1315
1315
  };
1316
- if (isLoading || isDetailsLoading) {
1316
+ const [getPropertyId, setPropertyId] = useState(null);
1317
+ useEffect(() => {
1318
+ if (displayData) {
1319
+ var _displayData$NdcDetai, _checkProperty$;
1320
+ console.log("here");
1321
+ 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");
1322
+ console.log("checkProperty", checkProperty);
1323
+ setPropertyId(checkProperty === null || checkProperty === void 0 ? void 0 : (_checkProperty$ = checkProperty[0]) === null || _checkProperty$ === void 0 ? void 0 : _checkProperty$.consumerCode);
1324
+ }
1325
+ }, [displayData]);
1326
+ const {
1327
+ isLoading: checkLoading,
1328
+ isError,
1329
+ error: checkError,
1330
+ data: propertyDetailsFetch
1331
+ } = Digit.Hooks.pt.usePropertySearch({
1332
+ filters: {
1333
+ propertyIds: getPropertyId
1334
+ },
1335
+ tenantId: tenantId
1336
+ }, {
1337
+ filters: {
1338
+ propertyIds: getPropertyId
1339
+ },
1340
+ tenantId: tenantId,
1341
+ enabled: getPropertyId ? true : false,
1342
+ privacy: Digit.Utils.getPrivacyObject()
1343
+ });
1344
+ if (isLoading || isDetailsLoading || checkLoading) {
1317
1345
  return /*#__PURE__*/React.createElement(Loader, null);
1318
1346
  }
1319
1347
  return /*#__PURE__*/React.createElement("div", {
@@ -1322,8 +1350,8 @@ const ApplicationOverview = () => {
1322
1350
  key: key,
1323
1351
  label: t(`${key === null || key === void 0 ? void 0 : key.toUpperCase()}`),
1324
1352
  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;
1353
+ }))))), /*#__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) => {
1354
+ var _detail$dueAmount, _propertyDetailsFetch, _propertyDetailsFetch2, _propertyDetailsFetch3, _propertyDetailsFetch4, _propertyDetailsFetch5, _propertyDetailsFetch6, _propertyDetailsFetch7, _propertyDetailsFetch8, _propertyDetailsFetch9, _propertyDetailsFetch0, _propertyDetailsFetch1, _propertyDetailsFetch10, _propertyDetailsFetch11, _propertyDetailsFetch12, _propertyDetailsFetch13, _propertyDetailsFetch14, _propertyDetailsFetch15, _propertyDetailsFetch16, _propertyDetailsFetch17, _propertyDetailsFetch18;
1327
1355
  return /*#__PURE__*/React.createElement("div", {
1328
1356
  key: index,
1329
1357
  style: {
@@ -1344,7 +1372,28 @@ const ApplicationOverview = () => {
1344
1372
  }), /*#__PURE__*/React.createElement(Row, {
1345
1373
  label: t("NDC_PROPERTY_TYPE"),
1346
1374
  text: t(detail.propertyType) || detail.propertyType
1347
- })));
1375
+ }), (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, {
1376
+ label: t("City"),
1377
+ 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
1378
+ }), /*#__PURE__*/React.createElement(Row, {
1379
+ label: t("House No"),
1380
+ 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
1381
+ }), /*#__PURE__*/React.createElement(Row, {
1382
+ label: t("Colony Name"),
1383
+ 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
1384
+ }), /*#__PURE__*/React.createElement(Row, {
1385
+ label: t("Street Name"),
1386
+ 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
1387
+ }), /*#__PURE__*/React.createElement(Row, {
1388
+ label: t("Pincode"),
1389
+ 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"
1390
+ }), /*#__PURE__*/React.createElement(Row, {
1391
+ label: t("Survey Id/UID"),
1392
+ 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
1393
+ }), /*#__PURE__*/React.createElement(Row, {
1394
+ label: t("Year of creation of Property"),
1395
+ 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
1396
+ }))));
1348
1397
  })), /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(CardSubHeader, null, t("NDC_APPLICATION_DOCUMENTS_OVERVIEW")), /*#__PURE__*/React.createElement("div", {
1349
1398
  style: {
1350
1399
  display: "flex",
@@ -8801,7 +8850,7 @@ const getTimelineCaptions$1 = (checkpoint, index, arr, t) => {
8801
8850
  }, 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
8851
  };
8803
8852
  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;
8853
+ 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
8854
  const {
8806
8855
  id
8807
8856
  } = useParams();
@@ -8906,6 +8955,34 @@ const CitizenApplicationOverview = () => {
8906
8955
  console.log("acknowledgementData", acknowledgementData);
8907
8956
  Digit.Utils.pdf.generateNDC(acknowledgementData);
8908
8957
  };
8958
+ const [getPropertyId, setPropertyId] = useState(null);
8959
+ useEffect(() => {
8960
+ if (displayData) {
8961
+ var _displayData$NdcDetai, _checkProperty$;
8962
+ console.log("here");
8963
+ 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");
8964
+ console.log("checkProperty", checkProperty);
8965
+ setPropertyId(checkProperty === null || checkProperty === void 0 ? void 0 : (_checkProperty$ = checkProperty[0]) === null || _checkProperty$ === void 0 ? void 0 : _checkProperty$.consumerCode);
8966
+ }
8967
+ }, [displayData]);
8968
+ const {
8969
+ isLoading: checkLoading,
8970
+ isError,
8971
+ error: checkError,
8972
+ data: propertyDetailsFetch
8973
+ } = Digit.Hooks.pt.usePropertySearch({
8974
+ filters: {
8975
+ propertyIds: getPropertyId
8976
+ },
8977
+ tenantId: tenantId
8978
+ }, {
8979
+ filters: {
8980
+ propertyIds: getPropertyId
8981
+ },
8982
+ tenantId: tenantId,
8983
+ enabled: getPropertyId ? true : false,
8984
+ privacy: Digit.Utils.getPrivacyObject()
8985
+ });
8909
8986
  if (isLoading || isDetailsLoading) {
8910
8987
  return /*#__PURE__*/React.createElement(Loader, null);
8911
8988
  }
@@ -8941,8 +9018,8 @@ const CitizenApplicationOverview = () => {
8941
9018
  className: "ndc_card_main"
8942
9019
  }, /*#__PURE__*/React.createElement(CardSubHeader, {
8943
9020
  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;
9021
+ }, 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) => {
9022
+ var _detail$dueAmount, _propertyDetailsFetch, _propertyDetailsFetch2, _propertyDetailsFetch3, _propertyDetailsFetch4, _propertyDetailsFetch5, _propertyDetailsFetch6, _propertyDetailsFetch7, _propertyDetailsFetch8, _propertyDetailsFetch9, _propertyDetailsFetch0, _propertyDetailsFetch1, _propertyDetailsFetch10, _propertyDetailsFetch11, _propertyDetailsFetch12, _propertyDetailsFetch13, _propertyDetailsFetch14, _propertyDetailsFetch15, _propertyDetailsFetch16, _propertyDetailsFetch17, _propertyDetailsFetch18;
8946
9023
  return /*#__PURE__*/React.createElement("div", {
8947
9024
  key: index,
8948
9025
  style: {
@@ -8963,7 +9040,28 @@ const CitizenApplicationOverview = () => {
8963
9040
  }), /*#__PURE__*/React.createElement(Row, {
8964
9041
  label: t("NDC_PROPERTY_TYPE"),
8965
9042
  text: t(detail.propertyType) || detail.propertyType
8966
- })));
9043
+ }), (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, {
9044
+ label: t("City"),
9045
+ 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
9046
+ }), /*#__PURE__*/React.createElement(Row, {
9047
+ label: t("House No"),
9048
+ 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
9049
+ }), /*#__PURE__*/React.createElement(Row, {
9050
+ label: t("Colony Name"),
9051
+ 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
9052
+ }), /*#__PURE__*/React.createElement(Row, {
9053
+ label: t("Street Name"),
9054
+ 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
9055
+ }), /*#__PURE__*/React.createElement(Row, {
9056
+ label: t("Pincode"),
9057
+ 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"
9058
+ }), /*#__PURE__*/React.createElement(Row, {
9059
+ label: t("Survey Id/UID"),
9060
+ 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
9061
+ }), /*#__PURE__*/React.createElement(Row, {
9062
+ label: t("Year of creation of Property"),
9063
+ 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
9064
+ }))));
8967
9065
  })), /*#__PURE__*/React.createElement(Card, {
8968
9066
  className: "ndc_card_main"
8969
9067
  }, /*#__PURE__*/React.createElement(CardSubHeader, {
@@ -9109,11 +9207,14 @@ const SearchFormFieldsComponents = ({
9109
9207
  textAlign: "start"
9110
9208
  }
9111
9209
  }, /*#__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
9210
  name: "uuid",
9116
9211
  inputRef: registerRef({})
9212
+ })), /*#__PURE__*/React.createElement(SearchField, null, /*#__PURE__*/React.createElement("label", null, t("CORE_COMMON_PHONE_NUMBER")), /*#__PURE__*/React.createElement(TextInput, {
9213
+ name: "phoneNumber",
9214
+ inputRef: registerRef({})
9215
+ })), /*#__PURE__*/React.createElement(SearchField, null, /*#__PURE__*/React.createElement("label", null, t("NDC_MSG_PROPERTY_LABEL")), /*#__PURE__*/React.createElement(TextInput, {
9216
+ name: "propertyId",
9217
+ inputRef: registerRef({})
9117
9218
  })), /*#__PURE__*/React.createElement("div", {
9118
9219
  className: "search-action-wrapper",
9119
9220
  style: {
@@ -9521,7 +9622,8 @@ const Inbox = ({
9521
9622
  headerText: `${t("MODULE_NKS_NO_DUE_CERTIFICATE_FEES")}`,
9522
9623
  links: [{
9523
9624
  text: "Create NDC Application",
9524
- link: "/digit-ui/employee/ndc/create"
9625
+ link: "/digit-ui/employee/ndc/create",
9626
+ accessTo: [""]
9525
9627
  }]
9526
9628
  };
9527
9629
  const SearchFormFields = useCallback(({
@@ -11523,7 +11625,6 @@ const NewNDCStepForm = () => {
11523
11625
  const handleSubmit = () => {};
11524
11626
  useEffect(() => {
11525
11627
  const unlisten = history.listen(() => {
11526
- console.log("route changes guys");
11527
11628
  dispatch(resetNDCForm());
11528
11629
  });
11529
11630
  return () => unlisten();
@@ -12546,24 +12647,20 @@ const PropertyDetailsForm$1 = ({
12546
12647
  }, /*#__PURE__*/React.createElement(Controller, {
12547
12648
  control: control,
12548
12649
  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
- }
12650
+ defaultValue: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.email) || "",
12651
+ render: props => /*#__PURE__*/React.createElement(TextInput, {
12652
+ value: propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.email,
12653
+ onChange: e => {
12654
+ setPropertyDetails(prev => ({
12655
+ ...prev,
12656
+ email: e.target.value
12657
+ }));
12658
+ props.onChange(e.target.value);
12659
+ },
12660
+ onBlur: e => {
12661
+ props.onBlur(e);
12662
+ }
12663
+ })
12567
12664
  }))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
12568
12665
  className: "card-label-smaller ndc_card_labels"
12569
12666
  }, `${t("NDC_MOBILE_NUMBER")} * `), /*#__PURE__*/React.createElement("div", {
@@ -12594,7 +12691,7 @@ const PropertyDetailsForm$1 = ({
12594
12691
  name: "address",
12595
12692
  defaultValue: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.address) || "",
12596
12693
  render: props => {
12597
- var _formData$cpt0, _formData$cpt0$detail, _formData$cpt0$detail2, _formData$cpt0$detail3, _formData$cpt0$detail4;
12694
+ var _formData$cpt9, _formData$cpt9$detail, _formData$cpt9$detail2, _formData$cpt9$detail3, _formData$cpt9$detail4;
12598
12695
  return /*#__PURE__*/React.createElement(TextInput, {
12599
12696
  value: propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.address,
12600
12697
  onChange: e => {
@@ -12607,7 +12704,7 @@ const PropertyDetailsForm$1 = ({
12607
12704
  onBlur: e => {
12608
12705
  props.onBlur(e);
12609
12706
  },
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
12707
+ 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.permanentAddress) === null || _formData$cpt9$detail4 === void 0 ? void 0 : _formData$cpt9$detail4.length) > 0
12611
12708
  });
12612
12709
  }
12613
12710
  })))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
@@ -12759,7 +12856,7 @@ const PropertySearchNSummary = ({
12759
12856
  setPropertyDetails({});
12760
12857
  setShowToast({
12761
12858
  error: true,
12762
- label: "PT_ENTER_VALID_PROPERTY_ID"
12859
+ label: "CS_PT_NO_PROPERTIES_FOUND"
12763
12860
  });
12764
12861
  }
12765
12862
  }
@@ -12772,7 +12869,7 @@ const PropertySearchNSummary = ({
12772
12869
  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
12870
  setShowToast({
12774
12871
  error: true,
12775
- label: "PT_ENTER_VALID_PROPERTY_ID"
12872
+ label: "CS_PT_NO_PROPERTIES_FOUND"
12776
12873
  });
12777
12874
  }
12778
12875
  }, [error, propertyDetails]);
@@ -12803,6 +12900,7 @@ const PropertySearchNSummary = ({
12803
12900
  });
12804
12901
  setSearchPropertyId(propertyId);
12805
12902
  setIsSearchClicked(true);
12903
+ dispatch(resetNDCForm());
12806
12904
  }
12807
12905
  };
12808
12906
  const handlePropertyChange = e => {
@@ -12936,7 +13034,6 @@ const PropertySearchNSummary = ({
12936
13034
  value: propertyId,
12937
13035
  onChange: handlePropertyChange,
12938
13036
  disable: false,
12939
- maxlength: 16,
12940
13037
  defaultValue: undefined
12941
13038
  }, propertyIdInput.validation)), !isSearchClicked && /*#__PURE__*/React.createElement("button", {
12942
13039
  className: "submit-bar",
@@ -13756,6 +13853,12 @@ const NewNDCStepForm$1 = () => {
13756
13853
  dispatch(setNDCStep(updatedStepNumber));
13757
13854
  };
13758
13855
  const handleSubmit = () => {};
13856
+ useEffect(() => {
13857
+ const unlisten = history.listen(() => {
13858
+ dispatch(resetNDCForm());
13859
+ });
13860
+ return () => unlisten();
13861
+ }, [history, dispatch]);
13759
13862
  return /*#__PURE__*/React.createElement("div", {
13760
13863
  className: "pageCard"
13761
13864
  }, /*#__PURE__*/React.createElement(CardHeader, {
@@ -13809,64 +13912,64 @@ const NewNDCStepFormOne$1 = ({
13809
13912
  } else createApplication(data);
13810
13913
  }
13811
13914
  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;
13915
+ 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
13916
  const applicant = ((_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : _Digit$UserService$ge.info) || {};
13814
13917
  const applicantId = applicant === null || applicant === void 0 ? void 0 : applicant.uuid;
13815
13918
  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,
13919
+ name: data === null || data === void 0 ? void 0 : (_data$PropertyDetails = data.PropertyDetails) === null || _data$PropertyDetails === void 0 ? void 0 : _data$PropertyDetails.firstName,
13920
+ mobileNumber: data === null || data === void 0 ? void 0 : (_data$PropertyDetails2 = data.PropertyDetails) === null || _data$PropertyDetails2 === void 0 ? void 0 : _data$PropertyDetails2.mobileNumber,
13921
+ gender: data === null || data === void 0 ? void 0 : (_data$PropertyDetails3 = data.PropertyDetails) === null || _data$PropertyDetails3 === void 0 ? void 0 : _data$PropertyDetails3.gender,
13922
+ emailId: data === null || data === void 0 ? void 0 : (_data$PropertyDetails4 = data.PropertyDetails) === null || _data$PropertyDetails4 === void 0 ? void 0 : _data$PropertyDetails4.email,
13820
13923
  type: "CITIZEN"
13821
13924
  }];
13822
13925
  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;
13926
+ ((data === null || data === void 0 ? void 0 : (_data$PropertyDetails5 = data.PropertyDetails) === null || _data$PropertyDetails5 === void 0 ? void 0 : _data$PropertyDetails5.waterConnection) || []).forEach(wc => {
13927
+ var _wc$billData, _data$PropertyDetails6, _data$cpt2, _data$cpt2$details, _wc$billData2, _wc$billData3;
13825
13928
  ndcDetails.push({
13826
13929
  uuid: wc === null || wc === void 0 ? void 0 : (_wc$billData = wc.billData) === null || _wc$billData === void 0 ? void 0 : _wc$billData.id,
13827
13930
  applicantId: applicantId,
13828
13931
  businessService: "WS",
13829
13932
  consumerCode: wc === null || wc === void 0 ? void 0 : wc.connectionNo,
13830
13933
  additionalDetails: {
13831
- propertyAddress: data === null || data === void 0 ? void 0 : (_data$PropertyDetails7 = data.PropertyDetails) === null || _data$PropertyDetails7 === void 0 ? void 0 : _data$PropertyDetails7.address,
13934
+ propertyAddress: data === null || data === void 0 ? void 0 : (_data$PropertyDetails6 = data.PropertyDetails) === null || _data$PropertyDetails6 === void 0 ? void 0 : _data$PropertyDetails6.address,
13832
13935
  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
13936
  },
13834
13937
  dueAmount: (wc === null || wc === void 0 ? void 0 : (_wc$billData2 = wc.billData) === null || _wc$billData2 === void 0 ? void 0 : _wc$billData2.totalAmount) || 0,
13835
13938
  status: wc === null || wc === void 0 ? void 0 : (_wc$billData3 = wc.billData) === null || _wc$billData3 === void 0 ? void 0 : _wc$billData3.status
13836
13939
  });
13837
13940
  });
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;
13941
+ ((data === null || data === void 0 ? void 0 : (_data$PropertyDetails7 = data.PropertyDetails) === null || _data$PropertyDetails7 === void 0 ? void 0 : _data$PropertyDetails7.sewerageConnection) || []).forEach(sc => {
13942
+ var _sc$billData, _data$PropertyDetails8, _data$cpt3, _data$cpt3$details, _sc$billData2, _sc$billData3;
13840
13943
  ndcDetails.push({
13841
13944
  uuid: sc === null || sc === void 0 ? void 0 : (_sc$billData = sc.billData) === null || _sc$billData === void 0 ? void 0 : _sc$billData.id,
13842
13945
  applicantId: applicantId,
13843
13946
  businessService: "SW",
13844
13947
  consumerCode: sc === null || sc === void 0 ? void 0 : sc.connectionNo,
13845
13948
  additionalDetails: {
13846
- propertyAddress: data === null || data === void 0 ? void 0 : (_data$PropertyDetails9 = data.PropertyDetails) === null || _data$PropertyDetails9 === void 0 ? void 0 : _data$PropertyDetails9.address,
13949
+ propertyAddress: data === null || data === void 0 ? void 0 : (_data$PropertyDetails8 = data.PropertyDetails) === null || _data$PropertyDetails8 === void 0 ? void 0 : _data$PropertyDetails8.address,
13847
13950
  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
13951
  },
13849
13952
  dueAmount: (sc === null || sc === void 0 ? void 0 : (_sc$billData2 = sc.billData) === null || _sc$billData2 === void 0 ? void 0 : _sc$billData2.totalAmount) || 0,
13850
13953
  status: sc === null || sc === void 0 ? void 0 : (_sc$billData3 = sc.billData) === null || _sc$billData3 === void 0 ? void 0 : _sc$billData3.status
13851
13954
  });
13852
13955
  });
13853
- if (data !== null && data !== void 0 && (_data$PropertyDetails0 = data.PropertyDetails) !== null && _data$PropertyDetails0 !== void 0 && _data$PropertyDetails0.tlNumber) {
13854
- var _data$PropertyDetails1;
13956
+ if (data !== null && data !== void 0 && (_data$PropertyDetails9 = data.PropertyDetails) !== null && _data$PropertyDetails9 !== void 0 && _data$PropertyDetails9.tlNumber) {
13957
+ var _data$PropertyDetails0;
13855
13958
  ndcDetails.push({
13856
13959
  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
13960
+ consumerCode: data === null || data === void 0 ? void 0 : (_data$PropertyDetails0 = data.PropertyDetails) === null || _data$PropertyDetails0 === void 0 ? void 0 : _data$PropertyDetails0.tlNumber
13858
13961
  });
13859
13962
  }
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;
13963
+ 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) {
13964
+ var _data$PropertyDetails11, _data$PropertyDetails12, _data$cpt4, _data$PropertyDetails13, _data$cpt5, _data$cpt5$details;
13965
+ 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
13966
  ndcDetails.push({
13864
13967
  uuid: billData === null || billData === void 0 ? void 0 : billData.id,
13865
13968
  applicantId: applicantId,
13866
13969
  businessService: "PT",
13867
13970
  consumerCode: data === null || data === void 0 ? void 0 : (_data$cpt4 = data.cpt) === null || _data$cpt4 === void 0 ? void 0 : _data$cpt4.id,
13868
13971
  additionalDetails: {
13869
- propertyAddress: data === null || data === void 0 ? void 0 : (_data$PropertyDetails14 = data.PropertyDetails) === null || _data$PropertyDetails14 === void 0 ? void 0 : _data$PropertyDetails14.address,
13972
+ propertyAddress: data === null || data === void 0 ? void 0 : (_data$PropertyDetails13 = data.PropertyDetails) === null || _data$PropertyDetails13 === void 0 ? void 0 : _data$PropertyDetails13.address,
13870
13973
  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
13974
  },
13872
13975
  dueAmount: (billData === null || billData === void 0 ? void 0 : billData.totalAmount) || 0,
@@ -13944,7 +14047,6 @@ const NewNDCStepFormOne$1 = ({
13944
14047
  if (!(cpt !== null && cpt !== void 0 && cpt.id)) missingFields.push(t("NDC_MESSAGE_PROPERTY_ID"));
13945
14048
  if (!cptDetails || Object.keys(cptDetails).length === 0) missingFields.push(t("NDC_MESSAGE_PLEASE_SEARCH_PROPERTY_ID"));
13946
14049
  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
14050
  if (!(propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.mobileNumber)) missingFields.push(t("NDC_MESSAGE_MOBILE_NUMBER"));
13949
14051
  if (!(propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.address)) missingFields.push(t("NDC_MESSAGE_ADDRESS"));
13950
14052
  if (!(propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.email)) missingFields.push(t("NDC_MESSAGE_EMAIL"));
@@ -13955,13 +14057,6 @@ const NewNDCStepFormOne$1 = ({
13955
14057
  if (propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.firstName && !nameRegex.test(propertyDetails.firstName)) {
13956
14058
  invalidFields.push(t("NDC_MESSAGE_FIRST_NAME_ONLY_ALPHABETS_ALLOWED"));
13957
14059
  }
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
14060
  if (propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.email && !emailRegex.test(propertyDetails.email)) {
13966
14061
  invalidFields.push(t("NDC_MESSAGE_EMAIL_INVALID_FORMAT"));
13967
14062
  }