@seniorsistemas/yms-integration 1.18.2 → 1.18.3-dedd666f-1a6a-40f2-b527-cd463044cb54
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/bundles/seniorsistemas-yms-integration.umd.js +19 -7
- package/bundles/seniorsistemas-yms-integration.umd.js.map +1 -1
- package/bundles/seniorsistemas-yms-integration.umd.min.js +1 -1
- package/bundles/seniorsistemas-yms-integration.umd.min.js.map +1 -1
- package/esm2015/src/erp-senior/devolucao/form/devolucao-form.component.js +7 -7
- package/esm2015/src/sam-senior/components/visitor-edit/visitor-edit-form/visitante-form/visitor-edit-form.component.js +2 -2
- package/esm2015/src/sam-senior/components/visitor-edit/visitor-edit-list/visitor-edit-list.component.js +12 -1
- package/esm5/src/erp-senior/devolucao/form/devolucao-form.component.js +7 -7
- package/esm5/src/sam-senior/components/visitor-edit/visitor-edit-form/visitante-form/visitor-edit-form.component.js +2 -2
- package/esm5/src/sam-senior/components/visitor-edit/visitor-edit-list/visitor-edit-list.component.js +13 -1
- package/fesm2015/seniorsistemas-yms-integration.js +18 -7
- package/fesm2015/seniorsistemas-yms-integration.js.map +1 -1
- package/fesm5/seniorsistemas-yms-integration.js +19 -7
- package/fesm5/seniorsistemas-yms-integration.js.map +1 -1
- package/package.json +1 -1
- package/src/sam-senior/components/visitor-edit/visitor-edit-list/visitor-edit-list.component.d.ts +1 -0
|
@@ -1868,7 +1868,7 @@
|
|
|
1868
1868
|
if (!this.formGroup.valid) {
|
|
1869
1869
|
return this.validateAllFormFields(this.formGroup);
|
|
1870
1870
|
}
|
|
1871
|
-
var visitante = this.formGroup.
|
|
1871
|
+
var visitante = this.formGroup.getRawValue();
|
|
1872
1872
|
visitante.id = this.id;
|
|
1873
1873
|
this.close(visitante);
|
|
1874
1874
|
};
|
|
@@ -1916,6 +1916,7 @@
|
|
|
1916
1916
|
this.visitorsChange = new core.EventEmitter();
|
|
1917
1917
|
this.hasChange = new core.EventEmitter();
|
|
1918
1918
|
this.ngUnsubscribe = new rxjs.Subject();
|
|
1919
|
+
this.visitorFound = false;
|
|
1919
1920
|
this.unsubscribe$ = new rxjs.Subject();
|
|
1920
1921
|
this._integrationCallback = integrationCallback;
|
|
1921
1922
|
}
|
|
@@ -2047,6 +2048,17 @@
|
|
|
2047
2048
|
.subscribe(function (visitante) { return _this.adicionaVisitanteParaSalvar(visitante); });
|
|
2048
2049
|
};
|
|
2049
2050
|
VisitanteComponent.prototype.adicionaVisitanteParaSalvar = function (visitante) {
|
|
2051
|
+
var _this = this;
|
|
2052
|
+
this.visitanteGridData.forEach(function (visitor) {
|
|
2053
|
+
if (visitor.document === visitante.document) {
|
|
2054
|
+
visitor.contact = visitante.contact;
|
|
2055
|
+
visitor.name = visitante.name;
|
|
2056
|
+
_this.visitorFound = true;
|
|
2057
|
+
}
|
|
2058
|
+
});
|
|
2059
|
+
if (this.visitorFound) {
|
|
2060
|
+
return;
|
|
2061
|
+
}
|
|
2050
2062
|
this.visitanteGridLoading = true;
|
|
2051
2063
|
visitante.documentType = this.getDocumentType();
|
|
2052
2064
|
if (visitante.visitorSituation === undefined) {
|
|
@@ -6517,6 +6529,12 @@
|
|
|
6517
6529
|
_this.hasChangeService.hasChange(_this.agenda.id);
|
|
6518
6530
|
}
|
|
6519
6531
|
});
|
|
6532
|
+
var statusAgenda = ["AGUARDANDO_CONFIRMACAO_SOLICITANTE", "AGENDADO", "AGUARDANDO_CONFIRMACAO", "REJEITADO_POR_VALIDACAO"];
|
|
6533
|
+
if (this.agenda && !statusAgenda.includes(this.agenda.status) || !this.permissions.editar) {
|
|
6534
|
+
this.formGroup.disable();
|
|
6535
|
+
this.disableButtonSave = true;
|
|
6536
|
+
}
|
|
6537
|
+
this.createdByErpDisableForm();
|
|
6520
6538
|
};
|
|
6521
6539
|
DevolucaoFormComponent.prototype.ngOnInit = function () {
|
|
6522
6540
|
var _this = this;
|
|
@@ -6544,12 +6562,6 @@
|
|
|
6544
6562
|
this.setTransportadora(this.agenda.externalTenant.cnpj);
|
|
6545
6563
|
}
|
|
6546
6564
|
this.totalEixosComposicao = this.agenda && this.agenda.veiculo ? this.agenda.veiculo.eixos || 0 : 0;
|
|
6547
|
-
var statusAgenda = ["AGUARDANDO_CONFIRMACAO_SOLICITANTE", "AGENDADO", "AGUARDANDO_CONFIRMACAO", "REJEITADO_POR_VALIDACAO"];
|
|
6548
|
-
if (this.agenda && !statusAgenda.includes(this.agenda.status) || !this.permissions.editar) {
|
|
6549
|
-
this.formGroup.disable();
|
|
6550
|
-
this.disableButtonSave = true;
|
|
6551
|
-
}
|
|
6552
|
-
this.createdByErpDisableForm();
|
|
6553
6565
|
this.erpProcessService.current.subscribe(function (message) { return _this.erpProcessData = message; });
|
|
6554
6566
|
this.erpFormConfigService.current.subscribe(function (message) { return _this.enableRevalidation = message; });
|
|
6555
6567
|
this.route.data.pipe(operators.takeUntil(this.ngUnsubscribe)).subscribe(function (data) { return _this.onRouteDataChange(data); });
|