@seniorsistemas/yms-integration 1.29.1 → 1.30.0
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 +202 -157
- 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 +22 -4
- package/esm2015/src/wms/components/document-grid/insert-key/insert-key.component.js +1 -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 +23 -4
- package/esm5/src/wms/components/document-grid/insert-key/insert-key.component.js +1 -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 +147 -113
- package/fesm2015/seniorsistemas-yms-integration.js.map +1 -1
- package/fesm5/seniorsistemas-yms-integration.js +156 -113
- 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 +7 -1
- package/src/wms/entities/agenda/agenda.service.d.ts +17 -0
- package/src/wms/entities/entity-service.d.ts +3 -0
|
@@ -3138,25 +3138,158 @@ var DocumentService = /** @class */ (function (_super) {
|
|
|
3138
3138
|
return DocumentService;
|
|
3139
3139
|
}(EntityService));
|
|
3140
3140
|
|
|
3141
|
+
var EntityService$1 = /** @class */ (function () {
|
|
3142
|
+
function EntityService(http, messageService, entityUrl, actionsUrl) {
|
|
3143
|
+
this.http = http;
|
|
3144
|
+
this.messageService = messageService;
|
|
3145
|
+
this.entityUrl = entityUrl;
|
|
3146
|
+
this.actionsUrl = actionsUrl;
|
|
3147
|
+
this.http = http;
|
|
3148
|
+
this.messageService = messageService;
|
|
3149
|
+
this.entityUrl = entityUrl;
|
|
3150
|
+
this.actionsUrl = actionsUrl;
|
|
3151
|
+
this.defaultCatch = this.defaultCatch.bind(this);
|
|
3152
|
+
}
|
|
3153
|
+
EntityService.prototype.getListQueryParams = function (listParams) {
|
|
3154
|
+
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;
|
|
3155
|
+
var params = new HttpParams();
|
|
3156
|
+
params = params.append("size", String(size));
|
|
3157
|
+
params = params.append("offset", String(page));
|
|
3158
|
+
if (sort && sort.length) {
|
|
3159
|
+
params = params.append("orderby", sort
|
|
3160
|
+
.map(function (s) {
|
|
3161
|
+
var order = "";
|
|
3162
|
+
if (s.order === 1)
|
|
3163
|
+
order = " asc";
|
|
3164
|
+
else if (s.order === -1)
|
|
3165
|
+
order = " desc";
|
|
3166
|
+
return "" + s.field + order;
|
|
3167
|
+
})
|
|
3168
|
+
.join(", "));
|
|
3169
|
+
}
|
|
3170
|
+
if (filterQuery)
|
|
3171
|
+
params = params.append("filter", filterQuery);
|
|
3172
|
+
if (displayFields && displayFields.length)
|
|
3173
|
+
params = params.append("displayfields", displayFields.join());
|
|
3174
|
+
return params;
|
|
3175
|
+
};
|
|
3176
|
+
EntityService.prototype.getBodyParams = function (listParams) {
|
|
3177
|
+
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;
|
|
3178
|
+
var bodyParams = {};
|
|
3179
|
+
bodyParams.size = size;
|
|
3180
|
+
bodyParams.offset = page;
|
|
3181
|
+
if (sort && sort.length) {
|
|
3182
|
+
bodyParams.orderBy = sort
|
|
3183
|
+
.map(function (s) {
|
|
3184
|
+
var order = "";
|
|
3185
|
+
if (s.order === 1)
|
|
3186
|
+
order = " asc";
|
|
3187
|
+
else if (s.order === -1)
|
|
3188
|
+
order = " desc";
|
|
3189
|
+
return "" + s.field + order;
|
|
3190
|
+
})
|
|
3191
|
+
.join(", ");
|
|
3192
|
+
}
|
|
3193
|
+
if (filterQuery)
|
|
3194
|
+
bodyParams.filter = filterQuery;
|
|
3195
|
+
if (displayFields && displayFields.length)
|
|
3196
|
+
bodyParams.displayfields = displayFields.join();
|
|
3197
|
+
return bodyParams;
|
|
3198
|
+
};
|
|
3199
|
+
EntityService.prototype.defaultCatch = function () {
|
|
3200
|
+
var _this = this;
|
|
3201
|
+
return catchError(function (err) {
|
|
3202
|
+
if (err) {
|
|
3203
|
+
var summary = err.status ? String(err.status) : "Error";
|
|
3204
|
+
var detail = (err.error && err.error.message) || err.statusText || err.message || "Error";
|
|
3205
|
+
_this.messageService.add({
|
|
3206
|
+
severity: "error",
|
|
3207
|
+
summary: summary,
|
|
3208
|
+
detail: detail,
|
|
3209
|
+
});
|
|
3210
|
+
}
|
|
3211
|
+
return throwError(err);
|
|
3212
|
+
});
|
|
3213
|
+
};
|
|
3214
|
+
EntityService.prototype.list = function (listParams) {
|
|
3215
|
+
return this.http.get(this.entityUrl, { params: this.getListQueryParams(listParams) }).pipe(this.defaultCatch());
|
|
3216
|
+
};
|
|
3217
|
+
EntityService.prototype.get = function (id) {
|
|
3218
|
+
return this.http.get(this.entityUrl + "/" + id).pipe(this.defaultCatch());
|
|
3219
|
+
};
|
|
3220
|
+
EntityService.prototype.insert = function (entity) {
|
|
3221
|
+
return this.http.post("" + this.entityUrl, entity).pipe(this.defaultCatch());
|
|
3222
|
+
};
|
|
3223
|
+
EntityService.prototype.update = function (id, entity) {
|
|
3224
|
+
return this.http.put(this.entityUrl + "/" + id, entity).pipe(this.defaultCatch());
|
|
3225
|
+
};
|
|
3226
|
+
EntityService.prototype.delete = function (id) {
|
|
3227
|
+
return this.http.delete(this.entityUrl + "/" + id).pipe(this.defaultCatch());
|
|
3228
|
+
};
|
|
3229
|
+
EntityService.prototype.listCustomFilter = function (listParams, action) {
|
|
3230
|
+
return this.http.post(this.actionsUrl + "/" + action, this.getBodyParams(listParams)).pipe(this.defaultCatch());
|
|
3231
|
+
};
|
|
3232
|
+
return EntityService;
|
|
3233
|
+
}());
|
|
3234
|
+
|
|
3235
|
+
var EntityService$2 = /** @class */ (function (_super) {
|
|
3236
|
+
__extends(EntityService, _super);
|
|
3237
|
+
function EntityService() {
|
|
3238
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
3239
|
+
}
|
|
3240
|
+
return EntityService;
|
|
3241
|
+
}(EntityService$1));
|
|
3242
|
+
|
|
3243
|
+
var AgendaService = /** @class */ (function (_super) {
|
|
3244
|
+
__extends(AgendaService, _super);
|
|
3245
|
+
function AgendaService(http, messageService) {
|
|
3246
|
+
var _this = _super.call(this, http, messageService, 'yms/agenda/entities/agenda', '') || this;
|
|
3247
|
+
_this.http = http;
|
|
3248
|
+
_this.messageService = messageService;
|
|
3249
|
+
_this.url = 'yms/agenda/queries/isClienteExterno';
|
|
3250
|
+
return _this;
|
|
3251
|
+
}
|
|
3252
|
+
AgendaService.prototype.isClienteExterno = function () {
|
|
3253
|
+
return this.http.post("" + this.url, {});
|
|
3254
|
+
};
|
|
3255
|
+
AgendaService.ngInjectableDef = defineInjectable({ factory: function AgendaService_Factory() { return new AgendaService(inject(HttpClient), inject(MessageService$1)); }, token: AgendaService, providedIn: "root" });
|
|
3256
|
+
AgendaService = __decorate([
|
|
3257
|
+
Injectable({ providedIn: 'root' }),
|
|
3258
|
+
__metadata("design:paramtypes", [HttpClient, MessageService$1])
|
|
3259
|
+
], AgendaService);
|
|
3260
|
+
return AgendaService;
|
|
3261
|
+
}(EntityService$2));
|
|
3262
|
+
|
|
3141
3263
|
var DocumentGridComponent = /** @class */ (function () {
|
|
3142
|
-
function DocumentGridComponent(translate, documentService, messageService, confirmationService, integrationService) {
|
|
3264
|
+
function DocumentGridComponent(translate, documentService, messageService, confirmationService, integrationService, agendaService) {
|
|
3143
3265
|
this.translate = translate;
|
|
3144
3266
|
this.documentService = documentService;
|
|
3145
3267
|
this.messageService = messageService;
|
|
3146
3268
|
this.confirmationService = confirmationService;
|
|
3147
3269
|
this.integrationService = integrationService;
|
|
3270
|
+
this.agendaService = agendaService;
|
|
3148
3271
|
this.viewDocument = new EventEmitter();
|
|
3149
3272
|
this.gridData = [];
|
|
3273
|
+
this.enableButtonIsClienteExterno = true;
|
|
3150
3274
|
this.ngUnsubscribe = new Subject();
|
|
3151
3275
|
this.selection = [];
|
|
3152
3276
|
}
|
|
3153
3277
|
DocumentGridComponent.prototype.ngOnInit = function () {
|
|
3278
|
+
this.verifyClienteExterno();
|
|
3154
3279
|
this.getProcessTypeByScheduling();
|
|
3155
3280
|
this.listDocuments();
|
|
3156
3281
|
};
|
|
3157
3282
|
DocumentGridComponent.prototype.ngAfterContentChecked = function () {
|
|
3158
3283
|
this.gridColumns = this.getGridColumns();
|
|
3159
3284
|
};
|
|
3285
|
+
DocumentGridComponent.prototype.verifyClienteExterno = function () {
|
|
3286
|
+
var _this = this;
|
|
3287
|
+
this.agendaService.isClienteExterno()
|
|
3288
|
+
.subscribe(function (result) {
|
|
3289
|
+
_this.isClienteExterno = result.isClienteExterno;
|
|
3290
|
+
_this.cantEditStatus();
|
|
3291
|
+
});
|
|
3292
|
+
};
|
|
3160
3293
|
DocumentGridComponent.prototype.getProcessTypeByScheduling = function () {
|
|
3161
3294
|
var _this = this;
|
|
3162
3295
|
this.integrationService.getProcessTypeByScheduling(this.agenda.tipoAgendamento.id)
|
|
@@ -3166,6 +3299,12 @@ var DocumentGridComponent = /** @class */ (function () {
|
|
|
3166
3299
|
this.gridData.push(document);
|
|
3167
3300
|
this.disabled = false;
|
|
3168
3301
|
};
|
|
3302
|
+
DocumentGridComponent.prototype.cantEditStatus = function () {
|
|
3303
|
+
var cantEditStatus = ['CANCELADO', 'EM_EXECUCAO', 'CONCLUIDO'].includes(this.agenda.status.toString());
|
|
3304
|
+
if (cantEditStatus) {
|
|
3305
|
+
this.enableButtonIsClienteExterno = false;
|
|
3306
|
+
}
|
|
3307
|
+
};
|
|
3169
3308
|
DocumentGridComponent.prototype.getActions = function () {
|
|
3170
3309
|
var _this = this;
|
|
3171
3310
|
return [
|
|
@@ -3364,14 +3503,15 @@ var DocumentGridComponent = /** @class */ (function () {
|
|
|
3364
3503
|
DocumentGridComponent = __decorate([
|
|
3365
3504
|
Component({
|
|
3366
3505
|
selector: 'document-grid',
|
|
3367
|
-
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\"
|
|
3506
|
+
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>",
|
|
3368
3507
|
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}"]
|
|
3369
3508
|
}),
|
|
3370
3509
|
__metadata("design:paramtypes", [TranslateService,
|
|
3371
3510
|
DocumentService,
|
|
3372
3511
|
MessageService,
|
|
3373
3512
|
ConfirmationService,
|
|
3374
|
-
IntegrationService
|
|
3513
|
+
IntegrationService,
|
|
3514
|
+
AgendaService])
|
|
3375
3515
|
], DocumentGridComponent);
|
|
3376
3516
|
return DocumentGridComponent;
|
|
3377
3517
|
}());
|
|
@@ -3601,9 +3741,6 @@ var InsertKeyComponent = /** @class */ (function () {
|
|
|
3601
3741
|
};
|
|
3602
3742
|
InsertKeyComponent.prototype.add = function () {
|
|
3603
3743
|
this.visibleChange.emit(false);
|
|
3604
|
-
if (!this.formGroup.get('key').value) {
|
|
3605
|
-
return;
|
|
3606
|
-
}
|
|
3607
3744
|
this.searchKey();
|
|
3608
3745
|
};
|
|
3609
3746
|
InsertKeyComponent.prototype.searchKey = function () {
|
|
@@ -3876,103 +4013,9 @@ var DocumentListModule = /** @class */ (function () {
|
|
|
3876
4013
|
return DocumentListModule;
|
|
3877
4014
|
}());
|
|
3878
4015
|
|
|
3879
|
-
var EntityService$1 = /** @class */ (function () {
|
|
3880
|
-
function EntityService(http, messageService, entityUrl, actionsUrl) {
|
|
3881
|
-
this.http = http;
|
|
3882
|
-
this.messageService = messageService;
|
|
3883
|
-
this.entityUrl = entityUrl;
|
|
3884
|
-
this.actionsUrl = actionsUrl;
|
|
3885
|
-
this.http = http;
|
|
3886
|
-
this.messageService = messageService;
|
|
3887
|
-
this.entityUrl = entityUrl;
|
|
3888
|
-
this.actionsUrl = actionsUrl;
|
|
3889
|
-
this.defaultCatch = this.defaultCatch.bind(this);
|
|
3890
|
-
}
|
|
3891
|
-
EntityService.prototype.getListQueryParams = function (listParams) {
|
|
3892
|
-
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;
|
|
3893
|
-
var params = new HttpParams();
|
|
3894
|
-
params = params.append("size", String(size));
|
|
3895
|
-
params = params.append("offset", String(page));
|
|
3896
|
-
if (sort && sort.length) {
|
|
3897
|
-
params = params.append("orderby", sort
|
|
3898
|
-
.map(function (s) {
|
|
3899
|
-
var order = "";
|
|
3900
|
-
if (s.order === 1)
|
|
3901
|
-
order = " asc";
|
|
3902
|
-
else if (s.order === -1)
|
|
3903
|
-
order = " desc";
|
|
3904
|
-
return "" + s.field + order;
|
|
3905
|
-
})
|
|
3906
|
-
.join(", "));
|
|
3907
|
-
}
|
|
3908
|
-
if (filterQuery)
|
|
3909
|
-
params = params.append("filter", filterQuery);
|
|
3910
|
-
if (displayFields && displayFields.length)
|
|
3911
|
-
params = params.append("displayfields", displayFields.join());
|
|
3912
|
-
return params;
|
|
3913
|
-
};
|
|
3914
|
-
EntityService.prototype.getBodyParams = function (listParams) {
|
|
3915
|
-
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;
|
|
3916
|
-
var bodyParams = {};
|
|
3917
|
-
bodyParams.size = size;
|
|
3918
|
-
bodyParams.offset = page;
|
|
3919
|
-
if (sort && sort.length) {
|
|
3920
|
-
bodyParams.orderBy = sort
|
|
3921
|
-
.map(function (s) {
|
|
3922
|
-
var order = "";
|
|
3923
|
-
if (s.order === 1)
|
|
3924
|
-
order = " asc";
|
|
3925
|
-
else if (s.order === -1)
|
|
3926
|
-
order = " desc";
|
|
3927
|
-
return "" + s.field + order;
|
|
3928
|
-
})
|
|
3929
|
-
.join(", ");
|
|
3930
|
-
}
|
|
3931
|
-
if (filterQuery)
|
|
3932
|
-
bodyParams.filter = filterQuery;
|
|
3933
|
-
if (displayFields && displayFields.length)
|
|
3934
|
-
bodyParams.displayfields = displayFields.join();
|
|
3935
|
-
return bodyParams;
|
|
3936
|
-
};
|
|
3937
|
-
EntityService.prototype.defaultCatch = function () {
|
|
3938
|
-
var _this = this;
|
|
3939
|
-
return catchError(function (err) {
|
|
3940
|
-
if (err) {
|
|
3941
|
-
var summary = err.status ? String(err.status) : "Error";
|
|
3942
|
-
var detail = (err.error && err.error.message) || err.statusText || err.message || "Error";
|
|
3943
|
-
_this.messageService.add({
|
|
3944
|
-
severity: "error",
|
|
3945
|
-
summary: summary,
|
|
3946
|
-
detail: detail,
|
|
3947
|
-
});
|
|
3948
|
-
}
|
|
3949
|
-
return throwError(err);
|
|
3950
|
-
});
|
|
3951
|
-
};
|
|
3952
|
-
EntityService.prototype.list = function (listParams) {
|
|
3953
|
-
return this.http.get(this.entityUrl, { params: this.getListQueryParams(listParams) }).pipe(this.defaultCatch());
|
|
3954
|
-
};
|
|
3955
|
-
EntityService.prototype.get = function (id) {
|
|
3956
|
-
return this.http.get(this.entityUrl + "/" + id).pipe(this.defaultCatch());
|
|
3957
|
-
};
|
|
3958
|
-
EntityService.prototype.insert = function (entity) {
|
|
3959
|
-
return this.http.post("" + this.entityUrl, entity).pipe(this.defaultCatch());
|
|
3960
|
-
};
|
|
3961
|
-
EntityService.prototype.update = function (id, entity) {
|
|
3962
|
-
return this.http.put(this.entityUrl + "/" + id, entity).pipe(this.defaultCatch());
|
|
3963
|
-
};
|
|
3964
|
-
EntityService.prototype.delete = function (id) {
|
|
3965
|
-
return this.http.delete(this.entityUrl + "/" + id).pipe(this.defaultCatch());
|
|
3966
|
-
};
|
|
3967
|
-
EntityService.prototype.listCustomFilter = function (listParams, action) {
|
|
3968
|
-
return this.http.post(this.actionsUrl + "/" + action, this.getBodyParams(listParams)).pipe(this.defaultCatch());
|
|
3969
|
-
};
|
|
3970
|
-
return EntityService;
|
|
3971
|
-
}());
|
|
3972
|
-
|
|
3973
4016
|
var ERP_ENVIRONMENT = new InjectionToken('integration_environment');
|
|
3974
4017
|
|
|
3975
|
-
var AgendaService = /** @class */ (function (_super) {
|
|
4018
|
+
var AgendaService$1 = /** @class */ (function (_super) {
|
|
3976
4019
|
__extends(AgendaService, _super);
|
|
3977
4020
|
function AgendaService(http, messageService, environment) {
|
|
3978
4021
|
var _this = _super.call(this, http, messageService, environment.project.domain + "/" + environment.project.service + "/entities/agenda", environment.project.domain + "/" + environment.project.service + "/actions") || this;
|
|
@@ -4073,7 +4116,7 @@ var RecebimentoChegadaVeiculoOverride = /** @class */ (function () {
|
|
|
4073
4116
|
RecebimentoChegadaVeiculoOverride = __decorate([
|
|
4074
4117
|
Injectable(),
|
|
4075
4118
|
__metadata("design:paramtypes", [ChegadaVeiculoOverride,
|
|
4076
|
-
AgendaService,
|
|
4119
|
+
AgendaService$1,
|
|
4077
4120
|
RecebimentoContratoService])
|
|
4078
4121
|
], RecebimentoChegadaVeiculoOverride);
|
|
4079
4122
|
return RecebimentoChegadaVeiculoOverride;
|
|
@@ -4137,7 +4180,7 @@ var ExpedicaoChegadaVeiculoOverride = /** @class */ (function () {
|
|
|
4137
4180
|
ExpedicaoChegadaVeiculoOverride = __decorate([
|
|
4138
4181
|
Injectable(),
|
|
4139
4182
|
__metadata("design:paramtypes", [ChegadaVeiculoOverride,
|
|
4140
|
-
AgendaService,
|
|
4183
|
+
AgendaService$1,
|
|
4141
4184
|
ExpedicaoService])
|
|
4142
4185
|
], ExpedicaoChegadaVeiculoOverride);
|
|
4143
4186
|
return ExpedicaoChegadaVeiculoOverride;
|
|
@@ -5184,7 +5227,7 @@ var AgendaModule = /** @class */ (function () {
|
|
|
5184
5227
|
]),
|
|
5185
5228
|
],
|
|
5186
5229
|
providers: [
|
|
5187
|
-
AgendaService,
|
|
5230
|
+
AgendaService$1,
|
|
5188
5231
|
],
|
|
5189
5232
|
declarations: [
|
|
5190
5233
|
/*{CA:MODULE_DECLARATIONS:START}*/
|
|
@@ -7051,7 +7094,7 @@ var DevolucaoChegadaVeiculoOverride = /** @class */ (function () {
|
|
|
7051
7094
|
DevolucaoChegadaVeiculoOverride = __decorate([
|
|
7052
7095
|
Injectable(),
|
|
7053
7096
|
__metadata("design:paramtypes", [ChegadaVeiculoOverride,
|
|
7054
|
-
AgendaService,
|
|
7097
|
+
AgendaService$1,
|
|
7055
7098
|
DevolucaoService])
|
|
7056
7099
|
], DevolucaoChegadaVeiculoOverride);
|
|
7057
7100
|
return DevolucaoChegadaVeiculoOverride;
|
|
@@ -8016,7 +8059,7 @@ var DevolucaoFormComponent = /** @class */ (function () {
|
|
|
8016
8059
|
ActivatedRoute,
|
|
8017
8060
|
DevolucaoChegadaVeiculoOverride,
|
|
8018
8061
|
ConfirmationService,
|
|
8019
|
-
AgendaService,
|
|
8062
|
+
AgendaService$1,
|
|
8020
8063
|
ErpProcessService,
|
|
8021
8064
|
ErpFormConfigService,
|
|
8022
8065
|
HasChangeService])
|
|
@@ -9597,7 +9640,7 @@ var ExpedicaoFormComponent = /** @class */ (function () {
|
|
|
9597
9640
|
TransportadoraService,
|
|
9598
9641
|
PedidoVendaService,
|
|
9599
9642
|
PedidoVendaItemService,
|
|
9600
|
-
AgendaService,
|
|
9643
|
+
AgendaService$1,
|
|
9601
9644
|
ExpedicaoChegadaVeiculoOverride,
|
|
9602
9645
|
ConfirmationService,
|
|
9603
9646
|
ErpProcessService,
|
|
@@ -9878,7 +9921,7 @@ var ProcessoAvulsoChegadaVeiculoOverride = /** @class */ (function () {
|
|
|
9878
9921
|
ProcessoAvulsoChegadaVeiculoOverride = __decorate([
|
|
9879
9922
|
Injectable(),
|
|
9880
9923
|
__metadata("design:paramtypes", [ChegadaVeiculoOverride,
|
|
9881
|
-
AgendaService,
|
|
9924
|
+
AgendaService$1,
|
|
9882
9925
|
ProcessoAvulsoService])
|
|
9883
9926
|
], ProcessoAvulsoChegadaVeiculoOverride);
|
|
9884
9927
|
return ProcessoAvulsoChegadaVeiculoOverride;
|
|
@@ -10184,7 +10227,7 @@ var ProcessoAvulsoFormComponent = /** @class */ (function () {
|
|
|
10184
10227
|
ProcessoAvulsoChegadaVeiculoOverride,
|
|
10185
10228
|
TranslateService,
|
|
10186
10229
|
ConfirmationService,
|
|
10187
|
-
AgendaService,
|
|
10230
|
+
AgendaService$1,
|
|
10188
10231
|
ErpProcessService,
|
|
10189
10232
|
ErpFormConfigService,
|
|
10190
10233
|
HasChangeService])
|
|
@@ -10373,7 +10416,7 @@ var RecebimentoOrdemCompraChegadaVeiculoOverride = /** @class */ (function () {
|
|
|
10373
10416
|
RecebimentoOrdemCompraChegadaVeiculoOverride = __decorate([
|
|
10374
10417
|
Injectable(),
|
|
10375
10418
|
__metadata("design:paramtypes", [ChegadaVeiculoOverride,
|
|
10376
|
-
AgendaService,
|
|
10419
|
+
AgendaService$1,
|
|
10377
10420
|
RecebimentoOrdemCompraService])
|
|
10378
10421
|
], RecebimentoOrdemCompraChegadaVeiculoOverride);
|
|
10379
10422
|
return RecebimentoOrdemCompraChegadaVeiculoOverride;
|
|
@@ -11554,7 +11597,7 @@ var RecebimentoOrdemCompraFormComponent = /** @class */ (function () {
|
|
|
11554
11597
|
NotaValidatorService,
|
|
11555
11598
|
ConfirmationService,
|
|
11556
11599
|
DialogService,
|
|
11557
|
-
AgendaService,
|
|
11600
|
+
AgendaService$1,
|
|
11558
11601
|
ErpProcessService,
|
|
11559
11602
|
ErpFormConfigService,
|
|
11560
11603
|
VerificaNotafiscal,
|
|
@@ -13901,7 +13944,7 @@ var RecebimentoFormComponent = /** @class */ (function () {
|
|
|
13901
13944
|
NotaValidatorService,
|
|
13902
13945
|
TransgeniaService,
|
|
13903
13946
|
DialogService,
|
|
13904
|
-
AgendaService,
|
|
13947
|
+
AgendaService$1,
|
|
13905
13948
|
ErpProcessService,
|
|
13906
13949
|
ErpFormConfigService,
|
|
13907
13950
|
VerificaNotafiscal,
|
|
@@ -14066,5 +14109,5 @@ var DockModule = /** @class */ (function () {
|
|
|
14066
14109
|
return DockModule;
|
|
14067
14110
|
}());
|
|
14068
14111
|
|
|
14069
|
-
export { AgendaModule, AgendaService, BalancaModule, BalancasService, CamerasModule, CamerasService, CancelasModule, CidadeModule, CidadeService, ContratoCompraItemModule, ContratoCompraItemService, ContratoCompraModule, ContratoCompraService, ControladorCancelaComponent, ControladorCancelaDescritor, ControladorCancelasService, CoreModule, DockModule, DockService, DocumentListComponent, DocumentListModule, ERP_ENVIRONMENT, ERP_SENIOR_HEADER, EmpresaModule, EmpresaService, ErpFormConfigService, ErpProcessData, ErpProcessService, ErpSeniorModule, EstadoModule, EstadoService, ExpedicaoChegadaVeiculoOverride, ExpedicaoModule, ExpedicaoService, FamiliaProdutoModule, FamiliaProdutoService, FieldCustomizationService, FilialModule, FilialService, FormComponent, FormDescritor, FormSamComponent, FormSamDescritor, FormWmsComponent, FormWmsDescritor, HasChangeService, INFORMACAOES_ADICIONAIS_HEADER, InfoComponent, InfoDescritor, IntegrationWebSocket, LogsModule, LogsService, LprModule, LprService, PaisModule, PaisService, PedidoVendaItemModule, PedidoVendaItemService, PedidoVendaModule, PedidoVendaService, PessoaEnderecoModule, PessoaEnderecoService, PessoaFisicaModule, PessoaFisicaService, PessoaJuridicaModule, PessoaJuridicaService, PessoaModule, PessoaService, PortariasComponent, PortariasDescritor, PortariasModule, ProdutoModule, ProdutoService, RecebimentoChegadaVeiculoOverride, RecebimentoContratoModule, RecebimentoContratoService, RoyaltyModule, RoyaltyService, SAM_SENIOR_HEADER, SafraModule, SafraService, SamSeniorModule, SnapshotComponent, SnapshotDescritor, TransportadoraModule, TransportadoraService, UnidadeMedidaModule, UnidadeMedidaService, VisitorListComponent, VisitorListModule, VisitorListService, VisualizarBalancaComponent, VisualizarBalancaDescritor, WmsModule, highlightLanguages, Service as ɵa, CustomStompConfig as ɵb,
|
|
14112
|
+
export { AgendaModule, AgendaService$1 as AgendaService, BalancaModule, BalancasService, CamerasModule, CamerasService, CancelasModule, CidadeModule, CidadeService, ContratoCompraItemModule, ContratoCompraItemService, ContratoCompraModule, ContratoCompraService, ControladorCancelaComponent, ControladorCancelaDescritor, ControladorCancelasService, CoreModule, DockModule, DockService, DocumentListComponent, DocumentListModule, ERP_ENVIRONMENT, ERP_SENIOR_HEADER, EmpresaModule, EmpresaService, ErpFormConfigService, ErpProcessData, ErpProcessService, ErpSeniorModule, EstadoModule, EstadoService, ExpedicaoChegadaVeiculoOverride, ExpedicaoModule, ExpedicaoService, FamiliaProdutoModule, FamiliaProdutoService, FieldCustomizationService, FilialModule, FilialService, FormComponent, FormDescritor, FormSamComponent, FormSamDescritor, FormWmsComponent, FormWmsDescritor, HasChangeService, INFORMACAOES_ADICIONAIS_HEADER, InfoComponent, InfoDescritor, IntegrationWebSocket, LogsModule, LogsService, LprModule, LprService, PaisModule, PaisService, PedidoVendaItemModule, PedidoVendaItemService, PedidoVendaModule, PedidoVendaService, PessoaEnderecoModule, PessoaEnderecoService, PessoaFisicaModule, PessoaFisicaService, PessoaJuridicaModule, PessoaJuridicaService, PessoaModule, PessoaService, PortariasComponent, PortariasDescritor, PortariasModule, ProdutoModule, ProdutoService, RecebimentoChegadaVeiculoOverride, RecebimentoContratoModule, RecebimentoContratoService, RoyaltyModule, RoyaltyService, SAM_SENIOR_HEADER, SafraModule, SafraService, SamSeniorModule, SnapshotComponent, SnapshotDescritor, TransportadoraModule, TransportadoraService, UnidadeMedidaModule, UnidadeMedidaService, VisitorListComponent, VisitorListModule, VisitorListService, VisualizarBalancaComponent, VisualizarBalancaDescritor, WmsModule, highlightLanguages, Service as ɵa, CustomStompConfig as ɵb, EntityService$2 as ɵba, EntityService$1 as ɵbb, RegisterDocumentModule as ɵbc, RegisterDocumentComponent as ɵbd, InsertKeyModule as ɵbe, InsertKeyComponent as ɵbf, IntegrationService$1 as ɵbg, RecebimentoFormComponent as ɵbh, DerivacaoService as ɵbi, NotaValidatorService as ɵbj, TransgeniaService as ɵbk, VerificaNotafiscal as ɵbl, BuildFormField as ɵbm, ExpedicaoFormComponent as ɵbn, ExpedicaoInfoComponent as ɵbo, RecebimentoInfoComponent as ɵbp, DevolucaoFormComponent as ɵbq, DevolucaoService as ɵbr, DevolucaoChegadaVeiculoOverride as ɵbs, RecebimentoOrdemCompraFormComponent as ɵbt, OrdemCompraService as ɵbu, RecebimentoOrdemCompraService as ɵbv, RecebimentoOrdemCompraChegadaVeiculoOverride as ɵbw, RecebimentoOrdemCompraInfoComponent as ɵbx, DevolucaoInfoComponent as ɵby, ContratoFormComponent as ɵbz, ViewImageComponent as ɵc, OrdemCompraFormComponent as ɵca, ProcessoAvulsoFormComponent as ɵcb, ProcessoAvulsoService as ɵcc, ProcessoAvulsoChegadaVeiculoOverride as ɵcd, ProcessoAvulsoInfoComponent as ɵce, LogIntegracaoDescritor as ɵcf, LogIntegracaoComponent as ɵcg, LogIntegracaoService as ɵch, DerivacaoModule as ɵci, DevolucaoModule as ɵcj, OrdemCompraModule as ɵck, RecebimentoOrdemCompraModule as ɵcl, TransgeniaModule as ɵcm, ProcessoAvulsoModule as ɵcn, LogIntegracaoModule as ɵco, NotaFormModule as ɵcp, DirectivesModule as ɵcq, TrimDirective as ɵcr, NotaFormComponent as ɵcs, LogDescritor as ɵd, LogsComponent as ɵe, PortariasService as ɵf, EntradaComponent as ɵg, AgendasComponent as ɵh, ConfirmacaoComponent as ɵi, VisitedInfoDescritor as ɵj, VisitedInfoComponent as ɵk, VisitedInfoService as ɵl, SchedulingComponent as ɵm, LobbyService as ɵn, EntityService as ɵo, SchedulingService as ɵp, VisitanteComponent as ɵq, VisitanteFormComponent as ɵr, CredencialFormComponent as ɵs, FocusService as ɵt, FormWmsService as ɵu, DocumentGridModule as ɵv, DocumentGridComponent as ɵw, DocumentService as ɵx, IntegrationService as ɵy, AgendaService as ɵz };
|
|
14070
14113
|
//# sourceMappingURL=seniorsistemas-yms-integration.js.map
|