@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.
@@ -1868,7 +1868,7 @@
1868
1868
  if (!this.formGroup.valid) {
1869
1869
  return this.validateAllFormFields(this.formGroup);
1870
1870
  }
1871
- var visitante = this.formGroup.value;
1871
+ var visitante = this.formGroup.getRawValue();
1872
1872
  visitante.id = this.id;
1873
1873
  this.close(visitante);
1874
1874
  };
@@ -2047,6 +2047,17 @@
2047
2047
  .subscribe(function (visitante) { return _this.adicionaVisitanteParaSalvar(visitante); });
2048
2048
  };
2049
2049
  VisitanteComponent.prototype.adicionaVisitanteParaSalvar = function (visitante) {
2050
+ var _this = this;
2051
+ this.visitanteGridData.forEach(function (visitor) {
2052
+ if (visitor.document === visitante.document) {
2053
+ visitor.contact = visitante.contact;
2054
+ visitor.name = visitante.name;
2055
+ _this.visitorFound = true;
2056
+ }
2057
+ });
2058
+ if (this.visitorFound) {
2059
+ return;
2060
+ }
2050
2061
  this.visitanteGridLoading = true;
2051
2062
  visitante.documentType = this.getDocumentType();
2052
2063
  if (visitante.visitorSituation === undefined) {