@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
|
@@ -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,10 +3299,22 @@ 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 = [
|
|
3304
|
+
'CANCELADO',
|
|
3305
|
+
'EM_EXECUCAO',
|
|
3306
|
+
'CONCLUIDO',
|
|
3307
|
+
'AGUARDANDO_POR_VALIDACAO'
|
|
3308
|
+
].includes(this.agenda.status.toString());
|
|
3309
|
+
if (cantEditStatus) {
|
|
3310
|
+
this.enableButtonIsClienteExterno = false;
|
|
3311
|
+
}
|
|
3312
|
+
};
|
|
3169
3313
|
DocumentGridComponent.prototype.getActions = function () {
|
|
3170
3314
|
var _this = this;
|
|
3171
3315
|
return [
|
|
3172
3316
|
{
|
|
3317
|
+
disabled: this.checkWmsSystemInvalid(),
|
|
3173
3318
|
label: this.translate.instant("yms.int.wms_search"),
|
|
3174
3319
|
command: function () {
|
|
3175
3320
|
_this.selection = [];
|
|
@@ -3178,6 +3323,7 @@ var DocumentGridComponent = /** @class */ (function () {
|
|
|
3178
3323
|
icon: "fa fa-search"
|
|
3179
3324
|
},
|
|
3180
3325
|
{
|
|
3326
|
+
disabled: this.checkWmsSystemInvalid(),
|
|
3181
3327
|
label: this.translate.instant("yms.int.wms_add_document_register"),
|
|
3182
3328
|
command: function () {
|
|
3183
3329
|
_this.selection = [];
|
|
@@ -3188,6 +3334,12 @@ var DocumentGridComponent = /** @class */ (function () {
|
|
|
3188
3334
|
}
|
|
3189
3335
|
];
|
|
3190
3336
|
};
|
|
3337
|
+
DocumentGridComponent.prototype.checkWmsSystemInvalid = function () {
|
|
3338
|
+
if (this.wmsSystem && this.wmsSystem === WmsSystem.NONE) {
|
|
3339
|
+
return true;
|
|
3340
|
+
}
|
|
3341
|
+
return false;
|
|
3342
|
+
};
|
|
3191
3343
|
DocumentGridComponent.prototype.getProp = function (obj, path) {
|
|
3192
3344
|
return path.split(".").reduce(function (result, prop) { return (result[prop] === undefined ? "" : result[prop]); }, obj);
|
|
3193
3345
|
};
|
|
@@ -3364,14 +3516,15 @@ var DocumentGridComponent = /** @class */ (function () {
|
|
|
3364
3516
|
DocumentGridComponent = __decorate([
|
|
3365
3517
|
Component({
|
|
3366
3518
|
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\"
|
|
3519
|
+
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
3520
|
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
3521
|
}),
|
|
3370
3522
|
__metadata("design:paramtypes", [TranslateService,
|
|
3371
3523
|
DocumentService,
|
|
3372
3524
|
MessageService,
|
|
3373
3525
|
ConfirmationService,
|
|
3374
|
-
IntegrationService
|
|
3526
|
+
IntegrationService,
|
|
3527
|
+
AgendaService])
|
|
3375
3528
|
], DocumentGridComponent);
|
|
3376
3529
|
return DocumentGridComponent;
|
|
3377
3530
|
}());
|
|
@@ -3873,103 +4026,9 @@ var DocumentListModule = /** @class */ (function () {
|
|
|
3873
4026
|
return DocumentListModule;
|
|
3874
4027
|
}());
|
|
3875
4028
|
|
|
3876
|
-
var EntityService$1 = /** @class */ (function () {
|
|
3877
|
-
function EntityService(http, messageService, entityUrl, actionsUrl) {
|
|
3878
|
-
this.http = http;
|
|
3879
|
-
this.messageService = messageService;
|
|
3880
|
-
this.entityUrl = entityUrl;
|
|
3881
|
-
this.actionsUrl = actionsUrl;
|
|
3882
|
-
this.http = http;
|
|
3883
|
-
this.messageService = messageService;
|
|
3884
|
-
this.entityUrl = entityUrl;
|
|
3885
|
-
this.actionsUrl = actionsUrl;
|
|
3886
|
-
this.defaultCatch = this.defaultCatch.bind(this);
|
|
3887
|
-
}
|
|
3888
|
-
EntityService.prototype.getListQueryParams = function (listParams) {
|
|
3889
|
-
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;
|
|
3890
|
-
var params = new HttpParams();
|
|
3891
|
-
params = params.append("size", String(size));
|
|
3892
|
-
params = params.append("offset", String(page));
|
|
3893
|
-
if (sort && sort.length) {
|
|
3894
|
-
params = params.append("orderby", sort
|
|
3895
|
-
.map(function (s) {
|
|
3896
|
-
var order = "";
|
|
3897
|
-
if (s.order === 1)
|
|
3898
|
-
order = " asc";
|
|
3899
|
-
else if (s.order === -1)
|
|
3900
|
-
order = " desc";
|
|
3901
|
-
return "" + s.field + order;
|
|
3902
|
-
})
|
|
3903
|
-
.join(", "));
|
|
3904
|
-
}
|
|
3905
|
-
if (filterQuery)
|
|
3906
|
-
params = params.append("filter", filterQuery);
|
|
3907
|
-
if (displayFields && displayFields.length)
|
|
3908
|
-
params = params.append("displayfields", displayFields.join());
|
|
3909
|
-
return params;
|
|
3910
|
-
};
|
|
3911
|
-
EntityService.prototype.getBodyParams = function (listParams) {
|
|
3912
|
-
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;
|
|
3913
|
-
var bodyParams = {};
|
|
3914
|
-
bodyParams.size = size;
|
|
3915
|
-
bodyParams.offset = page;
|
|
3916
|
-
if (sort && sort.length) {
|
|
3917
|
-
bodyParams.orderBy = sort
|
|
3918
|
-
.map(function (s) {
|
|
3919
|
-
var order = "";
|
|
3920
|
-
if (s.order === 1)
|
|
3921
|
-
order = " asc";
|
|
3922
|
-
else if (s.order === -1)
|
|
3923
|
-
order = " desc";
|
|
3924
|
-
return "" + s.field + order;
|
|
3925
|
-
})
|
|
3926
|
-
.join(", ");
|
|
3927
|
-
}
|
|
3928
|
-
if (filterQuery)
|
|
3929
|
-
bodyParams.filter = filterQuery;
|
|
3930
|
-
if (displayFields && displayFields.length)
|
|
3931
|
-
bodyParams.displayfields = displayFields.join();
|
|
3932
|
-
return bodyParams;
|
|
3933
|
-
};
|
|
3934
|
-
EntityService.prototype.defaultCatch = function () {
|
|
3935
|
-
var _this = this;
|
|
3936
|
-
return catchError(function (err) {
|
|
3937
|
-
if (err) {
|
|
3938
|
-
var summary = err.status ? String(err.status) : "Error";
|
|
3939
|
-
var detail = (err.error && err.error.message) || err.statusText || err.message || "Error";
|
|
3940
|
-
_this.messageService.add({
|
|
3941
|
-
severity: "error",
|
|
3942
|
-
summary: summary,
|
|
3943
|
-
detail: detail,
|
|
3944
|
-
});
|
|
3945
|
-
}
|
|
3946
|
-
return throwError(err);
|
|
3947
|
-
});
|
|
3948
|
-
};
|
|
3949
|
-
EntityService.prototype.list = function (listParams) {
|
|
3950
|
-
return this.http.get(this.entityUrl, { params: this.getListQueryParams(listParams) }).pipe(this.defaultCatch());
|
|
3951
|
-
};
|
|
3952
|
-
EntityService.prototype.get = function (id) {
|
|
3953
|
-
return this.http.get(this.entityUrl + "/" + id).pipe(this.defaultCatch());
|
|
3954
|
-
};
|
|
3955
|
-
EntityService.prototype.insert = function (entity) {
|
|
3956
|
-
return this.http.post("" + this.entityUrl, entity).pipe(this.defaultCatch());
|
|
3957
|
-
};
|
|
3958
|
-
EntityService.prototype.update = function (id, entity) {
|
|
3959
|
-
return this.http.put(this.entityUrl + "/" + id, entity).pipe(this.defaultCatch());
|
|
3960
|
-
};
|
|
3961
|
-
EntityService.prototype.delete = function (id) {
|
|
3962
|
-
return this.http.delete(this.entityUrl + "/" + id).pipe(this.defaultCatch());
|
|
3963
|
-
};
|
|
3964
|
-
EntityService.prototype.listCustomFilter = function (listParams, action) {
|
|
3965
|
-
return this.http.post(this.actionsUrl + "/" + action, this.getBodyParams(listParams)).pipe(this.defaultCatch());
|
|
3966
|
-
};
|
|
3967
|
-
return EntityService;
|
|
3968
|
-
}());
|
|
3969
|
-
|
|
3970
4029
|
var ERP_ENVIRONMENT = new InjectionToken('integration_environment');
|
|
3971
4030
|
|
|
3972
|
-
var AgendaService = /** @class */ (function (_super) {
|
|
4031
|
+
var AgendaService$1 = /** @class */ (function (_super) {
|
|
3973
4032
|
__extends(AgendaService, _super);
|
|
3974
4033
|
function AgendaService(http, messageService, environment) {
|
|
3975
4034
|
var _this = _super.call(this, http, messageService, environment.project.domain + "/" + environment.project.service + "/entities/agenda", environment.project.domain + "/" + environment.project.service + "/actions") || this;
|
|
@@ -4070,7 +4129,7 @@ var RecebimentoChegadaVeiculoOverride = /** @class */ (function () {
|
|
|
4070
4129
|
RecebimentoChegadaVeiculoOverride = __decorate([
|
|
4071
4130
|
Injectable(),
|
|
4072
4131
|
__metadata("design:paramtypes", [ChegadaVeiculoOverride,
|
|
4073
|
-
AgendaService,
|
|
4132
|
+
AgendaService$1,
|
|
4074
4133
|
RecebimentoContratoService])
|
|
4075
4134
|
], RecebimentoChegadaVeiculoOverride);
|
|
4076
4135
|
return RecebimentoChegadaVeiculoOverride;
|
|
@@ -4134,7 +4193,7 @@ var ExpedicaoChegadaVeiculoOverride = /** @class */ (function () {
|
|
|
4134
4193
|
ExpedicaoChegadaVeiculoOverride = __decorate([
|
|
4135
4194
|
Injectable(),
|
|
4136
4195
|
__metadata("design:paramtypes", [ChegadaVeiculoOverride,
|
|
4137
|
-
AgendaService,
|
|
4196
|
+
AgendaService$1,
|
|
4138
4197
|
ExpedicaoService])
|
|
4139
4198
|
], ExpedicaoChegadaVeiculoOverride);
|
|
4140
4199
|
return ExpedicaoChegadaVeiculoOverride;
|
|
@@ -5181,7 +5240,7 @@ var AgendaModule = /** @class */ (function () {
|
|
|
5181
5240
|
]),
|
|
5182
5241
|
],
|
|
5183
5242
|
providers: [
|
|
5184
|
-
AgendaService,
|
|
5243
|
+
AgendaService$1,
|
|
5185
5244
|
],
|
|
5186
5245
|
declarations: [
|
|
5187
5246
|
/*{CA:MODULE_DECLARATIONS:START}*/
|
|
@@ -7048,7 +7107,7 @@ var DevolucaoChegadaVeiculoOverride = /** @class */ (function () {
|
|
|
7048
7107
|
DevolucaoChegadaVeiculoOverride = __decorate([
|
|
7049
7108
|
Injectable(),
|
|
7050
7109
|
__metadata("design:paramtypes", [ChegadaVeiculoOverride,
|
|
7051
|
-
AgendaService,
|
|
7110
|
+
AgendaService$1,
|
|
7052
7111
|
DevolucaoService])
|
|
7053
7112
|
], DevolucaoChegadaVeiculoOverride);
|
|
7054
7113
|
return DevolucaoChegadaVeiculoOverride;
|
|
@@ -8013,7 +8072,7 @@ var DevolucaoFormComponent = /** @class */ (function () {
|
|
|
8013
8072
|
ActivatedRoute,
|
|
8014
8073
|
DevolucaoChegadaVeiculoOverride,
|
|
8015
8074
|
ConfirmationService,
|
|
8016
|
-
AgendaService,
|
|
8075
|
+
AgendaService$1,
|
|
8017
8076
|
ErpProcessService,
|
|
8018
8077
|
ErpFormConfigService,
|
|
8019
8078
|
HasChangeService])
|
|
@@ -9594,7 +9653,7 @@ var ExpedicaoFormComponent = /** @class */ (function () {
|
|
|
9594
9653
|
TransportadoraService,
|
|
9595
9654
|
PedidoVendaService,
|
|
9596
9655
|
PedidoVendaItemService,
|
|
9597
|
-
AgendaService,
|
|
9656
|
+
AgendaService$1,
|
|
9598
9657
|
ExpedicaoChegadaVeiculoOverride,
|
|
9599
9658
|
ConfirmationService,
|
|
9600
9659
|
ErpProcessService,
|
|
@@ -9875,7 +9934,7 @@ var ProcessoAvulsoChegadaVeiculoOverride = /** @class */ (function () {
|
|
|
9875
9934
|
ProcessoAvulsoChegadaVeiculoOverride = __decorate([
|
|
9876
9935
|
Injectable(),
|
|
9877
9936
|
__metadata("design:paramtypes", [ChegadaVeiculoOverride,
|
|
9878
|
-
AgendaService,
|
|
9937
|
+
AgendaService$1,
|
|
9879
9938
|
ProcessoAvulsoService])
|
|
9880
9939
|
], ProcessoAvulsoChegadaVeiculoOverride);
|
|
9881
9940
|
return ProcessoAvulsoChegadaVeiculoOverride;
|
|
@@ -10181,7 +10240,7 @@ var ProcessoAvulsoFormComponent = /** @class */ (function () {
|
|
|
10181
10240
|
ProcessoAvulsoChegadaVeiculoOverride,
|
|
10182
10241
|
TranslateService,
|
|
10183
10242
|
ConfirmationService,
|
|
10184
|
-
AgendaService,
|
|
10243
|
+
AgendaService$1,
|
|
10185
10244
|
ErpProcessService,
|
|
10186
10245
|
ErpFormConfigService,
|
|
10187
10246
|
HasChangeService])
|
|
@@ -10370,7 +10429,7 @@ var RecebimentoOrdemCompraChegadaVeiculoOverride = /** @class */ (function () {
|
|
|
10370
10429
|
RecebimentoOrdemCompraChegadaVeiculoOverride = __decorate([
|
|
10371
10430
|
Injectable(),
|
|
10372
10431
|
__metadata("design:paramtypes", [ChegadaVeiculoOverride,
|
|
10373
|
-
AgendaService,
|
|
10432
|
+
AgendaService$1,
|
|
10374
10433
|
RecebimentoOrdemCompraService])
|
|
10375
10434
|
], RecebimentoOrdemCompraChegadaVeiculoOverride);
|
|
10376
10435
|
return RecebimentoOrdemCompraChegadaVeiculoOverride;
|
|
@@ -11551,7 +11610,7 @@ var RecebimentoOrdemCompraFormComponent = /** @class */ (function () {
|
|
|
11551
11610
|
NotaValidatorService,
|
|
11552
11611
|
ConfirmationService,
|
|
11553
11612
|
DialogService,
|
|
11554
|
-
AgendaService,
|
|
11613
|
+
AgendaService$1,
|
|
11555
11614
|
ErpProcessService,
|
|
11556
11615
|
ErpFormConfigService,
|
|
11557
11616
|
VerificaNotafiscal,
|
|
@@ -13898,7 +13957,7 @@ var RecebimentoFormComponent = /** @class */ (function () {
|
|
|
13898
13957
|
NotaValidatorService,
|
|
13899
13958
|
TransgeniaService,
|
|
13900
13959
|
DialogService,
|
|
13901
|
-
AgendaService,
|
|
13960
|
+
AgendaService$1,
|
|
13902
13961
|
ErpProcessService,
|
|
13903
13962
|
ErpFormConfigService,
|
|
13904
13963
|
VerificaNotafiscal,
|
|
@@ -14063,5 +14122,5 @@ var DockModule = /** @class */ (function () {
|
|
|
14063
14122
|
return DockModule;
|
|
14064
14123
|
}());
|
|
14065
14124
|
|
|
14066
|
-
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,
|
|
14125
|
+
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 };
|
|
14067
14126
|
//# sourceMappingURL=seniorsistemas-yms-integration.js.map
|