@mseva/digit-ui-module-common 1.1.88-dev.1.15 → 1.1.88-dev.1.17

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.
@@ -11020,7 +11020,7 @@ const BillDetailsFormConfig = (props, t) => ({
11020
11020
  }
11021
11021
  }]
11022
11022
  }],
11023
- "WSReconnection": [{
11023
+ WSReconnection: [{
11024
11024
  head: t("COMMON_PAY_SCREEN_HEADER"),
11025
11025
  body: [{
11026
11026
  withoutLabel: true,
@@ -11038,7 +11038,7 @@ const BillDetailsFormConfig = (props, t) => ({
11038
11038
  }
11039
11039
  }]
11040
11040
  }],
11041
- "SWReconnection": [{
11041
+ SWReconnection: [{
11042
11042
  head: t("COMMON_PAY_SCREEN_HEADER"),
11043
11043
  body: [{
11044
11044
  withoutLabel: true,
@@ -11298,7 +11298,7 @@ const BillDetails$1 = ({
11298
11298
  })));
11299
11299
  };
11300
11300
  const isTL = businessService === "TL";
11301
- console.log("billDetails==????", billDetails);
11301
+ console.log("billDetails==||||", billDetails);
11302
11302
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(StatusTable, null, !checkFSM && bill && config.details.map((obj, index) => {
11303
11303
  const value = obj.keyPath.reduce((acc, key) => {
11304
11304
  if (typeof key === "function") acc = key(acc);else acc = acc[key];
@@ -13924,7 +13924,7 @@ const SuccessfulPayment$1 = props => {
13924
13924
  } = Digit.Hooks.useCommonMDMS(tenantId, "common-masters", "ReceiptKey", {
13925
13925
  select: data => {
13926
13926
  var _data$commonMasters, _data$commonMasters$u, _data$commonMasters$u2;
13927
- return businessService === "GC.ONE_TIME_FEE" ? "garbage-receipt" : businessService === "rl-services" ? "rentandlease-receipt" : ((_data$commonMasters = data["common-masters"]) === null || _data$commonMasters === void 0 ? void 0 : (_data$commonMasters$u = _data$commonMasters.uiCommonPay) === null || _data$commonMasters$u === void 0 ? void 0 : (_data$commonMasters$u2 = _data$commonMasters$u.filter(({
13927
+ return businessService === "GC.ONE_TIME_FEE" ? "garbage-receipt" : ((_data$commonMasters = data["common-masters"]) === null || _data$commonMasters === void 0 ? void 0 : (_data$commonMasters$u = _data$commonMasters.uiCommonPay) === null || _data$commonMasters$u === void 0 ? void 0 : (_data$commonMasters$u2 = _data$commonMasters$u.filter(({
13928
13928
  code
13929
13929
  }) => businessService === null || businessService === void 0 ? void 0 : businessService.includes(code))[0]) === null || _data$commonMasters$u2 === void 0 ? void 0 : _data$commonMasters$u2.receiptKey) || "consolidatedreceipt";
13930
13930
  }
@@ -14265,6 +14265,40 @@ const SuccessfulPayment$1 = props => {
14265
14265
  setPrinting(false);
14266
14266
  }
14267
14267
  };
14268
+ const printRLReceipt = async () => {
14269
+ if (printing) return;
14270
+ setPrinting(true);
14271
+ try {
14272
+ var _applicationDetails$B3, _applicationDetails$B4;
14273
+ const applicationDetails = await Digit.RentAndLeaseService.search({
14274
+ tenantId,
14275
+ filters: {
14276
+ applicationNumbers: consumerCode
14277
+ }
14278
+ });
14279
+ let application = applicationDetails;
14280
+ 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;
14281
+ if (!fileStoreId) {
14282
+ var _payments$Payments8;
14283
+ const payments = await Digit.PaymentService.getReciept(tenantId, businessService, {
14284
+ receiptNumbers: receiptNumber
14285
+ });
14286
+ let response = await Digit.PaymentService.generatePdf(tenantId, {
14287
+ Payments: [{
14288
+ ...((payments === null || payments === void 0 ? void 0 : (_payments$Payments8 = payments.Payments) === null || _payments$Payments8 === void 0 ? void 0 : _payments$Payments8[0]) || {}),
14289
+ ...application
14290
+ }]
14291
+ }, "rentandlease-receipt");
14292
+ fileStoreId = response === null || response === void 0 ? void 0 : response.filestoreIds[0];
14293
+ }
14294
+ const fileStore = await Digit.PaymentService.printReciept(tenantId, {
14295
+ fileStoreIds: fileStoreId
14296
+ });
14297
+ window.open(fileStore[fileStoreId], "_blank");
14298
+ } finally {
14299
+ setPrinting(false);
14300
+ }
14301
+ };
14268
14302
  const svCertificate = async () => {
14269
14303
  const state = tenantId;
14270
14304
  const applicationDetails = await Digit.SVService.search({
@@ -14690,7 +14724,7 @@ const SuccessfulPayment$1 = props => {
14690
14724
  display: "flex",
14691
14725
  justifyContent: "space-evenly"
14692
14726
  }
14693
- }, businessService !== "chb-services" && businessService !== "adv-services" && businessService !== "pet-services" && businessService !== "NDC" && businessService !== "Challan_Generation" && /*#__PURE__*/React.createElement("div", {
14727
+ }, businessService !== "chb-services" && businessService !== "adv-services" && businessService !== "pet-services" && businessService !== "NDC" && businessService !== "Challan_Generation" && businessService !== "rl-services" && /*#__PURE__*/React.createElement("div", {
14694
14728
  className: "primary-label-btn d-grid",
14695
14729
  style: {
14696
14730
  marginLeft: "unset",
@@ -14884,6 +14918,28 @@ const SuccessfulPayment$1 = props => {
14884
14918
  fill: "none"
14885
14919
  }), /*#__PURE__*/React.createElement("path", {
14886
14920
  d: "M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z"
14921
+ })), t("CHB_FEE_RECEIPT")))) : null, businessService == "rl-services" ? /*#__PURE__*/React.createElement("div", {
14922
+ style: {
14923
+ display: "flex",
14924
+ justifyContent: "flex-end",
14925
+ gap: "20px",
14926
+ marginRight: "20px",
14927
+ marginTop: "15px",
14928
+ marginBottom: "15px"
14929
+ }
14930
+ }, /*#__PURE__*/React.createElement("div", {
14931
+ className: "primary-label-btn d-grid",
14932
+ onClick: printing ? undefined : printRLReceipt
14933
+ }, printing ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("svg", {
14934
+ xmlns: "http://www.w3.org/2000/svg",
14935
+ height: "24",
14936
+ viewBox: "0 0 24 24",
14937
+ width: "24"
14938
+ }, /*#__PURE__*/React.createElement("path", {
14939
+ d: "M0 0h24v24H0z",
14940
+ fill: "none"
14941
+ }), /*#__PURE__*/React.createElement("path", {
14942
+ d: "M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z"
14887
14943
  })), t("CHB_FEE_RECEIPT")))) : null, businessService == "Challan_Generation" ? /*#__PURE__*/React.createElement("div", {
14888
14944
  style: {
14889
14945
  display: "flex",