ng-easycommerce 0.0.415 → 0.0.418

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.
Files changed (39) hide show
  1. package/README.md +17 -0
  2. package/assets/decidirFormEc.html +4 -35
  3. package/assets/ec-i18n/en.json +2 -1
  4. package/assets/ec-i18n/es.json +2 -1
  5. package/bundles/ng-easycommerce.umd.js +41 -31
  6. package/bundles/ng-easycommerce.umd.js.map +1 -1
  7. package/bundles/ng-easycommerce.umd.min.js +1 -1
  8. package/bundles/ng-easycommerce.umd.min.js.map +1 -1
  9. package/esm2015/lib/core.consts.js +4 -3
  10. package/esm2015/lib/ec-component/auth-ec/login-form-ec/login-form-ec.component.js +1 -3
  11. package/esm2015/lib/ec-component/login-ec/login-ec.component.js +1 -3
  12. package/esm2015/lib/ec-component/seller-dashboard-container-ec/seller-dashboard-container-ec.component.js +2 -2
  13. package/esm2015/lib/ec-component/widgets-ec/decidir-ec/decidir-ec.component.js +15 -4
  14. package/esm2015/lib/interceptors/auth.interceptor.js +3 -3
  15. package/esm2015/lib/interceptors/customer.interceptor.js +4 -4
  16. package/esm2015/lib/services/channel-config.service.js +5 -7
  17. package/esm2015/lib/services/checkout/addressing.service.js +4 -5
  18. package/esm2015/lib/services/checkout/checkout.service.js +10 -8
  19. package/esm2015/lib/services/checkout/error-handler.service.js +4 -1
  20. package/esm5/lib/core.consts.js +3 -2
  21. package/esm5/lib/ec-component/auth-ec/login-form-ec/login-form-ec.component.js +1 -3
  22. package/esm5/lib/ec-component/login-ec/login-ec.component.js +1 -3
  23. package/esm5/lib/ec-component/seller-dashboard-container-ec/seller-dashboard-container-ec.component.js +2 -2
  24. package/esm5/lib/ec-component/widgets-ec/decidir-ec/decidir-ec.component.js +16 -4
  25. package/esm5/lib/interceptors/auth.interceptor.js +3 -3
  26. package/esm5/lib/interceptors/customer.interceptor.js +4 -4
  27. package/esm5/lib/services/channel-config.service.js +5 -7
  28. package/esm5/lib/services/checkout/addressing.service.js +4 -5
  29. package/esm5/lib/services/checkout/checkout.service.js +10 -8
  30. package/esm5/lib/services/checkout/error-handler.service.js +4 -1
  31. package/fesm2015/ng-easycommerce.js +41 -32
  32. package/fesm2015/ng-easycommerce.js.map +1 -1
  33. package/fesm5/ng-easycommerce.js +41 -31
  34. package/fesm5/ng-easycommerce.js.map +1 -1
  35. package/lib/ec-component/widgets-ec/decidir-ec/decidir-ec.component.d.ts +5 -1
  36. package/lib/services/checkout/addressing.service.d.ts +3 -3
  37. package/lib/services/checkout/checkout.service.d.ts +2 -2
  38. package/ng-easycommerce.metadata.json +1 -1
  39. package/package.json +1 -1
@@ -428,11 +428,12 @@ var Constants = /** @class */ (function () {
428
428
  return _this.currency;
429
429
  };
430
430
  this.modifyChannelConfig = function (channelConfig) {
431
- console.log("Channel config: ", channelConfig);
432
431
  if (channelConfig.channel || channelConfig.code)
433
432
  _this.setChannel(channelConfig.channel || channelConfig.code);
434
433
  if (channelConfig.locale || channelConfig.locales.code)
435
434
  _this.setLocale(channelConfig.locale || channelConfig.locales.code);
435
+ if (channelConfig.currency || channelConfig.baseCurrency)
436
+ _this.setCurrency(channelConfig.currency || channelConfig.baseCurrency);
436
437
  return channelConfig;
437
438
  };
438
439
  }
@@ -2735,6 +2736,9 @@ var ErrorHandlerService = /** @class */ (function () {
2735
2736
  case 'channel_access_permission_denied':
2736
2737
  _this.channeAccessPermissionDenied(error);
2737
2738
  break;
2739
+ case 'user_disabled':
2740
+ _this.otherErrors(error);
2741
+ break;
2738
2742
  default:
2739
2743
  _this.otherErrors(error);
2740
2744
  break;
@@ -2852,7 +2856,7 @@ var __read$2 = (this && this.__read) || function (o, n) {
2852
2856
  return ar;
2853
2857
  };
2854
2858
  var CheckoutService = /** @class */ (function () {
2855
- function CheckoutService$1(connection, cartService, consts, toastrService, orderUtils, analyticsService, authService, router, checkoutError) {
2859
+ function CheckoutService$1(connection, cartService, consts, toastrService, orderUtils, analyticsService, authService, router, errorHandler) {
2856
2860
  var _this = this;
2857
2861
  this.connection = connection;
2858
2862
  this.cartService = cartService;
@@ -2862,7 +2866,7 @@ var CheckoutService = /** @class */ (function () {
2862
2866
  this.analyticsService = analyticsService;
2863
2867
  this.authService = authService;
2864
2868
  this.router = router;
2865
- this.checkoutError = checkoutError;
2869
+ this.errorHandler = errorHandler;
2866
2870
  this.baseApi = function () { return 'shop-api/' + _this.consts.getChannel() + '/checkout/' + _this.cartService.getCartToken(); };
2867
2871
  this.getPaymentMethodsApi = function () { return _this.baseApi() + '/payment'; };
2868
2872
  this.putAddressApi = function () { return _this.baseApi() + '/address'; };
@@ -3025,11 +3029,13 @@ var CheckoutService = /** @class */ (function () {
3025
3029
  this.cartService.cart.subscribe(function (cart) { return cart && (_this.cartLocal = cart) && _this.updateAsociatedData(cart); });
3026
3030
  this.order$.subscribe(function (order) { return order && _this.updateAsociatedData(order); });
3027
3031
  this.authService.getUserProfile().subscribe(function (user) { return _this.user = user; });
3028
- this.checkoutError.error$.pipe(filter(function (res) { return res != null; })).subscribe(function (res) {
3029
- _this.toastrService.show('redirect-cart');
3030
- setTimeout(function () {
3031
- _this.router.navigateByUrl('/cart');
3032
- }, 3000);
3032
+ this.errorHandler.error$.pipe(filter(function (res) { return res != null; })).subscribe(function (res) {
3033
+ if (res.code == 'out_of_stock' || res.code == 'items_with_product_or_product_variant_not_enabled') {
3034
+ _this.toastrService.show('redirect-cart');
3035
+ setTimeout(function () {
3036
+ _this.router.navigateByUrl('/cart');
3037
+ }, 3000);
3038
+ }
3033
3039
  });
3034
3040
  }
3035
3041
  CheckoutService$1.prototype.ngOnInit = function () {
@@ -3210,7 +3216,7 @@ var AddressingService = /** @class */ (function (_super) {
3210
3216
  _this.addressBookApi = function () { return 'shop-api/' + _this.consts.getChannel() + '/address-book'; };
3211
3217
  _this.headquarterApi = function () { return 'shop-api/' + _this.consts.getChannel() + '/checkout/' + _this.cartService.getCartToken() + '/headquarter'; };
3212
3218
  _this.typeForms = 'ARG';
3213
- _this.modeSelectAddress = 'ONLY_LOAD_ADDRESS';
3219
+ _this.modeSelectAddress = 'LOAD_ADDRESS_AND_SELECTION';
3214
3220
  _this.countriesList = [];
3215
3221
  _this.documentTypes = [];
3216
3222
  _this.provinceList = [];
@@ -3359,9 +3365,8 @@ var AddressingService = /** @class */ (function (_super) {
3359
3365
  ];
3360
3366
  return formsTypeCofig.find(function (ct) { return ct.code == _this.typeForms; });
3361
3367
  };
3362
- _this.setTypeSelectAddres = function (type) {
3363
- console.log("Setting type: ", type);
3364
- _this.modeSelectAddress = type && type || 'ONLY_LOAD_ADDRESS';
3368
+ _this.setTypeSelectAddress = function (type) {
3369
+ _this.modeSelectAddress = type && type || 'LOAD_ADDRESS_AND_SELECTION';
3365
3370
  };
3366
3371
  _this.setTypeForms = function (type) {
3367
3372
  _this.typeForms = type && type || 'ARG';
@@ -3420,7 +3425,7 @@ var ChannelConfigService = /** @class */ (function () {
3420
3425
  this.localesSubject = new BehaviorSubject([]);
3421
3426
  this.locales = this.localesSubject.asObservable();
3422
3427
  this.getChannelConfig = function () {
3423
- _this.connection.get(_this.channelConfigApi()).toPromise().then(function (res) { _this.channelConfigSubject.next(res), res && _this.consts.setChannel(res.code); }, function (err) { return _this.channelConfigSubject.next({}); }).catch(function (err) { return _this.channelConfigSubject.next(null); });
3428
+ _this.connection.get(_this.channelConfigApi()).toPromise().then(function (res) { _this.channelConfigSubject.next(res), res && _this.changeChannel(res); }, function (err) { return _this.channelConfigSubject.next({}); }).catch(function (err) { return _this.channelConfigSubject.next(null); });
3424
3429
  };
3425
3430
  this.getChannels = function () {
3426
3431
  _this.connection.get(_this.channelsApi()).toPromise()
@@ -3433,14 +3438,12 @@ var ChannelConfigService = /** @class */ (function () {
3433
3438
  .catch(function (err) { return _this.localesSubject.next([]); });
3434
3439
  };
3435
3440
  this.changeChannel = function (channelObj) {
3436
- console.log("Channel: ", channelObj);
3437
3441
  _this.consts.modifyChannelConfig({
3438
3442
  channel: channelObj.code,
3439
- locale: channelObj.defaultLocale.code
3440
- /* channeltype: channelObj.type */
3441
- /* currency: channelObj.baseCurrency */
3443
+ locale: channelObj.defaultLocale.code,
3444
+ currency: channelObj.baseCurrency
3442
3445
  });
3443
- _this.injector.get(AddressingService).setTypeSelectAddres(channelObj.headquarterSelectionOnly || null);
3446
+ _this.injector.get(AddressingService).setTypeSelectAddress(channelObj.headquarterSelectionOnly || 'LOAD_ADDRESS_AND_SELECTION');
3444
3447
  };
3445
3448
  this.getChannelConfig();
3446
3449
  this.getChannels();
@@ -5293,11 +5296,11 @@ var AuthInterceptor = /** @class */ (function () {
5293
5296
  return next.handle(req).pipe(catchError(function (catchErr) { return _this.handleErrors(catchErr); }));
5294
5297
  };
5295
5298
  AuthInterceptor.prototype.handleErrors = function (err) {
5296
- if (err.status === 401 || err.status === 403) {
5299
+ if (err.status === 403) {
5297
5300
  this.injector.get(AuthService).doLogoutUser();
5298
5301
  return of(err);
5299
5302
  }
5300
- if (err.status === 450) {
5303
+ if (err.status === 450 || err.status === 401) {
5301
5304
  this.injector.get(ErrorHandlerService).handlerErrorResponse(err.error);
5302
5305
  return of(err.error);
5303
5306
  }
@@ -5337,11 +5340,11 @@ var CustomerInterceptor = /** @class */ (function () {
5337
5340
  return next.handle(req).pipe(catchError(function (catchErr) { return _this.handleErrors(catchErr); }));
5338
5341
  };
5339
5342
  CustomerInterceptor.prototype.handleErrors = function (err) {
5340
- if (err.status === 401 || err.status === 403) {
5341
- this.injector.get(AuthService).logout();
5343
+ if (err.status === 403) {
5344
+ this.injector.get(AuthService).doLogoutUser();
5342
5345
  return of(err);
5343
5346
  }
5344
- if (err.status === 450) {
5347
+ if (err.status === 450 || err.status === 401) {
5345
5348
  this.injector.get(ErrorHandlerService).handlerErrorResponse(err.error);
5346
5349
  return of(err.error);
5347
5350
  }
@@ -8033,12 +8036,10 @@ var LoginEcComponent = /** @class */ (function (_super) {
8033
8036
  }
8034
8037
  else {
8035
8038
  _this.loading = false;
8036
- _this.toastrService.show('invalid-credentials');
8037
8039
  }
8038
8040
  }, function (err) {
8039
8041
  $('#collapse_login5').collapse('hide');
8040
8042
  _this.loading = false;
8041
- _this.toastrService.show('invalid-credentials');
8042
8043
  });
8043
8044
  };
8044
8045
  _this.ecOnConstruct();
@@ -9201,7 +9202,7 @@ var SellerDashboardContainerEcComponent = /** @class */ (function (_super) {
9201
9202
  SellerDashboardContainerEcComponent = __decorate$17([
9202
9203
  Component({
9203
9204
  selector: 'app-seller-dashboard-container',
9204
- template: "<section *ngIf=\"user\" id=\"seller-dashboard\">\n <div class=\"section-content mt-5 mb-2 tablaVendedores\">\n <div class=\"container-xl\">\n <div class=\"row\">\n <main class=\"col-md-12\">\n\n <ul *ngIf=\"hasHeader()\" class=\"nav nav-tabs\">\n <li class=\"nav-item col-12 col-lg-2\">\n <a *ngIf=\"hasUIComponent('HEADER_TAB')\" class=\"nav-link active cursor-pointer px-4\"\n aria-current=\"page\">\n {{ 'my-clients' | translate }}\n </a>\n </li>\n <div\n class=\"d-flex justify-content-end justify-content-lg-start justify-content-xl-end col-12 col-md-12 col-lg-6\">\n <a *ngIf=\"hasUIComponent('GENERATE_BUDGET_BTN') && authService.getCustomer()?.id; else withoutCustomer\"\n [routerLink]=\"'/collection'\" class=\"btn btn-seller-primary text-white btnGestionar d-flex align-items-center\"><i\n class=\"bi bi-file-earmark me-2 mr-2\"></i>{{ 'generate-budget' | translate }}</a>\n <ng-template #withoutCustomer>\n <a class=\"btn btn-seller-primary text-white btnGestionar d-flex align-items-center\" (click)=\"toastrService.show('must-select-customer')\">\n <i class=\"bi bi-file-earmark me-2 mr-2\"></i>{{ 'generate-budget' | translate }}</a>\n </ng-template>\n <a *ngIf=\"hasUIComponent('MANAGE_ORDERS_BTN')\"\n (click)=\"navigateExternal(constants.getUrlBase())\"\n class=\"btn btn-seller-primary text-white btnGestionar d-flex align-items-center me- me-lg-4 mr- mr-lg-4\"><i\n class=\"bi bi-archive-fill me-2 mr-2\"></i>{{ 'manage-orders' | translate }}</a>\n </div>\n <div class=\"d-flex ms-auto camposVendedores col-12 col-md-12 col-lg-4 justify-content-end\">\n <select *ngIf=\"hasUIComponent('SORT_SELECT')\" id=\"customerSort\" name=\"customerSort\"\n (change)=\"sortCustomers($event.target.value)\" class=\"mb-1 ordenarVendedores\">\n <option selected hidden disabled>{{ 'order-by' | translate }}</option>\n <option value='asc_firstName'>{{ 'client' | translate }} (A-Z)</option>\n <option value='desc_firstName'>{{ 'client' | translate }} (Z-A)</option>\n <option value='asc_id'>Menor a Mayor c\u00F3digo</option>\n <option value='desc_id'>Mayor a Menor c\u00F3digo</option>\n </select>\n <form *ngIf=\"hasUIComponent('SEARCH_FORM')\"\n class=\"col-lg-auto mb-lg-0 d-flex ms-3 ml-3 d-flex buscadorVendedores\">\n <input type=\"text\" name=\"searchInput\" class=\"form-control\"\n placeholder=\"{{ 'search' | translate }}\" [(ngModel)]=\"searchInput\"\n (keyup.enter)=\"updateCustomers()\">\n <button class=\"btn btn-primary ms-1 ml-1 bg-white border-dark btnSearch\"><i\n class=\"bi bi-search text-dark\" (click)=\"updateCustomers()\"></i></button>\n </form>\n </div>\n </ul>\n\n <ng-container *ngIf=\"user.customers?.length; else noCustomers\">\n\n <article class=\"card card-body mb-1 carritoProductoHeader m-0 py-0 mt-4\">\n <div class=\"row align-items-center font-bold border-bottom\">\n <div class=\"col-3 col-md-2 text-left\">\n <small>{{ 'code' | translate | uppercase }}</small>\n </div>\n <div class=\"col-5 col-md-3 mb-md-0\">\n <small>{{ 'client' | translate | uppercase }}</small>\n </div>\n <div class=\"col-4 col-md-3 text-left d-none d-md-block\">\n <small>{{ 'user' | translate | uppercase }}</small>\n </div>\n <div class=\"col-4 col-md-2 text-left\">\n <small>{{ 'new-orders' | translate | uppercase }}</small>\n </div>\n <div class=\"col-2 col-md-2 text-left d-none d-md-block\">\n <small></small>\n </div>\n\n </div>\n </article>\n\n <article *ngFor=\"let customer of filteredCustomers\" class=\"card card-body mb-3 cadaVendedor\">\n <div class=\"row d-flex align-items-center\">\n <div class=\"col-3 col-md-2 text-left ps-2 pl-2\">\n <div class=\"price h6 pb-0 mb-0 ps-3 pl-1\">{{ customer.id }}</div>\n </div>\n <div class=\"col-5 col-md-3 text-left\">\n <div class=\"price h6 fw-normal ps-2 pl-2 pb-0 mb-0\">\n {{ customer.firstName }} {{ customer.lastName }}\n <p class=\"d-block d-md-none fs-6 mt-1 mb-0 p-0 userMobile\">\n {{ customer.email }}\n </p>\n </div>\n </div>\n <div class=\"col-4 col-md-3 text-left d-none d-md-block\">\n <div class=\"price h6 fw-normal pb-0 mb-0 ps-2 pl-2\">\n {{ customer.email }}\n </div>\n </div>\n <div class=\"col-4 col-md-2 text-left ps-2 pl-2\">\n <div *ngIf=\"true\" class=\"contNumero\">\n {{ customer.ordersNotApproved }}\n </div>\n </div>\n <div class=\"col-12 col-md-2 btnIngresar\">\n\n <ng-container\n *ngIf=\"authService.getCustomer()?.id == customer.id; else noActiveCustomer\">\n <a (click)=\"changeCustomer(null)\"\n class=\"btn btn-seller-primary justify-content-center\">\n <i class=\"bi bi-box-arrow-left me-2 mr-2\"></i>\n <small class=\"me-2 mr-2 d-none d-md-block\">\n {{ 'exit' | translate | uppercase }}\n </small>\n </a>\n </ng-container>\n <ng-template #noActiveCustomer>\n <a (click)=\"changeCustomer(customer)\"\n class=\"btn btn-seller-primary justify-content-center\">\n <i class=\"bi bi-box-arrow-in-right me-2 mr-2\"></i>\n <small class=\"me-2 mr-2 d-none d-md-block\">\n {{ 'operate-as' | translate | uppercase }}\n </small>\n </a>\n </ng-template>\n\n </div>\n </div>\n </article>\n\n </ng-container>\n\n </main>\n </div>\n </div>\n </div>\n</section>\n\n<ng-template #noCustomers>\n <h4 class=\"text-center p-5\">{{ 'no-customers' | translate }}</h4>\n</ng-template>",
9205
+ template: "<section *ngIf=\"user\" id=\"seller-dashboard\">\n <div class=\"section-content mt-5 mb-2 tablaVendedores\">\n <div class=\"container-xl\">\n <div class=\"row\">\n <main class=\"col-md-12\">\n\n <ul *ngIf=\"hasHeader()\" class=\"nav nav-tabs\">\n <li class=\"nav-item col-12 col-lg-2\">\n <a *ngIf=\"hasUIComponent('HEADER_TAB')\" class=\"nav-link active cursor-pointer px-4\"\n aria-current=\"page\">\n {{ 'my-clients' | translate }}\n </a>\n </li>\n <li class=\"ms-auto row\">\n <div\n class=\"d-flex justify-content-end justify-content-lg-end justify-content-xl-end col-12 col-md-12 col-lg-auto\">\n <ng-container *ngIf=\"hasUIComponent('GENERATE_BUDGET_BTN') \">\n <a *ngIf=\"authService.getCustomer()?.id; else withoutCustomer\"\n [routerLink]=\"'/collection'\"\n class=\"btn btn-seller-primary text-white btnGestionar d-flex align-items-center\"><i\n class=\"bi bi-file-earmark me-2 mr-2\"></i>{{ 'generate-budget' | translate }}\n </a>\n <ng-template #withoutCustomer>\n <a class=\"btn btn-seller-primary text-white btnGestionar d-flex align-items-center\"\n (click)=\"toastrService.show('must-select-customer')\">\n <i class=\"bi bi-file-earmark me-2 mr-2\"></i>{{ 'generate-budget' | translate\n }}\n </a>\n </ng-template>\n </ng-container>\n <a *ngIf=\"hasUIComponent('MANAGE_ORDERS_BTN')\"\n (click)=\"navigateExternal(constants.getUrlBase())\"\n class=\"btn btn-seller-primary text-white btnGestionar d-flex align-items-center me- me-lg-4 mr- mr-lg-4\"><i\n class=\"bi bi-archive-fill me-2 mr-2\"></i>{{ 'manage-orders' | translate }}</a>\n </div>\n <div class=\"d-flex camposVendedores col-12 col-md-12 col-lg-auto justify-content-end\">\n <select *ngIf=\"hasUIComponent('SORT_SELECT')\" id=\"customerSort\" name=\"customerSort\"\n (change)=\"sortCustomers($event.target.value)\" class=\"mb-1 ordenarVendedores\">\n <option selected hidden disabled>{{ 'order-by' | translate }}</option>\n <option value='asc_firstName'>{{ 'client' | translate }} (A-Z)</option>\n <option value='desc_firstName'>{{ 'client' | translate }} (Z-A)</option>\n <option value='asc_id'>Menor a Mayor c\u00F3digo</option>\n <option value='desc_id'>Mayor a Menor c\u00F3digo</option>\n </select>\n <form *ngIf=\"hasUIComponent('SEARCH_FORM')\"\n class=\"col-lg-auto mb-lg-0 d-flex ms-3 ml-3 d-flex buscadorVendedores\">\n <input type=\"text\" name=\"searchInput\" class=\"form-control\"\n placeholder=\"{{ 'search' | translate }}\" [(ngModel)]=\"searchInput\"\n (keyup.enter)=\"updateCustomers()\">\n <button class=\"btn btn-primary ms-1 ml-1 bg-white border-dark btnSearch\"><i\n class=\"bi bi-search text-dark\" (click)=\"updateCustomers()\"></i></button>\n </form>\n </div>\n </li>\n </ul>\n\n <ng-container *ngIf=\"user.customers?.length; else noCustomers\">\n\n <article class=\"card card-body mb-1 carritoProductoHeader m-0 py-0 mt-4\">\n <div class=\"row align-items-center font-bold border-bottom\">\n <div class=\"col-3 col-md-2 text-left\">\n <small>{{ 'code' | translate | uppercase }}</small>\n </div>\n <div class=\"col-5 col-md-3 mb-md-0\">\n <small>{{ 'client' | translate | uppercase }}</small>\n </div>\n <div class=\"col-4 col-md-3 text-left d-none d-md-block\">\n <small>{{ 'user' | translate | uppercase }}</small>\n </div>\n <div class=\"col-4 col-md-2 text-left\">\n <small>{{ 'new-orders' | translate | uppercase }}</small>\n </div>\n <div class=\"col-2 col-md-2 text-left d-none d-md-block\">\n <small></small>\n </div>\n\n </div>\n </article>\n\n <article *ngFor=\"let customer of filteredCustomers\" class=\"card card-body mb-3 cadaVendedor\">\n <div class=\"row d-flex align-items-center\">\n <div class=\"col-3 col-md-2 text-left ps-2 pl-2\">\n <div class=\"price h6 pb-0 mb-0 ps-3 pl-1\">\n {{ customer.managementSystemInternalCode || 'n/a' }}\n </div>\n </div>\n <div class=\"col-5 col-md-3 text-left\">\n <div class=\"price h6 fw-normal ps-2 pl-2 pb-0 mb-0\">\n {{ customer.firstName }} {{ customer.lastName }}\n <p class=\"d-block d-md-none fs-6 mt-1 mb-0 p-0 userMobile\">\n {{ customer.email }}\n </p>\n </div>\n </div>\n <div class=\"col-4 col-md-3 text-left d-none d-md-block\">\n <div class=\"price h6 fw-normal pb-0 mb-0 ps-2 pl-2\">\n {{ customer.email }}\n </div>\n </div>\n <div class=\"col-4 col-md-2 text-left ps-2 pl-2\">\n <div *ngIf=\"true\" class=\"contNumero\">\n {{ customer.ordersNotApproved }}\n </div>\n </div>\n <div class=\"col-12 col-md-2 btnIngresar\">\n\n <ng-container\n *ngIf=\"authService.getCustomer()?.id == customer.id; else noActiveCustomer\">\n <a (click)=\"changeCustomer(null)\"\n class=\"btn btn-seller-primary justify-content-center\">\n <i class=\"bi bi-box-arrow-left me-2 mr-2\"></i>\n <small class=\"me-2 mr-2 d-none d-md-block\">\n {{ 'exit' | translate | uppercase }}\n </small>\n </a>\n </ng-container>\n <ng-template #noActiveCustomer>\n <a (click)=\"changeCustomer(customer)\"\n class=\"btn btn-seller-primary justify-content-center\">\n <i class=\"bi bi-box-arrow-in-right me-2 mr-2\"></i>\n <small class=\"me-2 mr-2 d-none d-md-block\">\n {{ 'operate-as' | translate | uppercase }}\n </small>\n </a>\n </ng-template>\n\n </div>\n </div>\n </article>\n\n </ng-container>\n\n </main>\n </div>\n </div>\n </div>\n</section>\n\n<ng-template #noCustomers>\n <h4 class=\"text-center p-5\">{{ 'no-customers' | translate }}</h4>\n</ng-template>",
9205
9206
  styles: ["#seller-dashboard{--seller-dashboard-primary-color:0,0,0}.btn-seller-primary{color:#fff!important;background-color:rgba(var(--seller-dashboard-primary-color),1)!important;border-color:rgba(var(--seller-dashboard-primary-color),1)!important}.btn-seller-primary:hover{background-color:rgba(var(--seller-dashboard-primary-color),.9)!important}.btn-seller-primary:active{background-color:rgba(var(--seller-dashboard-primary-color),.8)!important}.btnGestionar{padding:6px 12px!important;height:36px;display:flex;align-items:center;justify-content:center;margin-left:10px}.ordenarVendedores{width:150px!important;color:#8b8b8b!important;background-color:#fff;border:1px solid #b6b6b6!important;border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px}.buscadorVendedores{margin-bottom:4px!important}.buscadorVendedores input{border:1px solid #b6b6b6!important;width:200px}.buscadorVendedores .btnSearch{border:1px solid #b6b6b6!important;padding:.375rem .75rem;font-size:1rem}.buscadorVendedores .btnSearch:focus{background-color:#fff!important}.carritoProductoHeader{border:none!important}.carritoProductoHeader small{font-size:13px}.cadaVendedor{padding:5px 0;margin-bottom:0!important;border:none!important;border-bottom:1px solid #ccc!important;border-radius:0!important;-webkit-border-radius:0}.cadaVendedor .btnIngresar a{padding:10px!important;border-width:1px!important;border-style:solid!important;display:flex;align-items:center;width:100%!important;margin-left:auto;color:#fff}.cadaVendedor .btnIngresar .contNumero{background-color:#eee;width:20px;height:20px;color:#000;font-size:13px;display:flex;align-items:center;justify-content:center;font-weight:600;border-radius:20px;-webkit-border-radius:20px;-moz-border-radius:20px;-ms-border-radius:20px;-o-border-radius:20px}.userMobile{font-size:14px!important;font-style:italic!important}.cadaVendedor .btnIngresar a:hover{background-color:rgba(var(--seller-dashboard-primary-color),.85)}.cadaVendedor .btnIngresar a:active{background-color:rgba(var(--seller-dashboard-primary-color),.8)}.cursor-pointer{cursor:pointer}.font-bold{font-weight:700}.border-bottom{border-bottom:1px solid #000!important}@media screen and (max-width:1200px){.btnGestionar{font-size:12px}}@media screen and (max-width:992px){.camposVendedores{justify-content:flex-end;margin-top:8px;margin-bottom:4px}}@media all and (max-width:768px){.ordenarVendedores{width:140px!important}.buscadorVendedores input{width:140px}.cadaVendedor .btnIngresar a{width:70px!important}}@media all and (max-width:576px){.tablaVendedores .nav-tabs .nav-link{font-size:13px;padding:6px!important}.btnGestionar{padding:6px 8px!important;font-size:13px;height:36px;display:flex;align-items:center;justify-content:center;margin-top:3px;margin-left:10px}.buscadorVendedores input,.ordenarVendedores{font-size:13px}}.fs-6{font-size:1rem!important}"]
9206
9207
  }),
9207
9208
  __param$9(3, Inject('env'))
@@ -10809,11 +10810,9 @@ var LoginFormEcComponent = /** @class */ (function (_super) {
10809
10810
  return;
10810
10811
  }
10811
10812
  _this.loading = false;
10812
- _this.toastrService.show('invalid-credentials');
10813
10813
  }
10814
10814
  }, function (err) {
10815
10815
  _this.loading = false;
10816
- _this.toastrService.show('invalid-credentials');
10817
10816
  });
10818
10817
  };
10819
10818
  _this.redirectHome = function () {
@@ -13195,7 +13194,7 @@ var __decorate$1E = (this && this.__decorate) || function (decorators, target, k
13195
13194
  };
13196
13195
  var DecidirEcComponent = /** @class */ (function (_super) {
13197
13196
  __extends$13(DecidirEcComponent, _super);
13198
- function DecidirEcComponent(renderer, connection, toastrService, consts, cartService, toastr, activedRoute, sanitizer, modalService) {
13197
+ function DecidirEcComponent(renderer, connection, toastrService, consts, cartService, toastr, activedRoute, sanitizer, modalService, paramsService) {
13199
13198
  var _this = _super.call(this) || this;
13200
13199
  _this.renderer = renderer;
13201
13200
  _this.connection = connection;
@@ -13206,6 +13205,7 @@ var DecidirEcComponent = /** @class */ (function (_super) {
13206
13205
  _this.activedRoute = activedRoute;
13207
13206
  _this.sanitizer = sanitizer;
13208
13207
  _this.modalService = modalService;
13208
+ _this.paramsService = paramsService;
13209
13209
  _this.method = null;
13210
13210
  _this.total_amount = 0;
13211
13211
  _this.user_data = null;
@@ -13214,6 +13214,7 @@ var DecidirEcComponent = /** @class */ (function (_super) {
13214
13214
  _this.isDobleAuth = false;
13215
13215
  _this.urls = [];
13216
13216
  _this.closeModal = '';
13217
+ _this.paramsMensaje = '';
13217
13218
  _this.dataRedirect = function () { return _this.consts.getUrlBase() + 'shop-api/' + _this.consts.getChannel() + '/decidir/' + _this.cartService.cart_token + '/process-payment'; };
13218
13219
  _this.clearStorageState = function () {
13219
13220
  sessionStorage.removeItem('state');
@@ -13237,6 +13238,10 @@ var DecidirEcComponent = /** @class */ (function (_super) {
13237
13238
  if (state == 'success') {
13238
13239
  _this.ready.emit(true);
13239
13240
  }
13241
+ if (state == 'partially_authorized') {
13242
+ _this.ready.emit(true);
13243
+ _this.processError(_this.paramsMensaje);
13244
+ }
13240
13245
  if (state == 'cancel') {
13241
13246
  return;
13242
13247
  }
@@ -13272,7 +13277,12 @@ var DecidirEcComponent = /** @class */ (function (_super) {
13272
13277
  return _this;
13273
13278
  }
13274
13279
  DecidirEcComponent.prototype.ngOnInit = function () {
13280
+ var _this = this;
13275
13281
  this.getCheckoutDecidir();
13282
+ this.paramsService.parameters.subscribe(function (res) {
13283
+ _this.params = res;
13284
+ _this.paramsMensaje = _this.hasParams(res, 'partially_authorized_decidir') || 'Se está procesando el pago con tarjeta.';
13285
+ });
13276
13286
  this.ecOnInit();
13277
13287
  };
13278
13288
  DecidirEcComponent.prototype.ngOnDestroy = function () {
@@ -13285,7 +13295,6 @@ var DecidirEcComponent = /** @class */ (function (_super) {
13285
13295
  this.clearStorageState();
13286
13296
  localStorage.setItem('dataRedirect', this.dataRedirect());
13287
13297
  localStorage.setItem('dataDecidir', JSON.stringify(this.method));
13288
- console.log('dataaaaa', this.method);
13289
13298
  this.modalRef = this.modalService.show(template, { class: 'modal-xl modal-dialog-centered ', keyboard: false, backdrop: 'static', animated: true });
13290
13299
  this.closeModal = '';
13291
13300
  this.callState();
@@ -13299,7 +13308,8 @@ var DecidirEcComponent = /** @class */ (function (_super) {
13299
13308
  { type: ToastService },
13300
13309
  { type: ActivatedRoute },
13301
13310
  { type: DomSanitizer },
13302
- { type: BsModalService }
13311
+ { type: BsModalService },
13312
+ { type: ParametersService }
13303
13313
  ]; };
13304
13314
  __decorate$1E([
13305
13315
  Input()