@seniorsistemas/yms-integration 1.34.0 → 1.35.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 +148 -59
- 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 +44 -43
- package/esm2015/src/wms/components/document-grid/document-grid.component.js +19 -6
- package/esm2015/src/wms/components/document-grid/document-grid.module.js +3 -1
- package/esm2015/src/wms/components/document-grid/insert-key/insert-key.component.js +64 -7
- package/esm2015/src/wms/components/document-grid/insert-key/insert-key.module.js +4 -2
- package/esm2015/src/wms/components/document-grid/register-document/register-document.component.js +3 -2
- package/esm2015/src/wms/components/document-list/document-list.component.js +7 -6
- package/esm2015/src/wms/entities/external-tenant/external-tenant-dto.js +1 -0
- package/esm2015/src/wms/entities/external-tenant/external-tenant.service.js +18 -0
- package/esm2015/src/wms/entities/invoice-condition/invoice-condition.js +2 -1
- package/esm5/seniorsistemas-yms-integration.js +44 -43
- package/esm5/src/wms/components/document-grid/document-grid.component.js +19 -6
- package/esm5/src/wms/components/document-grid/document-grid.module.js +3 -1
- package/esm5/src/wms/components/document-grid/insert-key/insert-key.component.js +66 -7
- package/esm5/src/wms/components/document-grid/insert-key/insert-key.module.js +4 -2
- package/esm5/src/wms/components/document-grid/register-document/register-document.component.js +3 -2
- package/esm5/src/wms/components/document-list/document-list.component.js +7 -6
- package/esm5/src/wms/entities/external-tenant/external-tenant-dto.js +1 -0
- package/esm5/src/wms/entities/external-tenant/external-tenant.service.js +21 -0
- package/esm5/src/wms/entities/invoice-condition/invoice-condition.js +2 -1
- package/fesm2015/seniorsistemas-yms-integration.js +100 -17
- package/fesm2015/seniorsistemas-yms-integration.js.map +1 -1
- package/fesm5/seniorsistemas-yms-integration.js +105 -17
- package/fesm5/seniorsistemas-yms-integration.js.map +1 -1
- package/package.json +1 -1
- package/seniorsistemas-yms-integration.d.ts +43 -42
- package/seniorsistemas-yms-integration.metadata.json +1 -1
- package/src/wms/components/document-grid/document-grid.component.d.ts +6 -1
- package/src/wms/components/document-grid/insert-key/insert-key.component.d.ts +13 -1
- package/src/wms/entities/external-tenant/external-tenant-dto.d.ts +7 -0
- package/src/wms/entities/external-tenant/external-tenant.service.d.ts +9 -0
- package/src/wms/entities/invoice-condition/invoice-condition.d.ts +2 -1
|
@@ -3294,6 +3294,7 @@ var InvoiceCondition;
|
|
|
3294
3294
|
InvoiceCondition["PARTIAL_AUTHORIZED"] = "PARTIAL_AUTHORIZED";
|
|
3295
3295
|
InvoiceCondition["MANUAL_AUTHORIZED"] = "MANUAL_AUTHORIZED";
|
|
3296
3296
|
InvoiceCondition["DEVOLUTION"] = "DEVOLUTION";
|
|
3297
|
+
InvoiceCondition["REJECTED"] = "REJECTED";
|
|
3297
3298
|
})(InvoiceCondition || (InvoiceCondition = {}));
|
|
3298
3299
|
|
|
3299
3300
|
var DocumentGridComponent = /** @class */ (function () {
|
|
@@ -3309,15 +3310,24 @@ var DocumentGridComponent = /** @class */ (function () {
|
|
|
3309
3310
|
this.enableButtonIsClienteExterno = true;
|
|
3310
3311
|
this.summary = "yms.int.wms_saved_document_message_title";
|
|
3311
3312
|
this.ngUnsubscribe = new Subject();
|
|
3312
|
-
this.
|
|
3313
|
+
this.invoiceConditions = [
|
|
3313
3314
|
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_no_way"), value: null },
|
|
3314
3315
|
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_condition_authorized"), value: InvoiceCondition.AUTHORIZED },
|
|
3315
3316
|
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_condition_manual_authorized"), value: InvoiceCondition.MANUAL_AUTHORIZED },
|
|
3316
3317
|
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_condition_partial_authorized"), value: InvoiceCondition.PARTIAL_AUTHORIZED },
|
|
3317
|
-
{ label: this.translate.instant("yms.int.
|
|
3318
|
+
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_condition_devolution"), value: InvoiceCondition.DEVOLUTION },
|
|
3319
|
+
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_condition_rejected"), value: InvoiceCondition.REJECTED },
|
|
3318
3320
|
];
|
|
3319
3321
|
this.selection = [];
|
|
3320
3322
|
}
|
|
3323
|
+
DocumentGridComponent.prototype.getFilteredInvoiceConditions = function (invoiceConditions) {
|
|
3324
|
+
if (invoiceConditions === InvoiceCondition.AUTHORIZED) {
|
|
3325
|
+
return this.invoiceConditions.filter(function (cond) { return cond.value === InvoiceCondition.AUTHORIZED; });
|
|
3326
|
+
}
|
|
3327
|
+
else {
|
|
3328
|
+
return this.invoiceConditions.filter(function (cond) { return cond.value !== InvoiceCondition.AUTHORIZED; });
|
|
3329
|
+
}
|
|
3330
|
+
};
|
|
3321
3331
|
DocumentGridComponent.prototype.ngOnInit = function () {
|
|
3322
3332
|
this.verifyClienteExterno();
|
|
3323
3333
|
this.getProcessTypeByScheduling();
|
|
@@ -3433,7 +3443,6 @@ var DocumentGridComponent = /** @class */ (function () {
|
|
|
3433
3443
|
_this.sucessMessage();
|
|
3434
3444
|
});
|
|
3435
3445
|
_this.disabled = true;
|
|
3436
|
-
_this.listDocuments(false);
|
|
3437
3446
|
}
|
|
3438
3447
|
else {
|
|
3439
3448
|
_this.documentService.update(data.id, data).subscribe(function () {
|
|
@@ -3442,6 +3451,7 @@ var DocumentGridComponent = /** @class */ (function () {
|
|
|
3442
3451
|
});
|
|
3443
3452
|
}
|
|
3444
3453
|
});
|
|
3454
|
+
this.listDocuments(false);
|
|
3445
3455
|
}
|
|
3446
3456
|
};
|
|
3447
3457
|
DocumentGridComponent.prototype.updateKeyByWms = function (data) {
|
|
@@ -3482,10 +3492,14 @@ var DocumentGridComponent = /** @class */ (function () {
|
|
|
3482
3492
|
}
|
|
3483
3493
|
});
|
|
3484
3494
|
};
|
|
3495
|
+
DocumentGridComponent.prototype.notSavedDocuments = function () {
|
|
3496
|
+
return this.gridData.some(function (document) { return !document.id; });
|
|
3497
|
+
};
|
|
3485
3498
|
DocumentGridComponent.prototype.listDocuments = function (isDelete) {
|
|
3486
3499
|
var _this = this;
|
|
3487
3500
|
this.documentService.list({
|
|
3488
|
-
filterQuery: "schedulingId eq '" + this.agenda.id + "'"
|
|
3501
|
+
filterQuery: "schedulingId eq '" + this.agenda.id + "'",
|
|
3502
|
+
size: 100
|
|
3489
3503
|
})
|
|
3490
3504
|
.subscribe(function (contents) {
|
|
3491
3505
|
var _a;
|
|
@@ -3624,7 +3638,7 @@ var DocumentGridComponent = /** @class */ (function () {
|
|
|
3624
3638
|
DocumentGridComponent = __decorate([
|
|
3625
3639
|
Component({
|
|
3626
3640
|
selector: 'document-grid',
|
|
3627
|
-
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(false)\"\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=\"key\" [
|
|
3641
|
+
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(false)\"\n [disabled]=\"notSavedDocuments()\"\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=\"key\" [scrollable]=\"true\" [resizableColumns]=\"true\"\n [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\" pResizableColumn>\n <div class=\"senior-header\">\n <span class=\"senior-header-title\">{{ col.header }}</span>\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 *ngIf=\"isWmsSeniorConnect()\" (click)=\"selection = [rowData]\">\n <span>{{rowData[\"key\"]}}</span>\n </td>\n <td *ngIf=\"isWmsSilt()\" (click)=\"selection = [rowData]\">\n <span>{{rowData[\"invoiceKey\"]}}</span>\n </td>\n <td *ngIf=\"isWmsWIS() || isWmsSilt()\" (click)=\"selection = [rowData]\">\n <span>{{rowData[\"invoiceNumber\"]}}</span>\n </td>\n <td *ngIf=\"isWmsWIS() || isWmsSilt()\" (click)=\"selection = [rowData]\">\n <span>{{rowData[\"invoiceSerialNumber\"]}}</span>\n </td>\n <td *ngIf=\"isWmsWIS() || isWmsSeniorConnect() || isWmsSilt()\" (click)=\"selection = [rowData]\">\n <span>{{rowData[\"partnerName\"]}}</span>\n </td>\n <td *ngIf=\"isWmsWIS() || isWmsSeniorConnect() || isWmsSilt()\" (click)=\"selection = [rowData]\">\n <span>{{rowData[\"partnerDocument\"]}}</span>\n </td>\n <td *ngIf=\"isWmsWIS() || isWmsSilt()\" (click)=\"selection = [rowData]\">\n <span>{{rowData[\"logistcUnitName\"]}}</span>\n </td>\n <td *ngIf=\"isWmsWIS() || isWmsSilt()\" (click)=\"selection = [rowData]\">\n <span>{{rowData[\"logistcUnitDocument\"]}}</span>\n </td>\n <td *ngIf=\"isWmsSilt()\" (click)=\"selection = [rowData]\">\n <span>{{rowData[\"ownerName\"]}}</span>\n </td>\n <td *ngIf=\"isWmsSilt()\" (click)=\"selection = [rowData]\">\n <span>{{rowData[\"ownerDocument\"]}}</span>\n </td>\n <td *ngIf=\"!isClienteExterno\" (click)=\"selection = [rowData]\">\n <p-dropdown\n inputId=\"invoiceCondition\"\n name=\"invoiceCondition\"\n [autoWidth]=\"false\"\n [options]=\"getFilteredInvoiceConditions(rowData?.invoiceCondition)\"\n appendTo=\"body\"\n [(ngModel)]=\"rowData.invoiceCondition\"\n (onChange)=\"disabled = false\">\n </p-dropdown>\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"paginatorright\">\n <span [translate]=\"'yms.main.total_records'\" \n [translateParams]=\"{ value: documentTotalRecords }\">\n </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 [isClienteExterno]=\"isClienteExterno\">\n </register-document> \n <insert-key\n [wmsSystem]=\"wmsSystem\" \n (document)=\"onChangeDocument($event)\"\n [(visible)]=\"visibleInvoiceKey\">\n </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\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 </s-empty-state>\n </div>\n</ng-template>",
|
|
3628
3642
|
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}.invoice-condition .p-dropdown{position:relative;z-index:1000}"]
|
|
3629
3643
|
}),
|
|
3630
3644
|
__metadata("design:paramtypes", [TranslateService,
|
|
@@ -3692,7 +3706,8 @@ var RegisterDocumentComponent = /** @class */ (function () {
|
|
|
3692
3706
|
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_condition_authorized"), value: InvoiceCondition.AUTHORIZED },
|
|
3693
3707
|
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_condition_manual_authorized"), value: InvoiceCondition.MANUAL_AUTHORIZED },
|
|
3694
3708
|
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_condition_partial_authorized"), value: InvoiceCondition.PARTIAL_AUTHORIZED },
|
|
3695
|
-
{ label: this.translate.instant("yms.int.
|
|
3709
|
+
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_condition_devolution"), value: InvoiceCondition.DEVOLUTION },
|
|
3710
|
+
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_condition_rejected"), value: InvoiceCondition.REJECTED },
|
|
3696
3711
|
];
|
|
3697
3712
|
}
|
|
3698
3713
|
RegisterDocumentComponent.prototype.ngOnInit = function () {
|
|
@@ -3836,15 +3851,35 @@ var RegisterDocumentModule = /** @class */ (function () {
|
|
|
3836
3851
|
return RegisterDocumentModule;
|
|
3837
3852
|
}());
|
|
3838
3853
|
|
|
3854
|
+
var ExternalTenantService = /** @class */ (function (_super) {
|
|
3855
|
+
__extends(ExternalTenantService, _super);
|
|
3856
|
+
function ExternalTenantService(http, messageService) {
|
|
3857
|
+
var _this = _super.call(this, http, messageService, 'yms/agenda/entities/externalTenant', '') || this;
|
|
3858
|
+
_this.http = http;
|
|
3859
|
+
_this.messageService = messageService;
|
|
3860
|
+
return _this;
|
|
3861
|
+
}
|
|
3862
|
+
ExternalTenantService = __decorate([
|
|
3863
|
+
Injectable(),
|
|
3864
|
+
__metadata("design:paramtypes", [HttpClient, MessageService])
|
|
3865
|
+
], ExternalTenantService);
|
|
3866
|
+
return ExternalTenantService;
|
|
3867
|
+
}(EntityService));
|
|
3868
|
+
|
|
3839
3869
|
var InsertKeyComponent = /** @class */ (function () {
|
|
3840
|
-
function InsertKeyComponent(formBuilder, documentService, utils) {
|
|
3870
|
+
function InsertKeyComponent(formBuilder, documentService, utils, confirmationService, translate, externalTenantService) {
|
|
3841
3871
|
this.formBuilder = formBuilder;
|
|
3842
3872
|
this.documentService = documentService;
|
|
3843
3873
|
this.utils = utils;
|
|
3874
|
+
this.confirmationService = confirmationService;
|
|
3875
|
+
this.translate = translate;
|
|
3876
|
+
this.externalTenantService = externalTenantService;
|
|
3844
3877
|
this.document = new EventEmitter();
|
|
3845
3878
|
this.visible = new EventEmitter();
|
|
3846
3879
|
this.visibleChange = new EventEmitter();
|
|
3847
3880
|
this.isLoading = false;
|
|
3881
|
+
this.isPartnerloading = false;
|
|
3882
|
+
this.ngUnsubscribe = new Subject();
|
|
3848
3883
|
}
|
|
3849
3884
|
InsertKeyComponent.prototype.ngOnInit = function () {
|
|
3850
3885
|
var _this = this;
|
|
@@ -3890,6 +3925,7 @@ var InsertKeyComponent = /** @class */ (function () {
|
|
|
3890
3925
|
else {
|
|
3891
3926
|
_this.utils.translateMessage("error", "yms.int.wms_error_search_document_message_header", "yms.int.wms_error_unknown_search_document_message_content" + err.error.message);
|
|
3892
3927
|
}
|
|
3928
|
+
_this.confirmInvoiceDialog();
|
|
3893
3929
|
return throwError(err);
|
|
3894
3930
|
}), finalize(function () {
|
|
3895
3931
|
_this.isLoading = false;
|
|
@@ -3899,10 +3935,56 @@ var InsertKeyComponent = /** @class */ (function () {
|
|
|
3899
3935
|
_this.utils.message("warn", "yms.int.wms_insert_key_warning_message_header", "yms.int.wms_insert_key_warning_message_description");
|
|
3900
3936
|
return;
|
|
3901
3937
|
}
|
|
3902
|
-
|
|
3938
|
+
var document = content.contents[0];
|
|
3939
|
+
document.invoiceKey = _this.formGroup.get('key').value;
|
|
3940
|
+
document.invoiceCondition = InvoiceCondition.AUTHORIZED;
|
|
3941
|
+
_this.document.emit(document);
|
|
3903
3942
|
_this.formGroup.reset();
|
|
3904
3943
|
});
|
|
3905
3944
|
};
|
|
3945
|
+
InsertKeyComponent.prototype.confirmInvoiceDialog = function () {
|
|
3946
|
+
var _this = this;
|
|
3947
|
+
this.confirmationService.confirm({
|
|
3948
|
+
message: this.translate.instant("yms.int.wms_message_confirm_invoice_dialog"),
|
|
3949
|
+
acceptLabel: this.translate.instant("yms.int.wms_accept_confirm_invoice_dialog"),
|
|
3950
|
+
rejectLabel: this.translate.instant("yms.int.wms_reject_confirm_invoice_dialog"),
|
|
3951
|
+
header: this.translate.instant("yms.int.wms_header_content_confirm_invoice_dialog"),
|
|
3952
|
+
accept: function () { return _this.buildInvoice(); }
|
|
3953
|
+
});
|
|
3954
|
+
};
|
|
3955
|
+
InsertKeyComponent.prototype.buildInvoice = function () {
|
|
3956
|
+
var _this = this;
|
|
3957
|
+
this.isPartnerloading = true;
|
|
3958
|
+
var partnerDocument = this.formGroup.get('partnerDocument').value;
|
|
3959
|
+
this.externalTenantService.list({
|
|
3960
|
+
filterQuery: "cnpj eq '" + partnerDocument + "'"
|
|
3961
|
+
})
|
|
3962
|
+
.pipe(takeUntil(this.ngUnsubscribe), finalize(function () {
|
|
3963
|
+
_this.isPartnerloading = false;
|
|
3964
|
+
}))
|
|
3965
|
+
.subscribe(function (contents) {
|
|
3966
|
+
var documentInvoice = _this.createDocumentInvoice(contents);
|
|
3967
|
+
_this.document.emit(documentInvoice);
|
|
3968
|
+
_this.formGroup.reset();
|
|
3969
|
+
});
|
|
3970
|
+
};
|
|
3971
|
+
InsertKeyComponent.prototype.createDocumentInvoice = function (partners) {
|
|
3972
|
+
var documentInvoice = {
|
|
3973
|
+
invoiceKey: this.formGroup.get('key').value,
|
|
3974
|
+
invoiceNumber: this.formGroup.get('invoiceNumber').value,
|
|
3975
|
+
invoiceSerialNumber: this.formGroup.get('invoiceSerie').value,
|
|
3976
|
+
partnerDocument: this.formGroup.get('partnerDocument').value,
|
|
3977
|
+
partnerName: null,
|
|
3978
|
+
type: null,
|
|
3979
|
+
key: null,
|
|
3980
|
+
schedulingId: null
|
|
3981
|
+
};
|
|
3982
|
+
if (partners.totalElements > 0) {
|
|
3983
|
+
var partner = partners.contents[0];
|
|
3984
|
+
documentInvoice.partnerName = partner.descricao;
|
|
3985
|
+
}
|
|
3986
|
+
return documentInvoice;
|
|
3987
|
+
};
|
|
3906
3988
|
InsertKeyComponent.prototype.validateKeyDetails = function (nf) {
|
|
3907
3989
|
if (!nf) {
|
|
3908
3990
|
this.keyErrorMessage = null;
|
|
@@ -3960,12 +4042,15 @@ var InsertKeyComponent = /** @class */ (function () {
|
|
|
3960
4042
|
InsertKeyComponent = __decorate([
|
|
3961
4043
|
Component({
|
|
3962
4044
|
selector: "insert-key",
|
|
3963
|
-
template: "<form [formGroup]=\"formGroup\">\n <p-dialog [(visible)]=\"visible\" [modal]=\"true\" \n [draggable]=\"false\" (visibleChange)=\"cancel()\" (onShow)=\"onDialogShow()\">\n <p-header>{{'yms.int.wms_search_document' | translate}} {{ wmsSystem }}</p-header>\n <s-loading-state [loading]=\"isLoading\">\n <div class=\"flex py-2 justify-content-center spacing-bottom\"\n *ngIf=\"!isWmsSeniorConnect()\">\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 <span class=\"error-message\">{{keyErrorMessage | translate}}</span>\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 </s-loading-state>\n </p-dialog>\n\n</form>\n",
|
|
4045
|
+
template: "<form [formGroup]=\"formGroup\">\n <p-dialog [(visible)]=\"visible\" [modal]=\"true\" \n [draggable]=\"false\" (visibleChange)=\"cancel()\" (onShow)=\"onDialogShow()\">\n <p-header>{{'yms.int.wms_search_document' | translate}} {{ wmsSystem }}</p-header>\n <s-loading-state [loading]=\"isLoading || isPartnerloading\">\n <div class=\"flex py-2 justify-content-center spacing-bottom\"\n *ngIf=\"!isWmsSeniorConnect()\">\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 <span class=\"error-message\">{{keyErrorMessage | translate}}</span>\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 </s-loading-state>\n </p-dialog>\n\n</form>\n",
|
|
3964
4046
|
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}.error-message{color:#c13018;display:flex}"]
|
|
3965
4047
|
}),
|
|
3966
4048
|
__metadata("design:paramtypes", [FormBuilder,
|
|
3967
4049
|
DocumentService,
|
|
3968
|
-
UtilsMessageService
|
|
4050
|
+
UtilsMessageService,
|
|
4051
|
+
ConfirmationService,
|
|
4052
|
+
TranslateService,
|
|
4053
|
+
ExternalTenantService])
|
|
3969
4054
|
], InsertKeyComponent);
|
|
3970
4055
|
return InsertKeyComponent;
|
|
3971
4056
|
}());
|
|
@@ -3985,7 +4070,8 @@ var InsertKeyModule = /** @class */ (function () {
|
|
|
3985
4070
|
LoadingStateModule
|
|
3986
4071
|
],
|
|
3987
4072
|
exports: [InsertKeyComponent],
|
|
3988
|
-
declarations: [InsertKeyComponent]
|
|
4073
|
+
declarations: [InsertKeyComponent],
|
|
4074
|
+
providers: [ExternalTenantService]
|
|
3989
4075
|
})
|
|
3990
4076
|
], InsertKeyModule);
|
|
3991
4077
|
return InsertKeyModule;
|
|
@@ -3999,6 +4085,7 @@ var DocumentGridModule = /** @class */ (function () {
|
|
|
3999
4085
|
declarations: [DocumentGridComponent],
|
|
4000
4086
|
entryComponents: [DocumentGridComponent],
|
|
4001
4087
|
exports: [DocumentGridComponent],
|
|
4088
|
+
providers: [ExternalTenantService],
|
|
4002
4089
|
imports: [
|
|
4003
4090
|
CommonModule,
|
|
4004
4091
|
TranslateModule,
|
|
@@ -4098,8 +4185,9 @@ var DocumentListComponent = /** @class */ (function (_super) {
|
|
|
4098
4185
|
DocumentListComponent.prototype.getColumnLabels = function () {
|
|
4099
4186
|
if (this.isWmsWIS()) {
|
|
4100
4187
|
return __spread(this.getLabelsInvoice(), [
|
|
4101
|
-
{ field: "
|
|
4102
|
-
{ field: "
|
|
4188
|
+
{ field: "invoiceKey", label: 'yms.int.wms_register_document_invoice_invoice_key' },
|
|
4189
|
+
{ field: "partnerName", label: 'yms.int.wms_register_document_invoice_partner_name' },
|
|
4190
|
+
{ field: "partnerDocument", label: 'yms.int.wms_register_document_invoice_partner_document' },
|
|
4103
4191
|
{ field: "code", label: 'yms.int.wms_register_document_invoice_code' },
|
|
4104
4192
|
{ field: "invoiceCondition", label: 'yms.int.wms_register_document_invoice_condition' },
|
|
4105
4193
|
{ field: "notes", label: 'yms.int.wms_register_document_invoice_notes' },
|
|
@@ -4108,8 +4196,8 @@ var DocumentListComponent = /** @class */ (function (_super) {
|
|
|
4108
4196
|
if (this.isWmsSeniorConnect()) {
|
|
4109
4197
|
return [
|
|
4110
4198
|
{ field: "key", label: 'yms.int.wms_purchaseOrder' },
|
|
4111
|
-
{ field: "partnerName", label: 'yms.int.
|
|
4112
|
-
{ field: "partnerDocument", label: 'yms.int.
|
|
4199
|
+
{ field: "partnerName", label: 'yms.int.wms_register_document_invoice_partner_name' },
|
|
4200
|
+
{ field: "partnerDocument", label: 'yms.int.wms_register_document_invoice_partner_document' },
|
|
4113
4201
|
];
|
|
4114
4202
|
}
|
|
4115
4203
|
return __spread([
|
|
@@ -4168,7 +4256,7 @@ var DocumentListComponent = /** @class */ (function (_super) {
|
|
|
4168
4256
|
], DocumentListComponent.prototype, "wmsSystem", void 0);
|
|
4169
4257
|
DocumentListComponent = __decorate([
|
|
4170
4258
|
Component({
|
|
4171
|
-
template: "<div class=\"ui-g\">\n <div class=\"ui-g-12\">\n <p-table\n selectionMode=\"single\"\n [(selection)]=\"selected\"\n [value]=\"documents\"\n [columns]=\"getColumns\"\n dataKey=\"id\"\n rows=\"10\"\n [paginator]=\"true\"\n [totalRecords]=\"gridTotalRecords\"\n [lazy]=\"true\"\n [resizableColumns]=\"true\"\n (onLazyLoad)=\"updateGridData($event)\"\n *sLoadingState=\"gridLoading\"\n sortMode=\"multiple\"\n styleClass=\"sds-table-scrollable\"\n [rowsPerPageOptions]=\"[10, 20, 50, 100, 200]\"\n paginatorDropdownScrollHeight=\"250px\"\n [scrollable]=\"true\"\n >\n <ng-template pTemplate=\"colgroup\" let-columns>\n <colgroup>\n <col *ngFor=\"let col of columns\" class=\"table-col-width\">\n </colgroup>\n </ng-template>\n\n <ng-template pTemplate=\"header\" let-columns>\n <tr>\n <th *ngFor=\"let col of columns\" pResizableColumn [pSortableColumn]=\"col.field\" scope=\"col\">\n <div class=\"senior-header\">\n <span class=\"senior-header-title\">{{ col.label | translate }}</span>\n <p-sortIcon [field]=\"col.field\"></p-sortIcon>\n </div>\n </th>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"body\" let-rowData let-columns=\"columns\">\n <tr *ngIf=\"isWmsWIS()\">\n <td>{{ rowData?.invoiceNumber || 'N/A' }}</td>\n <td>{{ rowData?.invoiceSerialNumber || 'N/A' }}</td>\n <td>{{ rowData?.partnerName || 'N/A' }}</td>\n <td>{{ rowData?.partnerDocument || 'N/A' }}</td>\n <td>{{ rowData?.code || 'N/A' }}</td>\n <td>\n {{ getInvoiceConditionTranslation(rowData?.invoiceCondition) | translate }}\n </td>\n <td>{{ rowData?.notes || 'N/A' }}</td>\n </tr>\n <tr *ngIf=\"isWmsSeniorConnect()\">\n <td>{{rowData?.key}}</td>\n <td>{{rowData?.partnerName}}</td>\n <td>{{rowData?.partnerDocument}}</td>\n </tr>\n <tr *ngIf=\"!isWmsWIS() && !isWmsSeniorConnect()\">\n <td>{{rowData?.invoiceKey}}</td>\n <td>{{rowData?.invoiceNumber}}</td>\n <td>{{rowData?.invoiceSerialNumber}}</td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"paginatorright\">\n <span>\n {{ gridTotalRecords + \" \" + \n ('yms.int.wms_register_document_total_elements' | translate:{value: gridTotalRecords}) }}\n </span>\n </ng-template>\n </p-table>\n </div>\n</div>",
|
|
4259
|
+
template: "<div class=\"ui-g\">\n <div class=\"ui-g-12\">\n <p-table\n selectionMode=\"single\"\n [(selection)]=\"selected\"\n [value]=\"documents\"\n [columns]=\"getColumns\"\n dataKey=\"id\"\n rows=\"10\"\n [paginator]=\"true\"\n [totalRecords]=\"gridTotalRecords\"\n [lazy]=\"true\"\n [resizableColumns]=\"true\"\n (onLazyLoad)=\"updateGridData($event)\"\n *sLoadingState=\"gridLoading\"\n sortMode=\"multiple\"\n styleClass=\"sds-table-scrollable\"\n [rowsPerPageOptions]=\"[10, 20, 50, 100, 200]\"\n paginatorDropdownScrollHeight=\"250px\"\n [scrollable]=\"true\"\n >\n <ng-template pTemplate=\"colgroup\" let-columns>\n <colgroup>\n <col *ngFor=\"let col of columns\" class=\"table-col-width\">\n </colgroup>\n </ng-template>\n\n <ng-template pTemplate=\"header\" let-columns>\n <tr>\n <th *ngFor=\"let col of columns\" pResizableColumn [pSortableColumn]=\"col.field\" scope=\"col\">\n <div class=\"senior-header\">\n <span class=\"senior-header-title\">{{ col.label | translate }}</span>\n <p-sortIcon [field]=\"col.field\"></p-sortIcon>\n </div>\n </th>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"body\" let-rowData let-columns=\"columns\">\n <tr *ngIf=\"isWmsWIS()\">\n <td>{{ rowData?.invoiceNumber || 'N/A' }}</td>\n <td>{{ rowData?.invoiceSerialNumber || 'N/A' }}</td>\n <td>{{ rowData?.invoiceKey || 'N/A' }}</td>\n <td>{{ rowData?.partnerName || 'N/A' }}</td>\n <td>{{ rowData?.partnerDocument || 'N/A' }}</td>\n <td>{{ rowData?.code || 'N/A' }}</td>\n <td>\n {{ getInvoiceConditionTranslation(rowData?.invoiceCondition) | translate }}\n </td>\n <td>{{ rowData?.notes || 'N/A' }}</td>\n </tr>\n <tr *ngIf=\"isWmsSeniorConnect()\">\n <td>{{rowData?.key}}</td>\n <td>{{rowData?.partnerName}}</td>\n <td>{{rowData?.partnerDocument}}</td>\n </tr>\n <tr *ngIf=\"!isWmsWIS() && !isWmsSeniorConnect()\">\n <td>{{rowData?.invoiceKey}}</td>\n <td>{{rowData?.invoiceNumber}}</td>\n <td>{{rowData?.invoiceSerialNumber}}</td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"paginatorright\">\n <span>\n {{ gridTotalRecords + \" \" + \n ('yms.int.wms_register_document_total_elements' | translate:{value: gridTotalRecords}) }}\n </span>\n </ng-template>\n </p-table>\n </div>\n</div>",
|
|
4172
4260
|
styles: [".table-col-width{width:250px}"]
|
|
4173
4261
|
}),
|
|
4174
4262
|
__metadata("design:paramtypes", [DocumentService])
|
|
@@ -14304,5 +14392,5 @@ var DockModule = /** @class */ (function () {
|
|
|
14304
14392
|
return DockModule;
|
|
14305
14393
|
}());
|
|
14306
14394
|
|
|
14307
|
-
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, UtilsMessageService as ɵbc,
|
|
14395
|
+
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, UtilsMessageService as ɵbc, ExternalTenantService as ɵbd, RegisterDocumentModule as ɵbe, RegisterDocumentComponent as ɵbf, InsertKeyModule as ɵbg, InsertKeyComponent as ɵbh, IntegrationService$1 as ɵbi, RecebimentoFormComponent as ɵbj, DerivacaoService as ɵbk, NotaValidatorService as ɵbl, TransgeniaService as ɵbm, VerificaNotafiscal as ɵbn, BuildFormField as ɵbo, ExpedicaoFormComponent as ɵbp, ExpedicaoInfoComponent as ɵbq, RecebimentoInfoComponent as ɵbr, DevolucaoFormComponent as ɵbs, DevolucaoService as ɵbt, DevolucaoChegadaVeiculoOverride as ɵbu, RecebimentoOrdemCompraFormComponent as ɵbv, OrdemCompraService as ɵbw, RecebimentoOrdemCompraService as ɵbx, RecebimentoOrdemCompraChegadaVeiculoOverride as ɵby, RecebimentoOrdemCompraInfoComponent as ɵbz, ViewImageComponent as ɵc, DevolucaoInfoComponent as ɵca, ContratoFormComponent as ɵcb, OrdemCompraFormComponent as ɵcc, ProcessoAvulsoFormComponent as ɵcd, ProcessoAvulsoService as ɵce, ProcessoAvulsoChegadaVeiculoOverride as ɵcf, ProcessoAvulsoInfoComponent as ɵcg, LogIntegracaoDescritor as ɵch, LogIntegracaoComponent as ɵci, LogIntegracaoService as ɵcj, DerivacaoModule as ɵck, DevolucaoModule as ɵcl, OrdemCompraModule as ɵcm, RecebimentoOrdemCompraModule as ɵcn, TransgeniaModule as ɵco, ProcessoAvulsoModule as ɵcp, LogIntegracaoModule as ɵcq, NotaFormModule as ɵcr, DirectivesModule as ɵcs, TrimDirective as ɵct, NotaFormComponent as ɵcu, 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 };
|
|
14308
14396
|
//# sourceMappingURL=seniorsistemas-yms-integration.js.map
|