@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.
@@ -11912,7 +11912,7 @@ const PropertyDetailsForm$1 = ({
11912
11912
  formState,
11913
11913
  clearErrors
11914
11914
  }) => {
11915
- var _formData$cpt, _formData$cpt$details, _formData$cpt3, _Digit, _Digit$ComponentRegis, _formData$cpt4, _apiDataCheck$6, _propertyDetails$wate, _propertyDetails$sewe;
11915
+ 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;
11916
11916
  const {
11917
11917
  control,
11918
11918
  formState: localFormState,
@@ -12617,9 +12617,9 @@ const PropertyDetailsForm$1 = ({
12617
12617
  }, /*#__PURE__*/React.createElement(Controller, {
12618
12618
  control: control,
12619
12619
  name: "email",
12620
- defaultValue: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.email) || "",
12620
+ 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),
12621
12621
  render: props => {
12622
- var _formData$cpt7, _formData$cpt7$detail, _formData$cpt7$detail2, _formData$cpt7$detail3;
12622
+ var _formData$cpt8, _formData$cpt8$detail, _formData$cpt8$detail2, _formData$cpt8$detail3;
12623
12623
  return /*#__PURE__*/React.createElement(TextInput, {
12624
12624
  value: props === null || props === void 0 ? void 0 : props.value,
12625
12625
  onChange: e => {
@@ -12632,7 +12632,7 @@ const PropertyDetailsForm$1 = ({
12632
12632
  onBlur: e => {
12633
12633
  props.onBlur(e);
12634
12634
  },
12635
- 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
12635
+ 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
12636
12636
  });
12637
12637
  }
12638
12638
  }))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
@@ -12665,7 +12665,7 @@ const PropertyDetailsForm$1 = ({
12665
12665
  name: "address",
12666
12666
  defaultValue: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.address) || "",
12667
12667
  render: props => {
12668
- var _formData$cpt8, _formData$cpt8$detail, _formData$cpt8$detail2, _formData$cpt8$detail3, _formData$cpt8$detail4;
12668
+ var _formData$cpt9, _formData$cpt9$detail, _formData$cpt9$detail2, _formData$cpt9$detail3, _formData$cpt9$detail4;
12669
12669
  return /*#__PURE__*/React.createElement(TextInput, {
12670
12670
  value: propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.address,
12671
12671
  onChange: e => {
@@ -12678,7 +12678,7 @@ const PropertyDetailsForm$1 = ({
12678
12678
  onBlur: e => {
12679
12679
  props.onBlur(e);
12680
12680
  },
12681
- 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
12681
+ 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
12682
12682
  });
12683
12683
  }
12684
12684
  })))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
@@ -12724,7 +12724,7 @@ const PropertySearchNSummary = ({
12724
12724
  onSelect,
12725
12725
  formData
12726
12726
  }) => {
12727
- var _apiDataCheck$, _apiDataCheck$$NdcDet, _formData$cpt, _formData$cpt2, _propertyDetails$Prop3, _apiDataCheck$2, _formData$cpt12, _formData$cpt13, _formData$cpt13$dues;
12727
+ var _apiDataCheck$, _apiDataCheck$$NdcDet, _formData$cpt, _formData$cpt2, _propertyDetails$Prop3, _apiDataCheck$2;
12728
12728
  const {
12729
12729
  t
12730
12730
  } = useTranslation();
@@ -12782,6 +12782,7 @@ const PropertySearchNSummary = ({
12782
12782
  const [isSearchClicked, setIsSearchClicked] = useState(false);
12783
12783
  const [getNoDue, setNoDue] = useState(false);
12784
12784
  const [getCheckStatus, setCheckStats] = useState(false);
12785
+ const [getPayDuesButton, setPayDuesButton] = useState(false);
12785
12786
  const {
12786
12787
  isLoading,
12787
12788
  isError,
@@ -12881,6 +12882,7 @@ const PropertySearchNSummary = ({
12881
12882
  setIsSearchClicked(false);
12882
12883
  setNoDue(false);
12883
12884
  setCheckStats(false);
12885
+ setPayDuesButton(false);
12884
12886
  };
12885
12887
  if (isEditScreen) {
12886
12888
  return /*#__PURE__*/React.createElement(React.Fragment, null);
@@ -12923,6 +12925,7 @@ const PropertySearchNSummary = ({
12923
12925
  error: true,
12924
12926
  label: t("NDC_MESSAGE_DUES_FOUND_PLEASE_PAY")
12925
12927
  });
12928
+ setPayDuesButton(true);
12926
12929
  } else {
12927
12930
  setShowToast({
12928
12931
  error: false,
@@ -13015,7 +13018,7 @@ const PropertySearchNSummary = ({
13015
13018
  maxWidth: "100px"
13016
13019
  },
13017
13020
  onClick: searchProperty
13018
- }, `${t("PT_SEARCH")}`), !(apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$2 = apiDataCheck[0]) !== null && _apiDataCheck$2 !== void 0 && _apiDataCheck$2.NdcDetails) && getCheckStatus && /*#__PURE__*/React.createElement("button", {
13021
+ }, `${t("PT_SEARCH")}`), !(apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$2 = apiDataCheck[0]) !== null && _apiDataCheck$2 !== void 0 && _apiDataCheck$2.NdcDetails) && getCheckStatus && !getPayDuesButton && /*#__PURE__*/React.createElement("button", {
13019
13022
  className: "submit-bar",
13020
13023
  type: "button",
13021
13024
  style: {
@@ -13027,7 +13030,7 @@ const PropertySearchNSummary = ({
13027
13030
  onClick: () => {
13028
13031
  fetchBill();
13029
13032
  }
13030
- }, `${t("CHECK_STATUS_PROPERTY")}`), (formData === null || formData === void 0 ? void 0 : (_formData$cpt12 = formData.cpt) === null || _formData$cpt12 === void 0 ? void 0 : _formData$cpt12.id) && (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) > 0 && !isSearchClicked && /*#__PURE__*/React.createElement("button", {
13033
+ }, `${t("CHECK_STATUS_PROPERTY")}`), getPayDuesButton && /*#__PURE__*/React.createElement("button", {
13031
13034
  className: "submit-bar",
13032
13035
  type: "button",
13033
13036
  style: {
@@ -13037,6 +13040,7 @@ const PropertySearchNSummary = ({
13037
13040
  },
13038
13041
  onClick: () => {
13039
13042
  redirectToPayBill();
13043
+ setPayDuesButton(false);
13040
13044
  }
13041
13045
  }, `${t("PAY_DUES")}`), getNoDue && /*#__PURE__*/React.createElement("div", {
13042
13046
  style: {