@djb25/digit-ui-module-common 1.0.3 → 1.0.5

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
@@ -1381,7 +1381,7 @@ const SelectPaymentType$1 = props => {
1381
1381
  emailId: (userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$info4 = userInfo.info) === null || _userInfo$info4 === void 0 ? void 0 : _userInfo$info4.emailId) || (billDetails === null || billDetails === void 0 ? void 0 : billDetails.emailId),
1382
1382
  username: (userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$info5 = userInfo.info) === null || _userInfo$info5 === void 0 ? void 0 : _userInfo$info5.userName) || (billDetails === null || billDetails === void 0 ? void 0 : billDetails.userName)
1383
1383
  },
1384
- callbackUrl: window.location.href.includes("mcollect") || wrkflow === "WNS" ? window.location.protocol + "//" + window.location.host + "/digit-ui/citizen/payment/success/" + businessService + "/" + (wrkflow === "WNS" ? consumerCode : consumerCode) + "/" + tenantId + "?workflow=" + (wrkflow === "WNS" ? wrkflow : "mcollect") : window.location.protocol + "//" + window.location.host + "/digit-ui/citizen/payment/success/" + businessService + "/" + (wrkflow === "WNS" ? encodeURIComponent(consumerCode) : consumerCode) + "/" + tenantId + "?propertyId=" + consumerCode,
1384
+ callbackUrl: window.location.href.includes("mcollect") || wrkflow === "WNS" ? window.location.protocol + "//" + window.location.host + "/digit-ui/citizen/payment/success/" + businessService + "/" + encodeURIComponent(consumerCode) + "/" + tenantId + "?workflow=" + (wrkflow === "WNS" ? wrkflow : "mcollect") : window.location.protocol + "//" + window.location.host + "/digit-ui/citizen/payment/success/" + businessService + "/" + encodeURIComponent(consumerCode) + "/" + tenantId + "?propertyId=" + encodeURIComponent(consumerCode),
1385
1385
  additionalDetails: {
1386
1386
  isWhatsapp: false
1387
1387
  }
@@ -1391,7 +1391,7 @@ const SelectPaymentType$1 = props => {
1391
1391
  return Promise.resolve(Digit.PaymentService.createCitizenReciept(billDetails === null || billDetails === void 0 ? void 0 : billDetails.tenantId, filterData)).then(function (data) {
1392
1392
  var _data$Transaction;
1393
1393
  const redirectUrl = data === null || data === void 0 ? void 0 : (_data$Transaction = data.Transaction) === null || _data$Transaction === void 0 ? void 0 : _data$Transaction.redirectUrl;
1394
- if ((d === null || d === void 0 ? void 0 : d.paymentType) == "AXIS") {
1394
+ if ((d === null || d === void 0 ? void 0 : d.paymentType) == "AXIS" || (d === null || d === void 0 ? void 0 : d.paymentType) == "NPCI") {
1395
1395
  window.location = redirectUrl;
1396
1396
  } else if ((d === null || d === void 0 ? void 0 : d.paymentType) == "NTTDATA") {
1397
1397
  let redirect = redirectUrl.split("returnURL=");
@@ -1556,7 +1556,8 @@ const WrapPaymentComponent = props => {
1556
1556
  bpaData = _Digit$Hooks$obps$use2 === void 0 ? {} : _Digit$Hooks$obps$use2,
1557
1557
  isBpaSearchLoading = _Digit$Hooks$obps$use.isLoading;
1558
1558
  const _Digit$Hooks$usePayme = Digit.Hooks.usePaymentUpdate({
1559
- egId
1559
+ egId,
1560
+ tenantId
1560
1561
  }, business_service, {
1561
1562
  retry: false,
1562
1563
  staleTime: Infinity,
@@ -1679,15 +1680,26 @@ const WrapPaymentComponent = props => {
1679
1680
  const printReciept = function () {
1680
1681
  try {
1681
1682
  var _payments$Payments$;
1682
- function _temp6() {
1683
- return Promise.resolve(Digit.PaymentService.printReciept(state, {
1684
- fileStoreIds: response.filestoreIds[0]
1685
- })).then(function (fileStore) {
1686
- if (fileStore && fileStore[response.filestoreIds[0]]) {
1687
- window.open(fileStore[response.filestoreIds[0]], "_blank");
1688
- }
1683
+ function _temp9() {
1684
+ var _response, _response$filestoreId, _response2, _response2$fileStoreI;
1685
+ function _temp7() {
1689
1686
  setPrinting(false);
1690
- });
1687
+ }
1688
+ const fileStoreId = ((_response = response) === null || _response === void 0 ? void 0 : (_response$filestoreId = _response.filestoreIds) === null || _response$filestoreId === void 0 ? void 0 : _response$filestoreId[0]) || ((_response2 = response) === null || _response2 === void 0 ? void 0 : (_response2$fileStoreI = _response2.fileStoreIds) === null || _response2$fileStoreI === void 0 ? void 0 : _response2$fileStoreI[0]);
1689
+ const _temp6 = function () {
1690
+ if (fileStoreId) {
1691
+ return Promise.resolve(Digit.PaymentService.printReciept(state, {
1692
+ fileStoreIds: fileStoreId
1693
+ })).then(function (fileStore) {
1694
+ if (fileStore && fileStore[fileStoreId]) {
1695
+ window.open(fileStore[fileStoreId], "_blank");
1696
+ }
1697
+ });
1698
+ } else {
1699
+ console.error("PDF generation failed to return a filestoreId", response);
1700
+ }
1701
+ }();
1702
+ return _temp6 && _temp6.then ? _temp6.then(_temp7) : _temp7(_temp6);
1691
1703
  }
1692
1704
  let generatePdfKeyForWs = "ws-onetime-receipt";
1693
1705
  if (printing) return Promise.resolve();
@@ -1698,13 +1710,13 @@ const WrapPaymentComponent = props => {
1698
1710
  let response = {
1699
1711
  filestoreIds: [(_payments$Payments$ = payments.Payments[0]) === null || _payments$Payments$ === void 0 ? void 0 : _payments$Payments$.fileStoreId]
1700
1712
  };
1701
- const _temp5 = function () {
1713
+ const _temp8 = function () {
1702
1714
  if (!(paymentData !== null && paymentData !== void 0 && paymentData.fileStoreId)) {
1703
1715
  let assessmentYear = "",
1704
1716
  assessmentYearForReceipt = "";
1705
1717
  let count = 0;
1706
1718
  let toDate, fromDate;
1707
- const _temp4 = function (_payments$Payments, _payments$Payments$2, _payments$Payments$2$, _payments$Payments2) {
1719
+ const _temp5 = function (_payments$Payments, _payments$Payments$2, _payments$Payments$2$, _payments$Payments2) {
1708
1720
  if ((payments === null || payments === void 0 ? void 0 : (_payments$Payments = payments.Payments) === null || _payments$Payments === void 0 ? void 0 : (_payments$Payments$2 = _payments$Payments[0]) === null || _payments$Payments$2 === void 0 ? void 0 : (_payments$Payments$2$ = _payments$Payments$2.paymentDetails) === null || _payments$Payments$2$ === void 0 ? void 0 : _payments$Payments$2$[0].businessService) == "PT" || (payments === null || payments === void 0 ? void 0 : (_payments$Payments2 = payments.Payments) === null || _payments$Payments2 === void 0 ? void 0 : _payments$Payments2[0].paymentDetails[0].businessService) == "PT.MUTATION") {
1709
1721
  payments.Payments[0].paymentDetails[0].bill.billDetails.map(element => {
1710
1722
  if (element.amount > 0 || element.amountPaid > 0) {
@@ -1738,15 +1750,25 @@ const WrapPaymentComponent = props => {
1738
1750
  payments.Payments[0].additionalDetails = details;
1739
1751
  paymentArray[0] = payments.Payments[0];
1740
1752
  console.log("generatedpdfkey", generatePdfKey);
1741
- const _temp3 = function () {
1742
- if (business_service == "WS" || business_service == "SW") {
1753
+ const _temp4 = function () {
1754
+ if (business_service !== null && business_service !== void 0 && business_service.includes("WS") || business_service !== null && business_service !== void 0 && business_service.includes("SW")) {
1743
1755
  return Promise.resolve(Digit.PaymentService.generatePdf(state, {
1744
1756
  Payments: [_extends({}, paymentData)]
1745
1757
  }, generatePdfKeyForWs)).then(function (_Digit$PaymentService) {
1746
1758
  response = _Digit$PaymentService;
1759
+ const _temp2 = function (_response3, _response3$filestoreI, _response4, _response4$fileStoreI) {
1760
+ if (!((_response3 = response) !== null && _response3 !== void 0 && (_response3$filestoreI = _response3.filestoreIds) !== null && _response3$filestoreI !== void 0 && _response3$filestoreI[0]) && !((_response4 = response) !== null && _response4 !== void 0 && (_response4$fileStoreI = _response4.fileStoreIds) !== null && _response4$fileStoreI !== void 0 && _response4$fileStoreI[0])) {
1761
+ return Promise.resolve(Digit.PaymentService.generatePdf(state, {
1762
+ Payments: [_extends({}, paymentData)]
1763
+ }, generatePdfKey)).then(function (_Digit$PaymentService2) {
1764
+ response = _Digit$PaymentService2;
1765
+ });
1766
+ }
1767
+ }();
1768
+ if (_temp2 && _temp2.then) return _temp2.then(function () {});
1747
1769
  });
1748
1770
  } else {
1749
- const _temp2 = function () {
1771
+ const _temp3 = function () {
1750
1772
  if (businessServ.includes("BPA")) {
1751
1773
  var _payments$Payments$0$, _payments$Payments$0$2;
1752
1774
  let queryObj = {
@@ -1765,28 +1787,28 @@ const WrapPaymentComponent = props => {
1765
1787
  });
1766
1788
  return Promise.resolve(Digit.PaymentService.generatePdf(state, {
1767
1789
  Payments: [_extends({}, updatedpayments)]
1768
- }, generatePdfKey)).then(function (_Digit$PaymentService2) {
1769
- response = _Digit$PaymentService2;
1790
+ }, generatePdfKey)).then(function (_Digit$PaymentService3) {
1791
+ response = _Digit$PaymentService3;
1770
1792
  });
1771
1793
  });
1772
1794
  } else {
1773
1795
  return Promise.resolve(Digit.PaymentService.generatePdf(state, {
1774
1796
  Payments: [_extends({}, paymentData)]
1775
- }, generatePdfKey)).then(function (_Digit$PaymentService3) {
1776
- response = _Digit$PaymentService3;
1797
+ }, generatePdfKey)).then(function (_Digit$PaymentService4) {
1798
+ response = _Digit$PaymentService4;
1777
1799
  });
1778
1800
  }
1779
1801
  }();
1780
- if (_temp2 && _temp2.then) return _temp2.then(function () {});
1802
+ if (_temp3 && _temp3.then) return _temp3.then(function () {});
1781
1803
  }
1782
1804
  }();
1783
- if (_temp3 && _temp3.then) return _temp3.then(function () {});
1805
+ if (_temp4 && _temp4.then) return _temp4.then(function () {});
1784
1806
  }
1785
1807
  }();
1786
- if (_temp4 && _temp4.then) return _temp4.then(function () {});
1808
+ if (_temp5 && _temp5.then) return _temp5.then(function () {});
1787
1809
  }
1788
1810
  }();
1789
- return Promise.resolve(_temp5 && _temp5.then ? _temp5.then(_temp6) : _temp6(_temp5));
1811
+ return Promise.resolve(_temp8 && _temp8.then ? _temp8.then(_temp9) : _temp9(_temp8));
1790
1812
  } catch (e) {
1791
1813
  return Promise.reject(e);
1792
1814
  }
@@ -1943,7 +1965,7 @@ const WrapPaymentComponent = props => {
1943
1965
  }
1944
1966
  })).then(function (applicationDetails) {
1945
1967
  var _applicationDetails$h, _applicationDetails$h2;
1946
- function _temp8() {
1968
+ function _temp1() {
1947
1969
  return Promise.resolve(Digit.PaymentService.printReciept(tenantId, {
1948
1970
  fileStoreIds: fileStoreId
1949
1971
  })).then(function (fileStore) {
@@ -1952,7 +1974,7 @@ const WrapPaymentComponent = props => {
1952
1974
  }
1953
1975
  let fileStoreId = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$h = applicationDetails.hallsBookingApplication) === null || _applicationDetails$h === void 0 ? void 0 : (_applicationDetails$h2 = _applicationDetails$h[0]) === null || _applicationDetails$h2 === void 0 ? void 0 : _applicationDetails$h2.permissionLetterFilestoreId;
1954
1976
  const generatePdfKeyForTL = "chbpermissionletter";
1955
- const _temp7 = function () {
1977
+ const _temp0 = function () {
1956
1978
  if (!fileStoreId) {
1957
1979
  return Promise.resolve(Digit.PaymentService.generatePdf(tenantId, {
1958
1980
  hallsBookingApplication: [applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.hallsBookingApplication[0]]
@@ -1968,7 +1990,7 @@ const WrapPaymentComponent = props => {
1968
1990
  });
1969
1991
  }
1970
1992
  }();
1971
- return _temp7 && _temp7.then ? _temp7.then(_temp8) : _temp8(_temp7);
1993
+ return _temp0 && _temp0.then ? _temp0.then(_temp1) : _temp1(_temp0);
1972
1994
  });
1973
1995
  } catch (e) {
1974
1996
  return Promise.reject(e);
@@ -1983,7 +2005,7 @@ const WrapPaymentComponent = props => {
1983
2005
  }
1984
2006
  })).then(function (applicationDetails) {
1985
2007
  var _applicationDetails$b, _applicationDetails$b2;
1986
- function _temp0() {
2008
+ function _temp11() {
1987
2009
  return Promise.resolve(Digit.PaymentService.printReciept(tenantId, {
1988
2010
  fileStoreIds: fileStoreId
1989
2011
  })).then(function (fileStore) {
@@ -1992,7 +2014,7 @@ const WrapPaymentComponent = props => {
1992
2014
  }
1993
2015
  let fileStoreId = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$b = applicationDetails.bookingApplication) === null || _applicationDetails$b === void 0 ? void 0 : (_applicationDetails$b2 = _applicationDetails$b[0]) === null || _applicationDetails$b2 === void 0 ? void 0 : _applicationDetails$b2.permissionLetterFilestoreId;
1994
2016
  const generatePdfKeyForTL = "advpermissionletter";
1995
- const _temp9 = function () {
2017
+ const _temp10 = function () {
1996
2018
  if (!fileStoreId) {
1997
2019
  return Promise.resolve(Digit.PaymentService.generatePdf(tenantId, {
1998
2020
  bookingApplication: [applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.bookingApplication[0]]
@@ -2008,7 +2030,7 @@ const WrapPaymentComponent = props => {
2008
2030
  });
2009
2031
  }
2010
2032
  }();
2011
- return _temp9 && _temp9.then ? _temp9.then(_temp0) : _temp0(_temp9);
2033
+ return _temp10 && _temp10.then ? _temp10.then(_temp11) : _temp11(_temp10);
2012
2034
  });
2013
2035
  } catch (e) {
2014
2036
  return Promise.reject(e);
@@ -2025,7 +2047,7 @@ const WrapPaymentComponent = props => {
2025
2047
  }
2026
2048
  })).then(function (applicationDetails) {
2027
2049
  const generatePdfKeyForTL = "svcertificate";
2028
- const _temp1 = function () {
2050
+ const _temp12 = function () {
2029
2051
  if (applicationDetails) {
2030
2052
  var _applicationDetails$S;
2031
2053
  return Promise.resolve(Digit.PaymentService.generatePdf(state, {
@@ -2039,7 +2061,7 @@ const WrapPaymentComponent = props => {
2039
2061
  });
2040
2062
  }
2041
2063
  }();
2042
- if (_temp1 && _temp1.then) return _temp1.then(function () {});
2064
+ if (_temp12 && _temp12.then) return _temp12.then(function () {});
2043
2065
  });
2044
2066
  } catch (e) {
2045
2067
  return Promise.reject(e);
@@ -2055,7 +2077,7 @@ const WrapPaymentComponent = props => {
2055
2077
  }
2056
2078
  })).then(function (applicationDetails) {
2057
2079
  const generatePdfKeyForTL = "petservicecertificate";
2058
- const _temp10 = function () {
2080
+ const _temp13 = function () {
2059
2081
  if (applicationDetails) {
2060
2082
  var _applicationDetails$P;
2061
2083
  return Promise.resolve(Digit.PaymentService.generatePdf(state, {
@@ -2069,7 +2091,7 @@ const WrapPaymentComponent = props => {
2069
2091
  });
2070
2092
  }
2071
2093
  }();
2072
- if (_temp10 && _temp10.then) return _temp10.then(function () {});
2094
+ if (_temp13 && _temp13.then) return _temp13.then(function () {});
2073
2095
  });
2074
2096
  } catch (e) {
2075
2097
  return Promise.reject(e);
@@ -2086,7 +2108,7 @@ const WrapPaymentComponent = props => {
2086
2108
  }
2087
2109
  })).then(function (applicationDetails) {
2088
2110
  const generatePdfKeyForTL = "svidentitycard";
2089
- const _temp11 = function () {
2111
+ const _temp14 = function () {
2090
2112
  if (applicationDetails) {
2091
2113
  var _applicationDetails$S2;
2092
2114
  return Promise.resolve(Digit.PaymentService.generatePdf(state, {
@@ -2100,7 +2122,7 @@ const WrapPaymentComponent = props => {
2100
2122
  });
2101
2123
  }
2102
2124
  }();
2103
- if (_temp11 && _temp11.then) return _temp11.then(function () {});
2125
+ if (_temp14 && _temp14.then) return _temp14.then(function () {});
2104
2126
  });
2105
2127
  } catch (e) {
2106
2128
  return Promise.reject(e);
@@ -2115,7 +2137,7 @@ const WrapPaymentComponent = props => {
2115
2137
  }
2116
2138
  })).then(function (applicationDetails) {
2117
2139
  var _applicationDetails$b3, _applicationDetails$b4;
2118
- function _temp13() {
2140
+ function _temp16() {
2119
2141
  return Promise.resolve(Digit.PaymentService.printReciept(tenantId, {
2120
2142
  fileStoreIds: fileStoreId
2121
2143
  })).then(function (fileStore) {
@@ -2123,29 +2145,29 @@ const WrapPaymentComponent = props => {
2123
2145
  });
2124
2146
  }
2125
2147
  let fileStoreId = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$b3 = applicationDetails.bookingApplication) === null || _applicationDetails$b3 === void 0 ? void 0 : (_applicationDetails$b4 = _applicationDetails$b3[0]) === null || _applicationDetails$b4 === void 0 ? void 0 : _applicationDetails$b4.paymentReceiptFilestoreId;
2126
- const _temp12 = function () {
2148
+ const _temp15 = function () {
2127
2149
  if (!fileStoreId) {
2128
2150
  let response = {
2129
2151
  filestoreIds: [payments === null || payments === void 0 ? void 0 : payments.fileStoreId]
2130
2152
  };
2131
2153
  return Promise.resolve(Digit.PaymentService.generatePdf(tenantId, {
2132
2154
  Payments: [_extends({}, paymentData)]
2133
- }, "advservice-receipt")).then(function (_Digit$PaymentService4) {
2134
- var _response;
2135
- response = _Digit$PaymentService4;
2155
+ }, "advservice-receipt")).then(function (_Digit$PaymentService5) {
2156
+ var _response5;
2157
+ response = _Digit$PaymentService5;
2136
2158
  const updatedApplication = _extends({}, applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.bookingApplication[0], {
2137
- paymentReceiptFilestoreId: (_response = response) === null || _response === void 0 ? void 0 : _response.filestoreIds[0]
2159
+ paymentReceiptFilestoreId: (_response5 = response) === null || _response5 === void 0 ? void 0 : _response5.filestoreIds[0]
2138
2160
  });
2139
2161
  return Promise.resolve(AdvertisementCreateApi.mutateAsync({
2140
2162
  bookingApplication: updatedApplication
2141
2163
  })).then(function () {
2142
- var _response2;
2143
- fileStoreId = (_response2 = response) === null || _response2 === void 0 ? void 0 : _response2.filestoreIds[0];
2164
+ var _response6;
2165
+ fileStoreId = (_response6 = response) === null || _response6 === void 0 ? void 0 : _response6.filestoreIds[0];
2144
2166
  });
2145
2167
  });
2146
2168
  }
2147
2169
  }();
2148
- return _temp12 && _temp12.then ? _temp12.then(_temp13) : _temp13(_temp12);
2170
+ return _temp15 && _temp15.then ? _temp15.then(_temp16) : _temp16(_temp15);
2149
2171
  });
2150
2172
  } catch (e) {
2151
2173
  return Promise.reject(e);
@@ -2160,7 +2182,7 @@ const WrapPaymentComponent = props => {
2160
2182
  }
2161
2183
  })).then(function (applicationDetails) {
2162
2184
  var _applicationDetails$h3, _applicationDetails$h4;
2163
- function _temp15() {
2185
+ function _temp18() {
2164
2186
  return Promise.resolve(Digit.PaymentService.printReciept(tenantId, {
2165
2187
  fileStoreIds: fileStoreId
2166
2188
  })).then(function (fileStore) {
@@ -2168,29 +2190,29 @@ const WrapPaymentComponent = props => {
2168
2190
  });
2169
2191
  }
2170
2192
  let fileStoreId = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$h3 = applicationDetails.hallsBookingApplication) === null || _applicationDetails$h3 === void 0 ? void 0 : (_applicationDetails$h4 = _applicationDetails$h3[0]) === null || _applicationDetails$h4 === void 0 ? void 0 : _applicationDetails$h4.paymentReceiptFilestoreId;
2171
- const _temp14 = function () {
2193
+ const _temp17 = function () {
2172
2194
  if (!fileStoreId) {
2173
2195
  let response = {
2174
2196
  filestoreIds: [payments === null || payments === void 0 ? void 0 : payments.fileStoreId]
2175
2197
  };
2176
2198
  return Promise.resolve(Digit.PaymentService.generatePdf(tenantId, {
2177
2199
  Payments: [_extends({}, paymentData)]
2178
- }, "chbservice-receipt")).then(function (_Digit$PaymentService5) {
2179
- var _response3;
2180
- response = _Digit$PaymentService5;
2200
+ }, "chbservice-receipt")).then(function (_Digit$PaymentService6) {
2201
+ var _response7;
2202
+ response = _Digit$PaymentService6;
2181
2203
  const updatedApplication = _extends({}, applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.hallsBookingApplication[0], {
2182
- paymentReceiptFilestoreId: (_response3 = response) === null || _response3 === void 0 ? void 0 : _response3.filestoreIds[0]
2204
+ paymentReceiptFilestoreId: (_response7 = response) === null || _response7 === void 0 ? void 0 : _response7.filestoreIds[0]
2183
2205
  });
2184
2206
  return Promise.resolve(mutation.mutateAsync({
2185
2207
  hallsBookingApplication: updatedApplication
2186
2208
  })).then(function () {
2187
- var _response4;
2188
- fileStoreId = (_response4 = response) === null || _response4 === void 0 ? void 0 : _response4.filestoreIds[0];
2209
+ var _response8;
2210
+ fileStoreId = (_response8 = response) === null || _response8 === void 0 ? void 0 : _response8.filestoreIds[0];
2189
2211
  });
2190
2212
  });
2191
2213
  }
2192
2214
  }();
2193
- return _temp14 && _temp14.then ? _temp14.then(_temp15) : _temp15(_temp14);
2215
+ return _temp17 && _temp17.then ? _temp17.then(_temp18) : _temp18(_temp17);
2194
2216
  });
2195
2217
  } catch (e) {
2196
2218
  return Promise.reject(e);
@@ -2198,9 +2220,9 @@ const WrapPaymentComponent = props => {
2198
2220
  };
2199
2221
  const printRecieptNew = function (payment) {
2200
2222
  try {
2201
- function _temp20() {
2223
+ function _temp23() {
2202
2224
  var _payments$Payments$3;
2203
- function _temp18() {
2225
+ function _temp21() {
2204
2226
  return Promise.resolve(Digit.PaymentService.printReciept(state, {
2205
2227
  fileStoreIds: response.filestoreIds[0]
2206
2228
  })).then(function (fileStore) {
@@ -2210,7 +2232,7 @@ const WrapPaymentComponent = props => {
2210
2232
  let response = {
2211
2233
  filestoreIds: [(_payments$Payments$3 = payments.Payments[0]) === null || _payments$Payments$3 === void 0 ? void 0 : _payments$Payments$3.fileStoreId]
2212
2234
  };
2213
- const _temp17 = function () {
2235
+ const _temp20 = function () {
2214
2236
  if (true) {
2215
2237
  let assessmentYear = "",
2216
2238
  assessmentYearForReceipt = "";
@@ -2406,47 +2428,47 @@ const WrapPaymentComponent = props => {
2406
2428
  payments.Payments[0].paymentDetails[0].additionalDetails = details;
2407
2429
  }
2408
2430
  paymentArray[0] = payments.Payments[0];
2409
- const _temp16 = function () {
2431
+ const _temp19 = function () {
2410
2432
  if (payment.Payments[0].paymentDetails[0].businessService == "PT.MUTATION") {
2411
2433
  return Promise.resolve(Digit.PaymentService.generatePdf(state, {
2412
2434
  Payments: paymentArray
2413
- }, "pt-receipt")).then(function (_Digit$PaymentService8) {
2414
- response = _Digit$PaymentService8;
2435
+ }, "pt-receipt")).then(function (_Digit$PaymentService9) {
2436
+ response = _Digit$PaymentService9;
2415
2437
  });
2416
2438
  } else {
2417
2439
  return Promise.resolve(Digit.PaymentService.generatePdf(state, {
2418
2440
  Payments: paymentArray
2419
- }, generatePdfKey)).then(function (_Digit$PaymentService9) {
2420
- response = _Digit$PaymentService9;
2441
+ }, generatePdfKey)).then(function (_Digit$PaymentService0) {
2442
+ response = _Digit$PaymentService0;
2421
2443
  });
2422
2444
  }
2423
2445
  }();
2424
- if (_temp16 && _temp16.then) return _temp16.then(function () {});
2446
+ if (_temp19 && _temp19.then) return _temp19.then(function () {});
2425
2447
  }
2426
2448
  }();
2427
- return _temp17 && _temp17.then ? _temp17.then(_temp18) : _temp18(_temp17);
2449
+ return _temp20 && _temp20.then ? _temp20.then(_temp21) : _temp21(_temp20);
2428
2450
  }
2429
2451
  console.log("paymentpayment", payment, payment.Payments[0].paymentDetails[0].receiptNumber, payment.Payments[0]);
2430
2452
  const tenantId = Digit.ULBService.getCurrentTenantId();
2431
2453
  const state = Digit.ULBService.getStateId();
2432
2454
  let paymentArray = [];
2433
2455
  let payments;
2434
- const _temp19 = function () {
2456
+ const _temp22 = function () {
2435
2457
  if (payment.Payments[0].paymentDetails[0].businessService == "PT.MUTATION") {
2436
2458
  return Promise.resolve(Digit.PaymentService.getReciept(tenantId, "PT.MUTATION", {
2437
2459
  receiptNumbers: payment.Payments[0].paymentDetails[0].receiptNumber
2438
- })).then(function (_Digit$PaymentService6) {
2439
- payments = _Digit$PaymentService6;
2460
+ })).then(function (_Digit$PaymentService7) {
2461
+ payments = _Digit$PaymentService7;
2440
2462
  });
2441
2463
  } else {
2442
2464
  return Promise.resolve(Digit.PaymentService.getReciept(tenantId, "PT", {
2443
2465
  receiptNumbers: payment.Payments[0].paymentDetails[0].receiptNumber
2444
- })).then(function (_Digit$PaymentService7) {
2445
- payments = _Digit$PaymentService7;
2466
+ })).then(function (_Digit$PaymentService8) {
2467
+ payments = _Digit$PaymentService8;
2446
2468
  });
2447
2469
  }
2448
2470
  }();
2449
- return Promise.resolve(_temp19 && _temp19.then ? _temp19.then(_temp20) : _temp20(_temp19));
2471
+ return Promise.resolve(_temp22 && _temp22.then ? _temp22.then(_temp23) : _temp23(_temp22));
2450
2472
  } catch (e) {
2451
2473
  return Promise.reject(e);
2452
2474
  }
@@ -5142,7 +5164,7 @@ const BillDetails$1 = _ref => {
5142
5164
  const _excluded$2 = ["ManualRecieptDetails", "paymentModeDetails"],
5143
5165
  _excluded2 = ["errorObj"];
5144
5166
  const CollectPayment = props => {
5145
- var _businessService$toUp;
5167
+ var _paymentdetails$Bill, _businessService$toUp;
5146
5168
  const _Digit$Hooks$useQuery = Digit.Hooks.useQueryParams(),
5147
5169
  ModuleWorkflow = _Digit$Hooks$useQuery.workflow,
5148
5170
  IsDisconnectionFlow = _Digit$Hooks$useQuery.IsDisconnectionFlow;
@@ -5166,11 +5188,11 @@ const CollectPayment = props => {
5166
5188
  const _Digit$Hooks$useFetch = Digit.Hooks.useFetchPayment({
5167
5189
  tenantId: tenantId,
5168
5190
  consumerCode,
5169
- businessService: "request-service.water_tanker"
5191
+ businessService
5170
5192
  }),
5171
5193
  paymentdetails = _Digit$Hooks$useFetch.data,
5172
5194
  isLoading = _Digit$Hooks$useFetch.isLoading;
5173
- const bill = paymentdetails !== null && paymentdetails !== void 0 && paymentdetails.Bill ? paymentdetails === null || paymentdetails === void 0 ? void 0 : paymentdetails.Bill[0] : {};
5195
+ const bill = (paymentdetails === null || paymentdetails === void 0 ? void 0 : (_paymentdetails$Bill = paymentdetails.Bill) === null || _paymentdetails$Bill === void 0 ? void 0 : _paymentdetails$Bill.length) > 0 ? paymentdetails === null || paymentdetails === void 0 ? void 0 : paymentdetails.Bill[0] : {};
5174
5196
  const _Digit$Hooks$fsm$useS = Digit.Hooks.fsm.useSearch(tenantId, {
5175
5197
  applicationNos: consumerCode
5176
5198
  }, {
@@ -5505,7 +5527,7 @@ const CollectPayment = props => {
5505
5527
  onSubmit: onSubmit,
5506
5528
  formState: formState,
5507
5529
  defaultValues: getDefaultValues(),
5508
- isDisabled: (IsDisconnectionFlow ? false : businessService === "SW" || "WS" ? false : bill !== null && bill !== void 0 && bill.totalAmount ? !bill.totalAmount > 0 : true) || timerEnabledForBusinessService(businessService) && Time === 0,
5530
+ isDisabled: (IsDisconnectionFlow ? false : businessService === "SW" || businessService === "WS" ? false : bill !== null && bill !== void 0 && bill.totalAmount ? !bill.totalAmount > 0 : true) || timerEnabledForBusinessService(businessService) && Time === 0,
5509
5531
  onFormValueChange: (setValue, formValue) => {
5510
5532
  if (!isEqual_1(formValue.paymentMode, selectedPaymentMode)) {
5511
5533
  setFormState(formValue);