@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 { __decorate, __metadata, __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';
|
|
@@ -2802,6 +2802,7 @@ var WmsSystem;
|
|
|
2802
2802
|
WmsSystem["WIS"] = "WIS";
|
|
2803
2803
|
WmsSystem["ALCIS"] = "ALCIS";
|
|
2804
2804
|
WmsSystem["SENIOR_CONNECT"] = "SENIOR_CONNECT";
|
|
2805
|
+
WmsSystem["PARTNER"] = "PARTNER";
|
|
2805
2806
|
WmsSystem["GENERIC"] = "GENERIC";
|
|
2806
2807
|
})(WmsSystem || (WmsSystem = {}));
|
|
2807
2808
|
|
|
@@ -3076,6 +3077,7 @@ var InvoiceCondition;
|
|
|
3076
3077
|
InvoiceCondition["MANUAL_AUTHORIZED"] = "MANUAL_AUTHORIZED";
|
|
3077
3078
|
InvoiceCondition["DEVOLUTION"] = "DEVOLUTION";
|
|
3078
3079
|
InvoiceCondition["REJECTED"] = "REJECTED";
|
|
3080
|
+
InvoiceCondition["DIVERGENCE"] = "DIVERGENCE";
|
|
3079
3081
|
})(InvoiceCondition || (InvoiceCondition = {}));
|
|
3080
3082
|
|
|
3081
3083
|
function getInvoiceConditions(translate) {
|
|
@@ -3086,6 +3088,7 @@ function getInvoiceConditions(translate) {
|
|
|
3086
3088
|
{ label: translate.instant("yms.int.wms_grid_document_invoice_condition_partial_authorized"), value: InvoiceCondition.PARTIAL_AUTHORIZED },
|
|
3087
3089
|
{ label: translate.instant("yms.int.wms_grid_document_invoice_condition_devolution"), value: InvoiceCondition.DEVOLUTION },
|
|
3088
3090
|
{ label: translate.instant("yms.int.wms_grid_document_invoice_condition_rejected"), value: InvoiceCondition.REJECTED },
|
|
3091
|
+
{ label: translate.instant("yms.int.wms_grid_document_invoice_condition_divergence"), value: InvoiceCondition.DIVERGENCE },
|
|
3089
3092
|
];
|
|
3090
3093
|
}
|
|
3091
3094
|
|
|
@@ -3337,11 +3340,23 @@ let DocumentGridComponent = class DocumentGridComponent {
|
|
|
3337
3340
|
case WmsSystem.SENIOR:
|
|
3338
3341
|
result = this.wmsSiltIntegration();
|
|
3339
3342
|
break;
|
|
3343
|
+
case WmsSystem.PARTNER:
|
|
3344
|
+
result = this.wmsPartnerIntegration();
|
|
3345
|
+
break;
|
|
3340
3346
|
default:
|
|
3341
3347
|
result = [];
|
|
3342
3348
|
}
|
|
3343
3349
|
return result;
|
|
3344
3350
|
}
|
|
3351
|
+
wmsPartnerIntegration() {
|
|
3352
|
+
const columns = [
|
|
3353
|
+
{ field: "invoiceKey", header: this.translate.instant("yms.int.wms_register_document_invoice_key") },
|
|
3354
|
+
{ field: "invoiceNumber", header: this.translate.instant("yms.int.wms_register_document_invoice_number") },
|
|
3355
|
+
{ field: "invoiceSerialNumber", header: this.translate.instant("yms.int.wms_register_document_invoice_serial_number") },
|
|
3356
|
+
...this.getColumnPartner()
|
|
3357
|
+
];
|
|
3358
|
+
return columns;
|
|
3359
|
+
}
|
|
3345
3360
|
wmsSeniorConnectIntegration() {
|
|
3346
3361
|
const columns = [
|
|
3347
3362
|
{ field: "key", header: this.translate.instant("yms.int.wms_purchaseOrder") },
|
|
@@ -3404,6 +3419,9 @@ let DocumentGridComponent = class DocumentGridComponent {
|
|
|
3404
3419
|
isWmsSilt() {
|
|
3405
3420
|
return this.wmsSystem === WmsSystem.SENIOR;
|
|
3406
3421
|
}
|
|
3422
|
+
isWmsPartner() {
|
|
3423
|
+
return this.wmsSystem === WmsSystem.PARTNER;
|
|
3424
|
+
}
|
|
3407
3425
|
sucessMessage() {
|
|
3408
3426
|
return this.utils.message("success", this.summary, "saved_message_content");
|
|
3409
3427
|
}
|
|
@@ -3479,7 +3497,7 @@ __decorate([
|
|
|
3479
3497
|
DocumentGridComponent = __decorate([
|
|
3480
3498
|
Component({
|
|
3481
3499
|
selector: 'document-grid',
|
|
3482
|
-
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>",
|
|
3500
|
+
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>",
|
|
3483
3501
|
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}"]
|
|
3484
3502
|
}),
|
|
3485
3503
|
__metadata("design:paramtypes", [TranslateService,
|
|
@@ -3614,6 +3632,9 @@ let RegisterDocumentComponent = class RegisterDocumentComponent {
|
|
|
3614
3632
|
isWmsSeniorConnect() {
|
|
3615
3633
|
return this.wmsSystem === WmsSystem.SENIOR_CONNECT;
|
|
3616
3634
|
}
|
|
3635
|
+
isWmsPartner() {
|
|
3636
|
+
return this.wmsSystem === WmsSystem.PARTNER;
|
|
3637
|
+
}
|
|
3617
3638
|
watchFormChanges() {
|
|
3618
3639
|
this.formGroup.valueChanges.subscribe(() => {
|
|
3619
3640
|
const formValues = Object.values(this.formGroup.value);
|
|
@@ -3656,7 +3677,7 @@ __decorate([
|
|
|
3656
3677
|
RegisterDocumentComponent = __decorate([
|
|
3657
3678
|
Component({
|
|
3658
3679
|
selector: "register-document",
|
|
3659
|
-
template: "<s-sidebar\n [visible]=\"visible\"\n header=\"{{ 'yms.int.wms_register_document_add_document' | translate
|
|
3680
|
+
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>"
|
|
3660
3681
|
}),
|
|
3661
3682
|
__metadata("design:paramtypes", [FormBuilder,
|
|
3662
3683
|
TranslateService,
|
|
@@ -3732,6 +3753,9 @@ let InsertKeyComponent = class InsertKeyComponent {
|
|
|
3732
3753
|
isWmsSeniorConnect() {
|
|
3733
3754
|
return this.wmsSystem === WmsSystem.SENIOR_CONNECT;
|
|
3734
3755
|
}
|
|
3756
|
+
isWmsPartner() {
|
|
3757
|
+
return this.wmsSystem === WmsSystem.PARTNER;
|
|
3758
|
+
}
|
|
3735
3759
|
add() {
|
|
3736
3760
|
this.searchKey();
|
|
3737
3761
|
}
|
|
@@ -3749,13 +3773,17 @@ let InsertKeyComponent = class InsertKeyComponent {
|
|
|
3749
3773
|
size: 0,
|
|
3750
3774
|
offset: 0
|
|
3751
3775
|
};
|
|
3776
|
+
const errorSearch = "yms.int.wms_error_search_document_message_header";
|
|
3752
3777
|
this.documentService.findDocuments(key)
|
|
3753
3778
|
.pipe(catchError(err => {
|
|
3754
|
-
if (
|
|
3755
|
-
this.utils.message("error",
|
|
3779
|
+
if (this.wmsSystem === WmsSystem.PARTNER) {
|
|
3780
|
+
this.utils.message("error", errorSearch, "yms.int.wms_error_search_document_not_found_partner");
|
|
3781
|
+
}
|
|
3782
|
+
else if (err.error && err.error.message.includes("404")) {
|
|
3783
|
+
this.utils.message("error", errorSearch, "yms.int.wms_error_search_document_not_found_message_content");
|
|
3756
3784
|
}
|
|
3757
3785
|
else {
|
|
3758
|
-
this.utils.translateMessage("error",
|
|
3786
|
+
this.utils.translateMessage("error", errorSearch, "yms.int.wms_error_unknown_search_document_message_content " + err.error.message);
|
|
3759
3787
|
}
|
|
3760
3788
|
this.confirmInvoiceDialog();
|
|
3761
3789
|
return throwError(err);
|
|
@@ -3882,7 +3910,7 @@ __decorate([
|
|
|
3882
3910
|
InsertKeyComponent = __decorate([
|
|
3883
3911
|
Component({
|
|
3884
3912
|
selector: "insert-key",
|
|
3885
|
-
template: "<form [formGroup]=\"formGroup\">\n <p-dialog [(visible)]=\"visible\" [modal]=\"true\" \n [draggable]=\"false\" (visibleChange)=\"cancel()\" (onShow)=\"onDialogShow()\">\n
|
|
3913
|
+
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",
|
|
3886
3914
|
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}"]
|
|
3887
3915
|
}),
|
|
3888
3916
|
__metadata("design:paramtypes", [FormBuilder,
|
|
@@ -3913,13 +3941,38 @@ InsertKeyModule = __decorate([
|
|
|
3913
3941
|
})
|
|
3914
3942
|
], InsertKeyModule);
|
|
3915
3943
|
|
|
3944
|
+
let CpfCnpjFormatPipe = class CpfCnpjFormatPipe {
|
|
3945
|
+
transform(value) {
|
|
3946
|
+
if (!value) {
|
|
3947
|
+
return '';
|
|
3948
|
+
}
|
|
3949
|
+
const numeros = value.replace(/\D/g, ''); // Remove não dígitos
|
|
3950
|
+
const cpfLength = 11;
|
|
3951
|
+
const cnpjLength = 14;
|
|
3952
|
+
if (numeros.length === cpfLength) {
|
|
3953
|
+
return numeros.replace(/(\d{3})(\d{3})(\d{3})(\d{2})/, "$1.$2.$3-$4");
|
|
3954
|
+
}
|
|
3955
|
+
else if (numeros.length === cnpjLength) {
|
|
3956
|
+
return numeros.replace(/(\d{2})(\d{3})(\d{3})(\d{4})(\d{2})/, "$1.$2.$3/$4-$5");
|
|
3957
|
+
}
|
|
3958
|
+
else {
|
|
3959
|
+
return value;
|
|
3960
|
+
}
|
|
3961
|
+
}
|
|
3962
|
+
};
|
|
3963
|
+
CpfCnpjFormatPipe = __decorate([
|
|
3964
|
+
Pipe({
|
|
3965
|
+
name: 'cpfCnpjFormat'
|
|
3966
|
+
})
|
|
3967
|
+
], CpfCnpjFormatPipe);
|
|
3968
|
+
|
|
3916
3969
|
let DocumentGridModule = class DocumentGridModule {
|
|
3917
3970
|
};
|
|
3918
3971
|
DocumentGridModule = __decorate([
|
|
3919
3972
|
NgModule({
|
|
3920
|
-
declarations: [DocumentGridComponent],
|
|
3973
|
+
declarations: [DocumentGridComponent, CpfCnpjFormatPipe],
|
|
3921
3974
|
entryComponents: [DocumentGridComponent],
|
|
3922
|
-
exports: [DocumentGridComponent],
|
|
3975
|
+
exports: [DocumentGridComponent, CpfCnpjFormatPipe],
|
|
3923
3976
|
providers: [ExternalTenantService],
|
|
3924
3977
|
imports: [
|
|
3925
3978
|
CommonModule,
|
|
@@ -4018,6 +4071,7 @@ let DocumentListComponent = class DocumentListComponent extends DocumentListDesc
|
|
|
4018
4071
|
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_condition_partial_authorized"), value: InvoiceCondition.PARTIAL_AUTHORIZED },
|
|
4019
4072
|
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_condition_devolution"), value: InvoiceCondition.DEVOLUTION },
|
|
4020
4073
|
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_condition_rejected"), value: InvoiceCondition.REJECTED },
|
|
4074
|
+
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_condition_divergence"), value: InvoiceCondition.DIVERGENCE },
|
|
4021
4075
|
];
|
|
4022
4076
|
this.isAuthorized = (condition) => (condition === InvoiceCondition.AUTHORIZED);
|
|
4023
4077
|
}
|
|
@@ -13788,5 +13842,5 @@ DockModule = __decorate([
|
|
|
13788
13842
|
})
|
|
13789
13843
|
], DockModule);
|
|
13790
13844
|
|
|
13791
|
-
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,
|
|
13845
|
+
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 };
|
|
13792
13846
|
//# sourceMappingURL=seniorsistemas-yms-integration.js.map
|