@seniorsistemas/yms-integration 1.29.2 → 1.30.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 +215 -154
- 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/seniorsistemas-yms-integration.js +46 -44
- package/esm2015/src/wms/components/document-grid/document-grid.component.js +35 -4
- package/esm2015/src/wms/entities/agenda/agenda.service.js +26 -0
- package/esm2015/src/wms/entities/entity-service.js +4 -0
- package/esm5/seniorsistemas-yms-integration.js +46 -44
- package/esm5/src/wms/components/document-grid/document-grid.component.js +36 -4
- package/esm5/src/wms/entities/agenda/agenda.service.js +29 -0
- package/esm5/src/wms/entities/entity-service.js +11 -0
- package/fesm2015/seniorsistemas-yms-integration.js +160 -110
- package/fesm2015/seniorsistemas-yms-integration.js.map +1 -1
- package/fesm5/seniorsistemas-yms-integration.js +169 -110
- package/fesm5/seniorsistemas-yms-integration.js.map +1 -1
- package/package.json +1 -1
- package/seniorsistemas-yms-integration.d.ts +45 -43
- package/seniorsistemas-yms-integration.metadata.json +1 -1
- package/src/wms/components/document-grid/document-grid.component.d.ts +8 -1
- package/src/wms/entities/agenda/agenda.service.d.ts +17 -0
- package/src/wms/entities/entity-service.d.ts +3 -0
|
@@ -3197,25 +3197,158 @@
|
|
|
3197
3197
|
return DocumentService;
|
|
3198
3198
|
}(EntityService));
|
|
3199
3199
|
|
|
3200
|
+
var EntityService$1 = /** @class */ (function () {
|
|
3201
|
+
function EntityService(http, messageService, entityUrl, actionsUrl) {
|
|
3202
|
+
this.http = http;
|
|
3203
|
+
this.messageService = messageService;
|
|
3204
|
+
this.entityUrl = entityUrl;
|
|
3205
|
+
this.actionsUrl = actionsUrl;
|
|
3206
|
+
this.http = http;
|
|
3207
|
+
this.messageService = messageService;
|
|
3208
|
+
this.entityUrl = entityUrl;
|
|
3209
|
+
this.actionsUrl = actionsUrl;
|
|
3210
|
+
this.defaultCatch = this.defaultCatch.bind(this);
|
|
3211
|
+
}
|
|
3212
|
+
EntityService.prototype.getListQueryParams = function (listParams) {
|
|
3213
|
+
var _a = listParams.page, page = _a === void 0 ? 0 : _a, _b = listParams.size, size = _b === void 0 ? 10 : _b, _c = listParams.sort, sort = _c === void 0 ? [] : _c, _d = listParams.filterQuery, filterQuery = _d === void 0 ? "" : _d, _e = listParams.displayFields, displayFields = _e === void 0 ? [] : _e;
|
|
3214
|
+
var params = new http.HttpParams();
|
|
3215
|
+
params = params.append("size", String(size));
|
|
3216
|
+
params = params.append("offset", String(page));
|
|
3217
|
+
if (sort && sort.length) {
|
|
3218
|
+
params = params.append("orderby", sort
|
|
3219
|
+
.map(function (s) {
|
|
3220
|
+
var order = "";
|
|
3221
|
+
if (s.order === 1)
|
|
3222
|
+
order = " asc";
|
|
3223
|
+
else if (s.order === -1)
|
|
3224
|
+
order = " desc";
|
|
3225
|
+
return "" + s.field + order;
|
|
3226
|
+
})
|
|
3227
|
+
.join(", "));
|
|
3228
|
+
}
|
|
3229
|
+
if (filterQuery)
|
|
3230
|
+
params = params.append("filter", filterQuery);
|
|
3231
|
+
if (displayFields && displayFields.length)
|
|
3232
|
+
params = params.append("displayfields", displayFields.join());
|
|
3233
|
+
return params;
|
|
3234
|
+
};
|
|
3235
|
+
EntityService.prototype.getBodyParams = function (listParams) {
|
|
3236
|
+
var _a = listParams.page, page = _a === void 0 ? 0 : _a, _b = listParams.size, size = _b === void 0 ? 10 : _b, _c = listParams.sort, sort = _c === void 0 ? [] : _c, _d = listParams.filterQuery, filterQuery = _d === void 0 ? "" : _d, _e = listParams.displayFields, displayFields = _e === void 0 ? [] : _e;
|
|
3237
|
+
var bodyParams = {};
|
|
3238
|
+
bodyParams.size = size;
|
|
3239
|
+
bodyParams.offset = page;
|
|
3240
|
+
if (sort && sort.length) {
|
|
3241
|
+
bodyParams.orderBy = sort
|
|
3242
|
+
.map(function (s) {
|
|
3243
|
+
var order = "";
|
|
3244
|
+
if (s.order === 1)
|
|
3245
|
+
order = " asc";
|
|
3246
|
+
else if (s.order === -1)
|
|
3247
|
+
order = " desc";
|
|
3248
|
+
return "" + s.field + order;
|
|
3249
|
+
})
|
|
3250
|
+
.join(", ");
|
|
3251
|
+
}
|
|
3252
|
+
if (filterQuery)
|
|
3253
|
+
bodyParams.filter = filterQuery;
|
|
3254
|
+
if (displayFields && displayFields.length)
|
|
3255
|
+
bodyParams.displayfields = displayFields.join();
|
|
3256
|
+
return bodyParams;
|
|
3257
|
+
};
|
|
3258
|
+
EntityService.prototype.defaultCatch = function () {
|
|
3259
|
+
var _this = this;
|
|
3260
|
+
return operators.catchError(function (err) {
|
|
3261
|
+
if (err) {
|
|
3262
|
+
var summary = err.status ? String(err.status) : "Error";
|
|
3263
|
+
var detail = (err.error && err.error.message) || err.statusText || err.message || "Error";
|
|
3264
|
+
_this.messageService.add({
|
|
3265
|
+
severity: "error",
|
|
3266
|
+
summary: summary,
|
|
3267
|
+
detail: detail,
|
|
3268
|
+
});
|
|
3269
|
+
}
|
|
3270
|
+
return rxjs.throwError(err);
|
|
3271
|
+
});
|
|
3272
|
+
};
|
|
3273
|
+
EntityService.prototype.list = function (listParams) {
|
|
3274
|
+
return this.http.get(this.entityUrl, { params: this.getListQueryParams(listParams) }).pipe(this.defaultCatch());
|
|
3275
|
+
};
|
|
3276
|
+
EntityService.prototype.get = function (id) {
|
|
3277
|
+
return this.http.get(this.entityUrl + "/" + id).pipe(this.defaultCatch());
|
|
3278
|
+
};
|
|
3279
|
+
EntityService.prototype.insert = function (entity) {
|
|
3280
|
+
return this.http.post("" + this.entityUrl, entity).pipe(this.defaultCatch());
|
|
3281
|
+
};
|
|
3282
|
+
EntityService.prototype.update = function (id, entity) {
|
|
3283
|
+
return this.http.put(this.entityUrl + "/" + id, entity).pipe(this.defaultCatch());
|
|
3284
|
+
};
|
|
3285
|
+
EntityService.prototype.delete = function (id) {
|
|
3286
|
+
return this.http.delete(this.entityUrl + "/" + id).pipe(this.defaultCatch());
|
|
3287
|
+
};
|
|
3288
|
+
EntityService.prototype.listCustomFilter = function (listParams, action) {
|
|
3289
|
+
return this.http.post(this.actionsUrl + "/" + action, this.getBodyParams(listParams)).pipe(this.defaultCatch());
|
|
3290
|
+
};
|
|
3291
|
+
return EntityService;
|
|
3292
|
+
}());
|
|
3293
|
+
|
|
3294
|
+
var EntityService$2 = /** @class */ (function (_super) {
|
|
3295
|
+
__extends(EntityService, _super);
|
|
3296
|
+
function EntityService() {
|
|
3297
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
3298
|
+
}
|
|
3299
|
+
return EntityService;
|
|
3300
|
+
}(EntityService$1));
|
|
3301
|
+
|
|
3302
|
+
var AgendaService = /** @class */ (function (_super) {
|
|
3303
|
+
__extends(AgendaService, _super);
|
|
3304
|
+
function AgendaService(http, messageService) {
|
|
3305
|
+
var _this = _super.call(this, http, messageService, 'yms/agenda/entities/agenda', '') || this;
|
|
3306
|
+
_this.http = http;
|
|
3307
|
+
_this.messageService = messageService;
|
|
3308
|
+
_this.url = 'yms/agenda/queries/isClienteExterno';
|
|
3309
|
+
return _this;
|
|
3310
|
+
}
|
|
3311
|
+
AgendaService.prototype.isClienteExterno = function () {
|
|
3312
|
+
return this.http.post("" + this.url, {});
|
|
3313
|
+
};
|
|
3314
|
+
AgendaService.ngInjectableDef = core.defineInjectable({ factory: function AgendaService_Factory() { return new AgendaService(core.inject(http.HttpClient), core.inject(messageservice.MessageService)); }, token: AgendaService, providedIn: "root" });
|
|
3315
|
+
AgendaService = __decorate([
|
|
3316
|
+
core.Injectable({ providedIn: 'root' }),
|
|
3317
|
+
__metadata("design:paramtypes", [http.HttpClient, messageservice.MessageService])
|
|
3318
|
+
], AgendaService);
|
|
3319
|
+
return AgendaService;
|
|
3320
|
+
}(EntityService$2));
|
|
3321
|
+
|
|
3200
3322
|
var DocumentGridComponent = /** @class */ (function () {
|
|
3201
|
-
function DocumentGridComponent(translate, documentService, messageService, confirmationService, integrationService) {
|
|
3323
|
+
function DocumentGridComponent(translate, documentService, messageService, confirmationService, integrationService, agendaService) {
|
|
3202
3324
|
this.translate = translate;
|
|
3203
3325
|
this.documentService = documentService;
|
|
3204
3326
|
this.messageService = messageService;
|
|
3205
3327
|
this.confirmationService = confirmationService;
|
|
3206
3328
|
this.integrationService = integrationService;
|
|
3329
|
+
this.agendaService = agendaService;
|
|
3207
3330
|
this.viewDocument = new core.EventEmitter();
|
|
3208
3331
|
this.gridData = [];
|
|
3332
|
+
this.enableButtonIsClienteExterno = true;
|
|
3209
3333
|
this.ngUnsubscribe = new rxjs.Subject();
|
|
3210
3334
|
this.selection = [];
|
|
3211
3335
|
}
|
|
3212
3336
|
DocumentGridComponent.prototype.ngOnInit = function () {
|
|
3337
|
+
this.verifyClienteExterno();
|
|
3213
3338
|
this.getProcessTypeByScheduling();
|
|
3214
3339
|
this.listDocuments();
|
|
3215
3340
|
};
|
|
3216
3341
|
DocumentGridComponent.prototype.ngAfterContentChecked = function () {
|
|
3217
3342
|
this.gridColumns = this.getGridColumns();
|
|
3218
3343
|
};
|
|
3344
|
+
DocumentGridComponent.prototype.verifyClienteExterno = function () {
|
|
3345
|
+
var _this = this;
|
|
3346
|
+
this.agendaService.isClienteExterno()
|
|
3347
|
+
.subscribe(function (result) {
|
|
3348
|
+
_this.isClienteExterno = result.isClienteExterno;
|
|
3349
|
+
_this.cantEditStatus();
|
|
3350
|
+
});
|
|
3351
|
+
};
|
|
3219
3352
|
DocumentGridComponent.prototype.getProcessTypeByScheduling = function () {
|
|
3220
3353
|
var _this = this;
|
|
3221
3354
|
this.integrationService.getProcessTypeByScheduling(this.agenda.tipoAgendamento.id)
|
|
@@ -3225,10 +3358,22 @@
|
|
|
3225
3358
|
this.gridData.push(document);
|
|
3226
3359
|
this.disabled = false;
|
|
3227
3360
|
};
|
|
3361
|
+
DocumentGridComponent.prototype.cantEditStatus = function () {
|
|
3362
|
+
var cantEditStatus = [
|
|
3363
|
+
'CANCELADO',
|
|
3364
|
+
'EM_EXECUCAO',
|
|
3365
|
+
'CONCLUIDO',
|
|
3366
|
+
'AGUARDANDO_POR_VALIDACAO'
|
|
3367
|
+
].includes(this.agenda.status.toString());
|
|
3368
|
+
if (cantEditStatus) {
|
|
3369
|
+
this.enableButtonIsClienteExterno = false;
|
|
3370
|
+
}
|
|
3371
|
+
};
|
|
3228
3372
|
DocumentGridComponent.prototype.getActions = function () {
|
|
3229
3373
|
var _this = this;
|
|
3230
3374
|
return [
|
|
3231
3375
|
{
|
|
3376
|
+
disabled: this.checkWmsSystemInvalid(),
|
|
3232
3377
|
label: this.translate.instant("yms.int.wms_search"),
|
|
3233
3378
|
command: function () {
|
|
3234
3379
|
_this.selection = [];
|
|
@@ -3237,6 +3382,7 @@
|
|
|
3237
3382
|
icon: "fa fa-search"
|
|
3238
3383
|
},
|
|
3239
3384
|
{
|
|
3385
|
+
disabled: this.checkWmsSystemInvalid(),
|
|
3240
3386
|
label: this.translate.instant("yms.int.wms_add_document_register"),
|
|
3241
3387
|
command: function () {
|
|
3242
3388
|
_this.selection = [];
|
|
@@ -3247,6 +3393,12 @@
|
|
|
3247
3393
|
}
|
|
3248
3394
|
];
|
|
3249
3395
|
};
|
|
3396
|
+
DocumentGridComponent.prototype.checkWmsSystemInvalid = function () {
|
|
3397
|
+
if (this.wmsSystem && this.wmsSystem === WmsSystem.NONE) {
|
|
3398
|
+
return true;
|
|
3399
|
+
}
|
|
3400
|
+
return false;
|
|
3401
|
+
};
|
|
3250
3402
|
DocumentGridComponent.prototype.getProp = function (obj, path) {
|
|
3251
3403
|
return path.split(".").reduce(function (result, prop) { return (result[prop] === undefined ? "" : result[prop]); }, obj);
|
|
3252
3404
|
};
|
|
@@ -3423,14 +3575,15 @@
|
|
|
3423
3575
|
DocumentGridComponent = __decorate([
|
|
3424
3576
|
core.Component({
|
|
3425
3577
|
selector: 'document-grid',
|
|
3426
|
-
template: "<div *ngIf=\"this.processType === 'RECEBIMENTO_WMS'; else processNotConfigured\">\n <p-panel>\n <p-header>\n <div class=\"buttons\">\n <div>\n <s-button\n label=\"{{'yms.int.wms_add_document' | translate}}\"\n priority=\"primary\"\n [model]=\"getActions()\"\n [auxiliary]=\"false\">\n </s-button>\n <s-button\n label=\"{{'yms.wms_view_button' | translate}}\"\n priority=\"secondary\"\n [auxiliary]=\"false\"\n [disabled]=\"!selection || selection.length !== 1\"\n (onClick)=\"view()\">\n </s-button>\n <s-button\n label=\"{{'yms.wms_delete_button' | translate}}\"\n priority=\"secondary\"\n [disabled]=\"!selection || !selection.length\"\n (click)=\"onDelete()\">\n </s-button>\n </div>\n <s-button\n id=\"refresh-button\"\n priority=\"default\"\n iconClass=\"fa fa-refresh\"\n (onClick)=\"listDocuments()\"\n >\n </s-button>\n </div>\n </p-header>\n <div class=\"ui-g\">\n <div class=\"ui-g-12\" *ngIf=\"gridData && gridData.length; else emptyList\">\n <p-table #documentTable [value]=\"gridData\"\n [columns]=\"gridColumns\" dataKey=\"id\" [lazy]=\"true\" [scrollable]=\"true\" [resizableColumns]=\"true\"\n sortMode=\"multiple\" [paginator]=\"true\" [totalRecords]=\"documentTotalRecords\" rows=\"10\"\n [rowsPerPageOptions]=\"[10, 20, 50, 100]\" [(selection)]=\"selection\"\n [loading]=\"loading\">\n <ng-template pTemplate=\"colgroup\" let-columns>\n <colgroup>\n <col *ngFor=\"let col of columns\" [style.width]=\"col.width\"/>\n </colgroup>\n </ng-template>\n <ng-template pTemplate=\"header\" let-columns>\n <tr>\n <th id=\"checkbox\" class=\"table-checkbox\">\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\n </th>\n <th id=\"col\" *ngFor=\"let col of columns\" [pSortableColumn]=\"col.field\" pResizableColumn>\n <div class=\"senior-header\">\n <span class=\"senior-header-title\">{{ col.header }}</span>\n <p-sortIcon [field]=\"col.field\"></p-sortIcon>\n </div>\n </th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-rowData let-columns let-expanded=\"expanded\">\n <tr [pSelectableRow]=\"rowData\">\n <td class=\"table-checkbox\">\n <p-tableCheckbox [value]=\"rowData\"></p-tableCheckbox>\n </td>\n <td *ngFor=\"let column of getGridColumns()\" (click)=\"selection = [rowData]\">\n <span>{{ rowData[ column.field ] }}</span>\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"paginatorright\">\n <span [translate]=\"'total_records'\" [translateParams]=\"{ value: documentTotalRecords }\"></span>\n </ng-template>\n </p-table> \n </div>\n </div>\n <register-document\n [wmsSystem]=\"wmsSystem\"\n [edit]=\"edit\"\n [viewDocument]=\"selection\"\n (document)=\"onChangeDocument($event)\"\n [(visible)]=\"visibleDocumentRegister\"\n [agenda]=\"agenda\">\n </register-document> \n <insert-key [wmsSystem]=\"wmsSystem\" \n (document)=\"onChangeDocument($event)\" [(visible)]=\"visibleInvoiceKey\"></insert-key>\n </p-panel>\n</div>\n <div class=\"button-save\">\n <s-button \n priority=\"primary\" [label]=\"'save' | translate\"
|
|
3578
|
+
template: "<div *ngIf=\"this.processType === 'RECEBIMENTO_WMS'; else processNotConfigured\">\n <p-panel>\n <p-header>\n <div class=\"buttons\">\n <div>\n <s-button\n label=\"{{'yms.int.wms_add_document' | translate}}\"\n priority=\"primary\"\n [model]=\"getActions()\"\n [auxiliary]=\"false\"\n [disabled]=\"!enableButtonIsClienteExterno\">\n </s-button>\n <s-button\n label=\"{{'yms.wms_view_button' | translate}}\"\n priority=\"secondary\"\n [auxiliary]=\"false\"\n [disabled]=\"!selection || selection.length !== 1\"\n (onClick)=\"view()\">\n </s-button>\n <s-button\n label=\"{{'yms.wms_delete_button' | translate}}\"\n priority=\"secondary\"\n [disabled]=\"!selection || !selection.length || !enableButtonIsClienteExterno\"\n (click)=\"onDelete()\">\n </s-button>\n </div>\n <s-button\n id=\"refresh-button\"\n priority=\"default\"\n iconClass=\"fa fa-refresh\"\n (onClick)=\"listDocuments()\"\n >\n </s-button>\n </div>\n </p-header>\n <div class=\"ui-g\">\n <div class=\"ui-g-12\" *ngIf=\"gridData && gridData.length; else emptyList\">\n <p-table #documentTable [value]=\"gridData\"\n [columns]=\"gridColumns\" dataKey=\"id\" [lazy]=\"true\" [scrollable]=\"true\" [resizableColumns]=\"true\"\n sortMode=\"multiple\" [paginator]=\"true\" [totalRecords]=\"documentTotalRecords\" rows=\"10\"\n [rowsPerPageOptions]=\"[10, 20, 50, 100]\" [(selection)]=\"selection\"\n [loading]=\"loading\">\n <ng-template pTemplate=\"colgroup\" let-columns>\n <colgroup>\n <col *ngFor=\"let col of columns\" [style.width]=\"col.width\"/>\n </colgroup>\n </ng-template>\n <ng-template pTemplate=\"header\" let-columns>\n <tr>\n <th id=\"checkbox\" class=\"table-checkbox\">\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\n </th>\n <th id=\"col\" *ngFor=\"let col of columns\" [pSortableColumn]=\"col.field\" pResizableColumn>\n <div class=\"senior-header\">\n <span class=\"senior-header-title\">{{ col.header }}</span>\n <p-sortIcon [field]=\"col.field\"></p-sortIcon>\n </div>\n </th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-rowData let-columns let-expanded=\"expanded\">\n <tr [pSelectableRow]=\"rowData\">\n <td class=\"table-checkbox\">\n <p-tableCheckbox [value]=\"rowData\"></p-tableCheckbox>\n </td>\n <td *ngFor=\"let column of getGridColumns()\" (click)=\"selection = [rowData]\">\n <span>{{ rowData[ column.field ] }}</span>\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"paginatorright\">\n <span [translate]=\"'total_records'\" [translateParams]=\"{ value: documentTotalRecords }\"></span>\n </ng-template>\n </p-table> \n </div>\n </div>\n <register-document\n [wmsSystem]=\"wmsSystem\"\n [edit]=\"edit\"\n [viewDocument]=\"selection\"\n (document)=\"onChangeDocument($event)\"\n [(visible)]=\"visibleDocumentRegister\"\n [agenda]=\"agenda\">\n </register-document> \n <insert-key [wmsSystem]=\"wmsSystem\" \n (document)=\"onChangeDocument($event)\" [(visible)]=\"visibleInvoiceKey\"></insert-key>\n </p-panel>\n</div>\n <div class=\"button-save\">\n <s-button \n priority=\"primary\" [label]=\"'save' | translate\"\n [disabled]=\"disabled || !this.gridData || !enableButtonIsClienteExterno\"\n (click)=\"save()\">\n </s-button>\n </div>\n <register-document\n [wmsSystem]=\"wmsSystem\"\n [edit]=\"edit\"\n [viewDocument]=\"selection\"\n (document)=\"onChangeDocument($event)\"\n [(visible)]=\"visibleDocumentRegister\"\n [agenda]=\"agenda\">\n </register-document> \n <insert-key [wmsSystem]=\"wmsSystem\" \n (document)=\"onChangeDocument($event)\" [(visible)]=\"visibleInvoiceKey\"></insert-key>\n\n<ng-template #emptyList>\n <div class=\"center\">\n <s-empty-state\n iconClass=\"fa fa-exclamation-triangle\" [title]=\"'detail_empty_state_title' | translate\"\n [description]=\"'detail_empty_state_description' | translate\">\n </s-empty-state>\n </div>\n</ng-template>\n\n<ng-template #processNotConfigured>\n <div class=\"center\">\n <s-empty-state\n iconClass=\"fa fa-exclamation-triangle\"\n [title]=\"'yms.int.wms_there_no_process_type_configured_for_this_type_scheduling' | translate\"\n >\n </s-empty-state>\n </div>\n</ng-template>",
|
|
3427
3579
|
styles: [".buttons{display:flex;justify-content:space-between}.center{flex-direction:column;text-align:center}.ui-g{display:block}.button-save{margin:5px 0}#refresh-button{color:#fff}.table-checkbox{width:50px}"]
|
|
3428
3580
|
}),
|
|
3429
3581
|
__metadata("design:paramtypes", [core$1.TranslateService,
|
|
3430
3582
|
DocumentService,
|
|
3431
3583
|
api.MessageService,
|
|
3432
3584
|
api.ConfirmationService,
|
|
3433
|
-
IntegrationService
|
|
3585
|
+
IntegrationService,
|
|
3586
|
+
AgendaService])
|
|
3434
3587
|
], DocumentGridComponent);
|
|
3435
3588
|
return DocumentGridComponent;
|
|
3436
3589
|
}());
|
|
@@ -3932,103 +4085,9 @@
|
|
|
3932
4085
|
return DocumentListModule;
|
|
3933
4086
|
}());
|
|
3934
4087
|
|
|
3935
|
-
var EntityService$1 = /** @class */ (function () {
|
|
3936
|
-
function EntityService(http, messageService, entityUrl, actionsUrl) {
|
|
3937
|
-
this.http = http;
|
|
3938
|
-
this.messageService = messageService;
|
|
3939
|
-
this.entityUrl = entityUrl;
|
|
3940
|
-
this.actionsUrl = actionsUrl;
|
|
3941
|
-
this.http = http;
|
|
3942
|
-
this.messageService = messageService;
|
|
3943
|
-
this.entityUrl = entityUrl;
|
|
3944
|
-
this.actionsUrl = actionsUrl;
|
|
3945
|
-
this.defaultCatch = this.defaultCatch.bind(this);
|
|
3946
|
-
}
|
|
3947
|
-
EntityService.prototype.getListQueryParams = function (listParams) {
|
|
3948
|
-
var _a = listParams.page, page = _a === void 0 ? 0 : _a, _b = listParams.size, size = _b === void 0 ? 10 : _b, _c = listParams.sort, sort = _c === void 0 ? [] : _c, _d = listParams.filterQuery, filterQuery = _d === void 0 ? "" : _d, _e = listParams.displayFields, displayFields = _e === void 0 ? [] : _e;
|
|
3949
|
-
var params = new http.HttpParams();
|
|
3950
|
-
params = params.append("size", String(size));
|
|
3951
|
-
params = params.append("offset", String(page));
|
|
3952
|
-
if (sort && sort.length) {
|
|
3953
|
-
params = params.append("orderby", sort
|
|
3954
|
-
.map(function (s) {
|
|
3955
|
-
var order = "";
|
|
3956
|
-
if (s.order === 1)
|
|
3957
|
-
order = " asc";
|
|
3958
|
-
else if (s.order === -1)
|
|
3959
|
-
order = " desc";
|
|
3960
|
-
return "" + s.field + order;
|
|
3961
|
-
})
|
|
3962
|
-
.join(", "));
|
|
3963
|
-
}
|
|
3964
|
-
if (filterQuery)
|
|
3965
|
-
params = params.append("filter", filterQuery);
|
|
3966
|
-
if (displayFields && displayFields.length)
|
|
3967
|
-
params = params.append("displayfields", displayFields.join());
|
|
3968
|
-
return params;
|
|
3969
|
-
};
|
|
3970
|
-
EntityService.prototype.getBodyParams = function (listParams) {
|
|
3971
|
-
var _a = listParams.page, page = _a === void 0 ? 0 : _a, _b = listParams.size, size = _b === void 0 ? 10 : _b, _c = listParams.sort, sort = _c === void 0 ? [] : _c, _d = listParams.filterQuery, filterQuery = _d === void 0 ? "" : _d, _e = listParams.displayFields, displayFields = _e === void 0 ? [] : _e;
|
|
3972
|
-
var bodyParams = {};
|
|
3973
|
-
bodyParams.size = size;
|
|
3974
|
-
bodyParams.offset = page;
|
|
3975
|
-
if (sort && sort.length) {
|
|
3976
|
-
bodyParams.orderBy = sort
|
|
3977
|
-
.map(function (s) {
|
|
3978
|
-
var order = "";
|
|
3979
|
-
if (s.order === 1)
|
|
3980
|
-
order = " asc";
|
|
3981
|
-
else if (s.order === -1)
|
|
3982
|
-
order = " desc";
|
|
3983
|
-
return "" + s.field + order;
|
|
3984
|
-
})
|
|
3985
|
-
.join(", ");
|
|
3986
|
-
}
|
|
3987
|
-
if (filterQuery)
|
|
3988
|
-
bodyParams.filter = filterQuery;
|
|
3989
|
-
if (displayFields && displayFields.length)
|
|
3990
|
-
bodyParams.displayfields = displayFields.join();
|
|
3991
|
-
return bodyParams;
|
|
3992
|
-
};
|
|
3993
|
-
EntityService.prototype.defaultCatch = function () {
|
|
3994
|
-
var _this = this;
|
|
3995
|
-
return operators.catchError(function (err) {
|
|
3996
|
-
if (err) {
|
|
3997
|
-
var summary = err.status ? String(err.status) : "Error";
|
|
3998
|
-
var detail = (err.error && err.error.message) || err.statusText || err.message || "Error";
|
|
3999
|
-
_this.messageService.add({
|
|
4000
|
-
severity: "error",
|
|
4001
|
-
summary: summary,
|
|
4002
|
-
detail: detail,
|
|
4003
|
-
});
|
|
4004
|
-
}
|
|
4005
|
-
return rxjs.throwError(err);
|
|
4006
|
-
});
|
|
4007
|
-
};
|
|
4008
|
-
EntityService.prototype.list = function (listParams) {
|
|
4009
|
-
return this.http.get(this.entityUrl, { params: this.getListQueryParams(listParams) }).pipe(this.defaultCatch());
|
|
4010
|
-
};
|
|
4011
|
-
EntityService.prototype.get = function (id) {
|
|
4012
|
-
return this.http.get(this.entityUrl + "/" + id).pipe(this.defaultCatch());
|
|
4013
|
-
};
|
|
4014
|
-
EntityService.prototype.insert = function (entity) {
|
|
4015
|
-
return this.http.post("" + this.entityUrl, entity).pipe(this.defaultCatch());
|
|
4016
|
-
};
|
|
4017
|
-
EntityService.prototype.update = function (id, entity) {
|
|
4018
|
-
return this.http.put(this.entityUrl + "/" + id, entity).pipe(this.defaultCatch());
|
|
4019
|
-
};
|
|
4020
|
-
EntityService.prototype.delete = function (id) {
|
|
4021
|
-
return this.http.delete(this.entityUrl + "/" + id).pipe(this.defaultCatch());
|
|
4022
|
-
};
|
|
4023
|
-
EntityService.prototype.listCustomFilter = function (listParams, action) {
|
|
4024
|
-
return this.http.post(this.actionsUrl + "/" + action, this.getBodyParams(listParams)).pipe(this.defaultCatch());
|
|
4025
|
-
};
|
|
4026
|
-
return EntityService;
|
|
4027
|
-
}());
|
|
4028
|
-
|
|
4029
4088
|
var ERP_ENVIRONMENT = new core.InjectionToken('integration_environment');
|
|
4030
4089
|
|
|
4031
|
-
var AgendaService = /** @class */ (function (_super) {
|
|
4090
|
+
var AgendaService$1 = /** @class */ (function (_super) {
|
|
4032
4091
|
__extends(AgendaService, _super);
|
|
4033
4092
|
function AgendaService(http, messageService, environment) {
|
|
4034
4093
|
var _this = _super.call(this, http, messageService, environment.project.domain + "/" + environment.project.service + "/entities/agenda", environment.project.domain + "/" + environment.project.service + "/actions") || this;
|
|
@@ -4129,7 +4188,7 @@
|
|
|
4129
4188
|
RecebimentoChegadaVeiculoOverride = __decorate([
|
|
4130
4189
|
core.Injectable(),
|
|
4131
4190
|
__metadata("design:paramtypes", [ymsRoutines.ChegadaVeiculoOverride,
|
|
4132
|
-
AgendaService,
|
|
4191
|
+
AgendaService$1,
|
|
4133
4192
|
RecebimentoContratoService])
|
|
4134
4193
|
], RecebimentoChegadaVeiculoOverride);
|
|
4135
4194
|
return RecebimentoChegadaVeiculoOverride;
|
|
@@ -4193,7 +4252,7 @@
|
|
|
4193
4252
|
ExpedicaoChegadaVeiculoOverride = __decorate([
|
|
4194
4253
|
core.Injectable(),
|
|
4195
4254
|
__metadata("design:paramtypes", [ymsRoutines.ChegadaVeiculoOverride,
|
|
4196
|
-
AgendaService,
|
|
4255
|
+
AgendaService$1,
|
|
4197
4256
|
ExpedicaoService])
|
|
4198
4257
|
], ExpedicaoChegadaVeiculoOverride);
|
|
4199
4258
|
return ExpedicaoChegadaVeiculoOverride;
|
|
@@ -5240,7 +5299,7 @@
|
|
|
5240
5299
|
]),
|
|
5241
5300
|
],
|
|
5242
5301
|
providers: [
|
|
5243
|
-
AgendaService,
|
|
5302
|
+
AgendaService$1,
|
|
5244
5303
|
],
|
|
5245
5304
|
declarations: [
|
|
5246
5305
|
/*{CA:MODULE_DECLARATIONS:START}*/
|
|
@@ -7107,7 +7166,7 @@
|
|
|
7107
7166
|
DevolucaoChegadaVeiculoOverride = __decorate([
|
|
7108
7167
|
core.Injectable(),
|
|
7109
7168
|
__metadata("design:paramtypes", [ymsRoutines.ChegadaVeiculoOverride,
|
|
7110
|
-
AgendaService,
|
|
7169
|
+
AgendaService$1,
|
|
7111
7170
|
DevolucaoService])
|
|
7112
7171
|
], DevolucaoChegadaVeiculoOverride);
|
|
7113
7172
|
return DevolucaoChegadaVeiculoOverride;
|
|
@@ -8072,7 +8131,7 @@
|
|
|
8072
8131
|
router.ActivatedRoute,
|
|
8073
8132
|
DevolucaoChegadaVeiculoOverride,
|
|
8074
8133
|
api.ConfirmationService,
|
|
8075
|
-
AgendaService,
|
|
8134
|
+
AgendaService$1,
|
|
8076
8135
|
ErpProcessService,
|
|
8077
8136
|
ErpFormConfigService,
|
|
8078
8137
|
HasChangeService])
|
|
@@ -9653,7 +9712,7 @@
|
|
|
9653
9712
|
TransportadoraService,
|
|
9654
9713
|
PedidoVendaService,
|
|
9655
9714
|
PedidoVendaItemService,
|
|
9656
|
-
AgendaService,
|
|
9715
|
+
AgendaService$1,
|
|
9657
9716
|
ExpedicaoChegadaVeiculoOverride,
|
|
9658
9717
|
api.ConfirmationService,
|
|
9659
9718
|
ErpProcessService,
|
|
@@ -9934,7 +9993,7 @@
|
|
|
9934
9993
|
ProcessoAvulsoChegadaVeiculoOverride = __decorate([
|
|
9935
9994
|
core.Injectable(),
|
|
9936
9995
|
__metadata("design:paramtypes", [ymsRoutines.ChegadaVeiculoOverride,
|
|
9937
|
-
AgendaService,
|
|
9996
|
+
AgendaService$1,
|
|
9938
9997
|
ProcessoAvulsoService])
|
|
9939
9998
|
], ProcessoAvulsoChegadaVeiculoOverride);
|
|
9940
9999
|
return ProcessoAvulsoChegadaVeiculoOverride;
|
|
@@ -10240,7 +10299,7 @@
|
|
|
10240
10299
|
ProcessoAvulsoChegadaVeiculoOverride,
|
|
10241
10300
|
core$1.TranslateService,
|
|
10242
10301
|
api.ConfirmationService,
|
|
10243
|
-
AgendaService,
|
|
10302
|
+
AgendaService$1,
|
|
10244
10303
|
ErpProcessService,
|
|
10245
10304
|
ErpFormConfigService,
|
|
10246
10305
|
HasChangeService])
|
|
@@ -10429,7 +10488,7 @@
|
|
|
10429
10488
|
RecebimentoOrdemCompraChegadaVeiculoOverride = __decorate([
|
|
10430
10489
|
core.Injectable(),
|
|
10431
10490
|
__metadata("design:paramtypes", [ymsRoutines.ChegadaVeiculoOverride,
|
|
10432
|
-
AgendaService,
|
|
10491
|
+
AgendaService$1,
|
|
10433
10492
|
RecebimentoOrdemCompraService])
|
|
10434
10493
|
], RecebimentoOrdemCompraChegadaVeiculoOverride);
|
|
10435
10494
|
return RecebimentoOrdemCompraChegadaVeiculoOverride;
|
|
@@ -11610,7 +11669,7 @@
|
|
|
11610
11669
|
NotaValidatorService,
|
|
11611
11670
|
api.ConfirmationService,
|
|
11612
11671
|
api.DialogService,
|
|
11613
|
-
AgendaService,
|
|
11672
|
+
AgendaService$1,
|
|
11614
11673
|
ErpProcessService,
|
|
11615
11674
|
ErpFormConfigService,
|
|
11616
11675
|
VerificaNotafiscal,
|
|
@@ -13957,7 +14016,7 @@
|
|
|
13957
14016
|
NotaValidatorService,
|
|
13958
14017
|
TransgeniaService,
|
|
13959
14018
|
api.DialogService,
|
|
13960
|
-
AgendaService,
|
|
14019
|
+
AgendaService$1,
|
|
13961
14020
|
ErpProcessService,
|
|
13962
14021
|
ErpFormConfigService,
|
|
13963
14022
|
VerificaNotafiscal,
|
|
@@ -14123,7 +14182,7 @@
|
|
|
14123
14182
|
}());
|
|
14124
14183
|
|
|
14125
14184
|
exports.AgendaModule = AgendaModule;
|
|
14126
|
-
exports.AgendaService = AgendaService;
|
|
14185
|
+
exports.AgendaService = AgendaService$1;
|
|
14127
14186
|
exports.BalancaModule = BalancaModule;
|
|
14128
14187
|
exports.BalancasService = BalancasService;
|
|
14129
14188
|
exports.CamerasModule = CamerasModule;
|
|
@@ -14219,50 +14278,52 @@
|
|
|
14219
14278
|
exports.highlightLanguages = highlightLanguages;
|
|
14220
14279
|
exports.ɵa = Service;
|
|
14221
14280
|
exports.ɵb = CustomStompConfig;
|
|
14222
|
-
exports.ɵba =
|
|
14223
|
-
exports.ɵbb =
|
|
14224
|
-
exports.ɵbc =
|
|
14225
|
-
exports.ɵbd =
|
|
14226
|
-
exports.ɵbe =
|
|
14227
|
-
exports.ɵbf =
|
|
14228
|
-
exports.ɵbg =
|
|
14229
|
-
exports.ɵbh =
|
|
14230
|
-
exports.ɵbi =
|
|
14231
|
-
exports.ɵbj =
|
|
14232
|
-
exports.ɵbk =
|
|
14233
|
-
exports.ɵbl =
|
|
14234
|
-
exports.ɵbm =
|
|
14235
|
-
exports.ɵbn =
|
|
14236
|
-
exports.ɵbo =
|
|
14237
|
-
exports.ɵbp =
|
|
14238
|
-
exports.ɵbq =
|
|
14239
|
-
exports.ɵbr =
|
|
14240
|
-
exports.ɵbs =
|
|
14241
|
-
exports.ɵbt =
|
|
14242
|
-
exports.ɵbu =
|
|
14243
|
-
exports.ɵbv =
|
|
14244
|
-
exports.ɵbw =
|
|
14245
|
-
exports.ɵbx =
|
|
14246
|
-
exports.ɵby =
|
|
14247
|
-
exports.ɵbz =
|
|
14281
|
+
exports.ɵba = EntityService$2;
|
|
14282
|
+
exports.ɵbb = EntityService$1;
|
|
14283
|
+
exports.ɵbc = RegisterDocumentModule;
|
|
14284
|
+
exports.ɵbd = RegisterDocumentComponent;
|
|
14285
|
+
exports.ɵbe = InsertKeyModule;
|
|
14286
|
+
exports.ɵbf = InsertKeyComponent;
|
|
14287
|
+
exports.ɵbg = IntegrationService$1;
|
|
14288
|
+
exports.ɵbh = RecebimentoFormComponent;
|
|
14289
|
+
exports.ɵbi = DerivacaoService;
|
|
14290
|
+
exports.ɵbj = NotaValidatorService;
|
|
14291
|
+
exports.ɵbk = TransgeniaService;
|
|
14292
|
+
exports.ɵbl = VerificaNotafiscal;
|
|
14293
|
+
exports.ɵbm = BuildFormField;
|
|
14294
|
+
exports.ɵbn = ExpedicaoFormComponent;
|
|
14295
|
+
exports.ɵbo = ExpedicaoInfoComponent;
|
|
14296
|
+
exports.ɵbp = RecebimentoInfoComponent;
|
|
14297
|
+
exports.ɵbq = DevolucaoFormComponent;
|
|
14298
|
+
exports.ɵbr = DevolucaoService;
|
|
14299
|
+
exports.ɵbs = DevolucaoChegadaVeiculoOverride;
|
|
14300
|
+
exports.ɵbt = RecebimentoOrdemCompraFormComponent;
|
|
14301
|
+
exports.ɵbu = OrdemCompraService;
|
|
14302
|
+
exports.ɵbv = RecebimentoOrdemCompraService;
|
|
14303
|
+
exports.ɵbw = RecebimentoOrdemCompraChegadaVeiculoOverride;
|
|
14304
|
+
exports.ɵbx = RecebimentoOrdemCompraInfoComponent;
|
|
14305
|
+
exports.ɵby = DevolucaoInfoComponent;
|
|
14306
|
+
exports.ɵbz = ContratoFormComponent;
|
|
14248
14307
|
exports.ɵc = ViewImageComponent;
|
|
14249
|
-
exports.ɵca =
|
|
14250
|
-
exports.ɵcb =
|
|
14251
|
-
exports.ɵcc =
|
|
14252
|
-
exports.ɵcd =
|
|
14253
|
-
exports.ɵce =
|
|
14254
|
-
exports.ɵcf =
|
|
14255
|
-
exports.ɵcg =
|
|
14256
|
-
exports.ɵch =
|
|
14257
|
-
exports.ɵci =
|
|
14258
|
-
exports.ɵcj =
|
|
14259
|
-
exports.ɵck =
|
|
14260
|
-
exports.ɵcl =
|
|
14261
|
-
exports.ɵcm =
|
|
14262
|
-
exports.ɵcn =
|
|
14263
|
-
exports.ɵco =
|
|
14264
|
-
exports.ɵcp =
|
|
14265
|
-
exports.ɵcq =
|
|
14308
|
+
exports.ɵca = OrdemCompraFormComponent;
|
|
14309
|
+
exports.ɵcb = ProcessoAvulsoFormComponent;
|
|
14310
|
+
exports.ɵcc = ProcessoAvulsoService;
|
|
14311
|
+
exports.ɵcd = ProcessoAvulsoChegadaVeiculoOverride;
|
|
14312
|
+
exports.ɵce = ProcessoAvulsoInfoComponent;
|
|
14313
|
+
exports.ɵcf = LogIntegracaoDescritor;
|
|
14314
|
+
exports.ɵcg = LogIntegracaoComponent;
|
|
14315
|
+
exports.ɵch = LogIntegracaoService;
|
|
14316
|
+
exports.ɵci = DerivacaoModule;
|
|
14317
|
+
exports.ɵcj = DevolucaoModule;
|
|
14318
|
+
exports.ɵck = OrdemCompraModule;
|
|
14319
|
+
exports.ɵcl = RecebimentoOrdemCompraModule;
|
|
14320
|
+
exports.ɵcm = TransgeniaModule;
|
|
14321
|
+
exports.ɵcn = ProcessoAvulsoModule;
|
|
14322
|
+
exports.ɵco = LogIntegracaoModule;
|
|
14323
|
+
exports.ɵcp = NotaFormModule;
|
|
14324
|
+
exports.ɵcq = DirectivesModule;
|
|
14325
|
+
exports.ɵcr = TrimDirective;
|
|
14326
|
+
exports.ɵcs = NotaFormComponent;
|
|
14266
14327
|
exports.ɵd = LogDescritor;
|
|
14267
14328
|
exports.ɵe = LogsComponent;
|
|
14268
14329
|
exports.ɵf = PortariasService;
|
|
@@ -14285,7 +14346,7 @@
|
|
|
14285
14346
|
exports.ɵw = DocumentGridComponent;
|
|
14286
14347
|
exports.ɵx = DocumentService;
|
|
14287
14348
|
exports.ɵy = IntegrationService;
|
|
14288
|
-
exports.ɵz =
|
|
14349
|
+
exports.ɵz = AgendaService;
|
|
14289
14350
|
|
|
14290
14351
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
14291
14352
|
|