@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
|
@@ -2927,25 +2927,147 @@ DocumentService = __decorate([
|
|
|
2927
2927
|
__metadata("design:paramtypes", [HttpClient, MessageService])
|
|
2928
2928
|
], DocumentService);
|
|
2929
2929
|
|
|
2930
|
+
class EntityService$1 {
|
|
2931
|
+
constructor(http, messageService, entityUrl, actionsUrl) {
|
|
2932
|
+
this.http = http;
|
|
2933
|
+
this.messageService = messageService;
|
|
2934
|
+
this.entityUrl = entityUrl;
|
|
2935
|
+
this.actionsUrl = actionsUrl;
|
|
2936
|
+
this.http = http;
|
|
2937
|
+
this.messageService = messageService;
|
|
2938
|
+
this.entityUrl = entityUrl;
|
|
2939
|
+
this.actionsUrl = actionsUrl;
|
|
2940
|
+
this.defaultCatch = this.defaultCatch.bind(this);
|
|
2941
|
+
}
|
|
2942
|
+
getListQueryParams(listParams) {
|
|
2943
|
+
const { page = 0, size = 10, sort = [], filterQuery = "", displayFields = [] } = listParams;
|
|
2944
|
+
let params = new HttpParams();
|
|
2945
|
+
params = params.append("size", String(size));
|
|
2946
|
+
params = params.append("offset", String(page));
|
|
2947
|
+
if (sort && sort.length) {
|
|
2948
|
+
params = params.append("orderby", sort
|
|
2949
|
+
.map(s => {
|
|
2950
|
+
let order = "";
|
|
2951
|
+
if (s.order === 1)
|
|
2952
|
+
order = " asc";
|
|
2953
|
+
else if (s.order === -1)
|
|
2954
|
+
order = " desc";
|
|
2955
|
+
return `${s.field}${order}`;
|
|
2956
|
+
})
|
|
2957
|
+
.join(", "));
|
|
2958
|
+
}
|
|
2959
|
+
if (filterQuery)
|
|
2960
|
+
params = params.append("filter", filterQuery);
|
|
2961
|
+
if (displayFields && displayFields.length)
|
|
2962
|
+
params = params.append("displayfields", displayFields.join());
|
|
2963
|
+
return params;
|
|
2964
|
+
}
|
|
2965
|
+
getBodyParams(listParams) {
|
|
2966
|
+
const { page = 0, size = 10, sort = [], filterQuery = "", displayFields = [] } = listParams;
|
|
2967
|
+
const bodyParams = {};
|
|
2968
|
+
bodyParams.size = size;
|
|
2969
|
+
bodyParams.offset = page;
|
|
2970
|
+
if (sort && sort.length) {
|
|
2971
|
+
bodyParams.orderBy = sort
|
|
2972
|
+
.map(s => {
|
|
2973
|
+
let order = "";
|
|
2974
|
+
if (s.order === 1)
|
|
2975
|
+
order = " asc";
|
|
2976
|
+
else if (s.order === -1)
|
|
2977
|
+
order = " desc";
|
|
2978
|
+
return `${s.field}${order}`;
|
|
2979
|
+
})
|
|
2980
|
+
.join(", ");
|
|
2981
|
+
}
|
|
2982
|
+
if (filterQuery)
|
|
2983
|
+
bodyParams.filter = filterQuery;
|
|
2984
|
+
if (displayFields && displayFields.length)
|
|
2985
|
+
bodyParams.displayfields = displayFields.join();
|
|
2986
|
+
return bodyParams;
|
|
2987
|
+
}
|
|
2988
|
+
defaultCatch() {
|
|
2989
|
+
return catchError((err) => {
|
|
2990
|
+
if (err) {
|
|
2991
|
+
const summary = err.status ? String(err.status) : "Error";
|
|
2992
|
+
const detail = (err.error && err.error.message) || err.statusText || err.message || "Error";
|
|
2993
|
+
this.messageService.add({
|
|
2994
|
+
severity: "error",
|
|
2995
|
+
summary,
|
|
2996
|
+
detail,
|
|
2997
|
+
});
|
|
2998
|
+
}
|
|
2999
|
+
return throwError(err);
|
|
3000
|
+
});
|
|
3001
|
+
}
|
|
3002
|
+
list(listParams) {
|
|
3003
|
+
return this.http.get(this.entityUrl, { params: this.getListQueryParams(listParams) }).pipe(this.defaultCatch());
|
|
3004
|
+
}
|
|
3005
|
+
get(id) {
|
|
3006
|
+
return this.http.get(`${this.entityUrl}/${id}`).pipe(this.defaultCatch());
|
|
3007
|
+
}
|
|
3008
|
+
insert(entity) {
|
|
3009
|
+
return this.http.post(`${this.entityUrl}`, entity).pipe(this.defaultCatch());
|
|
3010
|
+
}
|
|
3011
|
+
update(id, entity) {
|
|
3012
|
+
return this.http.put(`${this.entityUrl}/${id}`, entity).pipe(this.defaultCatch());
|
|
3013
|
+
}
|
|
3014
|
+
delete(id) {
|
|
3015
|
+
return this.http.delete(`${this.entityUrl}/${id}`).pipe(this.defaultCatch());
|
|
3016
|
+
}
|
|
3017
|
+
listCustomFilter(listParams, action) {
|
|
3018
|
+
return this.http.post(`${this.actionsUrl}/${action}`, this.getBodyParams(listParams)).pipe(this.defaultCatch());
|
|
3019
|
+
}
|
|
3020
|
+
}
|
|
3021
|
+
|
|
3022
|
+
class EntityService$2 extends EntityService$1 {
|
|
3023
|
+
}
|
|
3024
|
+
|
|
3025
|
+
let AgendaService = class AgendaService extends EntityService$2 {
|
|
3026
|
+
constructor(http, messageService) {
|
|
3027
|
+
super(http, messageService, 'yms/agenda/entities/agenda', '');
|
|
3028
|
+
this.http = http;
|
|
3029
|
+
this.messageService = messageService;
|
|
3030
|
+
this.url = 'yms/agenda/queries/isClienteExterno';
|
|
3031
|
+
}
|
|
3032
|
+
isClienteExterno() {
|
|
3033
|
+
return this.http.post(`${this.url}`, {});
|
|
3034
|
+
}
|
|
3035
|
+
};
|
|
3036
|
+
AgendaService.ngInjectableDef = defineInjectable({ factory: function AgendaService_Factory() { return new AgendaService(inject(HttpClient), inject(MessageService$1)); }, token: AgendaService, providedIn: "root" });
|
|
3037
|
+
AgendaService = __decorate([
|
|
3038
|
+
Injectable({ providedIn: 'root' }),
|
|
3039
|
+
__metadata("design:paramtypes", [HttpClient, MessageService$1])
|
|
3040
|
+
], AgendaService);
|
|
3041
|
+
|
|
2930
3042
|
let DocumentGridComponent = class DocumentGridComponent {
|
|
2931
|
-
constructor(translate, documentService, messageService, confirmationService, integrationService) {
|
|
3043
|
+
constructor(translate, documentService, messageService, confirmationService, integrationService, agendaService) {
|
|
2932
3044
|
this.translate = translate;
|
|
2933
3045
|
this.documentService = documentService;
|
|
2934
3046
|
this.messageService = messageService;
|
|
2935
3047
|
this.confirmationService = confirmationService;
|
|
2936
3048
|
this.integrationService = integrationService;
|
|
3049
|
+
this.agendaService = agendaService;
|
|
2937
3050
|
this.viewDocument = new EventEmitter();
|
|
2938
3051
|
this.gridData = [];
|
|
3052
|
+
this.enableButtonIsClienteExterno = true;
|
|
2939
3053
|
this.ngUnsubscribe = new Subject();
|
|
2940
3054
|
this.selection = [];
|
|
2941
3055
|
}
|
|
2942
3056
|
ngOnInit() {
|
|
3057
|
+
this.verifyClienteExterno();
|
|
2943
3058
|
this.getProcessTypeByScheduling();
|
|
2944
3059
|
this.listDocuments();
|
|
2945
3060
|
}
|
|
2946
3061
|
ngAfterContentChecked() {
|
|
2947
3062
|
this.gridColumns = this.getGridColumns();
|
|
2948
3063
|
}
|
|
3064
|
+
verifyClienteExterno() {
|
|
3065
|
+
this.agendaService.isClienteExterno()
|
|
3066
|
+
.subscribe((result) => {
|
|
3067
|
+
this.isClienteExterno = result.isClienteExterno;
|
|
3068
|
+
this.cantEditStatus();
|
|
3069
|
+
});
|
|
3070
|
+
}
|
|
2949
3071
|
getProcessTypeByScheduling() {
|
|
2950
3072
|
this.integrationService.getProcessTypeByScheduling(this.agenda.tipoAgendamento.id)
|
|
2951
3073
|
.subscribe((result) => this.processType = result.processType);
|
|
@@ -2954,9 +3076,21 @@ let DocumentGridComponent = class DocumentGridComponent {
|
|
|
2954
3076
|
this.gridData.push(document);
|
|
2955
3077
|
this.disabled = false;
|
|
2956
3078
|
}
|
|
3079
|
+
cantEditStatus() {
|
|
3080
|
+
const cantEditStatus = [
|
|
3081
|
+
'CANCELADO',
|
|
3082
|
+
'EM_EXECUCAO',
|
|
3083
|
+
'CONCLUIDO',
|
|
3084
|
+
'AGUARDANDO_POR_VALIDACAO'
|
|
3085
|
+
].includes(this.agenda.status.toString());
|
|
3086
|
+
if (cantEditStatus) {
|
|
3087
|
+
this.enableButtonIsClienteExterno = false;
|
|
3088
|
+
}
|
|
3089
|
+
}
|
|
2957
3090
|
getActions() {
|
|
2958
3091
|
return [
|
|
2959
3092
|
{
|
|
3093
|
+
disabled: this.checkWmsSystemInvalid(),
|
|
2960
3094
|
label: this.translate.instant("yms.int.wms_search"),
|
|
2961
3095
|
command: () => {
|
|
2962
3096
|
this.selection = [];
|
|
@@ -2965,6 +3099,7 @@ let DocumentGridComponent = class DocumentGridComponent {
|
|
|
2965
3099
|
icon: "fa fa-search"
|
|
2966
3100
|
},
|
|
2967
3101
|
{
|
|
3102
|
+
disabled: this.checkWmsSystemInvalid(),
|
|
2968
3103
|
label: this.translate.instant("yms.int.wms_add_document_register"),
|
|
2969
3104
|
command: () => {
|
|
2970
3105
|
this.selection = [];
|
|
@@ -2975,6 +3110,12 @@ let DocumentGridComponent = class DocumentGridComponent {
|
|
|
2975
3110
|
}
|
|
2976
3111
|
];
|
|
2977
3112
|
}
|
|
3113
|
+
checkWmsSystemInvalid() {
|
|
3114
|
+
if (this.wmsSystem && this.wmsSystem === WmsSystem.NONE) {
|
|
3115
|
+
return true;
|
|
3116
|
+
}
|
|
3117
|
+
return false;
|
|
3118
|
+
}
|
|
2978
3119
|
getProp(obj, path) {
|
|
2979
3120
|
return path.split(".").reduce((result, prop) => (result[prop] === undefined ? "" : result[prop]), obj);
|
|
2980
3121
|
}
|
|
@@ -3149,14 +3290,15 @@ __decorate([
|
|
|
3149
3290
|
DocumentGridComponent = __decorate([
|
|
3150
3291
|
Component({
|
|
3151
3292
|
selector: 'document-grid',
|
|
3152
|
-
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\"
|
|
3293
|
+
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>",
|
|
3153
3294
|
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}"]
|
|
3154
3295
|
}),
|
|
3155
3296
|
__metadata("design:paramtypes", [TranslateService,
|
|
3156
3297
|
DocumentService,
|
|
3157
3298
|
MessageService,
|
|
3158
3299
|
ConfirmationService,
|
|
3159
|
-
IntegrationService
|
|
3300
|
+
IntegrationService,
|
|
3301
|
+
AgendaService])
|
|
3160
3302
|
], DocumentGridComponent);
|
|
3161
3303
|
|
|
3162
3304
|
const moment$4 = _moment;
|
|
@@ -3634,101 +3776,9 @@ DocumentListModule = __decorate([
|
|
|
3634
3776
|
__metadata("design:paramtypes", [IntegrationDispatcher])
|
|
3635
3777
|
], DocumentListModule);
|
|
3636
3778
|
|
|
3637
|
-
class EntityService$1 {
|
|
3638
|
-
constructor(http, messageService, entityUrl, actionsUrl) {
|
|
3639
|
-
this.http = http;
|
|
3640
|
-
this.messageService = messageService;
|
|
3641
|
-
this.entityUrl = entityUrl;
|
|
3642
|
-
this.actionsUrl = actionsUrl;
|
|
3643
|
-
this.http = http;
|
|
3644
|
-
this.messageService = messageService;
|
|
3645
|
-
this.entityUrl = entityUrl;
|
|
3646
|
-
this.actionsUrl = actionsUrl;
|
|
3647
|
-
this.defaultCatch = this.defaultCatch.bind(this);
|
|
3648
|
-
}
|
|
3649
|
-
getListQueryParams(listParams) {
|
|
3650
|
-
const { page = 0, size = 10, sort = [], filterQuery = "", displayFields = [] } = listParams;
|
|
3651
|
-
let params = new HttpParams();
|
|
3652
|
-
params = params.append("size", String(size));
|
|
3653
|
-
params = params.append("offset", String(page));
|
|
3654
|
-
if (sort && sort.length) {
|
|
3655
|
-
params = params.append("orderby", sort
|
|
3656
|
-
.map(s => {
|
|
3657
|
-
let order = "";
|
|
3658
|
-
if (s.order === 1)
|
|
3659
|
-
order = " asc";
|
|
3660
|
-
else if (s.order === -1)
|
|
3661
|
-
order = " desc";
|
|
3662
|
-
return `${s.field}${order}`;
|
|
3663
|
-
})
|
|
3664
|
-
.join(", "));
|
|
3665
|
-
}
|
|
3666
|
-
if (filterQuery)
|
|
3667
|
-
params = params.append("filter", filterQuery);
|
|
3668
|
-
if (displayFields && displayFields.length)
|
|
3669
|
-
params = params.append("displayfields", displayFields.join());
|
|
3670
|
-
return params;
|
|
3671
|
-
}
|
|
3672
|
-
getBodyParams(listParams) {
|
|
3673
|
-
const { page = 0, size = 10, sort = [], filterQuery = "", displayFields = [] } = listParams;
|
|
3674
|
-
const bodyParams = {};
|
|
3675
|
-
bodyParams.size = size;
|
|
3676
|
-
bodyParams.offset = page;
|
|
3677
|
-
if (sort && sort.length) {
|
|
3678
|
-
bodyParams.orderBy = sort
|
|
3679
|
-
.map(s => {
|
|
3680
|
-
let order = "";
|
|
3681
|
-
if (s.order === 1)
|
|
3682
|
-
order = " asc";
|
|
3683
|
-
else if (s.order === -1)
|
|
3684
|
-
order = " desc";
|
|
3685
|
-
return `${s.field}${order}`;
|
|
3686
|
-
})
|
|
3687
|
-
.join(", ");
|
|
3688
|
-
}
|
|
3689
|
-
if (filterQuery)
|
|
3690
|
-
bodyParams.filter = filterQuery;
|
|
3691
|
-
if (displayFields && displayFields.length)
|
|
3692
|
-
bodyParams.displayfields = displayFields.join();
|
|
3693
|
-
return bodyParams;
|
|
3694
|
-
}
|
|
3695
|
-
defaultCatch() {
|
|
3696
|
-
return catchError((err) => {
|
|
3697
|
-
if (err) {
|
|
3698
|
-
const summary = err.status ? String(err.status) : "Error";
|
|
3699
|
-
const detail = (err.error && err.error.message) || err.statusText || err.message || "Error";
|
|
3700
|
-
this.messageService.add({
|
|
3701
|
-
severity: "error",
|
|
3702
|
-
summary,
|
|
3703
|
-
detail,
|
|
3704
|
-
});
|
|
3705
|
-
}
|
|
3706
|
-
return throwError(err);
|
|
3707
|
-
});
|
|
3708
|
-
}
|
|
3709
|
-
list(listParams) {
|
|
3710
|
-
return this.http.get(this.entityUrl, { params: this.getListQueryParams(listParams) }).pipe(this.defaultCatch());
|
|
3711
|
-
}
|
|
3712
|
-
get(id) {
|
|
3713
|
-
return this.http.get(`${this.entityUrl}/${id}`).pipe(this.defaultCatch());
|
|
3714
|
-
}
|
|
3715
|
-
insert(entity) {
|
|
3716
|
-
return this.http.post(`${this.entityUrl}`, entity).pipe(this.defaultCatch());
|
|
3717
|
-
}
|
|
3718
|
-
update(id, entity) {
|
|
3719
|
-
return this.http.put(`${this.entityUrl}/${id}`, entity).pipe(this.defaultCatch());
|
|
3720
|
-
}
|
|
3721
|
-
delete(id) {
|
|
3722
|
-
return this.http.delete(`${this.entityUrl}/${id}`).pipe(this.defaultCatch());
|
|
3723
|
-
}
|
|
3724
|
-
listCustomFilter(listParams, action) {
|
|
3725
|
-
return this.http.post(`${this.actionsUrl}/${action}`, this.getBodyParams(listParams)).pipe(this.defaultCatch());
|
|
3726
|
-
}
|
|
3727
|
-
}
|
|
3728
|
-
|
|
3729
3779
|
const ERP_ENVIRONMENT = new InjectionToken('integration_environment');
|
|
3730
3780
|
|
|
3731
|
-
let AgendaService = class AgendaService extends EntityService$1 {
|
|
3781
|
+
let AgendaService$1 = class AgendaService extends EntityService$1 {
|
|
3732
3782
|
constructor(http, messageService, environment) {
|
|
3733
3783
|
super(http, messageService, `${environment.project.domain}/${environment.project.service}/entities/agenda`, `${environment.project.domain}/${environment.project.service}/actions`);
|
|
3734
3784
|
this.http = http;
|
|
@@ -3752,12 +3802,12 @@ let AgendaService = class AgendaService extends EntityService$1 {
|
|
|
3752
3802
|
.pipe(this.defaultCatch());
|
|
3753
3803
|
}
|
|
3754
3804
|
};
|
|
3755
|
-
AgendaService = __decorate([
|
|
3805
|
+
AgendaService$1 = __decorate([
|
|
3756
3806
|
Injectable(),
|
|
3757
3807
|
__param(2, Inject(ERP_ENVIRONMENT)),
|
|
3758
3808
|
__metadata("design:paramtypes", [HttpClient,
|
|
3759
3809
|
MessageService$1, Object])
|
|
3760
|
-
], AgendaService);
|
|
3810
|
+
], AgendaService$1);
|
|
3761
3811
|
|
|
3762
3812
|
/*{CA:PROJECT_IMPORTS:START}*/
|
|
3763
3813
|
/*{CA:PROJECT_IMPORTS:END}*/
|
|
@@ -3819,7 +3869,7 @@ let RecebimentoChegadaVeiculoOverride = class RecebimentoChegadaVeiculoOverride
|
|
|
3819
3869
|
RecebimentoChegadaVeiculoOverride = __decorate([
|
|
3820
3870
|
Injectable(),
|
|
3821
3871
|
__metadata("design:paramtypes", [ChegadaVeiculoOverride,
|
|
3822
|
-
AgendaService,
|
|
3872
|
+
AgendaService$1,
|
|
3823
3873
|
RecebimentoContratoService])
|
|
3824
3874
|
], RecebimentoChegadaVeiculoOverride);
|
|
3825
3875
|
|
|
@@ -3874,7 +3924,7 @@ let ExpedicaoChegadaVeiculoOverride = class ExpedicaoChegadaVeiculoOverride {
|
|
|
3874
3924
|
ExpedicaoChegadaVeiculoOverride = __decorate([
|
|
3875
3925
|
Injectable(),
|
|
3876
3926
|
__metadata("design:paramtypes", [ChegadaVeiculoOverride,
|
|
3877
|
-
AgendaService,
|
|
3927
|
+
AgendaService$1,
|
|
3878
3928
|
ExpedicaoService])
|
|
3879
3929
|
], ExpedicaoChegadaVeiculoOverride);
|
|
3880
3930
|
|
|
@@ -4873,7 +4923,7 @@ AgendaModule = __decorate([
|
|
|
4873
4923
|
]),
|
|
4874
4924
|
],
|
|
4875
4925
|
providers: [
|
|
4876
|
-
AgendaService,
|
|
4926
|
+
AgendaService$1,
|
|
4877
4927
|
],
|
|
4878
4928
|
declarations: [
|
|
4879
4929
|
/*{CA:MODULE_DECLARATIONS:START}*/
|
|
@@ -6555,7 +6605,7 @@ let DevolucaoChegadaVeiculoOverride = class DevolucaoChegadaVeiculoOverride {
|
|
|
6555
6605
|
DevolucaoChegadaVeiculoOverride = __decorate([
|
|
6556
6606
|
Injectable(),
|
|
6557
6607
|
__metadata("design:paramtypes", [ChegadaVeiculoOverride,
|
|
6558
|
-
AgendaService,
|
|
6608
|
+
AgendaService$1,
|
|
6559
6609
|
DevolucaoService])
|
|
6560
6610
|
], DevolucaoChegadaVeiculoOverride);
|
|
6561
6611
|
|
|
@@ -7454,7 +7504,7 @@ DevolucaoFormComponent = __decorate([
|
|
|
7454
7504
|
ActivatedRoute,
|
|
7455
7505
|
DevolucaoChegadaVeiculoOverride,
|
|
7456
7506
|
ConfirmationService,
|
|
7457
|
-
AgendaService,
|
|
7507
|
+
AgendaService$1,
|
|
7458
7508
|
ErpProcessService,
|
|
7459
7509
|
ErpFormConfigService,
|
|
7460
7510
|
HasChangeService])
|
|
@@ -8996,7 +9046,7 @@ ExpedicaoFormComponent = __decorate([
|
|
|
8996
9046
|
TransportadoraService,
|
|
8997
9047
|
PedidoVendaService,
|
|
8998
9048
|
PedidoVendaItemService,
|
|
8999
|
-
AgendaService,
|
|
9049
|
+
AgendaService$1,
|
|
9000
9050
|
ExpedicaoChegadaVeiculoOverride,
|
|
9001
9051
|
ConfirmationService,
|
|
9002
9052
|
ErpProcessService,
|
|
@@ -9276,7 +9326,7 @@ let ProcessoAvulsoChegadaVeiculoOverride = class ProcessoAvulsoChegadaVeiculoOve
|
|
|
9276
9326
|
ProcessoAvulsoChegadaVeiculoOverride = __decorate([
|
|
9277
9327
|
Injectable(),
|
|
9278
9328
|
__metadata("design:paramtypes", [ChegadaVeiculoOverride,
|
|
9279
|
-
AgendaService,
|
|
9329
|
+
AgendaService$1,
|
|
9280
9330
|
ProcessoAvulsoService])
|
|
9281
9331
|
], ProcessoAvulsoChegadaVeiculoOverride);
|
|
9282
9332
|
|
|
@@ -9556,7 +9606,7 @@ ProcessoAvulsoFormComponent = __decorate([
|
|
|
9556
9606
|
ProcessoAvulsoChegadaVeiculoOverride,
|
|
9557
9607
|
TranslateService,
|
|
9558
9608
|
ConfirmationService,
|
|
9559
|
-
AgendaService,
|
|
9609
|
+
AgendaService$1,
|
|
9560
9610
|
ErpProcessService,
|
|
9561
9611
|
ErpFormConfigService,
|
|
9562
9612
|
HasChangeService])
|
|
@@ -9739,7 +9789,7 @@ let RecebimentoOrdemCompraChegadaVeiculoOverride = class RecebimentoOrdemCompraC
|
|
|
9739
9789
|
RecebimentoOrdemCompraChegadaVeiculoOverride = __decorate([
|
|
9740
9790
|
Injectable(),
|
|
9741
9791
|
__metadata("design:paramtypes", [ChegadaVeiculoOverride,
|
|
9742
|
-
AgendaService,
|
|
9792
|
+
AgendaService$1,
|
|
9743
9793
|
RecebimentoOrdemCompraService])
|
|
9744
9794
|
], RecebimentoOrdemCompraChegadaVeiculoOverride);
|
|
9745
9795
|
|
|
@@ -10838,7 +10888,7 @@ RecebimentoOrdemCompraFormComponent = __decorate([
|
|
|
10838
10888
|
NotaValidatorService,
|
|
10839
10889
|
ConfirmationService,
|
|
10840
10890
|
DialogService,
|
|
10841
|
-
AgendaService,
|
|
10891
|
+
AgendaService$1,
|
|
10842
10892
|
ErpProcessService,
|
|
10843
10893
|
ErpFormConfigService,
|
|
10844
10894
|
VerificaNotafiscal,
|
|
@@ -13107,7 +13157,7 @@ RecebimentoFormComponent = __decorate([
|
|
|
13107
13157
|
NotaValidatorService,
|
|
13108
13158
|
TransgeniaService,
|
|
13109
13159
|
DialogService,
|
|
13110
|
-
AgendaService,
|
|
13160
|
+
AgendaService$1,
|
|
13111
13161
|
ErpProcessService,
|
|
13112
13162
|
ErpFormConfigService,
|
|
13113
13163
|
VerificaNotafiscal,
|
|
@@ -13339,5 +13389,5 @@ DockModule = __decorate([
|
|
|
13339
13389
|
})
|
|
13340
13390
|
], DockModule);
|
|
13341
13391
|
|
|
13342
|
-
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,
|
|
13392
|
+
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 };
|
|
13343
13393
|
//# sourceMappingURL=seniorsistemas-yms-integration.js.map
|