@seniorsistemas/yms-integration 1.27.2 → 1.28.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 +191 -199
- 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 +41 -43
- package/esm2015/src/wms/components/document-grid/document-grid.component.js +38 -10
- package/esm2015/src/wms/components/document-grid/insert-key/insert-key.component.js +2 -2
- package/esm2015/src/wms/components/document-grid/register-document/register-document.component.js +5 -14
- package/esm5/seniorsistemas-yms-integration.js +41 -43
- package/esm5/src/wms/components/document-grid/document-grid.component.js +39 -12
- package/esm5/src/wms/components/document-grid/insert-key/insert-key.component.js +2 -2
- package/esm5/src/wms/components/document-grid/register-document/register-document.component.js +5 -15
- package/fesm2015/seniorsistemas-yms-integration.js +149 -145
- package/fesm2015/seniorsistemas-yms-integration.js.map +1 -1
- package/fesm5/seniorsistemas-yms-integration.js +150 -156
- package/fesm5/seniorsistemas-yms-integration.js.map +1 -1
- package/package.json +1 -1
- package/seniorsistemas-yms-integration.d.ts +40 -42
- package/seniorsistemas-yms-integration.metadata.json +1 -1
- package/src/wms/components/document-grid/document-grid.component.d.ts +11 -3
- package/src/wms/components/document-grid/register-document/register-document.component.d.ts +1 -4
- package/esm2015/src/wms/entities/agenda/agenda.service.js +0 -22
- package/esm2015/src/wms/entities/entity-service.js +0 -4
- package/esm5/src/wms/entities/agenda/agenda.service.js +0 -25
- package/esm5/src/wms/entities/entity-service.js +0 -11
- package/src/wms/entities/agenda/agenda.service.d.ts +0 -9
- package/src/wms/entities/entity-service.d.ts +0 -3
|
@@ -2937,10 +2937,12 @@ let DocumentGridComponent = class DocumentGridComponent {
|
|
|
2937
2937
|
this.selection = [];
|
|
2938
2938
|
}
|
|
2939
2939
|
ngOnInit() {
|
|
2940
|
-
this.gridColumns = this.getGridColumns();
|
|
2941
2940
|
this.getProcessTypeByScheduling();
|
|
2942
2941
|
this.listDocuments();
|
|
2943
2942
|
}
|
|
2943
|
+
ngAfterContentChecked() {
|
|
2944
|
+
this.gridColumns = this.getGridColumns();
|
|
2945
|
+
}
|
|
2944
2946
|
getProcessTypeByScheduling() {
|
|
2945
2947
|
this.integrationService.getProcessTypeByScheduling(this.agenda.tipoAgendamento.id)
|
|
2946
2948
|
.subscribe((result) => this.processType = result.processType);
|
|
@@ -2952,7 +2954,7 @@ let DocumentGridComponent = class DocumentGridComponent {
|
|
|
2952
2954
|
getActions() {
|
|
2953
2955
|
return [
|
|
2954
2956
|
{
|
|
2955
|
-
label: this.translate.instant("yms.int.
|
|
2957
|
+
label: this.translate.instant("yms.int.wms_search"),
|
|
2956
2958
|
command: () => {
|
|
2957
2959
|
this.selection = [];
|
|
2958
2960
|
this.visibleInvoiceKey = true;
|
|
@@ -2995,7 +2997,7 @@ let DocumentGridComponent = class DocumentGridComponent {
|
|
|
2995
2997
|
}
|
|
2996
2998
|
}
|
|
2997
2999
|
updateKeyByWms(data) {
|
|
2998
|
-
if (data.key
|
|
3000
|
+
if (!data.key) {
|
|
2999
3001
|
data.key = data.invoiceKey;
|
|
3000
3002
|
}
|
|
3001
3003
|
if (this.wmsSystem === WmsSystem.WIS) {
|
|
@@ -3052,17 +3054,43 @@ let DocumentGridComponent = class DocumentGridComponent {
|
|
|
3052
3054
|
});
|
|
3053
3055
|
}
|
|
3054
3056
|
getGridColumns() {
|
|
3057
|
+
if (this.isWmsSeniorConnect()) {
|
|
3058
|
+
return [
|
|
3059
|
+
{ field: "key", header: this.translate.instant("yms.int.wms_purchaseOrder") },
|
|
3060
|
+
...this.getColumnPartner()
|
|
3061
|
+
];
|
|
3062
|
+
}
|
|
3063
|
+
if (this.isWmsWIS()) {
|
|
3064
|
+
return this.getColumnInvoiceAndlogistcUnit();
|
|
3065
|
+
}
|
|
3055
3066
|
return [
|
|
3056
|
-
{ field: "logistcUnitName", header: this.translate.instant("yms.int.wms_register_document_logistc_unit_name") },
|
|
3057
|
-
{ field: "logistcUnitDocument", header: this.translate.instant("yms.int.wms_register_document_logistc_unit_document") },
|
|
3058
3067
|
{ field: "invoiceKey", header: this.translate.instant("yms.int.wms_register_document_invoice_key") },
|
|
3059
|
-
|
|
3060
|
-
{ field: "invoiceSerialNumber", header: this.translate.instant("yms.int.wms_register_document_invoice_serial_number") },
|
|
3068
|
+
...this.getColumnInvoiceAndlogistcUnit(),
|
|
3061
3069
|
{ field: "ownerName", header: this.translate.instant("yms.int.wms_register_document_owner_name") },
|
|
3062
3070
|
{ field: "ownerDocument", header: this.translate.instant("yms.int.wms_register_document_owner_document") },
|
|
3063
|
-
{ field: "code", header: this.translate.instant("yms.int.wms_register_document_order_receiving_code") },
|
|
3064
3071
|
];
|
|
3065
3072
|
}
|
|
3073
|
+
getColumnInvoiceAndlogistcUnit() {
|
|
3074
|
+
return [
|
|
3075
|
+
{ field: "invoiceNumber", header: this.translate.instant("yms.int.wms_register_document_invoice_number") },
|
|
3076
|
+
{ field: "invoiceSerialNumber", header: this.translate.instant("yms.int.wms_register_document_invoice_serial_number") },
|
|
3077
|
+
...this.getColumnPartner(),
|
|
3078
|
+
{ field: "logistcUnitName", header: this.translate.instant("yms.int.wms_register_document_logistc_unit_name") },
|
|
3079
|
+
{ field: "logistcUnitDocument", header: this.translate.instant("yms.int.wms_register_document_logistc_unit_document") },
|
|
3080
|
+
];
|
|
3081
|
+
}
|
|
3082
|
+
getColumnPartner() {
|
|
3083
|
+
return [
|
|
3084
|
+
{ field: "partnerName", header: this.translate.instant("yms.int.wms_register_document_partner_name") },
|
|
3085
|
+
{ field: "partnerDocument", header: this.translate.instant("yms.int.wms_register_document_partner_document") },
|
|
3086
|
+
];
|
|
3087
|
+
}
|
|
3088
|
+
isWmsSeniorConnect() {
|
|
3089
|
+
return this.wmsSystem === WmsSystem.SENIOR_CONNECT;
|
|
3090
|
+
}
|
|
3091
|
+
isWmsWIS() {
|
|
3092
|
+
return this.wmsSystem === WmsSystem.WIS;
|
|
3093
|
+
}
|
|
3066
3094
|
message(severity, summary, detail) {
|
|
3067
3095
|
this.messageService.add({
|
|
3068
3096
|
severity,
|
|
@@ -3118,7 +3146,7 @@ __decorate([
|
|
|
3118
3146
|
DocumentGridComponent = __decorate([
|
|
3119
3147
|
Component({
|
|
3120
3148
|
selector: 'document-grid',
|
|
3121
|
-
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
|
|
3149
|
+
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\" [disabled]=\"disabled || !this.gridData\" (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>",
|
|
3122
3150
|
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}"]
|
|
3123
3151
|
}),
|
|
3124
3152
|
__metadata("design:paramtypes", [TranslateService,
|
|
@@ -3166,120 +3194,11 @@ class Document {
|
|
|
3166
3194
|
}
|
|
3167
3195
|
}
|
|
3168
3196
|
|
|
3169
|
-
class EntityService$1 {
|
|
3170
|
-
constructor(http, messageService, entityUrl, actionsUrl) {
|
|
3171
|
-
this.http = http;
|
|
3172
|
-
this.messageService = messageService;
|
|
3173
|
-
this.entityUrl = entityUrl;
|
|
3174
|
-
this.actionsUrl = actionsUrl;
|
|
3175
|
-
this.http = http;
|
|
3176
|
-
this.messageService = messageService;
|
|
3177
|
-
this.entityUrl = entityUrl;
|
|
3178
|
-
this.actionsUrl = actionsUrl;
|
|
3179
|
-
this.defaultCatch = this.defaultCatch.bind(this);
|
|
3180
|
-
}
|
|
3181
|
-
getListQueryParams(listParams) {
|
|
3182
|
-
const { page = 0, size = 10, sort = [], filterQuery = "", displayFields = [] } = listParams;
|
|
3183
|
-
let params = new HttpParams();
|
|
3184
|
-
params = params.append("size", String(size));
|
|
3185
|
-
params = params.append("offset", String(page));
|
|
3186
|
-
if (sort && sort.length) {
|
|
3187
|
-
params = params.append("orderby", sort
|
|
3188
|
-
.map(s => {
|
|
3189
|
-
let order = "";
|
|
3190
|
-
if (s.order === 1)
|
|
3191
|
-
order = " asc";
|
|
3192
|
-
else if (s.order === -1)
|
|
3193
|
-
order = " desc";
|
|
3194
|
-
return `${s.field}${order}`;
|
|
3195
|
-
})
|
|
3196
|
-
.join(", "));
|
|
3197
|
-
}
|
|
3198
|
-
if (filterQuery)
|
|
3199
|
-
params = params.append("filter", filterQuery);
|
|
3200
|
-
if (displayFields && displayFields.length)
|
|
3201
|
-
params = params.append("displayfields", displayFields.join());
|
|
3202
|
-
return params;
|
|
3203
|
-
}
|
|
3204
|
-
getBodyParams(listParams) {
|
|
3205
|
-
const { page = 0, size = 10, sort = [], filterQuery = "", displayFields = [] } = listParams;
|
|
3206
|
-
const bodyParams = {};
|
|
3207
|
-
bodyParams.size = size;
|
|
3208
|
-
bodyParams.offset = page;
|
|
3209
|
-
if (sort && sort.length) {
|
|
3210
|
-
bodyParams.orderBy = sort
|
|
3211
|
-
.map(s => {
|
|
3212
|
-
let order = "";
|
|
3213
|
-
if (s.order === 1)
|
|
3214
|
-
order = " asc";
|
|
3215
|
-
else if (s.order === -1)
|
|
3216
|
-
order = " desc";
|
|
3217
|
-
return `${s.field}${order}`;
|
|
3218
|
-
})
|
|
3219
|
-
.join(", ");
|
|
3220
|
-
}
|
|
3221
|
-
if (filterQuery)
|
|
3222
|
-
bodyParams.filter = filterQuery;
|
|
3223
|
-
if (displayFields && displayFields.length)
|
|
3224
|
-
bodyParams.displayfields = displayFields.join();
|
|
3225
|
-
return bodyParams;
|
|
3226
|
-
}
|
|
3227
|
-
defaultCatch() {
|
|
3228
|
-
return catchError((err) => {
|
|
3229
|
-
if (err) {
|
|
3230
|
-
const summary = err.status ? String(err.status) : "Error";
|
|
3231
|
-
const detail = (err.error && err.error.message) || err.statusText || err.message || "Error";
|
|
3232
|
-
this.messageService.add({
|
|
3233
|
-
severity: "error",
|
|
3234
|
-
summary,
|
|
3235
|
-
detail,
|
|
3236
|
-
});
|
|
3237
|
-
}
|
|
3238
|
-
return throwError(err);
|
|
3239
|
-
});
|
|
3240
|
-
}
|
|
3241
|
-
list(listParams) {
|
|
3242
|
-
return this.http.get(this.entityUrl, { params: this.getListQueryParams(listParams) }).pipe(this.defaultCatch());
|
|
3243
|
-
}
|
|
3244
|
-
get(id) {
|
|
3245
|
-
return this.http.get(`${this.entityUrl}/${id}`).pipe(this.defaultCatch());
|
|
3246
|
-
}
|
|
3247
|
-
insert(entity) {
|
|
3248
|
-
return this.http.post(`${this.entityUrl}`, entity).pipe(this.defaultCatch());
|
|
3249
|
-
}
|
|
3250
|
-
update(id, entity) {
|
|
3251
|
-
return this.http.put(`${this.entityUrl}/${id}`, entity).pipe(this.defaultCatch());
|
|
3252
|
-
}
|
|
3253
|
-
delete(id) {
|
|
3254
|
-
return this.http.delete(`${this.entityUrl}/${id}`).pipe(this.defaultCatch());
|
|
3255
|
-
}
|
|
3256
|
-
listCustomFilter(listParams, action) {
|
|
3257
|
-
return this.http.post(`${this.actionsUrl}/${action}`, this.getBodyParams(listParams)).pipe(this.defaultCatch());
|
|
3258
|
-
}
|
|
3259
|
-
}
|
|
3260
|
-
|
|
3261
|
-
class EntityService$2 extends EntityService$1 {
|
|
3262
|
-
}
|
|
3263
|
-
|
|
3264
|
-
let AgendaService = class AgendaService extends EntityService$2 {
|
|
3265
|
-
constructor(http, messageService) {
|
|
3266
|
-
super(http, messageService, 'yms/agenda/entities/agenda', '');
|
|
3267
|
-
this.http = http;
|
|
3268
|
-
this.messageService = messageService;
|
|
3269
|
-
}
|
|
3270
|
-
};
|
|
3271
|
-
AgendaService.ngInjectableDef = defineInjectable({ factory: function AgendaService_Factory() { return new AgendaService(inject(HttpClient), inject(MessageService$1)); }, token: AgendaService, providedIn: "root" });
|
|
3272
|
-
AgendaService = __decorate([
|
|
3273
|
-
Injectable({ providedIn: 'root' }),
|
|
3274
|
-
__metadata("design:paramtypes", [HttpClient, MessageService$1])
|
|
3275
|
-
], AgendaService);
|
|
3276
|
-
|
|
3277
3197
|
let RegisterDocumentComponent = class RegisterDocumentComponent {
|
|
3278
|
-
constructor(fb, messageService, translateService
|
|
3198
|
+
constructor(fb, messageService, translateService) {
|
|
3279
3199
|
this.fb = fb;
|
|
3280
3200
|
this.messageService = messageService;
|
|
3281
3201
|
this.translateService = translateService;
|
|
3282
|
-
this.agendaService = agendaService;
|
|
3283
3202
|
this.document = new EventEmitter();
|
|
3284
3203
|
this.visible = new EventEmitter();
|
|
3285
3204
|
this.visibleChange = new EventEmitter();
|
|
@@ -3294,13 +3213,11 @@ let RegisterDocumentComponent = class RegisterDocumentComponent {
|
|
|
3294
3213
|
if (!this.edit && this.visible) {
|
|
3295
3214
|
this.formGroup.disable();
|
|
3296
3215
|
this.setValuesFormGroup(this.viewDocument[0]);
|
|
3297
|
-
this.setValueForPartner();
|
|
3298
3216
|
this.hideSaveButton = true;
|
|
3299
3217
|
return this.visible;
|
|
3300
3218
|
}
|
|
3301
3219
|
if (this.formGroup !== undefined) {
|
|
3302
3220
|
this.formGroup.enable();
|
|
3303
|
-
this.setValueForPartner();
|
|
3304
3221
|
this.hideSaveButton = false;
|
|
3305
3222
|
}
|
|
3306
3223
|
}
|
|
@@ -3317,15 +3234,11 @@ let RegisterDocumentComponent = class RegisterDocumentComponent {
|
|
|
3317
3234
|
this.formGroup.get('logistcUnitName').setValue(document.logistcUnitName);
|
|
3318
3235
|
this.formGroup.get('notes').setValue(document.notes);
|
|
3319
3236
|
this.formGroup.get('code').setValue(document.code);
|
|
3237
|
+
this.formGroup.get('partnerName').setValue(document.partnerName);
|
|
3238
|
+
this.formGroup.get('partnerDocument').setValue(document.partnerDocument);
|
|
3320
3239
|
this.formGroup.get('ownerDocument').setValue(document.ownerDocument);
|
|
3321
3240
|
this.formGroup.get('ownerName').setValue(document.ownerName);
|
|
3322
3241
|
}
|
|
3323
|
-
setValueForPartner() {
|
|
3324
|
-
this.agendaService.get(this.agenda.id).subscribe((agenda) => {
|
|
3325
|
-
this.formGroup.get('partnerName').setValue(agenda.externalTenant.descricao);
|
|
3326
|
-
this.formGroup.get('partnerDocument').setValue(agenda.externalTenant.cnpj);
|
|
3327
|
-
});
|
|
3328
|
-
}
|
|
3329
3242
|
getFormGroup() {
|
|
3330
3243
|
this.formGroup = this.fb.group({
|
|
3331
3244
|
key: [undefined, Validators.required],
|
|
@@ -3409,8 +3322,7 @@ RegisterDocumentComponent = __decorate([
|
|
|
3409
3322
|
}),
|
|
3410
3323
|
__metadata("design:paramtypes", [FormBuilder,
|
|
3411
3324
|
MessageService,
|
|
3412
|
-
TranslateService
|
|
3413
|
-
AgendaService])
|
|
3325
|
+
TranslateService])
|
|
3414
3326
|
], RegisterDocumentComponent);
|
|
3415
3327
|
|
|
3416
3328
|
let RegisterDocumentModule = class RegisterDocumentModule {
|
|
@@ -3515,7 +3427,7 @@ __decorate([
|
|
|
3515
3427
|
InsertKeyComponent = __decorate([
|
|
3516
3428
|
Component({
|
|
3517
3429
|
selector: "insert-key",
|
|
3518
|
-
template: "<form [formGroup]=\"formGroup\">\n <p-dialog [(visible)]=\"visible\" [modal]=\"true\" (visibleChange)=\"cancel()\">\n <p-header>{{'yms.int.wms_search_document' | translate}} {{ wmsSystem }}</p-header>\n <div class=\"flex py-2 justify-content-center spacing-bottom\" \n *ngIf=\"!isWmsSeniorConnect() && !isWmsWis()\">\n <label for=\"key\">{{'yms.int.wms_insert_key_label' | translate}}</label>\n <input id=\"key\" class=\"size-input\" pInputText type=\"text\" formControlName=\"key\">\n </div>\n <div class=\"flex py-2 justify-content-center spacing-bottom\" *ngIf=\"isWmsSeniorConnect()\">\n <label for=\"purchaseOrder\">{{'yms.int.wms_purchaseOrder' | translate}} </label>\n <input id=\"purchaseOrder\" class=\"size-input\" pInputText type=\"text\" formControlName=\"purchaseOrder\">\n </div>\n <div class=\"flex py-2 justify-content-center spacing-bottom\" *ngIf=\"isWmsWis()\">\n <label for=\"invoiceNumber\">{{'yms.int.wms_invoice_number' | translate}}</label>\n <input id=\"invoiceNumber\" class=\"size-input\" pInputText type=\"text\" formControlName=\"invoiceNumber\">\n </div>\n <div class=\"flex py-2 justify-content-center spacing-bottom\" *ngIf=\"isWmsWis()\">\n <label for=\"invoiceSerie\">{{'yms.int.wms_invoice_serie' | translate}}</label>\n <input id=\"invoiceSerie\" class=\"size-input\" pInputText type=\"text\" formControlName=\"invoiceSerie\">\n </div>\n <div class=\"flex py-2 justify-content-center spacing-bottom\" *ngIf=\"isWmsWis()\">\n <label for=\"partnerDocument\">{{'yms.int.wms_partner_document' | translate}}</label>\n <input id=\"partnerDocument\" class=\"size-input\" pInputText type=\"text\" formControlName=\"partnerDocument\">\n </div>\n <div class=\"separator\"></div>\n <div class=\"spacing-top\">\n <s-button pButton label=\"{{'
|
|
3430
|
+
template: "<form [formGroup]=\"formGroup\">\n <p-dialog [(visible)]=\"visible\" [modal]=\"true\" [draggable]=\"false\" (visibleChange)=\"cancel()\">\n <p-header>{{'yms.int.wms_search_document' | translate}} {{ wmsSystem }}</p-header>\n <div class=\"flex py-2 justify-content-center spacing-bottom\" \n *ngIf=\"!isWmsSeniorConnect() && !isWmsWis()\">\n <label for=\"key\">{{'yms.int.wms_insert_key_label' | translate}}</label>\n <input id=\"key\" class=\"size-input\" pInputText type=\"text\" formControlName=\"key\">\n </div>\n <div class=\"flex py-2 justify-content-center spacing-bottom\" *ngIf=\"isWmsSeniorConnect()\">\n <label for=\"purchaseOrder\">{{'yms.int.wms_purchaseOrder' | translate}} </label>\n <input id=\"purchaseOrder\" class=\"size-input\" pInputText type=\"text\" formControlName=\"purchaseOrder\">\n </div>\n <div class=\"flex py-2 justify-content-center spacing-bottom\" *ngIf=\"isWmsWis()\">\n <label for=\"invoiceNumber\">{{'yms.int.wms_invoice_number' | translate}}</label>\n <input id=\"invoiceNumber\" class=\"size-input\" pInputText type=\"text\" formControlName=\"invoiceNumber\">\n </div>\n <div class=\"flex py-2 justify-content-center spacing-bottom\" *ngIf=\"isWmsWis()\">\n <label for=\"invoiceSerie\">{{'yms.int.wms_invoice_serie' | translate}}</label>\n <input id=\"invoiceSerie\" class=\"size-input\" pInputText type=\"text\" formControlName=\"invoiceSerie\">\n </div>\n <div class=\"flex py-2 justify-content-center spacing-bottom\" *ngIf=\"isWmsWis()\">\n <label for=\"partnerDocument\">{{'yms.int.wms_partner_document' | translate}}</label>\n <input id=\"partnerDocument\" class=\"size-input\" pInputText type=\"text\" formControlName=\"partnerDocument\">\n </div>\n <div class=\"separator\"></div>\n <div class=\"spacing-top\">\n <s-button pButton label=\"{{'yms.int.wms_search' | translate}}\" (click)=\"add()\"></s-button>\n <s-button\n type=\"button\"\n class=\"ui-button-link\"\n pButton label=\"{{'cancel' | translate}}\"\n (click)=\"cancel()\">\n </s-button>\n </div>\n </p-dialog>\n</form>",
|
|
3519
3431
|
styles: [".spacing-top{margin-top:10px}.spacing-bottom{margin-bottom:10px}.separator{width:100%;margin:5px 0;height:1px;background-color:#ccc}.size-input{width:480px}"]
|
|
3520
3432
|
}),
|
|
3521
3433
|
__metadata("design:paramtypes", [FormBuilder,
|
|
@@ -3614,9 +3526,101 @@ WmsModule = __decorate([
|
|
|
3614
3526
|
__metadata("design:paramtypes", [IntegrationDispatcher])
|
|
3615
3527
|
], WmsModule);
|
|
3616
3528
|
|
|
3529
|
+
class EntityService$1 {
|
|
3530
|
+
constructor(http, messageService, entityUrl, actionsUrl) {
|
|
3531
|
+
this.http = http;
|
|
3532
|
+
this.messageService = messageService;
|
|
3533
|
+
this.entityUrl = entityUrl;
|
|
3534
|
+
this.actionsUrl = actionsUrl;
|
|
3535
|
+
this.http = http;
|
|
3536
|
+
this.messageService = messageService;
|
|
3537
|
+
this.entityUrl = entityUrl;
|
|
3538
|
+
this.actionsUrl = actionsUrl;
|
|
3539
|
+
this.defaultCatch = this.defaultCatch.bind(this);
|
|
3540
|
+
}
|
|
3541
|
+
getListQueryParams(listParams) {
|
|
3542
|
+
const { page = 0, size = 10, sort = [], filterQuery = "", displayFields = [] } = listParams;
|
|
3543
|
+
let params = new HttpParams();
|
|
3544
|
+
params = params.append("size", String(size));
|
|
3545
|
+
params = params.append("offset", String(page));
|
|
3546
|
+
if (sort && sort.length) {
|
|
3547
|
+
params = params.append("orderby", sort
|
|
3548
|
+
.map(s => {
|
|
3549
|
+
let order = "";
|
|
3550
|
+
if (s.order === 1)
|
|
3551
|
+
order = " asc";
|
|
3552
|
+
else if (s.order === -1)
|
|
3553
|
+
order = " desc";
|
|
3554
|
+
return `${s.field}${order}`;
|
|
3555
|
+
})
|
|
3556
|
+
.join(", "));
|
|
3557
|
+
}
|
|
3558
|
+
if (filterQuery)
|
|
3559
|
+
params = params.append("filter", filterQuery);
|
|
3560
|
+
if (displayFields && displayFields.length)
|
|
3561
|
+
params = params.append("displayfields", displayFields.join());
|
|
3562
|
+
return params;
|
|
3563
|
+
}
|
|
3564
|
+
getBodyParams(listParams) {
|
|
3565
|
+
const { page = 0, size = 10, sort = [], filterQuery = "", displayFields = [] } = listParams;
|
|
3566
|
+
const bodyParams = {};
|
|
3567
|
+
bodyParams.size = size;
|
|
3568
|
+
bodyParams.offset = page;
|
|
3569
|
+
if (sort && sort.length) {
|
|
3570
|
+
bodyParams.orderBy = sort
|
|
3571
|
+
.map(s => {
|
|
3572
|
+
let order = "";
|
|
3573
|
+
if (s.order === 1)
|
|
3574
|
+
order = " asc";
|
|
3575
|
+
else if (s.order === -1)
|
|
3576
|
+
order = " desc";
|
|
3577
|
+
return `${s.field}${order}`;
|
|
3578
|
+
})
|
|
3579
|
+
.join(", ");
|
|
3580
|
+
}
|
|
3581
|
+
if (filterQuery)
|
|
3582
|
+
bodyParams.filter = filterQuery;
|
|
3583
|
+
if (displayFields && displayFields.length)
|
|
3584
|
+
bodyParams.displayfields = displayFields.join();
|
|
3585
|
+
return bodyParams;
|
|
3586
|
+
}
|
|
3587
|
+
defaultCatch() {
|
|
3588
|
+
return catchError((err) => {
|
|
3589
|
+
if (err) {
|
|
3590
|
+
const summary = err.status ? String(err.status) : "Error";
|
|
3591
|
+
const detail = (err.error && err.error.message) || err.statusText || err.message || "Error";
|
|
3592
|
+
this.messageService.add({
|
|
3593
|
+
severity: "error",
|
|
3594
|
+
summary,
|
|
3595
|
+
detail,
|
|
3596
|
+
});
|
|
3597
|
+
}
|
|
3598
|
+
return throwError(err);
|
|
3599
|
+
});
|
|
3600
|
+
}
|
|
3601
|
+
list(listParams) {
|
|
3602
|
+
return this.http.get(this.entityUrl, { params: this.getListQueryParams(listParams) }).pipe(this.defaultCatch());
|
|
3603
|
+
}
|
|
3604
|
+
get(id) {
|
|
3605
|
+
return this.http.get(`${this.entityUrl}/${id}`).pipe(this.defaultCatch());
|
|
3606
|
+
}
|
|
3607
|
+
insert(entity) {
|
|
3608
|
+
return this.http.post(`${this.entityUrl}`, entity).pipe(this.defaultCatch());
|
|
3609
|
+
}
|
|
3610
|
+
update(id, entity) {
|
|
3611
|
+
return this.http.put(`${this.entityUrl}/${id}`, entity).pipe(this.defaultCatch());
|
|
3612
|
+
}
|
|
3613
|
+
delete(id) {
|
|
3614
|
+
return this.http.delete(`${this.entityUrl}/${id}`).pipe(this.defaultCatch());
|
|
3615
|
+
}
|
|
3616
|
+
listCustomFilter(listParams, action) {
|
|
3617
|
+
return this.http.post(`${this.actionsUrl}/${action}`, this.getBodyParams(listParams)).pipe(this.defaultCatch());
|
|
3618
|
+
}
|
|
3619
|
+
}
|
|
3620
|
+
|
|
3617
3621
|
const ERP_ENVIRONMENT = new InjectionToken('integration_environment');
|
|
3618
3622
|
|
|
3619
|
-
let AgendaService
|
|
3623
|
+
let AgendaService = class AgendaService extends EntityService$1 {
|
|
3620
3624
|
constructor(http, messageService, environment) {
|
|
3621
3625
|
super(http, messageService, `${environment.project.domain}/${environment.project.service}/entities/agenda`, `${environment.project.domain}/${environment.project.service}/actions`);
|
|
3622
3626
|
this.http = http;
|
|
@@ -3640,12 +3644,12 @@ let AgendaService$1 = class AgendaService extends EntityService$1 {
|
|
|
3640
3644
|
.pipe(this.defaultCatch());
|
|
3641
3645
|
}
|
|
3642
3646
|
};
|
|
3643
|
-
AgendaService
|
|
3647
|
+
AgendaService = __decorate([
|
|
3644
3648
|
Injectable(),
|
|
3645
3649
|
__param(2, Inject(ERP_ENVIRONMENT)),
|
|
3646
3650
|
__metadata("design:paramtypes", [HttpClient,
|
|
3647
3651
|
MessageService$1, Object])
|
|
3648
|
-
], AgendaService
|
|
3652
|
+
], AgendaService);
|
|
3649
3653
|
|
|
3650
3654
|
/*{CA:PROJECT_IMPORTS:START}*/
|
|
3651
3655
|
/*{CA:PROJECT_IMPORTS:END}*/
|
|
@@ -3707,7 +3711,7 @@ let RecebimentoChegadaVeiculoOverride = class RecebimentoChegadaVeiculoOverride
|
|
|
3707
3711
|
RecebimentoChegadaVeiculoOverride = __decorate([
|
|
3708
3712
|
Injectable(),
|
|
3709
3713
|
__metadata("design:paramtypes", [ChegadaVeiculoOverride,
|
|
3710
|
-
AgendaService
|
|
3714
|
+
AgendaService,
|
|
3711
3715
|
RecebimentoContratoService])
|
|
3712
3716
|
], RecebimentoChegadaVeiculoOverride);
|
|
3713
3717
|
|
|
@@ -3762,7 +3766,7 @@ let ExpedicaoChegadaVeiculoOverride = class ExpedicaoChegadaVeiculoOverride {
|
|
|
3762
3766
|
ExpedicaoChegadaVeiculoOverride = __decorate([
|
|
3763
3767
|
Injectable(),
|
|
3764
3768
|
__metadata("design:paramtypes", [ChegadaVeiculoOverride,
|
|
3765
|
-
AgendaService
|
|
3769
|
+
AgendaService,
|
|
3766
3770
|
ExpedicaoService])
|
|
3767
3771
|
], ExpedicaoChegadaVeiculoOverride);
|
|
3768
3772
|
|
|
@@ -4761,7 +4765,7 @@ AgendaModule = __decorate([
|
|
|
4761
4765
|
]),
|
|
4762
4766
|
],
|
|
4763
4767
|
providers: [
|
|
4764
|
-
AgendaService
|
|
4768
|
+
AgendaService,
|
|
4765
4769
|
],
|
|
4766
4770
|
declarations: [
|
|
4767
4771
|
/*{CA:MODULE_DECLARATIONS:START}*/
|
|
@@ -6443,7 +6447,7 @@ let DevolucaoChegadaVeiculoOverride = class DevolucaoChegadaVeiculoOverride {
|
|
|
6443
6447
|
DevolucaoChegadaVeiculoOverride = __decorate([
|
|
6444
6448
|
Injectable(),
|
|
6445
6449
|
__metadata("design:paramtypes", [ChegadaVeiculoOverride,
|
|
6446
|
-
AgendaService
|
|
6450
|
+
AgendaService,
|
|
6447
6451
|
DevolucaoService])
|
|
6448
6452
|
], DevolucaoChegadaVeiculoOverride);
|
|
6449
6453
|
|
|
@@ -7342,7 +7346,7 @@ DevolucaoFormComponent = __decorate([
|
|
|
7342
7346
|
ActivatedRoute,
|
|
7343
7347
|
DevolucaoChegadaVeiculoOverride,
|
|
7344
7348
|
ConfirmationService,
|
|
7345
|
-
AgendaService
|
|
7349
|
+
AgendaService,
|
|
7346
7350
|
ErpProcessService,
|
|
7347
7351
|
ErpFormConfigService,
|
|
7348
7352
|
HasChangeService])
|
|
@@ -8884,7 +8888,7 @@ ExpedicaoFormComponent = __decorate([
|
|
|
8884
8888
|
TransportadoraService,
|
|
8885
8889
|
PedidoVendaService,
|
|
8886
8890
|
PedidoVendaItemService,
|
|
8887
|
-
AgendaService
|
|
8891
|
+
AgendaService,
|
|
8888
8892
|
ExpedicaoChegadaVeiculoOverride,
|
|
8889
8893
|
ConfirmationService,
|
|
8890
8894
|
ErpProcessService,
|
|
@@ -9164,7 +9168,7 @@ let ProcessoAvulsoChegadaVeiculoOverride = class ProcessoAvulsoChegadaVeiculoOve
|
|
|
9164
9168
|
ProcessoAvulsoChegadaVeiculoOverride = __decorate([
|
|
9165
9169
|
Injectable(),
|
|
9166
9170
|
__metadata("design:paramtypes", [ChegadaVeiculoOverride,
|
|
9167
|
-
AgendaService
|
|
9171
|
+
AgendaService,
|
|
9168
9172
|
ProcessoAvulsoService])
|
|
9169
9173
|
], ProcessoAvulsoChegadaVeiculoOverride);
|
|
9170
9174
|
|
|
@@ -9444,7 +9448,7 @@ ProcessoAvulsoFormComponent = __decorate([
|
|
|
9444
9448
|
ProcessoAvulsoChegadaVeiculoOverride,
|
|
9445
9449
|
TranslateService,
|
|
9446
9450
|
ConfirmationService,
|
|
9447
|
-
AgendaService
|
|
9451
|
+
AgendaService,
|
|
9448
9452
|
ErpProcessService,
|
|
9449
9453
|
ErpFormConfigService,
|
|
9450
9454
|
HasChangeService])
|
|
@@ -9627,7 +9631,7 @@ let RecebimentoOrdemCompraChegadaVeiculoOverride = class RecebimentoOrdemCompraC
|
|
|
9627
9631
|
RecebimentoOrdemCompraChegadaVeiculoOverride = __decorate([
|
|
9628
9632
|
Injectable(),
|
|
9629
9633
|
__metadata("design:paramtypes", [ChegadaVeiculoOverride,
|
|
9630
|
-
AgendaService
|
|
9634
|
+
AgendaService,
|
|
9631
9635
|
RecebimentoOrdemCompraService])
|
|
9632
9636
|
], RecebimentoOrdemCompraChegadaVeiculoOverride);
|
|
9633
9637
|
|
|
@@ -10726,7 +10730,7 @@ RecebimentoOrdemCompraFormComponent = __decorate([
|
|
|
10726
10730
|
NotaValidatorService,
|
|
10727
10731
|
ConfirmationService,
|
|
10728
10732
|
DialogService,
|
|
10729
|
-
AgendaService
|
|
10733
|
+
AgendaService,
|
|
10730
10734
|
ErpProcessService,
|
|
10731
10735
|
ErpFormConfigService,
|
|
10732
10736
|
VerificaNotafiscal,
|
|
@@ -12995,7 +12999,7 @@ RecebimentoFormComponent = __decorate([
|
|
|
12995
12999
|
NotaValidatorService,
|
|
12996
13000
|
TransgeniaService,
|
|
12997
13001
|
DialogService,
|
|
12998
|
-
AgendaService
|
|
13002
|
+
AgendaService,
|
|
12999
13003
|
ErpProcessService,
|
|
13000
13004
|
ErpFormConfigService,
|
|
13001
13005
|
VerificaNotafiscal,
|
|
@@ -13227,5 +13231,5 @@ DockModule = __decorate([
|
|
|
13227
13231
|
})
|
|
13228
13232
|
], DockModule);
|
|
13229
13233
|
|
|
13230
|
-
export { AgendaModule, AgendaService
|
|
13234
|
+
export { AgendaModule, AgendaService, BalancaModule, BalancasService, CamerasModule, CamerasService, CancelasModule, CidadeModule, CidadeService, ContratoCompraItemModule, ContratoCompraItemService, ContratoCompraModule, ContratoCompraService, ControladorCancelaComponent, ControladorCancelaDescritor, ControladorCancelasService, CoreModule, DockModule, DockService, 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, RegisterDocumentComponent as ɵba, InsertKeyModule as ɵbb, InsertKeyComponent as ɵbc, EntityService$1 as ɵbd, IntegrationService$1 as ɵbe, RecebimentoFormComponent as ɵbf, DerivacaoService as ɵbg, NotaValidatorService as ɵbh, TransgeniaService as ɵbi, VerificaNotafiscal as ɵbj, BuildFormField as ɵbk, ExpedicaoFormComponent as ɵbl, ExpedicaoInfoComponent as ɵbm, RecebimentoInfoComponent as ɵbn, DevolucaoFormComponent as ɵbo, DevolucaoService as ɵbp, DevolucaoChegadaVeiculoOverride as ɵbq, RecebimentoOrdemCompraFormComponent as ɵbr, OrdemCompraService as ɵbs, RecebimentoOrdemCompraService as ɵbt, RecebimentoOrdemCompraChegadaVeiculoOverride as ɵbu, RecebimentoOrdemCompraInfoComponent as ɵbv, DevolucaoInfoComponent as ɵbw, ContratoFormComponent as ɵbx, OrdemCompraFormComponent as ɵby, ProcessoAvulsoFormComponent as ɵbz, ViewImageComponent as ɵc, ProcessoAvulsoService as ɵca, ProcessoAvulsoChegadaVeiculoOverride as ɵcb, ProcessoAvulsoInfoComponent as ɵcc, LogIntegracaoDescritor as ɵcd, LogIntegracaoComponent as ɵce, LogIntegracaoService as ɵcf, DerivacaoModule as ɵcg, DevolucaoModule as ɵch, OrdemCompraModule as ɵci, RecebimentoOrdemCompraModule as ɵcj, TransgeniaModule as ɵck, ProcessoAvulsoModule as ɵcl, LogIntegracaoModule as ɵcm, NotaFormModule as ɵcn, DirectivesModule as ɵco, TrimDirective as ɵcp, NotaFormComponent as ɵcq, 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, RegisterDocumentModule as ɵz };
|
|
13231
13235
|
//# sourceMappingURL=seniorsistemas-yms-integration.js.map
|