@seniorsistemas/yms-integration 1.11.4 → 1.11.5

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.
@@ -9731,6 +9731,9 @@
9731
9731
  this.fornecedorNotas = [];
9732
9732
  this.contratoSelecionado = null;
9733
9733
  this.ngUnsubscribe = new rxjs.Subject();
9734
+ this.carregandoErpFilial = true;
9735
+ this.carregandoErpRouteData = true;
9736
+ this.carregandoErpRecebimento = true;
9734
9737
  this.onChangeRevalidation = function (_) {
9735
9738
  if (_this.erpProcessData && _this.formGroup) {
9736
9739
  _this.erpProcessData = _this.erpProcessService.builderErpProcessData(_this.erpProcessData, _this.formGroup);
@@ -9745,10 +9748,12 @@
9745
9748
  _this.formGroup.get("produto").disable();
9746
9749
  _this.formGroup.get("transgenia").setValue(undefined);
9747
9750
  _this.formGroup.get("transgenia").disable();
9751
+ _this.carregandoErpFilial = false;
9748
9752
  return;
9749
9753
  }
9750
9754
  _this.formGroup.get("produto").enable();
9751
9755
  _this.formGroup.get("transgenia").enable();
9756
+ _this.carregandoErpFilial = false;
9752
9757
  };
9753
9758
  }
9754
9759
  RecebimentoFormComponent.prototype.ngOnInit = function () {
@@ -9858,7 +9863,7 @@
9858
9863
  });
9859
9864
  };
9860
9865
  RecebimentoFormComponent.prototype.validaTransgenia = function () {
9861
- if (!this.formCarregado) {
9866
+ if (this.erpCarregado()) {
9862
9867
  return;
9863
9868
  }
9864
9869
  var transgenia = this.formGroup.get("transgenia").value;
@@ -9873,6 +9878,18 @@
9873
9878
  }
9874
9879
  this.validaFornecedorCorrespondeTipoPaticipanteDaTransgenia(transgenia);
9875
9880
  };
9881
+ RecebimentoFormComponent.prototype.erpCarregado = function () {
9882
+ if (this.carregandoErpFilial) {
9883
+ return true;
9884
+ }
9885
+ if (this.carregandoErpRouteData) {
9886
+ return true;
9887
+ }
9888
+ if (this.carregandoErpRecebimento) {
9889
+ return true;
9890
+ }
9891
+ return false;
9892
+ };
9876
9893
  RecebimentoFormComponent.prototype.mensagemTransgeniaInvalida = function () {
9877
9894
  this.addMessage("error", "yms.integration.mensagem_erro_titulo_informar_transgenia", "yms.integration.mensagem_erro_conteuto_informar_transgenia");
9878
9895
  this.formGroup.get("transgenia").setValue(undefined);
@@ -10086,6 +10103,7 @@
10086
10103
  else {
10087
10104
  this.formGroup.patchValue(new RecebimentoContrato());
10088
10105
  }
10106
+ this.carregandoErpRouteData = false;
10089
10107
  };
10090
10108
  RecebimentoFormComponent.prototype.onCancel = function () {
10091
10109
  this.goBack();
@@ -10220,7 +10238,7 @@
10220
10238
  size: 1,
10221
10239
  page: 0
10222
10240
  })
10223
- .pipe(operators.takeUntil(this.ngUnsubscribe), operators.finalize(function () { return _this.loading = false; }))
10241
+ .pipe(operators.takeUntil(this.ngUnsubscribe))
10224
10242
  .subscribe(function (_a) {
10225
10243
  var contents = _a.contents;
10226
10244
  if (!contents.length) {
@@ -10249,8 +10267,10 @@
10249
10267
  });
10250
10268
  });
10251
10269
  });
10252
- _this.formCarregado = true;
10253
10270
  _this.createdByErpDisableForm();
10271
+ _this.formCarregado = true;
10272
+ _this.carregandoErpRecebimento = false;
10273
+ _this.loading = false;
10254
10274
  });
10255
10275
  };
10256
10276
  RecebimentoFormComponent.prototype.onFilialLookupRequest = function (value) {