@seniorsistemas/yms-integration 1.19.0 → 1.19.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.
@@ -1889,6 +1889,16 @@ var VisitanteComponent = /** @class */ (function () {
1889
1889
  driver: true
1890
1890
  });
1891
1891
  }
1892
+ if (this.visitors.length > 0) {
1893
+ this.visitors[0].visitor = {
1894
+ name: mot.nome,
1895
+ document: mot.cpf,
1896
+ contact: this.getContatoMotorista(mot),
1897
+ visitorSituation: VisitorSituation.CHECK_IN_PENDING,
1898
+ documentType: this.getDocumentType(),
1899
+ driver: true
1900
+ };
1901
+ }
1892
1902
  };
1893
1903
  VisitanteComponent.prototype.adicionaVisitantesGrid = function () {
1894
1904
  var _this = this;
@@ -1981,6 +1991,14 @@ var VisitanteComponent = /** @class */ (function () {
1981
1991
  if (visitor.document === visitante.document) {
1982
1992
  visitor.contact = visitante.contact;
1983
1993
  visitor.name = visitante.name;
1994
+ var novoVisitante_1 = _this.buildVisitorCredentialsDto(visitor);
1995
+ _this.visitors.forEach(function (result) {
1996
+ if (result.visitor.document === novoVisitante_1.visitor.document) {
1997
+ result.visitor.name = novoVisitante_1.visitor.name;
1998
+ result.visitor.contact = novoVisitante_1.visitor.contact;
1999
+ }
2000
+ });
2001
+ _this.visitorsChange.emit(_this.visitors);
1984
2002
  _this.visitorFound = true;
1985
2003
  }
1986
2004
  });
@@ -2008,6 +2026,19 @@ var VisitanteComponent = /** @class */ (function () {
2008
2026
  this.visitorsChange.emit(this.visitors);
2009
2027
  this.hasChange.emit(true);
2010
2028
  };
2029
+ VisitanteComponent.prototype.buildVisitorCredentialsDto = function (visitor) {
2030
+ var visitorCredentialsDto = new VisitorCredentialsDto();
2031
+ var visitante = {
2032
+ name: visitor.name,
2033
+ document: visitor.document,
2034
+ contact: visitor.contact,
2035
+ documentType: visitor.documentType,
2036
+ visitorSituation: visitor.visitorSituation,
2037
+ driver: false
2038
+ };
2039
+ visitorCredentialsDto.visitor = visitante;
2040
+ return visitorCredentialsDto;
2041
+ };
2011
2042
  VisitanteComponent.prototype.model = function (visitante) {
2012
2043
  var _this = this;
2013
2044
  var isDriver = visitante.document === this.motorista.cpf;