@seniorsistemas/yms-integration 1.18.3 → 1.18.4

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.
@@ -1808,7 +1808,7 @@ var VisitanteFormComponent = /** @class */ (function () {
1808
1808
  if (!this.formGroup.valid) {
1809
1809
  return this.validateAllFormFields(this.formGroup);
1810
1810
  }
1811
- var visitante = this.formGroup.value;
1811
+ var visitante = this.formGroup.getRawValue();
1812
1812
  visitante.id = this.id;
1813
1813
  this.close(visitante);
1814
1814
  };
@@ -1987,6 +1987,17 @@ var VisitanteComponent = /** @class */ (function () {
1987
1987
  .subscribe(function (visitante) { return _this.adicionaVisitanteParaSalvar(visitante); });
1988
1988
  };
1989
1989
  VisitanteComponent.prototype.adicionaVisitanteParaSalvar = function (visitante) {
1990
+ var _this = this;
1991
+ this.visitanteGridData.forEach(function (visitor) {
1992
+ if (visitor.document === visitante.document) {
1993
+ visitor.contact = visitante.contact;
1994
+ visitor.name = visitante.name;
1995
+ _this.visitorFound = true;
1996
+ }
1997
+ });
1998
+ if (this.visitorFound) {
1999
+ return;
2000
+ }
1990
2001
  this.visitanteGridLoading = true;
1991
2002
  visitante.documentType = this.getDocumentType();
1992
2003
  if (visitante.visitorSituation === undefined) {