@mseva/digit-ui-module-ndc 1.0.19 → 1.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -12061,7 +12061,7 @@ function SelectNDCReason(_ref) {
12061
12061
  }
12062
12062
 
12063
12063
  const PropertyDetailsForm$1 = _ref => {
12064
- var _formData$cpt, _formData$cpt$details, _formData$cpt3, _Digit, _Digit$ComponentRegis, _formData$cpt4, _apiDataCheck$6, _propertyDetails$wate, _propertyDetails$sewe;
12064
+ var _formData$cpt, _formData$cpt$details, _formData$cpt3, _Digit, _Digit$ComponentRegis, _formData$cpt4, _apiDataCheck$6, _propertyDetails$wate, _propertyDetails$sewe, _formData$cpt7, _formData$cpt7$detail, _formData$cpt7$detail2, _formData$cpt7$detail3;
12065
12065
  const fetchBill = function (bussinessService, consumercodes, index) {
12066
12066
  try {
12067
12067
  if (bussinessService === "WS") {
@@ -12741,9 +12741,9 @@ const PropertyDetailsForm$1 = _ref => {
12741
12741
  }, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
12742
12742
  control: control,
12743
12743
  name: "email",
12744
- defaultValue: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.email) || "",
12744
+ defaultValue: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.email) || (formData === null || formData === void 0 ? void 0 : (_formData$cpt7 = formData.cpt) === null || _formData$cpt7 === void 0 ? void 0 : (_formData$cpt7$detail = _formData$cpt7.details) === null || _formData$cpt7$detail === void 0 ? void 0 : (_formData$cpt7$detail2 = _formData$cpt7$detail.owners) === null || _formData$cpt7$detail2 === void 0 ? void 0 : (_formData$cpt7$detail3 = _formData$cpt7$detail2[0]) === null || _formData$cpt7$detail3 === void 0 ? void 0 : _formData$cpt7$detail3.emailId),
12745
12745
  render: props => {
12746
- var _formData$cpt7, _formData$cpt7$detail, _formData$cpt7$detail2, _formData$cpt7$detail3;
12746
+ var _formData$cpt8, _formData$cpt8$detail, _formData$cpt8$detail2, _formData$cpt8$detail3;
12747
12747
  return /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
12748
12748
  value: props === null || props === void 0 ? void 0 : props.value,
12749
12749
  onChange: e => {
@@ -12755,7 +12755,7 @@ const PropertyDetailsForm$1 = _ref => {
12755
12755
  onBlur: e => {
12756
12756
  props.onBlur(e);
12757
12757
  },
12758
- disabled: formData === null || formData === void 0 ? void 0 : (_formData$cpt7 = formData.cpt) === null || _formData$cpt7 === void 0 ? void 0 : (_formData$cpt7$detail = _formData$cpt7.details) === null || _formData$cpt7$detail === void 0 ? void 0 : (_formData$cpt7$detail2 = _formData$cpt7$detail.owners) === null || _formData$cpt7$detail2 === void 0 ? void 0 : (_formData$cpt7$detail3 = _formData$cpt7$detail2[0]) === null || _formData$cpt7$detail3 === void 0 ? void 0 : _formData$cpt7$detail3.emailId
12758
+ 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$detail3.emailId
12759
12759
  });
12760
12760
  }
12761
12761
  }))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, {
@@ -12787,7 +12787,7 @@ const PropertyDetailsForm$1 = _ref => {
12787
12787
  name: "address",
12788
12788
  defaultValue: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.address) || "",
12789
12789
  render: props => {
12790
- var _formData$cpt8, _formData$cpt8$detail, _formData$cpt8$detail2, _formData$cpt8$detail3, _formData$cpt8$detail4;
12790
+ var _formData$cpt9, _formData$cpt9$detail, _formData$cpt9$detail2, _formData$cpt9$detail3, _formData$cpt9$detail4;
12791
12791
  return /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
12792
12792
  value: propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.address,
12793
12793
  onChange: e => {
@@ -12799,7 +12799,7 @@ const PropertyDetailsForm$1 = _ref => {
12799
12799
  onBlur: e => {
12800
12800
  props.onBlur(e);
12801
12801
  },
12802
- 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.permanentAddress) === null || _formData$cpt8$detail4 === void 0 ? void 0 : _formData$cpt8$detail4.length) > 0
12802
+ 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
12803
12803
  });
12804
12804
  }
12805
12805
  })))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, {
@@ -12840,14 +12840,14 @@ const getAddress = (address, t) => {
12840
12840
  return (address !== null && address !== void 0 && address.doorNo ? (address === null || address === void 0 ? void 0 : address.doorNo) + ", " : "") + " " + (address !== null && address !== void 0 && address.street ? (address === null || address === void 0 ? void 0 : address.street) + ", " : "") + (address !== null && address !== void 0 && address.landmark ? (address === null || address === void 0 ? void 0 : address.landmark) + ", " : "") + t(Digit.Utils.pt.getMohallaLocale(address === null || address === void 0 ? void 0 : address.locality.code, address === null || address === void 0 ? void 0 : address.tenantId)) + ", " + t(Digit.Utils.pt.getCityLocale(address === null || address === void 0 ? void 0 : address.tenantId)) + (address !== null && address !== void 0 && address.pincode && t(address === null || address === void 0 ? void 0 : address.pincode) ? ", " + address.pincode : " ");
12841
12841
  };
12842
12842
  const PropertySearchNSummary = _ref => {
12843
- var _apiDataCheck$, _apiDataCheck$$NdcDet, _formData$cpt, _formData$cpt2, _propertyDetails$Prop3, _apiDataCheck$2, _formData$cpt11, _formData$cpt12, _formData$cpt12$dues;
12843
+ var _apiDataCheck$, _apiDataCheck$$NdcDet, _formData$cpt, _formData$cpt2, _propertyDetails$Prop3, _apiDataCheck$2;
12844
12844
  const fetchBill = function () {
12845
12845
  try {
12846
12846
  const _temp = _catch(function () {
12847
- var _formData$cpt14;
12847
+ var _formData$cpt12;
12848
12848
  return Promise.resolve(Digit.PaymentService.fetchBill(tenantId, {
12849
12849
  businessService: "PT",
12850
- consumerCode: formData === null || formData === void 0 ? void 0 : (_formData$cpt14 = formData.cpt) === null || _formData$cpt14 === void 0 ? void 0 : _formData$cpt14.id
12850
+ consumerCode: formData === null || formData === void 0 ? void 0 : (_formData$cpt12 = formData.cpt) === null || _formData$cpt12 === void 0 ? void 0 : _formData$cpt12.id
12851
12851
  })).then(function (result) {
12852
12852
  var _result$Bill;
12853
12853
  if ((result === null || result === void 0 ? void 0 : (_result$Bill = result.Bill) === null || _result$Bill === void 0 ? void 0 : _result$Bill.length) > 0) {
@@ -12857,6 +12857,7 @@ const PropertySearchNSummary = _ref => {
12857
12857
  error: true,
12858
12858
  label: t("NDC_MESSAGE_DUES_FOUND_PLEASE_PAY")
12859
12859
  });
12860
+ setPayDuesButton(true);
12860
12861
  } else {
12861
12862
  setShowToast({
12862
12863
  error: false,
@@ -12963,6 +12964,7 @@ const PropertySearchNSummary = _ref => {
12963
12964
  const [isSearchClicked, setIsSearchClicked] = React.useState(false);
12964
12965
  const [getNoDue, setNoDue] = React.useState(false);
12965
12966
  const [getCheckStatus, setCheckStats] = React.useState(false);
12967
+ const [getPayDuesButton, setPayDuesButton] = React.useState(false);
12966
12968
  const {
12967
12969
  isLoading,
12968
12970
  isError,
@@ -13059,6 +13061,7 @@ const PropertySearchNSummary = _ref => {
13059
13061
  setIsSearchClicked(false);
13060
13062
  setNoDue(false);
13061
13063
  setCheckStats(false);
13064
+ setPayDuesButton(false);
13062
13065
  };
13063
13066
  if (isEditScreen) {
13064
13067
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null);
@@ -13135,7 +13138,7 @@ const PropertySearchNSummary = _ref => {
13135
13138
  maxWidth: "100px"
13136
13139
  },
13137
13140
  onClick: searchProperty
13138
- }, "" + t("PT_SEARCH")), !(apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$2 = apiDataCheck[0]) !== null && _apiDataCheck$2 !== void 0 && _apiDataCheck$2.NdcDetails) && getCheckStatus && /*#__PURE__*/React__default.createElement("button", {
13141
+ }, "" + t("PT_SEARCH")), !(apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$2 = apiDataCheck[0]) !== null && _apiDataCheck$2 !== void 0 && _apiDataCheck$2.NdcDetails) && getCheckStatus && !getPayDuesButton && /*#__PURE__*/React__default.createElement("button", {
13139
13142
  className: "submit-bar",
13140
13143
  type: "button",
13141
13144
  style: {
@@ -13147,7 +13150,7 @@ const PropertySearchNSummary = _ref => {
13147
13150
  onClick: () => {
13148
13151
  fetchBill();
13149
13152
  }
13150
- }, "" + t("CHECK_STATUS_PROPERTY")), (formData === null || formData === void 0 ? void 0 : (_formData$cpt11 = formData.cpt) === null || _formData$cpt11 === void 0 ? void 0 : _formData$cpt11.id) && (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) > 0 && !isSearchClicked && /*#__PURE__*/React__default.createElement("button", {
13153
+ }, "" + t("CHECK_STATUS_PROPERTY")), getPayDuesButton && /*#__PURE__*/React__default.createElement("button", {
13151
13154
  className: "submit-bar",
13152
13155
  type: "button",
13153
13156
  style: {
@@ -13157,6 +13160,7 @@ const PropertySearchNSummary = _ref => {
13157
13160
  },
13158
13161
  onClick: () => {
13159
13162
  redirectToPayBill();
13163
+ setPayDuesButton(false);
13160
13164
  }
13161
13165
  }, "" + t("PAY_DUES")), getNoDue && /*#__PURE__*/React__default.createElement("div", {
13162
13166
  style: {