@seniorsistemas/yms-integration 1.18.4 → 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.
- package/bundles/seniorsistemas-yms-integration.umd.js +44 -24
- 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/devices/balancas/balancas.service.js +4 -1
- package/esm2015/src/devices/balancas/visualiar-balanca/visualizar-balanca.component.js +8 -25
- package/esm2015/src/devices/balancas/weightScale.js +1 -1
- package/esm2015/src/sam-senior/components/visitor-edit/visitor-edit-list/visitor-edit-list.component.js +32 -1
- package/esm5/src/devices/balancas/balancas.service.js +4 -1
- package/esm5/src/devices/balancas/visualiar-balanca/visualizar-balanca.component.js +8 -25
- package/esm5/src/devices/balancas/weightScale.js +1 -1
- package/esm5/src/sam-senior/components/visitor-edit/visitor-edit-list/visitor-edit-list.component.js +32 -1
- package/fesm2015/seniorsistemas-yms-integration.js +42 -22
- package/fesm2015/seniorsistemas-yms-integration.js.map +1 -1
- package/fesm5/seniorsistemas-yms-integration.js +42 -22
- package/fesm5/seniorsistemas-yms-integration.js.map +1 -1
- package/package.json +1 -1
- package/seniorsistemas-yms-integration.metadata.json +1 -1
- package/src/devices/balancas/balancas.service.d.ts +1 -0
- package/src/devices/balancas/visualiar-balanca/visualizar-balanca.component.d.ts +2 -11
- package/src/devices/balancas/weightScale.d.ts +2 -2
- package/src/sam-senior/components/visitor-edit/visitor-edit-list/visitor-edit-list.component.d.ts +1 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('rxjs'), require('rxjs/operators'), require('@angular/common'), require('@angular/core'), require('@ngx-translate/core'), require('@seniorsistemas/angular-components'), require('primeng/message'), require('primeng/table'), require('@angular/common/http'), require('primeng/api'), require('@seniorsistemas/yms-routines'), require('@angular/animations'), require('@seniorsistemas/platform-components'), require('@stomp/ng2-stompjs'), require('
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@seniorsistemas/yms-integration', ['exports', 'rxjs', 'rxjs/operators', '@angular/common', '@angular/core', '@ngx-translate/core', '@seniorsistemas/angular-components', 'primeng/message', 'primeng/table', '@angular/common/http', 'primeng/api', '@seniorsistemas/yms-routines', '@angular/animations', '@seniorsistemas/platform-components', '@stomp/ng2-stompjs', '
|
|
4
|
-
(global = global || self, factory((global.seniorsistemas = global.seniorsistemas || {}, global.seniorsistemas['yms-integration'] = {}), global.rxjs, global.rxjs.operators, global.ng.common, global.ng.core, global.core$1, global.angularComponents, global.message, global.table, global.ng.common.http, global.api, global.ymsRoutines, global.ng.animations, global.platformComponents, global.ng2Stompjs, global.
|
|
5
|
-
}(this, (function (exports, rxjs, operators, common, core, core$1, angularComponents, message, table, http, api, ymsRoutines, animations, platformComponents, ng2Stompjs,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('rxjs'), require('rxjs/operators'), require('@angular/common'), require('@angular/core'), require('@ngx-translate/core'), require('@seniorsistemas/angular-components'), require('primeng/message'), require('primeng/table'), require('@angular/common/http'), require('primeng/api'), require('@seniorsistemas/yms-routines'), require('@angular/animations'), require('@seniorsistemas/platform-components'), require('@stomp/ng2-stompjs'), require('sockjs-client'), require('ngx-cookie-service'), require('primeng/components/dynamicdialog/dynamicdialog'), require('primeng/primeng'), require('@seniorsistemas/yms-components'), require('@angular/router'), require('primeng/inputswitch'), require('primeng/inputtext'), require('@angular/forms'), require('moment'), require('primeng/components/common/messageservice'), require('primeng/shared'), require('primeng/button'), require('ngx-highlightjs'), require('primeng/accordion'), require('primeng/confirmdialog'), require('primeng/dialog'), require('primeng/dropdown'), require('primeng/panel'), require('angular2-hotkeys'), require('primeng/components/common/api'), require('highlight.js/lib/languages/json'), require('highlight.js/lib/languages/xml')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@seniorsistemas/yms-integration', ['exports', 'rxjs', 'rxjs/operators', '@angular/common', '@angular/core', '@ngx-translate/core', '@seniorsistemas/angular-components', 'primeng/message', 'primeng/table', '@angular/common/http', 'primeng/api', '@seniorsistemas/yms-routines', '@angular/animations', '@seniorsistemas/platform-components', '@stomp/ng2-stompjs', 'sockjs-client', 'ngx-cookie-service', 'primeng/components/dynamicdialog/dynamicdialog', 'primeng/primeng', '@seniorsistemas/yms-components', '@angular/router', 'primeng/inputswitch', 'primeng/inputtext', '@angular/forms', 'moment', 'primeng/components/common/messageservice', 'primeng/shared', 'primeng/button', 'ngx-highlightjs', 'primeng/accordion', 'primeng/confirmdialog', 'primeng/dialog', 'primeng/dropdown', 'primeng/panel', 'angular2-hotkeys', 'primeng/components/common/api', 'highlight.js/lib/languages/json', 'highlight.js/lib/languages/xml'], factory) :
|
|
4
|
+
(global = global || self, factory((global.seniorsistemas = global.seniorsistemas || {}, global.seniorsistemas['yms-integration'] = {}), global.rxjs, global.rxjs.operators, global.ng.common, global.ng.core, global.core$1, global.angularComponents, global.message, global.table, global.ng.common.http, global.api, global.ymsRoutines, global.ng.animations, global.platformComponents, global.ng2Stompjs, global.SockJS, global.ngxCookieService, global.dynamicdialog, global.primeng, global.ymsComponents, global.ng.router, global.inputswitch, global.inputtext, global.ng.forms, global._moment, global.messageservice, global.shared, global.button, global.ngxHighlightjs, global.accordion, global.confirmdialog, global.dialog, global.dropdown, global.panel, global.angular2Hotkeys, global.api$1, global.jsonx, global.xmlx));
|
|
5
|
+
}(this, (function (exports, rxjs, operators, common, core, core$1, angularComponents, message, table, http, api, ymsRoutines, animations, platformComponents, ng2Stompjs, SockJS, ngxCookieService, dynamicdialog, primeng, ymsComponents, router, inputswitch, inputtext, forms, _moment, messageservice, shared, button, ngxHighlightjs, accordion, confirmdialog, dialog, dropdown, panel, angular2Hotkeys, api$1, jsonx, xmlx) { 'use strict';
|
|
6
6
|
|
|
7
7
|
jsonx = jsonx && Object.prototype.hasOwnProperty.call(jsonx, 'default') ? jsonx['default'] : jsonx;
|
|
8
8
|
xmlx = xmlx && Object.prototype.hasOwnProperty.call(xmlx, 'default') ? xmlx['default'] : xmlx;
|
|
@@ -435,6 +435,9 @@
|
|
|
435
435
|
BalancasService.prototype.fallbackCall = function (balanca, peso) {
|
|
436
436
|
return this.http.post(this.urlBalanca + "actions/manualWeight", { code: balanca, weight: peso }).pipe(this.defaultCatch());
|
|
437
437
|
};
|
|
438
|
+
BalancasService.prototype.getStabilizedWeight = function (code) {
|
|
439
|
+
return this.http.post(this.urlBalanca + "queries/getStabilizedWeight", { code: code }).pipe(this.defaultCatch());
|
|
440
|
+
};
|
|
438
441
|
BalancasService.prototype.getWeightScaleByCode = function (code) {
|
|
439
442
|
var params = {
|
|
440
443
|
displayFields: ["description", "code"],
|
|
@@ -468,13 +471,10 @@
|
|
|
468
471
|
}());
|
|
469
472
|
var VisualizarBalancaComponent = /** @class */ (function (_super) {
|
|
470
473
|
__extends(VisualizarBalancaComponent, _super);
|
|
471
|
-
function VisualizarBalancaComponent(service
|
|
474
|
+
function VisualizarBalancaComponent(service) {
|
|
472
475
|
var _this = _super.call(this) || this;
|
|
473
476
|
_this.service = service;
|
|
474
|
-
_this.client = client;
|
|
475
|
-
_this.cookieService = cookieService;
|
|
476
477
|
_this.loading = false;
|
|
477
|
-
_this.websocket = new IntegrationWebSocket(_this.client, _this.cookieService, 'integration');
|
|
478
478
|
_this.unsubscribe$ = new rxjs.Subject();
|
|
479
479
|
_this.weightScales$ = new rxjs.BehaviorSubject([]);
|
|
480
480
|
_this.weightScaleValues = new Map();
|
|
@@ -492,19 +492,10 @@
|
|
|
492
492
|
_this.weightScales$.next(contents);
|
|
493
493
|
contents.forEach(function (value) {
|
|
494
494
|
_this.weightScaleValues.set(value.id, 0);
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
.pipe(operators.map(function (message) { return message.body; }), operators.map(function (body) { return JSON.parse(body).data; }), operators.takeUntil(_this.unsubscribe$))
|
|
500
|
-
.subscribe(function (payload) {
|
|
501
|
-
if (!_this.weightScales$.value.length)
|
|
502
|
-
return;
|
|
503
|
-
var index = _this.weightScales$.value.findIndex(function (value) { return value.id === payload.weightScale.id; });
|
|
504
|
-
if (index < 0)
|
|
505
|
-
return;
|
|
506
|
-
var find = _this.weightScales$.value[index];
|
|
507
|
-
_this.weightScaleValues.set(find.id, payload.weight);
|
|
495
|
+
_this.service.getStabilizedWeight(value.code)
|
|
496
|
+
.subscribe(function (stabilized) {
|
|
497
|
+
_this.weightScaleValues.set(value.id, stabilized.weight);
|
|
498
|
+
});
|
|
508
499
|
});
|
|
509
500
|
});
|
|
510
501
|
};
|
|
@@ -521,9 +512,7 @@
|
|
|
521
512
|
selector: 'visualizar-balanca-component',
|
|
522
513
|
template: "<div *sLoadingState=\"loading\">\n <p-table [value]=\"weightScales$ | async\">\n <ng-template pTemplate=\"header\">\n <tr>\n <th>C\u00F3digo</th>\n <th>Descri\u00E7\u00E3o</th>\n <th>Peso</th>\n </tr>\n </ng-template>\n <ng-template let-rowData pTemplate=\"body\">\n <tr>\n <td>{{rowData.code}}</td>\n <td>{{rowData.description}}</td>\n <td>{{weightScaleValues.get(rowData.id)}}</td>\n </tr>\n </ng-template>\n </p-table>\n</div>"
|
|
523
514
|
}),
|
|
524
|
-
__metadata("design:paramtypes", [BalancasService
|
|
525
|
-
ng2Stompjs.StompService,
|
|
526
|
-
ngxCookieService.CookieService])
|
|
515
|
+
__metadata("design:paramtypes", [BalancasService])
|
|
527
516
|
], VisualizarBalancaComponent);
|
|
528
517
|
return VisualizarBalancaComponent;
|
|
529
518
|
}(VisualizarBalancaDescritor));
|
|
@@ -1960,6 +1949,16 @@
|
|
|
1960
1949
|
driver: true
|
|
1961
1950
|
});
|
|
1962
1951
|
}
|
|
1952
|
+
if (this.visitors.length > 0) {
|
|
1953
|
+
this.visitors[0].visitor = {
|
|
1954
|
+
name: mot.nome,
|
|
1955
|
+
document: mot.cpf,
|
|
1956
|
+
contact: this.getContatoMotorista(mot),
|
|
1957
|
+
visitorSituation: VisitorSituation.CHECK_IN_PENDING,
|
|
1958
|
+
documentType: this.getDocumentType(),
|
|
1959
|
+
driver: true
|
|
1960
|
+
};
|
|
1961
|
+
}
|
|
1963
1962
|
};
|
|
1964
1963
|
VisitanteComponent.prototype.adicionaVisitantesGrid = function () {
|
|
1965
1964
|
var _this = this;
|
|
@@ -2052,6 +2051,14 @@
|
|
|
2052
2051
|
if (visitor.document === visitante.document) {
|
|
2053
2052
|
visitor.contact = visitante.contact;
|
|
2054
2053
|
visitor.name = visitante.name;
|
|
2054
|
+
var novoVisitante_1 = _this.buildVisitorCredentialsDto(visitor);
|
|
2055
|
+
_this.visitors.forEach(function (result) {
|
|
2056
|
+
if (result.visitor.document === novoVisitante_1.visitor.document) {
|
|
2057
|
+
result.visitor.name = novoVisitante_1.visitor.name;
|
|
2058
|
+
result.visitor.contact = novoVisitante_1.visitor.contact;
|
|
2059
|
+
}
|
|
2060
|
+
});
|
|
2061
|
+
_this.visitorsChange.emit(_this.visitors);
|
|
2055
2062
|
_this.visitorFound = true;
|
|
2056
2063
|
}
|
|
2057
2064
|
});
|
|
@@ -2079,6 +2086,19 @@
|
|
|
2079
2086
|
this.visitorsChange.emit(this.visitors);
|
|
2080
2087
|
this.hasChange.emit(true);
|
|
2081
2088
|
};
|
|
2089
|
+
VisitanteComponent.prototype.buildVisitorCredentialsDto = function (visitor) {
|
|
2090
|
+
var visitorCredentialsDto = new VisitorCredentialsDto();
|
|
2091
|
+
var visitante = {
|
|
2092
|
+
name: visitor.name,
|
|
2093
|
+
document: visitor.document,
|
|
2094
|
+
contact: visitor.contact,
|
|
2095
|
+
documentType: visitor.documentType,
|
|
2096
|
+
visitorSituation: visitor.visitorSituation,
|
|
2097
|
+
driver: false
|
|
2098
|
+
};
|
|
2099
|
+
visitorCredentialsDto.visitor = visitante;
|
|
2100
|
+
return visitorCredentialsDto;
|
|
2101
|
+
};
|
|
2082
2102
|
VisitanteComponent.prototype.model = function (visitante) {
|
|
2083
2103
|
var _this = this;
|
|
2084
2104
|
var isDriver = visitante.document === this.motorista.cpf;
|