@seniorsistemas/yms-integration 1.18.1 → 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 +29 -8
- 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/scheduling/scheduling.component.js +2 -2
- 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 +21 -1
- package/esm5/src/erp-senior/devolucao/form/devolucao-form.component.js +7 -7
- package/esm5/src/sam-senior/components/scheduling/scheduling.component.js +2 -2
- 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 +22 -1
- package/fesm2015/seniorsistemas-yms-integration.js +28 -8
- package/fesm2015/seniorsistemas-yms-integration.js.map +1 -1
- package/fesm5/seniorsistemas-yms-integration.js +29 -8
- package/fesm5/seniorsistemas-yms-integration.js.map +1 -1
- package/package.json +1 -1
- package/seniorsistemas-yms-integration.metadata.json +1 -1
- package/src/sam-senior/components/visitor-edit/visitor-edit-list/visitor-edit-list.component.d.ts +2 -0
|
@@ -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.
|
|
1811
|
+
var visitante = this.formGroup.getRawValue();
|
|
1812
1812
|
visitante.id = this.id;
|
|
1813
1813
|
this.close(visitante);
|
|
1814
1814
|
};
|
|
@@ -1854,7 +1854,9 @@ var VisitanteComponent = /** @class */ (function () {
|
|
|
1854
1854
|
this.integrationCallback = integrationCallback;
|
|
1855
1855
|
this.visitors = [];
|
|
1856
1856
|
this.visitorsChange = new EventEmitter();
|
|
1857
|
+
this.hasChange = new EventEmitter();
|
|
1857
1858
|
this.ngUnsubscribe = new Subject();
|
|
1859
|
+
this.visitorFound = false;
|
|
1858
1860
|
this.unsubscribe$ = new Subject();
|
|
1859
1861
|
this._integrationCallback = integrationCallback;
|
|
1860
1862
|
}
|
|
@@ -1986,6 +1988,17 @@ var VisitanteComponent = /** @class */ (function () {
|
|
|
1986
1988
|
.subscribe(function (visitante) { return _this.adicionaVisitanteParaSalvar(visitante); });
|
|
1987
1989
|
};
|
|
1988
1990
|
VisitanteComponent.prototype.adicionaVisitanteParaSalvar = function (visitante) {
|
|
1991
|
+
var _this = this;
|
|
1992
|
+
this.visitanteGridData.forEach(function (visitor) {
|
|
1993
|
+
if (visitor.document === visitante.document) {
|
|
1994
|
+
visitor.contact = visitante.contact;
|
|
1995
|
+
visitor.name = visitante.name;
|
|
1996
|
+
_this.visitorFound = true;
|
|
1997
|
+
}
|
|
1998
|
+
});
|
|
1999
|
+
if (this.visitorFound) {
|
|
2000
|
+
return;
|
|
2001
|
+
}
|
|
1989
2002
|
this.visitanteGridLoading = true;
|
|
1990
2003
|
visitante.documentType = this.getDocumentType();
|
|
1991
2004
|
if (visitante.visitorSituation === undefined) {
|
|
@@ -2005,6 +2018,7 @@ var VisitanteComponent = /** @class */ (function () {
|
|
|
2005
2018
|
};
|
|
2006
2019
|
this.visitors.push(novo_visitante);
|
|
2007
2020
|
this.visitorsChange.emit(this.visitors);
|
|
2021
|
+
this.hasChange.emit(true);
|
|
2008
2022
|
};
|
|
2009
2023
|
VisitanteComponent.prototype.model = function (visitante) {
|
|
2010
2024
|
var _this = this;
|
|
@@ -2073,6 +2087,7 @@ var VisitanteComponent = /** @class */ (function () {
|
|
|
2073
2087
|
else {
|
|
2074
2088
|
visitorWithCredencial.credentialCards.push(this.createCredentialCard(visitorCredentialCard));
|
|
2075
2089
|
}
|
|
2090
|
+
this.hasChange.emit(true);
|
|
2076
2091
|
};
|
|
2077
2092
|
VisitanteComponent.prototype.editarVisitante = function (visitante) {
|
|
2078
2093
|
this.criarOuAtualizarVisitante(visitante);
|
|
@@ -2085,12 +2100,14 @@ var VisitanteComponent = /** @class */ (function () {
|
|
|
2085
2100
|
var removeVisitor = _this.visitors.findIndex(function (visitor) { return visitor.visitor.document === value.document; });
|
|
2086
2101
|
if (removeVisitor !== -1) {
|
|
2087
2102
|
_this.visitors.splice(removeVisitor, 1);
|
|
2103
|
+
_this.hasChange.emit(true);
|
|
2088
2104
|
}
|
|
2089
2105
|
}
|
|
2090
2106
|
});
|
|
2091
2107
|
};
|
|
2092
2108
|
VisitanteComponent.prototype.deletarCredenciais = function (viisitorCredential) {
|
|
2093
2109
|
viisitorCredential.credentialCards.splice(0, viisitorCredential.credentialCards.length);
|
|
2110
|
+
this.hasChange.emit(true);
|
|
2094
2111
|
};
|
|
2095
2112
|
VisitanteComponent.prototype.getContatoMotorista = function (motorista) {
|
|
2096
2113
|
return motorista.telefone === undefined ? "0" : motorista.telefone;
|
|
@@ -2184,6 +2201,10 @@ var VisitanteComponent = /** @class */ (function () {
|
|
|
2184
2201
|
Output(),
|
|
2185
2202
|
__metadata("design:type", Object)
|
|
2186
2203
|
], VisitanteComponent.prototype, "visitorsChange", void 0);
|
|
2204
|
+
__decorate([
|
|
2205
|
+
Output(),
|
|
2206
|
+
__metadata("design:type", Object)
|
|
2207
|
+
], VisitanteComponent.prototype, "hasChange", void 0);
|
|
2187
2208
|
VisitanteComponent = __decorate([
|
|
2188
2209
|
Component({
|
|
2189
2210
|
selector: 'visitante-component',
|
|
@@ -2771,7 +2792,7 @@ var SchedulingComponent = /** @class */ (function () {
|
|
|
2771
2792
|
SchedulingComponent = __decorate([
|
|
2772
2793
|
Component({
|
|
2773
2794
|
selector: "scheduling",
|
|
2774
|
-
template: "<visited-info [agenda]=\"agenda\"> </visited-info>\r\n<form [formGroup]=\"formGroup\" *sLoadingState=\"loading\" novalidate>\r\n <div class=\"ui-fluid\">\r\n <div class=\"ui-g\">\r\n <div class=\"ui-g-12 ui-md-6 required\">\r\n <label for=\"motivoVisita\">{{ \"yms.patio.sam_motivo_visita\" | translate }}</label>\r\n <input\r\n type=\"text\"\r\n id=\"motivoVisita\"\r\n name=\"motivoVisita\"\r\n pInputText\r\n formControlName=\"motivoVisita\"\r\n autocomplete=\"off\"\r\n />\r\n <s-control-errors\r\n [control]=\"formGroup.controls['motivoVisita']\"\r\n [errorMessages]=\"{ required: 'error_required' | translate }\"\r\n >\r\n </s-control-errors>\r\n </div>\r\n <div class=\"ui-g-12 ui-md-6 required\">\r\n <label for=\"portaria\">{{ \"yms.patio.sam_portaria\" | translate }}</label>\r\n <s-lookup\r\n dataKey=\"id\"\r\n id=\"portaria\"\r\n name=\"portaria\"\r\n formControlName=\"portaria\"\r\n lookupDisplayField=\"name\"\r\n [multiple]=\"false\"\r\n (onLookupRequest)=\"portariaLookup.lookupRequest($event)\"\r\n (onSearchRequest)=\"portariaLookup.searchRequest($event)\"\r\n [searchTitle]=\"'yms.patio.sam_portaria' | translate\"\r\n [searchEmptyTitle]=\"'nothing_found' | translate\"\r\n [searchFields]=\"portariaLookup.searchFields\"\r\n [searchGridFields]=\"portariaLookup.searchGridFields\"\r\n [searchGridData]=\"portariaLookup.searchGridData\"\r\n [searchTotalRecords]=\"portariaLookup.searchTotalRecords\"\r\n [searchTotalRecordsLabel]=\"\r\n 'total_records' | translate : { value: portariaLookup.searchTotalRecords }\r\n \">\r\n </s-lookup>\r\n <s-control-errors \r\n [control]=\"formGroup.controls['portaria']\"\r\n [errorMessages]=\"{ required: 'error_required' | translate }\">\r\n </s-control-errors>\r\n </div>\r\n <div class=\"ui-g-6 ui-md-3 required\">\r\n <label for=\"dataSaida\">{{ \"yms.patio.sam_data_saida\" | translate }}</label>\r\n <p-calendar\r\n id=\"dataSaida\"\r\n name=\"dataSaida\"\r\n formControlName=\"dataSaida\"\r\n inputId=\"dataSaida\"\r\n [showIcon]=\"true\"\r\n [locale]=\"localeConfig.calendar\"\r\n [dateFormat]=\"localeConfig.calendar.dateFormat\"\r\n >\r\n </p-calendar>\r\n <s-control-errors\r\n [control]=\"formGroup.controls['dataSaida']\"\r\n [errorMessages]=\"{ required: 'error_required' | translate }\"\r\n >\r\n </s-control-errors>\r\n </div>\r\n <div class=\"ui-g-6 ui-md-3 required\">\r\n <label for=\"horaSaida\">{{ \"yms.patio.sam_hora_saida\" | translate }}</label>\r\n <p-calendar\r\n id=\"horaSaida\"\r\n name=\"horaSaida\"\r\n formControlName=\"horaSaida\"\r\n [locale]=\"localeConfig.calendar\"\r\n inputId=\"horaSaida\"\r\n [showTime]=\"true\"\r\n [hourFormat]=\"localeConfig.calendar.hourFormat\"\r\n [timeOnly]=\"true\"\r\n >\r\n </p-calendar>\r\n <s-control-errors\r\n [control]=\"formGroup.controls['horaSaida']\"\r\n [errorMessages]=\"{ required: 'error_required' | translate }\"\r\n >\r\n </s-control-errors>\r\n </div>\r\n </div>\r\n </div>\r\n</form>\r\n<div class=\"separator\"></div>\r\n<div *ngIf=\"schedulingVisitors.visitors\">\r\n <visitante-component
|
|
2795
|
+
template: "<visited-info [agenda]=\"agenda\"> </visited-info>\r\n<form [formGroup]=\"formGroup\" *sLoadingState=\"loading\" novalidate>\r\n <div class=\"ui-fluid\">\r\n <div class=\"ui-g\">\r\n <div class=\"ui-g-12 ui-md-6 required\">\r\n <label for=\"motivoVisita\">{{ \"yms.patio.sam_motivo_visita\" | translate }}</label>\r\n <input\r\n type=\"text\"\r\n id=\"motivoVisita\"\r\n name=\"motivoVisita\"\r\n pInputText\r\n formControlName=\"motivoVisita\"\r\n autocomplete=\"off\"\r\n />\r\n <s-control-errors\r\n [control]=\"formGroup.controls['motivoVisita']\"\r\n [errorMessages]=\"{ required: 'error_required' | translate }\"\r\n >\r\n </s-control-errors>\r\n </div>\r\n <div class=\"ui-g-12 ui-md-6 required\">\r\n <label for=\"portaria\">{{ \"yms.patio.sam_portaria\" | translate }}</label>\r\n <s-lookup\r\n dataKey=\"id\"\r\n id=\"portaria\"\r\n name=\"portaria\"\r\n formControlName=\"portaria\"\r\n lookupDisplayField=\"name\"\r\n [multiple]=\"false\"\r\n (onLookupRequest)=\"portariaLookup.lookupRequest($event)\"\r\n (onSearchRequest)=\"portariaLookup.searchRequest($event)\"\r\n [searchTitle]=\"'yms.patio.sam_portaria' | translate\"\r\n [searchEmptyTitle]=\"'nothing_found' | translate\"\r\n [searchFields]=\"portariaLookup.searchFields\"\r\n [searchGridFields]=\"portariaLookup.searchGridFields\"\r\n [searchGridData]=\"portariaLookup.searchGridData\"\r\n [searchTotalRecords]=\"portariaLookup.searchTotalRecords\"\r\n [searchTotalRecordsLabel]=\"\r\n 'total_records' | translate : { value: portariaLookup.searchTotalRecords }\r\n \">\r\n </s-lookup>\r\n <s-control-errors \r\n [control]=\"formGroup.controls['portaria']\"\r\n [errorMessages]=\"{ required: 'error_required' | translate }\">\r\n </s-control-errors>\r\n </div>\r\n <div class=\"ui-g-6 ui-md-3 required\">\r\n <label for=\"dataSaida\">{{ \"yms.patio.sam_data_saida\" | translate }}</label>\r\n <p-calendar\r\n id=\"dataSaida\"\r\n name=\"dataSaida\"\r\n formControlName=\"dataSaida\"\r\n inputId=\"dataSaida\"\r\n [showIcon]=\"true\"\r\n [locale]=\"localeConfig.calendar\"\r\n [dateFormat]=\"localeConfig.calendar.dateFormat\"\r\n >\r\n </p-calendar>\r\n <s-control-errors\r\n [control]=\"formGroup.controls['dataSaida']\"\r\n [errorMessages]=\"{ required: 'error_required' | translate }\"\r\n >\r\n </s-control-errors>\r\n </div>\r\n <div class=\"ui-g-6 ui-md-3 required\">\r\n <label for=\"horaSaida\">{{ \"yms.patio.sam_hora_saida\" | translate }}</label>\r\n <p-calendar\r\n id=\"horaSaida\"\r\n name=\"horaSaida\"\r\n formControlName=\"horaSaida\"\r\n [locale]=\"localeConfig.calendar\"\r\n inputId=\"horaSaida\"\r\n [showTime]=\"true\"\r\n [hourFormat]=\"localeConfig.calendar.hourFormat\"\r\n [timeOnly]=\"true\"\r\n >\r\n </p-calendar>\r\n <s-control-errors\r\n [control]=\"formGroup.controls['horaSaida']\"\r\n [errorMessages]=\"{ required: 'error_required' | translate }\"\r\n >\r\n </s-control-errors>\r\n </div>\r\n </div>\r\n </div>\r\n</form>\r\n<div class=\"separator\"></div>\r\n<div *ngIf=\"schedulingVisitors.visitors\">\r\n <visitante-component\r\n [motorista]=\"agenda.motorista\"\r\n [(visitors)]=\"schedulingVisitors.visitors\"\r\n (hasChange)=\"isFormModified = $event\">\r\n </visitante-component>\r\n</div>\r\n<div class=\"separator\"></div>\r\n<div style=\"margin-top: 10px\">\r\n <s-button priority=\"primary\" [label]=\"'save' | translate\" (onClick)=\"onSave()\"\r\n [disabled]=\"loading || !canSave()\"></s-button>\r\n <s-button *ngIf=\"saveAndInitButton\" priority=\"primary\" [label]=\"'save_and_init' | translate\" (onClick)=\"onSave(true)\"\r\n [disabled]=\"loading\"></s-button>\r\n \r\n</div>\r\n"
|
|
2775
2796
|
}),
|
|
2776
2797
|
__metadata("design:paramtypes", [FormBuilder,
|
|
2777
2798
|
ActivatedRoute,
|
|
@@ -6448,6 +6469,12 @@ var DevolucaoFormComponent = /** @class */ (function () {
|
|
|
6448
6469
|
_this.hasChangeService.hasChange(_this.agenda.id);
|
|
6449
6470
|
}
|
|
6450
6471
|
});
|
|
6472
|
+
var statusAgenda = ["AGUARDANDO_CONFIRMACAO_SOLICITANTE", "AGENDADO", "AGUARDANDO_CONFIRMACAO", "REJEITADO_POR_VALIDACAO"];
|
|
6473
|
+
if (this.agenda && !statusAgenda.includes(this.agenda.status) || !this.permissions.editar) {
|
|
6474
|
+
this.formGroup.disable();
|
|
6475
|
+
this.disableButtonSave = true;
|
|
6476
|
+
}
|
|
6477
|
+
this.createdByErpDisableForm();
|
|
6451
6478
|
};
|
|
6452
6479
|
DevolucaoFormComponent.prototype.ngOnInit = function () {
|
|
6453
6480
|
var _this = this;
|
|
@@ -6475,12 +6502,6 @@ var DevolucaoFormComponent = /** @class */ (function () {
|
|
|
6475
6502
|
this.setTransportadora(this.agenda.externalTenant.cnpj);
|
|
6476
6503
|
}
|
|
6477
6504
|
this.totalEixosComposicao = this.agenda && this.agenda.veiculo ? this.agenda.veiculo.eixos || 0 : 0;
|
|
6478
|
-
var statusAgenda = ["AGUARDANDO_CONFIRMACAO_SOLICITANTE", "AGENDADO", "AGUARDANDO_CONFIRMACAO", "REJEITADO_POR_VALIDACAO"];
|
|
6479
|
-
if (this.agenda && !statusAgenda.includes(this.agenda.status) || !this.permissions.editar) {
|
|
6480
|
-
this.formGroup.disable();
|
|
6481
|
-
this.disableButtonSave = true;
|
|
6482
|
-
}
|
|
6483
|
-
this.createdByErpDisableForm();
|
|
6484
6505
|
this.erpProcessService.current.subscribe(function (message) { return _this.erpProcessData = message; });
|
|
6485
6506
|
this.erpFormConfigService.current.subscribe(function (message) { return _this.enableRevalidation = message; });
|
|
6486
6507
|
this.route.data.pipe(takeUntil(this.ngUnsubscribe)).subscribe(function (data) { return _this.onRouteDataChange(data); });
|