@seniorsistemas/yms-integration 1.40.0 → 1.41.0-40a6b08d-a470-47ac-b09e-157571809831
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 +109 -52
- 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 +45 -44
- package/esm2015/src/wms/components/document-grid/document-grid.component.js +17 -2
- package/esm2015/src/wms/components/document-grid/document-grid.module.js +4 -3
- package/esm2015/src/wms/components/document-grid/insert-key/insert-key.component.js +12 -5
- package/esm2015/src/wms/components/document-grid/register-document/register-document.component.js +5 -2
- package/esm2015/src/wms/components/document-list/document-list.component.js +2 -1
- package/esm2015/src/wms/components/utils/invoice-conditions.js +2 -1
- package/esm2015/src/wms/entities/invoice-condition/invoice-condition.js +2 -1
- package/esm2015/src/wms/entities/wms-system/wms-system.js +2 -1
- package/esm2015/src/wms/shared/cpf-cnpj-format.pipe.js +28 -0
- package/esm5/seniorsistemas-yms-integration.js +45 -44
- package/esm5/src/wms/components/document-grid/document-grid.component.js +16 -2
- package/esm5/src/wms/components/document-grid/document-grid.module.js +4 -3
- package/esm5/src/wms/components/document-grid/insert-key/insert-key.component.js +12 -5
- package/esm5/src/wms/components/document-grid/register-document/register-document.component.js +5 -2
- package/esm5/src/wms/components/document-list/document-list.component.js +2 -1
- package/esm5/src/wms/components/utils/invoice-conditions.js +2 -1
- package/esm5/src/wms/entities/invoice-condition/invoice-condition.js +2 -1
- package/esm5/src/wms/entities/wms-system/wms-system.js +2 -1
- package/esm5/src/wms/shared/cpf-cnpj-format.pipe.js +31 -0
- package/fesm2015/seniorsistemas-yms-integration.js +64 -10
- package/fesm2015/seniorsistemas-yms-integration.js.map +1 -1
- package/fesm5/seniorsistemas-yms-integration.js +66 -10
- package/fesm5/seniorsistemas-yms-integration.js.map +1 -1
- package/package.json +1 -1
- package/seniorsistemas-yms-integration.d.ts +44 -43
- package/seniorsistemas-yms-integration.metadata.json +1 -1
- package/src/wms/components/document-grid/document-grid.component.d.ts +2 -0
- package/src/wms/components/document-grid/insert-key/insert-key.component.d.ts +1 -0
- package/src/wms/components/document-grid/register-document/register-document.component.d.ts +1 -0
- package/src/wms/entities/invoice-condition/invoice-condition.d.ts +2 -1
- package/src/wms/entities/wms-system/wms-system.d.ts +1 -0
- package/src/wms/shared/cpf-cnpj-format.pipe.d.ts +4 -0
|
@@ -2,7 +2,7 @@ import { Subject, throwError, BehaviorSubject, empty, ReplaySubject, NEVER, fork
|
|
|
2
2
|
import { takeUntil, catchError, finalize, map, filter, mergeMap, tap, concatMap, switchMap, debounceTime } from 'rxjs/operators';
|
|
3
3
|
import { __extends, __decorate, __metadata, __assign, __spread, __values, __param } from 'tslib';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
|
-
import { Injectable, Input, Component, NgModule, Output, defineInjectable, inject, EventEmitter, ViewChild, TemplateRef, InjectionToken, Inject, HostListener, Directive, ElementRef } from '@angular/core';
|
|
5
|
+
import { Injectable, Input, Component, NgModule, Output, defineInjectable, inject, EventEmitter, ViewChild, TemplateRef, Pipe, InjectionToken, Inject, HostListener, Directive, ElementRef } from '@angular/core';
|
|
6
6
|
import { TranslateService, TranslateModule } from '@ngx-translate/core';
|
|
7
7
|
import { ButtonModule, LoadingStateModule, FieldType, FormField, CustomFieldsModule, ControlErrorsModule, EmptyStateModule, DynamicFormModule, TokenListModule, NumberInputModule, LocaleModule, SidebarModule } from '@seniorsistemas/angular-components';
|
|
8
8
|
import { MessageModule } from 'primeng/message';
|
|
@@ -3002,6 +3002,7 @@ var WmsSystem;
|
|
|
3002
3002
|
WmsSystem["WIS"] = "WIS";
|
|
3003
3003
|
WmsSystem["ALCIS"] = "ALCIS";
|
|
3004
3004
|
WmsSystem["SENIOR_CONNECT"] = "SENIOR_CONNECT";
|
|
3005
|
+
WmsSystem["PARTNER"] = "PARTNER";
|
|
3005
3006
|
WmsSystem["GENERIC"] = "GENERIC";
|
|
3006
3007
|
})(WmsSystem || (WmsSystem = {}));
|
|
3007
3008
|
|
|
@@ -3298,6 +3299,7 @@ var InvoiceCondition;
|
|
|
3298
3299
|
InvoiceCondition["MANUAL_AUTHORIZED"] = "MANUAL_AUTHORIZED";
|
|
3299
3300
|
InvoiceCondition["DEVOLUTION"] = "DEVOLUTION";
|
|
3300
3301
|
InvoiceCondition["REJECTED"] = "REJECTED";
|
|
3302
|
+
InvoiceCondition["DIVERGENCE"] = "DIVERGENCE";
|
|
3301
3303
|
})(InvoiceCondition || (InvoiceCondition = {}));
|
|
3302
3304
|
|
|
3303
3305
|
function getInvoiceConditions(translate) {
|
|
@@ -3308,6 +3310,7 @@ function getInvoiceConditions(translate) {
|
|
|
3308
3310
|
{ label: translate.instant("yms.int.wms_grid_document_invoice_condition_partial_authorized"), value: InvoiceCondition.PARTIAL_AUTHORIZED },
|
|
3309
3311
|
{ label: translate.instant("yms.int.wms_grid_document_invoice_condition_devolution"), value: InvoiceCondition.DEVOLUTION },
|
|
3310
3312
|
{ label: translate.instant("yms.int.wms_grid_document_invoice_condition_rejected"), value: InvoiceCondition.REJECTED },
|
|
3313
|
+
{ label: translate.instant("yms.int.wms_grid_document_invoice_condition_divergence"), value: InvoiceCondition.DIVERGENCE },
|
|
3311
3314
|
];
|
|
3312
3315
|
}
|
|
3313
3316
|
|
|
@@ -3571,11 +3574,22 @@ var DocumentGridComponent = /** @class */ (function () {
|
|
|
3571
3574
|
case WmsSystem.SENIOR:
|
|
3572
3575
|
result = this.wmsSiltIntegration();
|
|
3573
3576
|
break;
|
|
3577
|
+
case WmsSystem.PARTNER:
|
|
3578
|
+
result = this.wmsPartnerIntegration();
|
|
3579
|
+
break;
|
|
3574
3580
|
default:
|
|
3575
3581
|
result = [];
|
|
3576
3582
|
}
|
|
3577
3583
|
return result;
|
|
3578
3584
|
};
|
|
3585
|
+
DocumentGridComponent.prototype.wmsPartnerIntegration = function () {
|
|
3586
|
+
var columns = __spread([
|
|
3587
|
+
{ field: "invoiceKey", header: this.translate.instant("yms.int.wms_register_document_invoice_key") },
|
|
3588
|
+
{ field: "invoiceNumber", header: this.translate.instant("yms.int.wms_register_document_invoice_number") },
|
|
3589
|
+
{ field: "invoiceSerialNumber", header: this.translate.instant("yms.int.wms_register_document_invoice_serial_number") }
|
|
3590
|
+
], this.getColumnPartner());
|
|
3591
|
+
return columns;
|
|
3592
|
+
};
|
|
3579
3593
|
DocumentGridComponent.prototype.wmsSeniorConnectIntegration = function () {
|
|
3580
3594
|
var columns = __spread([
|
|
3581
3595
|
{ field: "key", header: this.translate.instant("yms.int.wms_purchaseOrder") }
|
|
@@ -3632,6 +3646,9 @@ var DocumentGridComponent = /** @class */ (function () {
|
|
|
3632
3646
|
DocumentGridComponent.prototype.isWmsSilt = function () {
|
|
3633
3647
|
return this.wmsSystem === WmsSystem.SENIOR;
|
|
3634
3648
|
};
|
|
3649
|
+
DocumentGridComponent.prototype.isWmsPartner = function () {
|
|
3650
|
+
return this.wmsSystem === WmsSystem.PARTNER;
|
|
3651
|
+
};
|
|
3635
3652
|
DocumentGridComponent.prototype.sucessMessage = function () {
|
|
3636
3653
|
return this.utils.message("success", this.summary, "saved_message_content");
|
|
3637
3654
|
};
|
|
@@ -3706,7 +3723,7 @@ var DocumentGridComponent = /** @class */ (function () {
|
|
|
3706
3723
|
DocumentGridComponent = __decorate([
|
|
3707
3724
|
Component({
|
|
3708
3725
|
selector: 'document-grid',
|
|
3709
|
-
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() || isWmsSeniorConnect()\" (click)=\"selection = [rowData]\">\n <span>{{rowData[\"logistcUnitName\"]}}</span>\n </td>\n <td *ngIf=\"isWmsWIS() || isWmsSilt() || isWmsSeniorConnect()\" (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 && isWmsWIS()\" (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 [agenda]=\"agenda\"\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>",
|
|
3726
|
+
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()\" \n (click)=\"selection = [rowData]\" (keypress)=\"selection = [rowData]\">\n <span>{{rowData[\"key\"]}}</span>\n </td>\n <td *ngIf=\"isWmsSilt() || isWmsPartner()\" \n (click)=\"selection = [rowData]\" (keypress)=\"selection = [rowData]\">\n <span>{{rowData[\"invoiceKey\"]}}</span>\n </td>\n <td *ngIf=\"isWmsWIS() || isWmsSilt() || isWmsPartner()\" \n (click)=\"selection = [rowData]\" (keypress)=\"selection = [rowData]\">\n <span>{{rowData[\"invoiceNumber\"]}}</span>\n </td>\n <td *ngIf=\"isWmsWIS() || isWmsSilt() || isWmsPartner()\" \n (click)=\"selection = [rowData]\" (keypress)=\"selection = [rowData]\">\n <span>{{rowData[\"invoiceSerialNumber\"]}}</span>\n </td>\n <td *ngIf=\"isWmsWIS() || isWmsSeniorConnect() || isWmsSilt() || isWmsPartner()\" \n (click)=\"selection = [rowData]\" (keypress)=\"selection = [rowData]\">\n <span>{{rowData[\"partnerName\"]}}</span>\n </td>\n <td *ngIf=\"isWmsWIS() || isWmsSeniorConnect() || isWmsSilt() || isWmsPartner()\" \n (click)=\"selection = [rowData]\" (keypress)=\"selection = [rowData]\">\n <span>{{rowData[\"partnerDocument\"] | cpfCnpjFormat}}</span>\n </td>\n <td *ngIf=\"isWmsWIS() || isWmsSilt() || isWmsSeniorConnect()\" \n (click)=\"selection = [rowData]\" (keypress)=\"selection = [rowData]\">\n <span>{{rowData[\"logistcUnitName\"]}}</span>\n </td>\n <td *ngIf=\"isWmsWIS() || isWmsSilt() || isWmsSeniorConnect()\" \n (click)=\"selection = [rowData]\" (keypress)=\"selection = [rowData]\">\n <span>{{rowData[\"logistcUnitDocument\"]}}</span>\n </td>\n <td *ngIf=\"isWmsSilt()\" (click)=\"selection = [rowData]\" (keypress)=\"selection = [rowData]\">\n <span>{{rowData[\"ownerName\"]}}</span>\n </td>\n <td *ngIf=\"isWmsSilt()\" (click)=\"selection = [rowData]\" (keypress)=\"selection = [rowData]\">\n <span>{{rowData[\"ownerDocument\"]}}</span>\n </td>\n <td *ngIf=\"!isClienteExterno && isWmsWIS()\" \n (click)=\"selection = [rowData]\" (keypress)=\"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 [agenda]=\"agenda\"\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>",
|
|
3710
3727
|
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}"]
|
|
3711
3728
|
}),
|
|
3712
3729
|
__metadata("design:paramtypes", [TranslateService,
|
|
@@ -3846,6 +3863,9 @@ var RegisterDocumentComponent = /** @class */ (function () {
|
|
|
3846
3863
|
RegisterDocumentComponent.prototype.isWmsSeniorConnect = function () {
|
|
3847
3864
|
return this.wmsSystem === WmsSystem.SENIOR_CONNECT;
|
|
3848
3865
|
};
|
|
3866
|
+
RegisterDocumentComponent.prototype.isWmsPartner = function () {
|
|
3867
|
+
return this.wmsSystem === WmsSystem.PARTNER;
|
|
3868
|
+
};
|
|
3849
3869
|
RegisterDocumentComponent.prototype.watchFormChanges = function () {
|
|
3850
3870
|
var _this = this;
|
|
3851
3871
|
this.formGroup.valueChanges.subscribe(function () {
|
|
@@ -3888,7 +3908,7 @@ var RegisterDocumentComponent = /** @class */ (function () {
|
|
|
3888
3908
|
RegisterDocumentComponent = __decorate([
|
|
3889
3909
|
Component({
|
|
3890
3910
|
selector: "register-document",
|
|
3891
|
-
template: "<s-sidebar\n [visible]=\"visible\"\n header=\"{{ 'yms.int.wms_register_document_add_document' | translate
|
|
3911
|
+
template: "<s-sidebar\n [visible]=\"visible\"\n header=\"{{isWmsPartner() ? ('yms.int.wms_register_document_add_document' | translate ) : \n ('yms.int.wms_register_document_add_document' | translate ) + ' ' + wmsSystem }}\"\n (visibleChange)=\"close()\"\n (onclose)=\"close()\">\n <form [formGroup]=\"formGroup\">\n <div class=\"ui-g ui-fluid\">\n <div class=\"ui-g-6\" *ngIf=\"isWmsSeniorConnect()\">\n <label for=\"key\">{{'yms.int.wms_purchaseOrder' | translate}}</label>\n <input id=\"key\" pInputText type=\"text\" formControlName=\"key\">\n </div>\n <div class=\"ui-g-6\" *ngIf=\"!isWmsSeniorConnect() && !isWmsWis()\">\n <label for=\"invoiceKey\">{{'yms.int.wms_register_document_invoice_key' | translate}}</label>\n <input id=\"invoiceKey\" pInputText type=\"text\" formControlName=\"invoiceKey\">\n </div>\n <div class=\"ui-g-6\" *ngIf=\"!isWmsSeniorConnect()\">\n <label for=\"invoiceNumber\">{{'yms.int.wms_register_document_invoice_number' | translate}}</label>\n <input id=\"invoiceNumber\" pInputText type=\"text\" formControlName=\"invoiceNumber\">\n </div>\n <div class=\"ui-g-6\" *ngIf=\"!isWmsSeniorConnect()\">\n <label for=\"invoiceSerialNumber\">\n {{'yms.int.wms_register_document_invoice_serial_number' | translate}}\n </label>\n <input id=\"invoiceSerialNumber\" pInputText type=\"text\" formControlName=\"invoiceSerialNumber\">\n </div>\n <div class=\"ui-g-8\">\n <label for=\"logistcUnitName\">{{'yms.int.wms_register_document_logistc_unit_name' | translate}}</label>\n <input id=\"logistcUnitName\" pInputText type=\"text\" formControlName=\"logistcUnitName\">\n </div>\n <div class=\"ui-g-4\">\n <label for=\"logistcUnitDocument\">\n {{'yms.int.wms_register_document_logistc_unit_document' | translate}}\n </label>\n <input id=\"logistcUnitDocument\" pInputText type=\"text\" formControlName=\"logistcUnitDocument\">\n </div>\n <div class=\"ui-g-8\" *ngIf=\"!isWmsSeniorConnect() && !isWmsWis() && !isWmsPartner()\">\n <label for=\"documentOwnerName\">{{'yms.int.wms_register_document_owner_name' | translate}}</label>\n <input id=\"documentOwnerName\" pInputText type=\"text\" formControlName=\"ownerName\">\n </div>\n <div class=\"ui-g-4\" *ngIf=\"!isWmsSeniorConnect() && !isWmsWis() && !isWmsPartner()\">\n <label for=\"ownerDocument\">{{'yms.int.wms_register_document_owner_document' | translate}}</label>\n <input id=\"ownerDocument\" pInputText type=\"text\" formControlName=\"ownerDocument\">\n </div>\n <div class=\"ui-g-8\">\n <label for=\"partnerName\">{{'yms.int.wms_register_document_partner_name' | translate}}</label>\n <input id=\"partnerName\" pInputText type=\"text\" formControlName=\"partnerName\">\n </div>\n <div class=\"ui-g-4\">\n <label for=\"partnerDocument\">{{'yms.int.wms_register_document_partner_document' | translate}}</label>\n <input id=\"partnerDocument\" pInputText type=\"text\" formControlName=\"partnerDocument\">\n </div>\n <div class=\"ui-g-12\">\n <label for=\"notes\" id=\"notes\">{{'yms.int.wms_register_document_notes' | translate}}</label>\n <textarea id=\"notes\" rows=\"4\" pInputTextarea autoResize=\"autoResize\" formControlName=\"notes\"></textarea>\n </div>\n <div class=\"ui-g-4\" *ngIf=\"isWmsSenior() || isWmsWis() || isWmsPartner()\">\n <label for=\"code\">\n {{'yms.int.wms_register_document_order_receiving_code' | translate}}\n </label>\n <input id=\"code\" pInputText type=\"text\" formControlName=\"code\">\n </div>\n <div class=\"ui-g-4\" *ngIf=\"!isClienteExterno && ( isWmsWis() || isWmsPartner() ) \">\n <label for=\"invoiceCondition\" id=\"invoiceCondition\">\n {{'yms.int.wms_grid_document_invoice_condition' | translate}}\n </label>\n <p-dropdown\n inputId=\"invoiceCondition\"\n name=\"invoiceCondition\"\n [autoWidth]=\"false\"\n [options]=\"invoiceCondition\"\n formControlName=\"invoiceCondition\"\n ></p-dropdown>\n </div>\n </div>\n </form>\n <div class=\"space-between\">\n <button\n pButton label=\"{{'save' | translate}}\"\n (click)=\"save()\"\n [attr.data-hidden]=\"hideSaveButton\"\n [disabled]=\"!isSaveFormValid\">\n </button>\n <button\n type=\"button\" class=\"ui-button-link\" pButton label=\"{{'cancel' | translate}}\" (click)=\"close()\">\n </button>\n </div>\n</s-sidebar>"
|
|
3892
3912
|
}),
|
|
3893
3913
|
__metadata("design:paramtypes", [FormBuilder,
|
|
3894
3914
|
TranslateService,
|
|
@@ -3973,6 +3993,9 @@ var InsertKeyComponent = /** @class */ (function () {
|
|
|
3973
3993
|
InsertKeyComponent.prototype.isWmsSeniorConnect = function () {
|
|
3974
3994
|
return this.wmsSystem === WmsSystem.SENIOR_CONNECT;
|
|
3975
3995
|
};
|
|
3996
|
+
InsertKeyComponent.prototype.isWmsPartner = function () {
|
|
3997
|
+
return this.wmsSystem === WmsSystem.PARTNER;
|
|
3998
|
+
};
|
|
3976
3999
|
InsertKeyComponent.prototype.add = function () {
|
|
3977
4000
|
this.searchKey();
|
|
3978
4001
|
};
|
|
@@ -3991,13 +4014,17 @@ var InsertKeyComponent = /** @class */ (function () {
|
|
|
3991
4014
|
size: 0,
|
|
3992
4015
|
offset: 0
|
|
3993
4016
|
};
|
|
4017
|
+
var errorSearch = "yms.int.wms_error_search_document_message_header";
|
|
3994
4018
|
this.documentService.findDocuments(key)
|
|
3995
4019
|
.pipe(catchError(function (err) {
|
|
3996
|
-
if (
|
|
3997
|
-
_this.utils.message("error",
|
|
4020
|
+
if (_this.wmsSystem === WmsSystem.PARTNER) {
|
|
4021
|
+
_this.utils.message("error", errorSearch, "yms.int.wms_error_search_document_not_found_partner");
|
|
4022
|
+
}
|
|
4023
|
+
else if (err.error && err.error.message.includes("404")) {
|
|
4024
|
+
_this.utils.message("error", errorSearch, "yms.int.wms_error_search_document_not_found_message_content");
|
|
3998
4025
|
}
|
|
3999
4026
|
else {
|
|
4000
|
-
_this.utils.translateMessage("error",
|
|
4027
|
+
_this.utils.translateMessage("error", errorSearch, "yms.int.wms_error_unknown_search_document_message_content " + err.error.message);
|
|
4001
4028
|
}
|
|
4002
4029
|
_this.confirmInvoiceDialog();
|
|
4003
4030
|
return throwError(err);
|
|
@@ -4125,7 +4152,7 @@ var InsertKeyComponent = /** @class */ (function () {
|
|
|
4125
4152
|
InsertKeyComponent = __decorate([
|
|
4126
4153
|
Component({
|
|
4127
4154
|
selector: "insert-key",
|
|
4128
|
-
template: "<form [formGroup]=\"formGroup\">\n <p-dialog [(visible)]=\"visible\" [modal]=\"true\" \n [draggable]=\"false\" (visibleChange)=\"cancel()\" (onShow)=\"onDialogShow()\">\n
|
|
4155
|
+
template: "<form [formGroup]=\"formGroup\">\n <p-dialog [(visible)]=\"visible\" [modal]=\"true\" \n [draggable]=\"false\" (visibleChange)=\"cancel()\" (onShow)=\"onDialogShow()\">\n <p-header>{{isWmsPartner() ? ('yms.int.wms_search_document' | translate) : \n ('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",
|
|
4129
4156
|
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}"]
|
|
4130
4157
|
}),
|
|
4131
4158
|
__metadata("design:paramtypes", [FormBuilder,
|
|
@@ -4161,14 +4188,42 @@ var InsertKeyModule = /** @class */ (function () {
|
|
|
4161
4188
|
return InsertKeyModule;
|
|
4162
4189
|
}());
|
|
4163
4190
|
|
|
4191
|
+
var CpfCnpjFormatPipe = /** @class */ (function () {
|
|
4192
|
+
function CpfCnpjFormatPipe() {
|
|
4193
|
+
}
|
|
4194
|
+
CpfCnpjFormatPipe.prototype.transform = function (value) {
|
|
4195
|
+
if (!value) {
|
|
4196
|
+
return '';
|
|
4197
|
+
}
|
|
4198
|
+
var numeros = value.replace(/\D/g, ''); // Remove não dígitos
|
|
4199
|
+
var cpfLength = 11;
|
|
4200
|
+
var cnpjLength = 14;
|
|
4201
|
+
if (numeros.length === cpfLength) {
|
|
4202
|
+
return numeros.replace(/(\d{3})(\d{3})(\d{3})(\d{2})/, "$1.$2.$3-$4");
|
|
4203
|
+
}
|
|
4204
|
+
else if (numeros.length === cnpjLength) {
|
|
4205
|
+
return numeros.replace(/(\d{2})(\d{3})(\d{3})(\d{4})(\d{2})/, "$1.$2.$3/$4-$5");
|
|
4206
|
+
}
|
|
4207
|
+
else {
|
|
4208
|
+
return value;
|
|
4209
|
+
}
|
|
4210
|
+
};
|
|
4211
|
+
CpfCnpjFormatPipe = __decorate([
|
|
4212
|
+
Pipe({
|
|
4213
|
+
name: 'cpfCnpjFormat'
|
|
4214
|
+
})
|
|
4215
|
+
], CpfCnpjFormatPipe);
|
|
4216
|
+
return CpfCnpjFormatPipe;
|
|
4217
|
+
}());
|
|
4218
|
+
|
|
4164
4219
|
var DocumentGridModule = /** @class */ (function () {
|
|
4165
4220
|
function DocumentGridModule() {
|
|
4166
4221
|
}
|
|
4167
4222
|
DocumentGridModule = __decorate([
|
|
4168
4223
|
NgModule({
|
|
4169
|
-
declarations: [DocumentGridComponent],
|
|
4224
|
+
declarations: [DocumentGridComponent, CpfCnpjFormatPipe],
|
|
4170
4225
|
entryComponents: [DocumentGridComponent],
|
|
4171
|
-
exports: [DocumentGridComponent],
|
|
4226
|
+
exports: [DocumentGridComponent, CpfCnpjFormatPipe],
|
|
4172
4227
|
providers: [ExternalTenantService],
|
|
4173
4228
|
imports: [
|
|
4174
4229
|
CommonModule,
|
|
@@ -4274,6 +4329,7 @@ var DocumentListComponent = /** @class */ (function (_super) {
|
|
|
4274
4329
|
{ label: _this.translate.instant("yms.int.wms_grid_document_invoice_condition_partial_authorized"), value: InvoiceCondition.PARTIAL_AUTHORIZED },
|
|
4275
4330
|
{ label: _this.translate.instant("yms.int.wms_grid_document_invoice_condition_devolution"), value: InvoiceCondition.DEVOLUTION },
|
|
4276
4331
|
{ label: _this.translate.instant("yms.int.wms_grid_document_invoice_condition_rejected"), value: InvoiceCondition.REJECTED },
|
|
4332
|
+
{ label: _this.translate.instant("yms.int.wms_grid_document_invoice_condition_divergence"), value: InvoiceCondition.DIVERGENCE },
|
|
4277
4333
|
];
|
|
4278
4334
|
_this.isAuthorized = function (condition) { return (condition === InvoiceCondition.AUTHORIZED); };
|
|
4279
4335
|
return _this;
|
|
@@ -14532,5 +14588,5 @@ var DockModule = /** @class */ (function () {
|
|
|
14532
14588
|
return DockModule;
|
|
14533
14589
|
}());
|
|
14534
14590
|
|
|
14535
|
-
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,
|
|
14591
|
+
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, CpfCnpjFormatPipe as ɵbd, ExternalTenantService as ɵbe, RegisterDocumentModule as ɵbf, RegisterDocumentComponent as ɵbg, InsertKeyModule as ɵbh, InsertKeyComponent as ɵbi, IntegrationService$1 as ɵbj, RecebimentoFormComponent as ɵbk, DerivacaoService as ɵbl, NotaValidatorService as ɵbm, TransgeniaService as ɵbn, VerificaNotafiscal as ɵbo, BuildFormField as ɵbp, ExpedicaoFormComponent as ɵbq, ExpedicaoInfoComponent as ɵbr, RecebimentoInfoComponent as ɵbs, DevolucaoFormComponent as ɵbt, DevolucaoService as ɵbu, DevolucaoChegadaVeiculoOverride as ɵbv, RecebimentoOrdemCompraFormComponent as ɵbw, OrdemCompraService as ɵbx, RecebimentoOrdemCompraService as ɵby, RecebimentoOrdemCompraChegadaVeiculoOverride as ɵbz, ViewImageComponent as ɵc, RecebimentoOrdemCompraInfoComponent as ɵca, DevolucaoInfoComponent as ɵcb, ContratoFormComponent as ɵcc, OrdemCompraFormComponent as ɵcd, ProcessoAvulsoFormComponent as ɵce, ProcessoAvulsoService as ɵcf, ProcessoAvulsoChegadaVeiculoOverride as ɵcg, ProcessoAvulsoInfoComponent as ɵch, LogIntegracaoDescritor as ɵci, LogIntegracaoComponent as ɵcj, LogIntegracaoService as ɵck, DerivacaoModule as ɵcl, DevolucaoModule as ɵcm, OrdemCompraModule as ɵcn, RecebimentoOrdemCompraModule as ɵco, TransgeniaModule as ɵcp, ProcessoAvulsoModule as ɵcq, LogIntegracaoModule as ɵcr, NotaFormModule as ɵcs, DirectivesModule as ɵct, TrimDirective as ɵcu, NotaFormComponent as ɵcv, 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 };
|
|
14536
14592
|
//# sourceMappingURL=seniorsistemas-yms-integration.js.map
|