@mseva/digit-ui-module-ptr 1.3.4-dev.2.8 → 1.3.4-dev.2.9

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.
@@ -20740,13 +20740,20 @@ const PTRApplicationDetails = () => {
20740
20740
  payments,
20741
20741
  ...params
20742
20742
  }) {
20743
- var _response;
20743
+ var _application$document, _application$petDetai, _response;
20744
+ const petImage = application === null || application === void 0 ? void 0 : (_application$document = application.documents) === null || _application$document === void 0 ? void 0 : _application$document.find(doc => (doc === null || doc === void 0 ? void 0 : doc.documentType) === "PET.PETPHOTO");
20745
+ const petImageUrl = petImage !== null && petImage !== void 0 && petImage.filestoreId ? `${window.location.origin}/filestore/v1/files/id?tenantId=pb&fileStoreId=${petImage.filestoreId}` : `${window.location.origin}/adorable-golden-retriever.png`;
20746
+ const petAge = formatPetAge(application === null || application === void 0 ? void 0 : (_application$petDetai = application.petDetails) === null || _application$petDetai === void 0 ? void 0 : _application$petDetai.petAge, t);
20744
20747
  let response = {
20745
20748
  filestoreIds: [payments === null || payments === void 0 ? void 0 : payments.fileStoreId]
20746
20749
  };
20747
20750
  response = await Digit.PaymentService.generatePdf(tenantId, {
20748
20751
  Payments: [{
20749
- ...payments
20752
+ ...payments,
20753
+ application,
20754
+ approver,
20755
+ petAge,
20756
+ petImageUrl
20750
20757
  }]
20751
20758
  }, "petservice-receipt");
20752
20759
  const fileStore = await Digit.PaymentService.printReciept(tenantId, {