ng-easycommerce 0.0.644 → 0.0.646

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.
@@ -13859,7 +13859,21 @@ var RegisterFormEcComponent = /** @class */ (function (_super) {
13859
13859
  }, function (error) {
13860
13860
  _this.register_loading = false;
13861
13861
  if (error.status == 400) {
13862
- _this.toastr.showPersistent('El email ingresado ya se encuentra registrado.');
13862
+ var backendError = error.error;
13863
+ if (backendError &&
13864
+ backendError.errors &&
13865
+ backendError.errors.email &&
13866
+ backendError.errors.email.length > 0) {
13867
+ // Mostrar el primer mensaje de error de email
13868
+ _this.toastr.showPersistent(backendError.errors.email[0]);
13869
+ }
13870
+ else if (backendError && backendError.message) {
13871
+ // Si no hay mensaje específico, pero hay mensaje general del backend
13872
+ _this.toastr.showPersistent(backendError.message);
13873
+ }
13874
+ else {
13875
+ _this.toastr.showPersistent('El email ingresado ya se encuentra registrado.');
13876
+ }
13863
13877
  }
13864
13878
  else {
13865
13879
  _this.toastr.show('Error en el registro. Vuelva a intentarlo más tarde.');
@@ -19410,6 +19424,12 @@ var PlaceToPayEcComponent = /** @class */ (function (_super) {
19410
19424
  }, function (err) { return _this.processError('Ocurrió un error al procesar el pago. Inténtelo más tarde.'); });
19411
19425
  };
19412
19426
  _this.ecOnConstruct();
19427
+ console.log("method", _this.method);
19428
+ console.log("previousFailureAmount", _this.previousFailureAmount);
19429
+ _this.cartService.cart.subscribe(function (cart) {
19430
+ _this.cart = cart;
19431
+ });
19432
+ console.log("cart", _this.cart);
19413
19433
  return _this;
19414
19434
  }
19415
19435
  PlaceToPayEcComponent.prototype.ngOnInit = function () {
@@ -19445,7 +19465,7 @@ var PlaceToPayEcComponent = /** @class */ (function (_super) {
19445
19465
  PlaceToPayEcComponent = __decorate$20([
19446
19466
  Component({
19447
19467
  selector: 'app-place-to-pay-ec',
19448
- template: "<div class=\"text-center\">\n <ng-container *ngIf=\"url; else loadingUrl\">\n <ng-container *ngIf=\"!loading; else loadingTemp\">\n <button (click)=\"iniciar()\" class=\"btn btn-outline-secondary rounded-0 comprar mt-3\">\n {{ buttonText }}\n </button>\n\n <!-- Mensaje de intento previo fallido -->\n <div *ngIf=\"hasPreviousFailure\" class=\"alert alert-danger mt-3\">\n El pago no se pudo realizar el {{ previousFailureDate }}\n por un monto de {{ previousFailureAmount | ecCurrencySymbol }}.\n </div>\n </ng-container>\n </ng-container>\n</div>\n\n<ng-template #loadingUrl>\n <div class=\"d-flex flex-column justify-content-center align-items-center mt-2\">\n <app-loading-full-ec></app-loading-full-ec>\n </div>\n</ng-template>\n\n<ng-template #loadingTemp>\n <div class=\"d-flex flex-column justify-content-center align-items-center mt-2\">\n <h3>Procesando el pago por Place to Pay</h3>\n <h5>Recuerde hacer click en \"Volver al sitio\" desde Place to Pay para finalizar la compra.</h5>\n <app-loading-full-ec></app-loading-full-ec>\n </div>\n <div class=\"container-fluid\">\n <div class=\"row\">\n <div class=\"col-5\">\n <hr>\n </div>\n <div class=\"col-2 text-center\">\n <label>o</label>\n </div>\n <div class=\"col-5\">\n <hr>\n </div>\n </div>\n </div>\n <div class=\"d-flex flex-column justify-content-center align-items-center mt-2\">\n <button (click)=\"clickClose()\" class=\"btn btn-outline-secondary rounded-0 comprar\">Cancelar pago</button>\n </div>\n</ng-template>",
19468
+ template: "<div class=\"text-center\">\n <ng-container *ngIf=\"url; else loadingUrl\">\n <ng-container *ngIf=\"!loading; else loadingTemp\">\n <button (click)=\"iniciar()\" class=\"btn btn-outline-secondary rounded-0 comprar mt-3\">\n {{ buttonText }}\n </button>\n\n <!-- Mensaje de intento previo fallido -->\n <div *ngIf=\"hasPreviousFailure\" class=\"alert alert-danger mt-3\">\n El pago del pedido con n\u00FAmero de orden {{ cart.number }} no se pudo realizar el {{ previousFailureDate }}\n por un monto de {{ previousFailureAmount | ecCurrencySymbol }}.\n </div>\n </ng-container>\n </ng-container>\n</div>\n\n<ng-template #loadingUrl>\n <div class=\"d-flex flex-column justify-content-center align-items-center mt-2\">\n <app-loading-full-ec></app-loading-full-ec>\n </div>\n</ng-template>\n\n<ng-template #loadingTemp>\n <div class=\"d-flex flex-column justify-content-center align-items-center mt-2\">\n <h3>Procesando el pago por Place to Pay</h3>\n <h5>Recuerde hacer click en \"Volver al sitio\" desde Place to Pay para finalizar la compra.</h5>\n <app-loading-full-ec></app-loading-full-ec>\n </div>\n <div class=\"container-fluid\">\n <div class=\"row\">\n <div class=\"col-5\">\n <hr>\n </div>\n <div class=\"col-2 text-center\">\n <label>o</label>\n </div>\n <div class=\"col-5\">\n <hr>\n </div>\n </div>\n </div>\n <div class=\"d-flex flex-column justify-content-center align-items-center mt-2\">\n <button (click)=\"clickClose()\" class=\"btn btn-outline-secondary rounded-0 comprar\">Cancelar pago</button>\n </div>\n</ng-template>",
19449
19469
  styles: [""]
19450
19470
  })
19451
19471
  ], PlaceToPayEcComponent);