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