ng-easycommerce 0.1.0 → 0.1.1

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.1.1
2
+ - Registro mayorista: el mensaje de éxito ahora refleja la configuración del canal, diferenciando la verificación de cuenta del envío del mail de bienvenida.
3
+
1
4
  # Version 0.1.0
2
5
  - Precios de productos, líneas de carrito y resúmenes: se incorporan contratos explícitos de neto, impuesto y bruto, con fallback compatible para respuestas legacy.
3
6
  - Carrito, sidebar y checkout: descuentos de orden, cupones y envío seleccionan neto o bruto según `showPriceWithTaxesWhileBrowsing`, sin recalcular impuestos.
@@ -19508,7 +19508,7 @@
19508
19508
  };
19509
19509
  var RegisterWholesalerFormEcComponent = /** @class */ (function (_super) {
19510
19510
  __extends$T(RegisterWholesalerFormEcComponent, _super);
19511
- function RegisterWholesalerFormEcComponent(authService, toastr, router, consts, paramsService, formBuilder) {
19511
+ function RegisterWholesalerFormEcComponent(authService, toastr, router, consts, paramsService, formBuilder, channelConfigService) {
19512
19512
  var _this = _super.call(this) || this;
19513
19513
  _this.authService = authService;
19514
19514
  _this.toastr = toastr;
@@ -19516,6 +19516,7 @@
19516
19516
  _this.consts = consts;
19517
19517
  _this.paramsService = paramsService;
19518
19518
  _this.formBuilder = formBuilder;
19519
+ _this.channelConfigService = channelConfigService;
19519
19520
  _this.provincesSubject = new rxjs.BehaviorSubject([]);
19520
19521
  _this.countriesSubject = new rxjs.BehaviorSubject([]);
19521
19522
  _this.documentTypesSubject = new rxjs.BehaviorSubject([]);
@@ -19531,6 +19532,8 @@
19531
19532
  _this.requestTerms = false;
19532
19533
  _this.campospersonajuridica = false;
19533
19534
  _this.params = {};
19535
+ _this.isAccountVerificationRequired = false;
19536
+ _this.isSendWelcomeEmail = false;
19534
19537
  _this.onCountrySelected = function (value) {
19535
19538
  $('#selectOpPais').attr('disabled', true);
19536
19539
  _this.registerForm.controls['countryCode'].setValue(value);
@@ -19565,7 +19568,18 @@
19565
19568
  var formValue = __assign$t(__assign$t({}, _this.registerForm.value), { postcode: String(_this.registerForm.value.postcode) });
19566
19569
  _this.authService.signUpWholesaler(formValue).toPromise().then(function (res) {
19567
19570
  _this.register_loading = false;
19568
- _this.toastr.show('register-ok');
19571
+ var messageKey;
19572
+ switch (true) {
19573
+ case _this.isAccountVerificationRequired:
19574
+ messageKey = 'register-ok';
19575
+ break;
19576
+ case _this.isSendWelcomeEmail:
19577
+ messageKey = 'register-welcome';
19578
+ break;
19579
+ default:
19580
+ messageKey = 'register-success';
19581
+ }
19582
+ _this.toastr.showPersistent(messageKey);
19569
19583
  _this.success = true;
19570
19584
  _this.ready.emit(true);
19571
19585
  if (_this.redirect) {
@@ -19595,6 +19609,14 @@
19595
19609
  RegisterWholesalerFormEcComponent.prototype.ngOnInit = function () {
19596
19610
  var _this = this;
19597
19611
  this.paramsService.parameters.subscribe(function (res) { return _this.params = res; });
19612
+ this.channelConfigService.channelConfig$.subscribe(function (config) {
19613
+ _this.isAccountVerificationRequired = config && config.isAccountVerificationRequired !== undefined
19614
+ ? config.isAccountVerificationRequired
19615
+ : false;
19616
+ _this.isSendWelcomeEmail = config && config.isSendWelcomeEmail !== undefined
19617
+ ? config.isSendWelcomeEmail
19618
+ : false;
19619
+ });
19598
19620
  this.registerForm = this.formBuilder.group({
19599
19621
  firstName: ['', [forms.Validators.required, forms.Validators.pattern(/^[A-Za-zÁÉÍÓÚáéíóúÑñ\s]+$/)]],
19600
19622
  lastName: ['', [forms.Validators.required, forms.Validators.pattern(/^[A-Za-zÁÉÍÓÚáéíóúÑñ\s]+$/)]],
@@ -19640,7 +19662,8 @@
19640
19662
  { type: router.Router },
19641
19663
  { type: Constants },
19642
19664
  { type: ParametersService },
19643
- { type: forms.FormBuilder }
19665
+ { type: forms.FormBuilder },
19666
+ { type: ChannelConfigService }
19644
19667
  ]; };
19645
19668
  __decorate$1z([
19646
19669
  core.Input()