@seniorsistemas/yms-integration 1.18.1 → 1.18.3
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 +16 -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/scheduling/scheduling.component.js +2 -2
- package/esm2015/src/sam-senior/components/visitor-edit/visitor-edit-list/visitor-edit-list.component.js +10 -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-list/visitor-edit-list.component.js +10 -1
- package/fesm2015/seniorsistemas-yms-integration.js +16 -7
- package/fesm2015/seniorsistemas-yms-integration.js.map +1 -1
- package/fesm5/seniorsistemas-yms-integration.js +16 -7
- 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 +1 -0
|
@@ -1854,6 +1854,7 @@ 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();
|
|
1858
1859
|
this.unsubscribe$ = new Subject();
|
|
1859
1860
|
this._integrationCallback = integrationCallback;
|
|
@@ -2005,6 +2006,7 @@ var VisitanteComponent = /** @class */ (function () {
|
|
|
2005
2006
|
};
|
|
2006
2007
|
this.visitors.push(novo_visitante);
|
|
2007
2008
|
this.visitorsChange.emit(this.visitors);
|
|
2009
|
+
this.hasChange.emit(true);
|
|
2008
2010
|
};
|
|
2009
2011
|
VisitanteComponent.prototype.model = function (visitante) {
|
|
2010
2012
|
var _this = this;
|
|
@@ -2073,6 +2075,7 @@ var VisitanteComponent = /** @class */ (function () {
|
|
|
2073
2075
|
else {
|
|
2074
2076
|
visitorWithCredencial.credentialCards.push(this.createCredentialCard(visitorCredentialCard));
|
|
2075
2077
|
}
|
|
2078
|
+
this.hasChange.emit(true);
|
|
2076
2079
|
};
|
|
2077
2080
|
VisitanteComponent.prototype.editarVisitante = function (visitante) {
|
|
2078
2081
|
this.criarOuAtualizarVisitante(visitante);
|
|
@@ -2085,12 +2088,14 @@ var VisitanteComponent = /** @class */ (function () {
|
|
|
2085
2088
|
var removeVisitor = _this.visitors.findIndex(function (visitor) { return visitor.visitor.document === value.document; });
|
|
2086
2089
|
if (removeVisitor !== -1) {
|
|
2087
2090
|
_this.visitors.splice(removeVisitor, 1);
|
|
2091
|
+
_this.hasChange.emit(true);
|
|
2088
2092
|
}
|
|
2089
2093
|
}
|
|
2090
2094
|
});
|
|
2091
2095
|
};
|
|
2092
2096
|
VisitanteComponent.prototype.deletarCredenciais = function (viisitorCredential) {
|
|
2093
2097
|
viisitorCredential.credentialCards.splice(0, viisitorCredential.credentialCards.length);
|
|
2098
|
+
this.hasChange.emit(true);
|
|
2094
2099
|
};
|
|
2095
2100
|
VisitanteComponent.prototype.getContatoMotorista = function (motorista) {
|
|
2096
2101
|
return motorista.telefone === undefined ? "0" : motorista.telefone;
|
|
@@ -2184,6 +2189,10 @@ var VisitanteComponent = /** @class */ (function () {
|
|
|
2184
2189
|
Output(),
|
|
2185
2190
|
__metadata("design:type", Object)
|
|
2186
2191
|
], VisitanteComponent.prototype, "visitorsChange", void 0);
|
|
2192
|
+
__decorate([
|
|
2193
|
+
Output(),
|
|
2194
|
+
__metadata("design:type", Object)
|
|
2195
|
+
], VisitanteComponent.prototype, "hasChange", void 0);
|
|
2187
2196
|
VisitanteComponent = __decorate([
|
|
2188
2197
|
Component({
|
|
2189
2198
|
selector: 'visitante-component',
|
|
@@ -2771,7 +2780,7 @@ var SchedulingComponent = /** @class */ (function () {
|
|
|
2771
2780
|
SchedulingComponent = __decorate([
|
|
2772
2781
|
Component({
|
|
2773
2782
|
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
|
|
2783
|
+
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
2784
|
}),
|
|
2776
2785
|
__metadata("design:paramtypes", [FormBuilder,
|
|
2777
2786
|
ActivatedRoute,
|
|
@@ -6448,6 +6457,12 @@ var DevolucaoFormComponent = /** @class */ (function () {
|
|
|
6448
6457
|
_this.hasChangeService.hasChange(_this.agenda.id);
|
|
6449
6458
|
}
|
|
6450
6459
|
});
|
|
6460
|
+
var statusAgenda = ["AGUARDANDO_CONFIRMACAO_SOLICITANTE", "AGENDADO", "AGUARDANDO_CONFIRMACAO", "REJEITADO_POR_VALIDACAO"];
|
|
6461
|
+
if (this.agenda && !statusAgenda.includes(this.agenda.status) || !this.permissions.editar) {
|
|
6462
|
+
this.formGroup.disable();
|
|
6463
|
+
this.disableButtonSave = true;
|
|
6464
|
+
}
|
|
6465
|
+
this.createdByErpDisableForm();
|
|
6451
6466
|
};
|
|
6452
6467
|
DevolucaoFormComponent.prototype.ngOnInit = function () {
|
|
6453
6468
|
var _this = this;
|
|
@@ -6475,12 +6490,6 @@ var DevolucaoFormComponent = /** @class */ (function () {
|
|
|
6475
6490
|
this.setTransportadora(this.agenda.externalTenant.cnpj);
|
|
6476
6491
|
}
|
|
6477
6492
|
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
6493
|
this.erpProcessService.current.subscribe(function (message) { return _this.erpProcessData = message; });
|
|
6485
6494
|
this.erpFormConfigService.current.subscribe(function (message) { return _this.enableRevalidation = message; });
|
|
6486
6495
|
this.route.data.pipe(takeUntil(this.ngUnsubscribe)).subscribe(function (data) { return _this.onRouteDataChange(data); });
|