@osovitny/anatoly 3.19.24 → 3.19.26

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.
@@ -4358,11 +4358,11 @@ class PaymentsService {
4358
4358
  return subtotal > 0 ? subtotal : 0;
4359
4359
  }
4360
4360
  //DiscountCode
4361
- applyDiscountCode(discountCode, data) {
4361
+ applyDiscountCode(data) {
4362
4362
  if (!data) {
4363
4363
  return;
4364
4364
  }
4365
- this.discountCode = discountCode;
4365
+ this.discountCode = data.code;
4366
4366
  if (data.amount) {
4367
4367
  this.discountPercentage = 0;
4368
4368
  this.discountAmount = parseInt(data.amount);
@@ -4544,7 +4544,7 @@ class OrderSummaryComponent extends ComponentBase {
4544
4544
  }
4545
4545
  switch (data.status) {
4546
4546
  case DiscountCodeStatus.Exist:
4547
- this.ps.applyDiscountCode(this.promoCode, data.code);
4547
+ this.ps.applyDiscountCode(data);
4548
4548
  this.discount = this.ps.getDiscountCodeAsString();
4549
4549
  this.ns.success("Discount applied successfully");
4550
4550
  break;
@@ -4728,7 +4728,7 @@ function PaymentMethodsComponent_For_9_Template(rf, ctx) { if (rf & 1) {
4728
4728
  i0.ɵɵadvance(2);
4729
4729
  i0.ɵɵtextInterpolate1("Pay with ", item_r2.title, "");
4730
4730
  i0.ɵɵadvance(2);
4731
- i0.ɵɵpropertyInterpolate1("src", "./dist/@lib/images/payment-icons/", item_r2.icon, ".png", i0.ɵɵsanitizeUrl);
4731
+ i0.ɵɵpropertyInterpolate1("src", "/assets/@lib/images/payment-icons/", item_r2.icon, ".png", i0.ɵɵsanitizeUrl);
4732
4732
  i0.ɵɵpropertyInterpolate1("alt", "payment-icon ", item_r2.title, "");
4733
4733
  } }
4734
4734
  class PaymentMethodsComponent extends ComponentBase {
@@ -4792,7 +4792,7 @@ class PaymentMethodsComponent extends ComponentBase {
4792
4792
  }
4793
4793
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PaymentMethodsComponent, [{
4794
4794
  type: Component,
4795
- args: [{ selector: "anatoly-billing-payment-methods", standalone: false, template: "<div class='card p-0 mb-3'>\r\n <div class='card-header'>\r\n <div class='card-title'>\r\n <h2>Select a payment method</h2>\r\n </div>\r\n </div>\r\n <div class='card-body'>\r\n <div class='payment__select-method'>\r\n <ul>\r\n @for (item of paymentMethods; track item) {\r\n <li (click)='onPaymentSelect(item)' [class.selected]='item.selected'>\r\n <div class='payment-name'>Pay with {{ item.title }}</div>\r\n <div class='icon-img'>\r\n <img src='./dist/@lib/images/payment-icons/{{item.icon}}.png' alt='payment-icon {{item.title}}'>\r\n </div>\r\n </li>\r\n }\r\n </ul>\r\n </div>\r\n </div>\r\n</div>\r\n" }]
4795
+ args: [{ selector: "anatoly-billing-payment-methods", standalone: false, template: "<div class='card p-0 mb-3'>\r\n <div class='card-header'>\r\n <div class='card-title'>\r\n <h2>Select a payment method</h2>\r\n </div>\r\n </div>\r\n <div class='card-body'>\r\n <div class='payment__select-method'>\r\n <ul>\r\n @for (item of paymentMethods; track item) {\r\n <li (click)='onPaymentSelect(item)' [class.selected]='item.selected'>\r\n <div class='payment-name'>Pay with {{ item.title }}</div>\r\n <div class='icon-img'>\r\n <img src='/assets/@lib/images/payment-icons/{{item.icon}}.png' alt='payment-icon {{item.title}}'>\r\n </div>\r\n </li>\r\n }\r\n </ul>\r\n </div>\r\n </div>\r\n</div>\r\n" }]
4796
4796
  }], () => [{ type: PaymentsService }], null); })();
4797
4797
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PaymentMethodsComponent, { className: "PaymentMethodsComponent", filePath: "lib/billing/components/payment-methods/payment-methods.component.ts", lineNumber: 30 }); })();
4798
4798