@mseva/digit-ui-module-common 1.1.86 → 1.1.88-dev.1

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.
@@ -7903,6 +7903,40 @@ const WrapPaymentComponent = props => {
7903
7903
  setPrinting(false);
7904
7904
  }
7905
7905
  };
7906
+ const printRLReceipt = async () => {
7907
+ if (printing) return;
7908
+ setPrinting(true);
7909
+ try {
7910
+ var _applicationDetails$B3, _applicationDetails$B4;
7911
+ const applicationDetails = await Digit.RentAndLeaseService.search({
7912
+ tenantId,
7913
+ filters: {
7914
+ applicationNumbers: consumerCode
7915
+ }
7916
+ });
7917
+ let application = applicationDetails;
7918
+ 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;
7919
+ if (!fileStoreId) {
7920
+ var _payments$Payments7;
7921
+ const payments = await Digit.PaymentService.getReciept(tenantId, business_service, {
7922
+ receiptNumbers: receiptNumber
7923
+ });
7924
+ let response = await Digit.PaymentService.generatePdf(tenantId, {
7925
+ Payments: [{
7926
+ ...((payments === null || payments === void 0 ? void 0 : (_payments$Payments7 = payments.Payments) === null || _payments$Payments7 === void 0 ? void 0 : _payments$Payments7[0]) || {}),
7927
+ ...application
7928
+ }]
7929
+ }, "rentandlease-receipt");
7930
+ fileStoreId = response === null || response === void 0 ? void 0 : response.filestoreIds[0];
7931
+ }
7932
+ const fileStore = await Digit.PaymentService.printReciept(tenantId, {
7933
+ fileStoreIds: fileStoreId
7934
+ });
7935
+ window.open(fileStore[fileStoreId], "_blank");
7936
+ } finally {
7937
+ setPrinting(false);
7938
+ }
7939
+ };
7906
7940
  let bannerText;
7907
7941
  if (workflw) {
7908
7942
  bannerText = `CITIZEN_SUCCESS_UC_PAYMENT_MESSAGE`;
@@ -8421,6 +8455,36 @@ const WrapPaymentComponent = props => {
8421
8455
  marginTop: "10px",
8422
8456
  marginLeft: "100px"
8423
8457
  }
8458
+ }))) : null, business_service == "rl-services" ? /*#__PURE__*/React.createElement("div", {
8459
+ style: {
8460
+ display: "flex",
8461
+ alignItems: "center",
8462
+ justifyContent: "space-between",
8463
+ flexWrap: "wrap",
8464
+ gap: "20px"
8465
+ }
8466
+ }, /*#__PURE__*/React.createElement("div", {
8467
+ style: IconWrapperStyle,
8468
+ onClick: printing ? undefined : printRLReceipt
8469
+ }, printing ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("svg", {
8470
+ xmlns: "http://www.w3.org/2000/svg",
8471
+ height: "24px",
8472
+ viewBox: "0 0 24 24",
8473
+ width: "24px",
8474
+ fill: "#a82227"
8475
+ }, /*#__PURE__*/React.createElement("path", {
8476
+ d: "M0 0h24v24H0V0z",
8477
+ fill: "none"
8478
+ }), /*#__PURE__*/React.createElement("path", {
8479
+ d: "M19 9h-4V3H9v6H5l7 7 7-7zm-8 2V5h2v6h1.17L12 13.17 9.83 11H11zm-6 7h14v2H5z"
8480
+ })), t("CHB_FEE_RECEIPT"))), business_service == "rl-services" && /*#__PURE__*/React.createElement(Link, {
8481
+ to: `/digit-ui/citizen`
8482
+ }, /*#__PURE__*/React.createElement(SubmitBar, {
8483
+ label: t("CORE_COMMON_GO_TO_HOME"),
8484
+ style: {
8485
+ marginTop: "10px",
8486
+ marginLeft: "100px"
8487
+ }
8424
8488
  }))) : null, business_service == "sv-services" && /*#__PURE__*/React.createElement(Link, {
8425
8489
  to: `/digit-ui/citizen`
8426
8490
  }, /*#__PURE__*/React.createElement(SubmitBar, {