ng-easycommerce 0.0.596 → 0.0.597

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.
@@ -14132,15 +14132,18 @@ var __decorate$1u = (this && this.__decorate) || function (decorators, target, k
14132
14132
  };
14133
14133
  var DetailCheckoutBlockEcComponent = /** @class */ (function (_super) {
14134
14134
  __extends$V(DetailCheckoutBlockEcComponent, _super);
14135
- function DetailCheckoutBlockEcComponent(checkoutService, cartService) {
14135
+ function DetailCheckoutBlockEcComponent(checkoutService, cartService, channelConfigService) {
14136
14136
  var _this = _super.call(this) || this;
14137
14137
  _this.checkoutService = checkoutService;
14138
14138
  _this.cartService = cartService;
14139
+ _this.channelConfigService = channelConfigService;
14139
14140
  _this.data = null;
14140
14141
  _this.discountTotal = 0;
14141
14142
  _this.couponTotal = 0;
14142
14143
  _this.showPrice = false;
14143
14144
  _this.creditAmountConfigured = false;
14145
+ _this.hideDiscounts = false;
14146
+ _this.hideTaxes = false;
14144
14147
  _this.getIcon = function (data_item) {
14145
14148
  switch (data_item.type) {
14146
14149
  case 'coupon': return 'fas fa-ticket-alt fa-3x';
@@ -14173,6 +14176,11 @@ var DetailCheckoutBlockEcComponent = /** @class */ (function (_super) {
14173
14176
  this.cartService.creditAmount$.subscribe(function (creditAmount) {
14174
14177
  _this.creditAmountConfigured = creditAmount !== null;
14175
14178
  });
14179
+ this.channelConfigService.channelConfig$.subscribe(function (channel) {
14180
+ var _a, _b, _c, _d;
14181
+ _this.hideDiscounts = (_b = (_a = channel) === null || _a === void 0 ? void 0 : _a.hideDiscounts, (_b !== null && _b !== void 0 ? _b : false));
14182
+ _this.hideTaxes = (_d = (_c = channel) === null || _c === void 0 ? void 0 : _c.hideTaxes, (_d !== null && _d !== void 0 ? _d : false));
14183
+ });
14176
14184
  };
14177
14185
  DetailCheckoutBlockEcComponent.prototype.calcularTotales = function () {
14178
14186
  if (this.data) {
@@ -14186,7 +14194,8 @@ var DetailCheckoutBlockEcComponent = /** @class */ (function (_super) {
14186
14194
  };
14187
14195
  DetailCheckoutBlockEcComponent.ctorParameters = function () { return [
14188
14196
  { type: CheckoutService },
14189
- { type: CartService }
14197
+ { type: CartService },
14198
+ { type: ChannelConfigService }
14190
14199
  ]; };
14191
14200
  __decorate$1u([
14192
14201
  Input()
@@ -14194,7 +14203,7 @@ var DetailCheckoutBlockEcComponent = /** @class */ (function (_super) {
14194
14203
  DetailCheckoutBlockEcComponent = __decorate$1u([
14195
14204
  Component({
14196
14205
  selector: 'app-detail-checkout-block-ec',
14197
- template: "<div id=\"appDetailCheckoutBlockEc\" class=\"d-flex flex-row w-100 justify-content-center flex-wrap\"\n *ngIf=\"data && (creditAmountConfigured ? showPrice : true)\">\n <ng-container *ngFor=\"let item of data; let i = index\">\n <ng-container *ngIf=\"item.type != 'discount' && item.type != 'coupon'\">\n <div class=\"d-flex flex-column justify-content-center mx-sm-3 mx-2 text-center mb-4 resumen\">\n <i ngClass=\"mb-2 colorIconoCheckout\" [class]=\"getIcon(item)\"></i>\n <strong class=\"text-center w-100 font-brandon font-md mb-1\">{{ item.type | translate }}</strong>\n <span class=\"text-center w-100 font-brandon font-md text-gray\">{{ (item.amount != 0 ) ? (item.amount |\n ecCurrencySymbol) : ('free' | translate) }}</span>\n </div>\n </ng-container>\n\n\n <!-- Mostrar total de descuentos -->\n <div class=\"d-flex flex-column justify-content-center mx-sm-3 mx-2 text-center mb-4 resumen\"\n *ngIf=\"this.discountTotal != 0 && i === 1\">\n <i ngClass=\"mb-2 colorIconoCheckout\" [class]=\"getIcon2('discount')\"></i>\n <strong class=\"text-center w-100 font-brandon font-md mb-1\">Descuento</strong>\n <span class=\"text-center w-100 font-brandon font-md text-gray\">{{ (this.discountTotal | ecCurrencySymbol)\n }}</span>\n </div>\n\n <!-- Mostrar total de cupones -->\n <div class=\"d-flex flex-column justify-content-center mx-sm-3 mx-2 text-center mb-4 resumen\"\n *ngIf=\"this.couponTotal != 0 && i === 1\">\n <i ngClass=\"mb-2 colorIconoCheckout\" [class]=\"getIcon2('coupon')\"></i>\n <strong class=\"text-center w-100 font-brandon font-md mb-1\">Cupon</strong>\n <span class=\"text-center w-100 font-brandon font-md text-gray\">{{(this.couponTotal| ecCurrencySymbol)\n }}</span>\n </div>\n </ng-container>\n</div>",
14206
+ template: "<div id=\"appDetailCheckoutBlockEc\" class=\"d-flex flex-row w-100 justify-content-center flex-wrap\"\n *ngIf=\"data && (creditAmountConfigured ? showPrice : true)\">\n <ng-container *ngFor=\"let item of data; let i = index\">\n <ng-container *ngIf=\"item.type != 'discount' && item.type != 'coupon'\">\n <div class=\"d-flex flex-column justify-content-center mx-sm-3 mx-2 text-center mb-4 resumen\">\n <i ngClass=\"mb-2 colorIconoCheckout\" [class]=\"getIcon(item)\"></i>\n <strong class=\"text-center w-100 font-brandon font-md mb-1\">{{ item.type | translate }}</strong>\n <span class=\"text-center w-100 font-brandon font-md text-gray\">{{ (item.amount != 0 ) ? (item.amount |\n ecCurrencySymbol) : ('free' | translate) }}</span>\n </div>\n </ng-container>\n\n\n <!-- Mostrar total de descuentos -->\n <div class=\"d-flex flex-column justify-content-center mx-sm-3 mx-2 text-center mb-4 resumen\"\n *ngIf=\"!hideDiscounts && this.discountTotal != 0 && i === 1\">\n <i ngClass=\"mb-2 colorIconoCheckout\" [class]=\"getIcon2('discount')\"></i>\n <strong class=\"text-center w-100 font-brandon font-md mb-1\">Descuento</strong>\n <span class=\"text-center w-100 font-brandon font-md text-gray\">{{ (this.discountTotal | ecCurrencySymbol)\n }}</span>\n </div>\n\n <!-- Mostrar total de cupones -->\n <div class=\"d-flex flex-column justify-content-center mx-sm-3 mx-2 text-center mb-4 resumen\"\n *ngIf=\"!hideDiscounts && this.couponTotal != 0 && i === 1\">\n <i ngClass=\"mb-2 colorIconoCheckout\" [class]=\"getIcon2('coupon')\"></i>\n <strong class=\"text-center w-100 font-brandon font-md mb-1\">Cupon</strong>\n <span class=\"text-center w-100 font-brandon font-md text-gray\">{{(this.couponTotal| ecCurrencySymbol)\n }}</span>\n </div>\n </ng-container>\n</div>",
14198
14207
  styles: [""]
14199
14208
  })
14200
14209
  ], DetailCheckoutBlockEcComponent);
@@ -18515,16 +18524,19 @@ var __decorate$1$ = (this && this.__decorate) || function (decorators, target, k
18515
18524
  return c > 3 && r && Object.defineProperty(target, key, r), r;
18516
18525
  };
18517
18526
  var SidebarEcComponent = /** @class */ (function () {
18518
- function SidebarEcComponent(cartService, consts, authService, router, toastrService) {
18527
+ function SidebarEcComponent(cartService, consts, authService, router, toastrService, channelConfigService) {
18519
18528
  var _this = this;
18520
18529
  this.cartService = cartService;
18521
18530
  this.consts = consts;
18522
18531
  this.authService = authService;
18523
18532
  this.router = router;
18524
18533
  this.toastrService = toastrService;
18534
+ this.channelConfigService = channelConfigService;
18525
18535
  this.user = null;
18526
18536
  this.promotions = [];
18527
18537
  this.variantsToShow = ['TALLE', 'COLOR'];
18538
+ this.hideDiscounts = false;
18539
+ this.hideTaxes = false;
18528
18540
  this.actualizarCantidad = function (item, cantidad, stock, id) {
18529
18541
  if (id) {
18530
18542
  var elem_1 = document.getElementById(id);
@@ -18588,6 +18600,11 @@ var SidebarEcComponent = /** @class */ (function () {
18588
18600
  this.authService.getUserProfile().subscribe(function (u) {
18589
18601
  _this.user = u;
18590
18602
  });
18603
+ this.channelConfigService.channelConfig$.subscribe(function (channel) {
18604
+ var _a, _b, _c, _d;
18605
+ _this.hideDiscounts = (_b = (_a = channel) === null || _a === void 0 ? void 0 : _a.hideDiscounts, (_b !== null && _b !== void 0 ? _b : false));
18606
+ _this.hideTaxes = (_d = (_c = channel) === null || _c === void 0 ? void 0 : _c.hideTaxes, (_d !== null && _d !== void 0 ? _d : false));
18607
+ });
18591
18608
  };
18592
18609
  SidebarEcComponent.prototype.redirectDetailProduct = function (product) {
18593
18610
  var variant = product.variants[0];
@@ -18609,7 +18626,8 @@ var SidebarEcComponent = /** @class */ (function () {
18609
18626
  { type: Constants },
18610
18627
  { type: AuthService },
18611
18628
  { type: Router },
18612
- { type: ToastService }
18629
+ { type: ToastService },
18630
+ { type: ChannelConfigService }
18613
18631
  ]; };
18614
18632
  SidebarEcComponent = __decorate$1$([
18615
18633
  Component({