ng-easycommerce 0.0.425 → 0.0.426

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,6 @@
1
+ # version 0.0.426
2
+ - Se agrego logica para que el tipo de moneda se tome en base al usuario logueado.
3
+
1
4
  # version 0.0.425
2
5
  - Mejoras en el servicio de recaptcha para que tome claves desde parametros.
3
6
  -- Parametro principal debe nombrarse como "recaptcha_key_[canal]"
@@ -409,6 +409,12 @@
409
409
  symbol: 'S/',
410
410
  position: 'L',
411
411
  withoutDecimals: false
412
+ },
413
+ {
414
+ code: 'SEK',
415
+ symbol: 'SEK',
416
+ position: 'R',
417
+ withoutDecimals: false
412
418
  }
413
419
  ];
414
420
  _this.currency = currencyTypeCofig.find(function (ct) { return ct.code == currencyTypeFind.toUpperCase(); }) || _this.currency;
@@ -3435,6 +3441,7 @@
3435
3441
  };
3436
3442
  this.setChannelInfo = function (channelObj) {
3437
3443
  _this.consts.setChannel(channelObj.code);
3444
+ _this.consts.setCurrency(channelObj.baseCurrency);
3438
3445
  _this.injector.get(AddressingService).setTypeSelectAddress(channelObj.headquarterSelectionOnly || 'LOAD_ADDRESS_AND_SELECTION');
3439
3446
  };
3440
3447
  this.getChannelConfig();
@@ -3624,13 +3631,6 @@
3624
3631
  return rxjs.of(err.toString());
3625
3632
  })).toPromise();
3626
3633
  };
3627
- // private getCurrentUser(): Observable<User> {
3628
- // return this.connection.get('getProfile').map(res => {
3629
- // const user = new User();
3630
- // this.user = user.deserialize(res.data);
3631
- // return user;
3632
- // });
3633
- // }
3634
3634
  this.signUp = function (data) { return _this.connection.post(_this.registerApi(), data); };
3635
3635
  this.confirmAccount = function (token) {
3636
3636
  return _this.connection.get(_this.confirmAccountApi(token));
@@ -3720,12 +3720,10 @@
3720
3720
  this.user = null;
3721
3721
  }
3722
3722
  else if ((_a = this.user) === null || _a === void 0 ? void 0 : _a.channels.find(function (userchannel) { var _a; return ((_a = userchannel) === null || _a === void 0 ? void 0 : _a.code) === _this.constants.getChannel(); })) {
3723
- // this.user.channels?.length > 1 && this.channelsUserSubject.next(this.user.channels)
3724
3723
  return this.user;
3725
3724
  }
3726
3725
  else {
3727
3726
  this.logout();
3728
- //window.location.reload()
3729
3727
  }
3730
3728
  return this.user;
3731
3729
  };
@@ -3761,8 +3759,6 @@
3761
3759
  this.user.initilized(tokens);
3762
3760
  this.forceChannelsForSeller(tokens);
3763
3761
  this.user.persistInStorage();
3764
- // localStorage.setItem(this.EXPIRATES_IN, moment(tokens.expires_in).add(1, 'days').format());
3765
- // localStorage.setItem(this.REFRESH_TOKEN, tokens.refresh_token);
3766
3762
  localStorage.setItem(this.EXPIRATES_IN, moment(tokens.expires_in).add(1, 'h').format());
3767
3763
  localStorage.setItem(this.REFRESH_TOKEN, moment(tokens.expires_in).add(1, 'h').format());
3768
3764
  localStorage.setItem(this.JWT_TOKEN, tokens.token);