ng-easycommerce 0.0.572 → 0.0.574

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.
package/README.md CHANGED
@@ -1,3 +1,11 @@
1
+ # version 0.0.574
2
+ - Decidir se reinicia modal al terminar o cancelar el agregar nueva tarjeta
3
+ - Se agregó una alerta al registrar un usuario para que se muestre un mensaje de acuerdo a las siguientes condiciones:
4
+ - Si `isAccountVerificationRequired` es true, se muestra el mensaje `register-ok`.
5
+ - Si `isSendWelcomeEmail` es true y `isAccountVerificationRequired` es false, se muestra el mensaje `register-welcome`.
6
+ - Si ambos checks son false, se muestra el mensaje `register-success`.
7
+ # version 0.0.573
8
+ - Se modifica y se agrega funcion para actualizar el stock y cambie al disponible en caso de que sea mayor. Tambien lo elimina en caso de que el stock sea 0.
1
9
  # version 0.0.572
2
10
  - Se implementó la lógica para gestionar un observable `balanceCustomerSubject` en `cart.service` que contiene los datos referentes al crédito del usuario.
3
11
  - Se añadió la validaciónes en `cart.service` y `product-detail`, para verificar si el usuario tiene suficientes créditos antes de continuar con la compra.
@@ -266,6 +266,8 @@
266
266
  "newsletter-thanks": "Gràcies per subscriure a les notícies",
267
267
  "notes": "Detalls addicionals d'enviament",
268
268
  "register-ok": "Es va enviar un mail a la seva casella de correu a la seva nova compte",
269
+ "register-welcome": "Registre completat amb èxit. S'ha enviat un correu electrònic de benvinguda a la seva bústia",
270
+ "register-success": "Registre completat amb èxit. Si us plau, iniciï sessió",
269
271
  "thanks-for-register-detail": "Ara ja podeu entrar. A continuació li deixem l'accés a l'inici de sessió",
270
272
  "thanks-for-register": "Gràcies per registrar",
271
273
  "pickup-store": "Botiga de recollida",
@@ -250,6 +250,8 @@
250
250
  "redirect-cart": "Redirecting to cart",
251
251
  "register": "Register",
252
252
  "register-ok": "An email was sent to your mailbox to verify your new account",
253
+ "register-welcome": "Registration successful. A welcome email has been sent to your mailbox",
254
+ "register-success": "Registration successful. Please log in",
253
255
  "related-products": "Related Products",
254
256
  "repeat-new-password": "Repeat new password",
255
257
  "repeat-password": "Repeat password",
@@ -253,6 +253,8 @@
253
253
  "redirect-cart": "Redirigiendo al carrito",
254
254
  "register": "Solicitar Registro",
255
255
  "register-ok": "Se envió un mail a su casilla de correo para verificar su nueva cuenta",
256
+ "register-welcome": "Registro exitoso. Se ha enviado un email de bienvenida a su casilla de correo",
257
+ "register-success": "Registro exitoso. Por favor, inicie sesión",
256
258
  "related-products": "Productos relacionados",
257
259
  "repeat-new-password": "Repita nueva contraseña",
258
260
  "repeat-password": "Confirme la contraseña",
@@ -258,6 +258,8 @@
258
258
  "newsletter-thanks": "Merci de vous être abonné aux nouvelles",
259
259
  "notes": "Détails d'expédition supplémentaires",
260
260
  "register-ok": "Un e-mail a été envoyé à votre boîte aux lettres pour vérifier votre nouveau compte",
261
+ "register-welcome": "Inscription réussie. Un e-mail de bienvenue a été envoyé à votre boîte de réception",
262
+ "register-success": "Inscription réussie. Veuillez vous connecter",
261
263
  "thanks-for-register-detail": "Vous pouvez maintenant vous connecter. Ensuite, nous vous laissons l'accès à la connexion",
262
264
  "thanks-for-register": "Merci de votre inscription",
263
265
  "pickup-store": "Magasin de ramassage",
@@ -266,6 +266,8 @@
266
266
  "newsletter-thanks": "Grazas por subscribirte á noticia",
267
267
  "notes": "Detalles adicionais de envío",
268
268
  "register-ok": "Enviouse un correo electrónico á súa caixa de correo para verificar a súa nova conta",
269
+ "register-welcome": "Rexistro exitoso. Enviouse un correo electrónico de benvida á túa caixa de correo",
270
+ "register-success": "Rexistro exitoso. Por favor, inicie sesión",
269
271
  "thanks-for-register-detail": "Agora podes iniciar sesión. Entón deixámosche acceso ao inicio de sesión",
270
272
  "thanks-for-register": "Grazas por rexistrarse",
271
273
  "pickup-store": "Tenda de recollida",
@@ -266,6 +266,8 @@
266
266
  "newsletter-thanks": "Obrigado por se inscrever nas notícias",
267
267
  "notes": "Detalhes adicionais de envio",
268
268
  "register-ok": "Um email foi enviado para sua caixa de correio para verificar sua nova conta",
269
+ "register-welcome": "Registro bem-sucedido. Um e-mail de boas-vindas foi enviado para sua caixa de correio",
270
+ "register-success": "Registro bem-sucedido. Por favor, faça login",
269
271
  "thanks-for-register-detail": "Agora você pode fazer login. Então deixamos você acessar o login",
270
272
  "thanks-for-register": "Obrigado por se registrar",
271
273
  "pickup-store": "Retiro na local",
@@ -7247,6 +7247,17 @@
7247
7247
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
7248
7248
  }
7249
7249
  };
7250
+ var __values = (this && this.__values) || function(o) {
7251
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
7252
+ if (m) return m.call(o);
7253
+ if (o && typeof o.length === "number") return {
7254
+ next: function () {
7255
+ if (o && i >= o.length) o = void 0;
7256
+ return { value: o && o[i++], done: !o };
7257
+ }
7258
+ };
7259
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
7260
+ };
7250
7261
  var CartEcComponent = /** @class */ (function (_super) {
7251
7262
  __extends$g(CartEcComponent, _super);
7252
7263
  function CartEcComponent(cartService, authService, consts, productsService, router, modalService, toastrService, addressingService) {
@@ -7265,6 +7276,8 @@
7265
7276
  _this.promotions = [];
7266
7277
  _this.cargando = false;
7267
7278
  _this.channel = {};
7279
+ _this.updateStock = false;
7280
+ _this.exitUpdate = false;
7268
7281
  _this.toDecimal = function (amount) { return _this.consts.toDecimal(amount); };
7269
7282
  _this.actualizarCantidad = function (item, cantidad, stock, id) {
7270
7283
  if (id) {
@@ -7519,7 +7532,78 @@
7519
7532
  $('#' + id).modal('hide');
7520
7533
  };
7521
7534
  CartEcComponent.prototype.checkStock = function (item) {
7522
- return item.quantity > item.product.variants[0].stock;
7535
+ var e_1, _a;
7536
+ try {
7537
+ for (var _b = __values(item.product.variants), _c = _b.next(); !_c.done; _c = _b.next()) {
7538
+ var variant = _c.value;
7539
+ if (item.variant_id === variant.code) {
7540
+ if (variant.stock === 0) {
7541
+ this.updateStock = true;
7542
+ return '0';
7543
+ }
7544
+ else if (item.quantity > variant.stock) {
7545
+ this.updateStock = true;
7546
+ return variant.stock;
7547
+ }
7548
+ }
7549
+ }
7550
+ }
7551
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
7552
+ finally {
7553
+ try {
7554
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
7555
+ }
7556
+ finally { if (e_1) throw e_1.error; }
7557
+ }
7558
+ return false; // Solo se ejecuta si no se cumple la condición
7559
+ };
7560
+ CartEcComponent.prototype.updateAllStock = function () {
7561
+ var _this = this;
7562
+ var items = [];
7563
+ // Define la suscripción antes de usarla
7564
+ this.cartService.cartItems.subscribe(function (res) {
7565
+ res.forEach(function (item) {
7566
+ var e_2, _a;
7567
+ try {
7568
+ for (var _b = __values(item.product.variants), _c = _b.next(); !_c.done; _c = _b.next()) {
7569
+ var variant = _c.value;
7570
+ if (item.variant_id === variant.code && !_this.exitUpdate) {
7571
+ if (variant.stock === 0) {
7572
+ _this.cartService.deleteCartItem(item, false); // Borra el artículo
7573
+ }
7574
+ else if (item.quantity > variant.stock) {
7575
+ items.push({
7576
+ productCode: item.product.id,
7577
+ quantity: variant.stock,
7578
+ variantCode: variant.code,
7579
+ });
7580
+ }
7581
+ else {
7582
+ items.push({
7583
+ productCode: item.product.id,
7584
+ quantity: item.quantity,
7585
+ variantCode: variant.code,
7586
+ });
7587
+ }
7588
+ }
7589
+ }
7590
+ }
7591
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
7592
+ finally {
7593
+ try {
7594
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
7595
+ }
7596
+ finally { if (e_2) throw e_2.error; }
7597
+ }
7598
+ });
7599
+ if (items.length > 0 && !_this.exitUpdate) {
7600
+ // subscription.unsubscribe(); // Desuscríbete antes de actualizar
7601
+ _this.cartService.addAllToCart(items); // Actualiza el carrito
7602
+ _this.updateStock = false;
7603
+ _this.exitUpdate = true;
7604
+ // this.updateAllStock(); // Vuelve a verificar el stock
7605
+ }
7606
+ });
7523
7607
  };
7524
7608
  CartEcComponent.prototype.createDiscountMessage = function (saleprice, price) {
7525
7609
  if (isNaN(saleprice) || isNaN(price) || saleprice >= price || saleprice <= 0 || price <= 0) {
@@ -8305,7 +8389,7 @@
8305
8389
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
8306
8390
  }
8307
8391
  };
8308
- var __values = (this && this.__values) || function(o) {
8392
+ var __values$1 = (this && this.__values) || function(o) {
8309
8393
  var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
8310
8394
  if (m) return m.call(o);
8311
8395
  if (o && typeof o.length === "number") return {
@@ -8410,7 +8494,7 @@
8410
8494
  var e_1, _a;
8411
8495
  var parent = e.target.parentElement.children;
8412
8496
  try {
8413
- for (var parent_1 = __values(parent), parent_1_1 = parent_1.next(); !parent_1_1.done; parent_1_1 = parent_1.next()) {
8497
+ for (var parent_1 = __values$1(parent), parent_1_1 = parent_1.next(); !parent_1_1.done; parent_1_1 = parent_1.next()) {
8414
8498
  var button = parent_1_1.value;
8415
8499
  if (button.classList.contains('active')) {
8416
8500
  button.classList.remove('active');
@@ -8479,7 +8563,7 @@
8479
8563
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
8480
8564
  return c > 3 && r && Object.defineProperty(target, key, r), r;
8481
8565
  };
8482
- var __values$1 = (this && this.__values) || function(o) {
8566
+ var __values$2 = (this && this.__values) || function(o) {
8483
8567
  var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
8484
8568
  if (m) return m.call(o);
8485
8569
  if (o && typeof o.length === "number") return {
@@ -8568,7 +8652,7 @@
8568
8652
  var e_1, _a;
8569
8653
  var parent = e.target.parentElement.children;
8570
8654
  try {
8571
- for (var parent_1 = __values$1(parent), parent_1_1 = parent_1.next(); !parent_1_1.done; parent_1_1 = parent_1.next()) {
8655
+ for (var parent_1 = __values$2(parent), parent_1_1 = parent_1.next(); !parent_1_1.done; parent_1_1 = parent_1.next()) {
8572
8656
  var button = parent_1_1.value;
8573
8657
  if (button.classList.contains('active')) {
8574
8658
  button.classList.remove('active');
@@ -12917,13 +13001,14 @@
12917
13001
  };
12918
13002
  var RegisterFormEcComponent = /** @class */ (function (_super) {
12919
13003
  __extends$O(RegisterFormEcComponent, _super);
12920
- function RegisterFormEcComponent(authService, toastr, router, analyticsService, formBuilder) {
13004
+ function RegisterFormEcComponent(authService, toastr, router, analyticsService, formBuilder, channelConfigService) {
12921
13005
  var _this = _super.call(this) || this;
12922
13006
  _this.authService = authService;
12923
13007
  _this.toastr = toastr;
12924
13008
  _this.router = router;
12925
13009
  _this.analyticsService = analyticsService;
12926
13010
  _this.formBuilder = formBuilder;
13011
+ _this.channelConfigService = channelConfigService;
12927
13012
  _this.isLogged = true;
12928
13013
  _this.darkMode = false;
12929
13014
  _this.redirect = true;
@@ -12940,6 +13025,8 @@
12940
13025
  newsletter: false,
12941
13026
  terms: false,
12942
13027
  };
13028
+ _this.isAccountVerificationRequired = false;
13029
+ _this.isSendWelcomeEmail = false;
12943
13030
  _this.setProp = function (prop, event) {
12944
13031
  _this.registroUsuario[prop] = event.target.value;
12945
13032
  };
@@ -12964,7 +13051,18 @@
12964
13051
  if (_this.registerForm.valid) {
12965
13052
  _this.authService.signUp(_this.registerForm.value).toPromise().then(function (res) {
12966
13053
  _this.register_loading = false;
12967
- _this.toastr.show('register-ok');
13054
+ var messageKey;
13055
+ switch (true) {
13056
+ case _this.isAccountVerificationRequired:
13057
+ messageKey = 'register-ok';
13058
+ break;
13059
+ case _this.isSendWelcomeEmail:
13060
+ messageKey = 'register-welcome';
13061
+ break;
13062
+ default:
13063
+ messageKey = 'register-success';
13064
+ }
13065
+ _this.toastr.show(messageKey);
12968
13066
  _this.analyticsService.callEvent('sign_up', {
12969
13067
  firstName: _this.registerForm.value.firstName,
12970
13068
  lastName: _this.registerForm.value.lastName,
@@ -12994,6 +13092,7 @@
12994
13092
  return _this;
12995
13093
  }
12996
13094
  RegisterFormEcComponent.prototype.ngOnInit = function () {
13095
+ var _this = this;
12997
13096
  this.registerForm = this.formBuilder.group({
12998
13097
  firstName: ['', forms.Validators.required],
12999
13098
  lastName: ['', forms.Validators.required],
@@ -13003,6 +13102,20 @@
13003
13102
  newsletter: [false],
13004
13103
  terms: ['', forms.Validators.required],
13005
13104
  });
13105
+ this.channelConfigService.channelConfig$.subscribe(function (config) {
13106
+ if (config && config.isAccountVerificationRequired !== undefined) {
13107
+ _this.isAccountVerificationRequired = config.isAccountVerificationRequired;
13108
+ }
13109
+ else {
13110
+ _this.isAccountVerificationRequired = false;
13111
+ }
13112
+ if (config && config.isSendWelcomeEmail !== undefined) {
13113
+ _this.isSendWelcomeEmail = config.isSendWelcomeEmail;
13114
+ }
13115
+ else {
13116
+ _this.isSendWelcomeEmail = false;
13117
+ }
13118
+ });
13006
13119
  this.ecOnInit();
13007
13120
  };
13008
13121
  RegisterFormEcComponent.ctorParameters = function () { return [
@@ -13010,7 +13123,8 @@
13010
13123
  { type: ToastService },
13011
13124
  { type: router.Router },
13012
13125
  { type: AnalyticsService },
13013
- { type: forms.FormBuilder }
13126
+ { type: forms.FormBuilder },
13127
+ { type: ChannelConfigService }
13014
13128
  ]; };
13015
13129
  __decorate$1m([
13016
13130
  core.Input()
@@ -17373,6 +17487,9 @@
17373
17487
  }, 1000);
17374
17488
  }
17375
17489
  };
17490
+ BancardCatastroEcComponent.prototype.openModal = function () {
17491
+ this.infoPreview = true;
17492
+ };
17376
17493
  BancardCatastroEcComponent.prototype.closeModal = function () {
17377
17494
  };
17378
17495
  BancardCatastroEcComponent.ctorParameters = function () { return [
@@ -17408,7 +17525,7 @@
17408
17525
  BancardCatastroEcComponent = __decorate$1S([
17409
17526
  core.Component({
17410
17527
  selector: 'app-bancard-catastro-ec',
17411
- template: "<div *ngIf=\"!loading; else loadingView\">\r\n <div class=\"row my-3\">\r\n <ng-container *ngIf=\"registered_cards && registered_cards.length > 0; else notCards\">\r\n <ng-container *ngFor=\"let card of registered_cards; let x=index\">\r\n <div class=\"col-12 col-md-6\">\r\n <div class=\"card my-2\">\r\n <div class=\"card-body\">\r\n <div class=\"row\">\r\n <div class=\"col-12 col-md-9\">\r\n <h5 class=\"card-title\">Terminada en {{card.card_masked_number.slice(-4)}}</h5>\r\n <!-- <h6 class=\"card-subtitle mb-2 text-muted\">Card subtitle</h6> -->\r\n <!-- <p class=\"card-text\">Some quick example text to build on the card title and make up the bulk of the card's content.</p>\r\n -->\r\n <p class=\"card-text text-muted\">{{card.card_brand}}</p>\r\n <p class=\"card-text text-muted\">Vencimiento: {{card.expiration_date}}</p>\r\n </div>\r\n <div class=\"col-3 d-none d-md-flex\">\r\n <div class=\"d-flex flex-column justify-content-between align-items-center w-100\">\r\n <div class=\"d-flex justify-content-end w-100\">\r\n <a class=\"cursor-pointer text-primary\" (click)=\"deleteCard(card.card_id)\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" class=\"bi bi-trash3\"\r\n viewBox=\"0 0 16 16\">\r\n <path\r\n d=\"M6.5 1h3a.5.5 0 0 1 .5.5v1H6v-1a.5.5 0 0 1 .5-.5ZM11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3A1.5 1.5 0 0 0 5 1.5v1H2.506a.58.58 0 0 0-.01 0H1.5a.5.5 0 0 0 0 1h.538l.853 10.66A2 2 0 0 0 4.885 16h6.23a2 2 0 0 0 1.994-1.84l.853-10.66h.538a.5.5 0 0 0 0-1h-.995a.59.59 0 0 0-.01 0H11Zm1.958 1-.846 10.58a1 1 0 0 1-.997.92h-6.23a1 1 0 0 1-.997-.92L3.042 3.5h9.916Zm-7.487 1a.5.5 0 0 1 .528.47l.5 8.5a.5.5 0 0 1-.998.06L5 5.03a.5.5 0 0 1 .47-.53Zm5.058 0a.5.5 0 0 1 .47.53l-.5 8.5a.5.5 0 1 1-.998-.06l.5-8.5a.5.5 0 0 1 .528-.47ZM8 4.5a.5.5 0 0 1 .5.5v8.5a.5.5 0 0 1-1 0V5a.5.5 0 0 1 .5-.5Z\" />\r\n </svg>\r\n </a>\r\n </div>\r\n <img [src]=\"getCardImg(card.card_brand)\" class=\"img-card\" />\r\n \r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"card-footer d-flex flex-row justify-content-end\">\r\n <ng-container *ngIf=\"!checkingPayment; else buttonLoading\">\r\n <button *ngIf=\"card.card_type == 'credit'; else debito\" class=\"btn comprar text-white\" data-bs-toggle=\"modal\"\r\n data-bs-target=\"#modalCuotas\" (click)=\"setCurrentCardID(card.card_id)\">Pagar</button>\r\n <ng-template #debito>\r\n <button class=\"btn comprar text-white\" (click)=\"toPay(card.card_id)\">Pagar</button>\r\n </ng-template>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n <ng-template #notCards>\r\n <div class=\"col-12 d-flex justify-content-center\">\r\n <h6>Usted no posee tarjetas registrada. Para continuar con este m\u00E9todo de pago por favor registre una\r\n tarjeta presionando el bot\u00F3n de <span class=\"text-decoration-underline fs-6\"> Nueva tarjeta</span>\r\n </h6>\r\n </div>\r\n </ng-template>\r\n </div>\r\n <div class=\"d-flex flex-row w-full justify-content-center\">\r\n <button class=\"btn comprar text-white\" data-bs-toggle=\"modal\" data-bs-target=\"#catastro\"\r\n (click)=\"getProcessId()\">Nueva Tarjeta</button>\r\n </div>\r\n</div>\r\n\r\n<div class=\"modal\" tabindex=\"-1\" id=\"catastro\">\r\n <div class=\"modal-dialog\">\r\n <div class=\"modal-content\">\r\n <div class=\"modal-header\">\r\n <!-- <h5 class=\"modal-title\">Modal title</h5> -->\r\n <button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"\r\n (click)=\"closeModal()\"></button>\r\n </div>\r\n <div class=\"modal-body d-flex flex-column justify-content-center align-items-center\">\r\n <ng-container *ngIf=\"infoPreview; else iframe\">\r\n <div class=\"alert alert-warning \" role=\"alert\">\r\n <p class=\"mb-0\">Estimado usuario,</p>\r\n <p> A continuaci\u00F3n usted pasar\u00E1 por \u00FAnica vez por un proceso de\r\n validaci\u00F3n con preguntas de seguridad. Para iniciar favor tener en\r\n cuenta las siguientes recomendaciones:</p>\r\n <ol class=\"list-group list-group-numbered\">\r\n <li class=\"list-group-item list-group-item-warning\">Verifique su n\u00FAmero de c\u00E9dula de\r\n identidad</li>\r\n <li class=\"list-group-item list-group-item-warning\">Tenga a mano sus tarjetas de cr\u00E9dito y\r\n d\u00E9bito activas</li>\r\n <li class=\"list-group-item list-group-item-warning\">Verifique el monto y lugar de sus\r\n \u00FAltimas compras en\r\n comercios o extracciones en cajeros</li>\r\n </ol>\r\n </div>\r\n <div class=\"d-flex flex-row w-full justify-content-center\">\r\n <a class=\"cursor-pointer text-dark fs-xs\" (click)=\"skipInfoPreview()\">Saltar</a>\r\n </div>\r\n </ng-container>\r\n <ng-template #iframe>\r\n <iframe *ngIf=\"url; else loadingView\" [src]=\"url\" frameborder=\"0\" class=\"iframeStyle\"></iframe>\r\n </ng-template>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n\r\n<!-- Modal -->\r\n<div class=\"modal fade\" id=\"modalCuotas\" tabindex=\"-1\" aria-labelledby=\"exampleModalLabel\" aria-hidden=\"true\">\r\n <div class=\"modal-dialog modal-dialog-centered modal-sm\">\r\n <div class=\"modal-content\">\r\n <div class=\"modal-header\">\r\n <h5 class=\"modal-title\" id=\"exampleModalLabel\">Elija el n\u00FAmero de cuotas</h5>\r\n <button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button>\r\n </div>\r\n <div class=\"modal-body\">\r\n <select class=\"form-select\" aria-label=\"Default select example\"\r\n (change)=\"setNumberOfPayments($event.target.value)\">\r\n <option selected disabled>Selecciones la cantidad de cuotas</option>\r\n <option value=\"1\">1 cuota</option>\r\n <option value=\"3\">3 cuotas</option>\r\n <option value=\"6\">6 cuotas</option>\r\n <option value=\"12\">12 cuotas</option>\r\n </select>\r\n </div>\r\n <div class=\"modal-footer\" *ngIf=\"canPay()\">\r\n <button type=\"button\" class=\"btn comprar text-white\" data-bs-dismiss=\"modal\"\r\n (click)=\"toPay(currentCardID)\">Pagar</button>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<ng-template #loadingView>\r\n <div>\r\n <app-loading-inline-ec></app-loading-inline-ec>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #buttonLoading>\r\n <button type=\"button\" class=\"btn comprar text-white\" data-bs-dismiss=\"modal\"> \r\n <app-loading-inline-ec></app-loading-inline-ec>\r\n </button>\r\n</ng-template>",
17528
+ template: "<div *ngIf=\"!loading; else loadingView\">\r\n <div class=\"row my-3\">\r\n <ng-container *ngIf=\"registered_cards && registered_cards.length > 0; else notCards\">\r\n <ng-container *ngFor=\"let card of registered_cards; let x=index\">\r\n <div class=\"col-12 col-md-6\">\r\n <div class=\"card my-2\">\r\n <div class=\"card-body\">\r\n <div class=\"row\">\r\n <div class=\"col-12 col-md-9\">\r\n <h5 class=\"card-title\">Terminada en {{card.card_masked_number.slice(-4)}}</h5>\r\n <!-- <h6 class=\"card-subtitle mb-2 text-muted\">Card subtitle</h6> -->\r\n <!-- <p class=\"card-text\">Some quick example text to build on the card title and make up the bulk of the card's content.</p>\r\n -->\r\n <p class=\"card-text text-muted\">{{card.card_brand}}</p>\r\n <p class=\"card-text text-muted\">Vencimiento: {{card.expiration_date}}</p>\r\n </div>\r\n <div class=\"col-3 d-none d-md-flex\">\r\n <div class=\"d-flex flex-column justify-content-between align-items-center w-100\">\r\n <div class=\"d-flex justify-content-end w-100\">\r\n <a class=\"cursor-pointer text-primary\" (click)=\"deleteCard(card.card_id)\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" class=\"bi bi-trash3\"\r\n viewBox=\"0 0 16 16\">\r\n <path\r\n d=\"M6.5 1h3a.5.5 0 0 1 .5.5v1H6v-1a.5.5 0 0 1 .5-.5ZM11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3A1.5 1.5 0 0 0 5 1.5v1H2.506a.58.58 0 0 0-.01 0H1.5a.5.5 0 0 0 0 1h.538l.853 10.66A2 2 0 0 0 4.885 16h6.23a2 2 0 0 0 1.994-1.84l.853-10.66h.538a.5.5 0 0 0 0-1h-.995a.59.59 0 0 0-.01 0H11Zm1.958 1-.846 10.58a1 1 0 0 1-.997.92h-6.23a1 1 0 0 1-.997-.92L3.042 3.5h9.916Zm-7.487 1a.5.5 0 0 1 .528.47l.5 8.5a.5.5 0 0 1-.998.06L5 5.03a.5.5 0 0 1 .47-.53Zm5.058 0a.5.5 0 0 1 .47.53l-.5 8.5a.5.5 0 1 1-.998-.06l.5-8.5a.5.5 0 0 1 .528-.47ZM8 4.5a.5.5 0 0 1 .5.5v8.5a.5.5 0 0 1-1 0V5a.5.5 0 0 1 .5-.5Z\" />\r\n </svg>\r\n </a>\r\n </div>\r\n <img [src]=\"getCardImg(card.card_brand)\" class=\"img-card\" />\r\n \r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"card-footer d-flex flex-row justify-content-end\">\r\n <ng-container *ngIf=\"!checkingPayment; else buttonLoading\">\r\n <button *ngIf=\"card.card_type == 'credit'; else debito\" class=\"btn comprar text-white\" data-bs-toggle=\"modal\"\r\n data-bs-target=\"#modalCuotas\" (click)=\"setCurrentCardID(card.card_id)\">Pagar</button>\r\n <ng-template #debito>\r\n <button class=\"btn comprar text-white\" (click)=\"toPay(card.card_id)\">Pagar</button>\r\n </ng-template>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n <ng-template #notCards>\r\n <div class=\"col-12 d-flex justify-content-center\">\r\n <h6>Usted no posee tarjetas registrada. Para continuar con este m\u00E9todo de pago por favor registre una\r\n tarjeta presionando el bot\u00F3n de <span class=\"text-decoration-underline fs-6\"> Nueva tarjeta</span>\r\n </h6>\r\n </div>\r\n </ng-template>\r\n </div>\r\n <div class=\"d-flex flex-row w-full justify-content-center\">\r\n <button class=\"btn comprar text-white\" data-bs-toggle=\"modal\" data-bs-target=\"#catastro\"\r\n (click)=\"getProcessId(); openModal()\">Nueva Tarjeta</button>\r\n </div>\r\n</div>\r\n\r\n<div class=\"modal\" tabindex=\"-1\" id=\"catastro\">\r\n <div class=\"modal-dialog\">\r\n <div class=\"modal-content\">\r\n <div class=\"modal-header\">\r\n <!-- <h5 class=\"modal-title\">Modal title</h5> -->\r\n <button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"\r\n (click)=\"closeModal()\"></button>\r\n </div>\r\n <div class=\"modal-body d-flex flex-column justify-content-center align-items-center\">\r\n <ng-container *ngIf=\"infoPreview; else iframe\">\r\n <div class=\"alert alert-warning \" role=\"alert\">\r\n <p class=\"mb-0\">Estimado usuario,</p>\r\n <p> A continuaci\u00F3n usted pasar\u00E1 por \u00FAnica vez por un proceso de\r\n validaci\u00F3n con preguntas de seguridad. Para iniciar favor tener en\r\n cuenta las siguientes recomendaciones:</p>\r\n <ol class=\"list-group list-group-numbered\">\r\n <li class=\"list-group-item list-group-item-warning\">Verifique su n\u00FAmero de c\u00E9dula de\r\n identidad</li>\r\n <li class=\"list-group-item list-group-item-warning\">Tenga a mano sus tarjetas de cr\u00E9dito y\r\n d\u00E9bito activas</li>\r\n <li class=\"list-group-item list-group-item-warning\">Verifique el monto y lugar de sus\r\n \u00FAltimas compras en\r\n comercios o extracciones en cajeros</li>\r\n </ol>\r\n </div>\r\n <div class=\"d-flex flex-row w-full justify-content-center\">\r\n <a class=\"cursor-pointer text-dark fs-xs\" (click)=\"skipInfoPreview()\">Saltar</a>\r\n </div>\r\n </ng-container>\r\n <ng-template #iframe>\r\n <iframe *ngIf=\"url; else loadingView\" [src]=\"url\" frameborder=\"0\" class=\"iframeStyle\"></iframe>\r\n </ng-template>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n\r\n<!-- Modal -->\r\n<div class=\"modal fade\" id=\"modalCuotas\" tabindex=\"-1\" aria-labelledby=\"exampleModalLabel\" aria-hidden=\"true\">\r\n <div class=\"modal-dialog modal-dialog-centered modal-sm\">\r\n <div class=\"modal-content\">\r\n <div class=\"modal-header\">\r\n <h5 class=\"modal-title\" id=\"exampleModalLabel\">Elija el n\u00FAmero de cuotas</h5>\r\n <button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button>\r\n </div>\r\n <div class=\"modal-body\">\r\n <select class=\"form-select\" aria-label=\"Default select example\"\r\n (change)=\"setNumberOfPayments($event.target.value)\">\r\n <option selected disabled>Selecciones la cantidad de cuotas</option>\r\n <option value=\"1\">1 cuota</option>\r\n <option value=\"3\">3 cuotas</option>\r\n <option value=\"6\">6 cuotas</option>\r\n <option value=\"12\">12 cuotas</option>\r\n </select>\r\n </div>\r\n <div class=\"modal-footer\" *ngIf=\"canPay()\">\r\n <button type=\"button\" class=\"btn comprar text-white\" data-bs-dismiss=\"modal\"\r\n (click)=\"toPay(currentCardID)\">Pagar</button>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<ng-template #loadingView>\r\n <div>\r\n <app-loading-inline-ec></app-loading-inline-ec>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #buttonLoading>\r\n <button type=\"button\" class=\"btn comprar text-white\" data-bs-dismiss=\"modal\"> \r\n <app-loading-inline-ec></app-loading-inline-ec>\r\n </button>\r\n</ng-template>",
17412
17529
  styles: [".iframeStyle{min-height:520px!important;width:80%}.img-card{width:90px;height:90px}"]
17413
17530
  })
17414
17531
  ], BancardCatastroEcComponent);