@seniorsistemas/yms-integration 1.41.0 → 1.42.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.
Files changed (30) hide show
  1. package/bundles/seniorsistemas-yms-integration.umd.js +106 -52
  2. package/bundles/seniorsistemas-yms-integration.umd.js.map +1 -1
  3. package/bundles/seniorsistemas-yms-integration.umd.min.js +1 -1
  4. package/bundles/seniorsistemas-yms-integration.umd.min.js.map +1 -1
  5. package/esm2015/seniorsistemas-yms-integration.js +45 -44
  6. package/esm2015/src/wms/components/document-grid/document-grid.component.js +17 -2
  7. package/esm2015/src/wms/components/document-grid/document-grid.module.js +4 -3
  8. package/esm2015/src/wms/components/document-grid/insert-key/insert-key.component.js +12 -5
  9. package/esm2015/src/wms/components/document-grid/register-document/register-document.component.js +5 -2
  10. package/esm2015/src/wms/entities/wms-system/wms-system.js +2 -1
  11. package/esm2015/src/wms/shared/cpf-cnpj-format.pipe.js +28 -0
  12. package/esm5/seniorsistemas-yms-integration.js +45 -44
  13. package/esm5/src/wms/components/document-grid/document-grid.component.js +16 -2
  14. package/esm5/src/wms/components/document-grid/document-grid.module.js +4 -3
  15. package/esm5/src/wms/components/document-grid/insert-key/insert-key.component.js +12 -5
  16. package/esm5/src/wms/components/document-grid/register-document/register-document.component.js +5 -2
  17. package/esm5/src/wms/entities/wms-system/wms-system.js +2 -1
  18. package/esm5/src/wms/shared/cpf-cnpj-format.pipe.js +31 -0
  19. package/fesm2015/seniorsistemas-yms-integration.js +61 -10
  20. package/fesm2015/seniorsistemas-yms-integration.js.map +1 -1
  21. package/fesm5/seniorsistemas-yms-integration.js +63 -10
  22. package/fesm5/seniorsistemas-yms-integration.js.map +1 -1
  23. package/package.json +1 -1
  24. package/seniorsistemas-yms-integration.d.ts +44 -43
  25. package/seniorsistemas-yms-integration.metadata.json +1 -1
  26. package/src/wms/components/document-grid/document-grid.component.d.ts +2 -0
  27. package/src/wms/components/document-grid/insert-key/insert-key.component.d.ts +1 -0
  28. package/src/wms/components/document-grid/register-document/register-document.component.d.ts +1 -0
  29. package/src/wms/entities/wms-system/wms-system.d.ts +1 -0
  30. package/src/wms/shared/cpf-cnpj-format.pipe.d.ts +4 -0
@@ -5,6 +5,7 @@ export var WmsSystem;
5
5
  WmsSystem["WIS"] = "WIS";
6
6
  WmsSystem["ALCIS"] = "ALCIS";
7
7
  WmsSystem["SENIOR_CONNECT"] = "SENIOR_CONNECT";
8
+ WmsSystem["PARTNER"] = "PARTNER";
8
9
  WmsSystem["GENERIC"] = "GENERIC";
9
10
  })(WmsSystem || (WmsSystem = {}));
10
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid21zLXN5c3RlbS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BzZW5pb3JzaXN0ZW1hcy95bXMtaW50ZWdyYXRpb24vIiwic291cmNlcyI6WyJzcmMvd21zL2VudGl0aWVzL3dtcy1zeXN0ZW0vd21zLXN5c3RlbS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxNQUFNLENBQU4sSUFBWSxTQU9YO0FBUEQsV0FBWSxTQUFTO0lBQ2pCLDBCQUFhLENBQUE7SUFDYiw4QkFBaUIsQ0FBQTtJQUNqQix3QkFBVyxDQUFBO0lBQ1gsNEJBQWUsQ0FBQTtJQUNmLDhDQUFpQyxDQUFBO0lBQ2pDLGdDQUFtQixDQUFBO0FBQ3ZCLENBQUMsRUFQVyxTQUFTLEtBQVQsU0FBUyxRQU9wQiIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBlbnVtIFdtc1N5c3RlbSB7XG4gICAgTk9ORSA9IFwiTk9ORVwiLFxuICAgIFNFTklPUiA9IFwiU0VOSU9SXCIsXG4gICAgV0lTID0gXCJXSVNcIixcbiAgICBBTENJUyA9IFwiQUxDSVNcIixcbiAgICBTRU5JT1JfQ09OTkVDVCA9IFwiU0VOSU9SX0NPTk5FQ1RcIixcbiAgICBHRU5FUklDID0gXCJHRU5FUklDXCJcbn1cbiJdfQ==
11
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid21zLXN5c3RlbS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BzZW5pb3JzaXN0ZW1hcy95bXMtaW50ZWdyYXRpb24vIiwic291cmNlcyI6WyJzcmMvd21zL2VudGl0aWVzL3dtcy1zeXN0ZW0vd21zLXN5c3RlbS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxNQUFNLENBQU4sSUFBWSxTQVFYO0FBUkQsV0FBWSxTQUFTO0lBQ2pCLDBCQUFhLENBQUE7SUFDYiw4QkFBaUIsQ0FBQTtJQUNqQix3QkFBVyxDQUFBO0lBQ1gsNEJBQWUsQ0FBQTtJQUNmLDhDQUFpQyxDQUFBO0lBQ2pDLGdDQUFtQixDQUFBO0lBQ25CLGdDQUFtQixDQUFBO0FBQ3ZCLENBQUMsRUFSVyxTQUFTLEtBQVQsU0FBUyxRQVFwQiIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBlbnVtIFdtc1N5c3RlbSB7XG4gICAgTk9ORSA9IFwiTk9ORVwiLFxuICAgIFNFTklPUiA9IFwiU0VOSU9SXCIsXG4gICAgV0lTID0gXCJXSVNcIixcbiAgICBBTENJUyA9IFwiQUxDSVNcIixcbiAgICBTRU5JT1JfQ09OTkVDVCA9IFwiU0VOSU9SX0NPTk5FQ1RcIixcbiAgICBQQVJUTkVSID0gXCJQQVJUTkVSXCIsXG4gICAgR0VORVJJQyA9IFwiR0VORVJJQ1wiXG59XG4iXX0=
@@ -0,0 +1,31 @@
1
+ import * as tslib_1 from "tslib";
2
+ import { Pipe } from '@angular/core';
3
+ var CpfCnpjFormatPipe = /** @class */ (function () {
4
+ function CpfCnpjFormatPipe() {
5
+ }
6
+ CpfCnpjFormatPipe.prototype.transform = function (value) {
7
+ if (!value) {
8
+ return '';
9
+ }
10
+ var numeros = value.replace(/\D/g, ''); // Remove não dígitos
11
+ var cpfLength = 11;
12
+ var cnpjLength = 14;
13
+ if (numeros.length === cpfLength) {
14
+ return numeros.replace(/(\d{3})(\d{3})(\d{3})(\d{2})/, "$1.$2.$3-$4");
15
+ }
16
+ else if (numeros.length === cnpjLength) {
17
+ return numeros.replace(/(\d{2})(\d{3})(\d{3})(\d{4})(\d{2})/, "$1.$2.$3/$4-$5");
18
+ }
19
+ else {
20
+ return value;
21
+ }
22
+ };
23
+ CpfCnpjFormatPipe = tslib_1.__decorate([
24
+ Pipe({
25
+ name: 'cpfCnpjFormat'
26
+ })
27
+ ], CpfCnpjFormatPipe);
28
+ return CpfCnpjFormatPipe;
29
+ }());
30
+ export { CpfCnpjFormatPipe };
31
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3BmLWNucGotZm9ybWF0LnBpcGUuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9Ac2VuaW9yc2lzdGVtYXMveW1zLWludGVncmF0aW9uLyIsInNvdXJjZXMiOlsic3JjL3dtcy9zaGFyZWQvY3BmLWNucGotZm9ybWF0LnBpcGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sRUFBRSxJQUFJLEVBQWlCLE1BQU0sZUFBZSxDQUFDO0FBS3BEO0lBQUE7SUFvQkEsQ0FBQztJQWxCQyxxQ0FBUyxHQUFULFVBQVUsS0FBYTtRQUNyQixJQUFJLENBQUMsS0FBSyxFQUFFO1lBQ1YsT0FBTyxFQUFFLENBQUM7U0FDWDtRQUNELElBQU0sT0FBTyxHQUFHLEtBQUssQ0FBQyxPQUFPLENBQUMsS0FBSyxFQUFFLEVBQUUsQ0FBQyxDQUFDLENBQUMscUJBQXFCO1FBQy9ELElBQU0sU0FBUyxHQUFHLEVBQUUsQ0FBQztRQUNyQixJQUFNLFVBQVUsR0FBRyxFQUFFLENBQUM7UUFFdEIsSUFBSSxPQUFPLENBQUMsTUFBTSxLQUFLLFNBQVMsRUFBRTtZQUM5QixPQUFPLE9BQU8sQ0FBQyxPQUFPLENBQUMsOEJBQThCLEVBQUUsYUFBYSxDQUFDLENBQUM7U0FDekU7YUFBTSxJQUFJLE9BQU8sQ0FBQyxNQUFNLEtBQUssVUFBVSxFQUFFO1lBQ3RDLE9BQU8sT0FBTyxDQUFDLE9BQU8sQ0FBQyxxQ0FBcUMsRUFBRSxnQkFBZ0IsQ0FBQyxDQUFDO1NBQ25GO2FBQU07WUFDSCxPQUFPLEtBQUssQ0FBQztTQUNoQjtJQUVILENBQUM7SUFsQlUsaUJBQWlCO1FBSDdCLElBQUksQ0FBQztZQUNKLElBQUksRUFBRSxlQUFlO1NBQ3RCLENBQUM7T0FDVyxpQkFBaUIsQ0FvQjdCO0lBQUQsd0JBQUM7Q0FBQSxBQXBCRCxJQW9CQztTQXBCWSxpQkFBaUIiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBQaXBlLCBQaXBlVHJhbnNmb3JtIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5cbkBQaXBlKHtcbiAgbmFtZTogJ2NwZkNucGpGb3JtYXQnXG59KVxuZXhwb3J0IGNsYXNzIENwZkNucGpGb3JtYXRQaXBlIGltcGxlbWVudHMgUGlwZVRyYW5zZm9ybSB7XG5cbiAgdHJhbnNmb3JtKHZhbHVlOiBzdHJpbmcpOiBzdHJpbmcge1xuICAgIGlmICghdmFsdWUpIHtcbiAgICAgIHJldHVybiAnJztcbiAgICB9XG4gICAgY29uc3QgbnVtZXJvcyA9IHZhbHVlLnJlcGxhY2UoL1xcRC9nLCAnJyk7IC8vIFJlbW92ZSBuw6NvIGTDrWdpdG9zXG4gICAgY29uc3QgY3BmTGVuZ3RoID0gMTE7XG4gICAgY29uc3QgY25wakxlbmd0aCA9IDE0O1xuICAgIFxuICAgIGlmIChudW1lcm9zLmxlbmd0aCA9PT0gY3BmTGVuZ3RoKSB7XG4gICAgICAgIHJldHVybiBudW1lcm9zLnJlcGxhY2UoLyhcXGR7M30pKFxcZHszfSkoXFxkezN9KShcXGR7Mn0pLywgXCIkMS4kMi4kMy0kNFwiKTtcbiAgICB9IGVsc2UgaWYgKG51bWVyb3MubGVuZ3RoID09PSBjbnBqTGVuZ3RoKSB7XG4gICAgICAgIHJldHVybiBudW1lcm9zLnJlcGxhY2UoLyhcXGR7Mn0pKFxcZHszfSkoXFxkezN9KShcXGR7NH0pKFxcZHsyfSkvLCBcIiQxLiQyLiQzLyQ0LSQ1XCIpO1xuICAgIH0gZWxzZSB7XG4gICAgICAgIHJldHVybiB2YWx1ZTtcbiAgICB9XG5cbiAgfVxuXG59XG4iXX0=
@@ -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
 
@@ -3339,11 +3340,23 @@ let DocumentGridComponent = class DocumentGridComponent {
3339
3340
  case WmsSystem.SENIOR:
3340
3341
  result = this.wmsSiltIntegration();
3341
3342
  break;
3343
+ case WmsSystem.PARTNER:
3344
+ result = this.wmsPartnerIntegration();
3345
+ break;
3342
3346
  default:
3343
3347
  result = [];
3344
3348
  }
3345
3349
  return result;
3346
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
+ }
3347
3360
  wmsSeniorConnectIntegration() {
3348
3361
  const columns = [
3349
3362
  { field: "key", header: this.translate.instant("yms.int.wms_purchaseOrder") },
@@ -3406,6 +3419,9 @@ let DocumentGridComponent = class DocumentGridComponent {
3406
3419
  isWmsSilt() {
3407
3420
  return this.wmsSystem === WmsSystem.SENIOR;
3408
3421
  }
3422
+ isWmsPartner() {
3423
+ return this.wmsSystem === WmsSystem.PARTNER;
3424
+ }
3409
3425
  sucessMessage() {
3410
3426
  return this.utils.message("success", this.summary, "saved_message_content");
3411
3427
  }
@@ -3481,7 +3497,7 @@ __decorate([
3481
3497
  DocumentGridComponent = __decorate([
3482
3498
  Component({
3483
3499
  selector: 'document-grid',
3484
- 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>",
3485
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}"]
3486
3502
  }),
3487
3503
  __metadata("design:paramtypes", [TranslateService,
@@ -3616,6 +3632,9 @@ let RegisterDocumentComponent = class RegisterDocumentComponent {
3616
3632
  isWmsSeniorConnect() {
3617
3633
  return this.wmsSystem === WmsSystem.SENIOR_CONNECT;
3618
3634
  }
3635
+ isWmsPartner() {
3636
+ return this.wmsSystem === WmsSystem.PARTNER;
3637
+ }
3619
3638
  watchFormChanges() {
3620
3639
  this.formGroup.valueChanges.subscribe(() => {
3621
3640
  const formValues = Object.values(this.formGroup.value);
@@ -3658,7 +3677,7 @@ __decorate([
3658
3677
  RegisterDocumentComponent = __decorate([
3659
3678
  Component({
3660
3679
  selector: "register-document",
3661
- template: "<s-sidebar\n [visible]=\"visible\"\n header=\"{{ '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()\">\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()\">\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()\">\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()\">\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>"
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\" *ngIf=\"!isWmsPartner()\">\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\" *ngIf=\"!isWmsPartner()\">\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()\">\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>"
3662
3681
  }),
3663
3682
  __metadata("design:paramtypes", [FormBuilder,
3664
3683
  TranslateService,
@@ -3734,6 +3753,9 @@ let InsertKeyComponent = class InsertKeyComponent {
3734
3753
  isWmsSeniorConnect() {
3735
3754
  return this.wmsSystem === WmsSystem.SENIOR_CONNECT;
3736
3755
  }
3756
+ isWmsPartner() {
3757
+ return this.wmsSystem === WmsSystem.PARTNER;
3758
+ }
3737
3759
  add() {
3738
3760
  this.searchKey();
3739
3761
  }
@@ -3751,13 +3773,17 @@ let InsertKeyComponent = class InsertKeyComponent {
3751
3773
  size: 0,
3752
3774
  offset: 0
3753
3775
  };
3776
+ const errorSearch = "yms.int.wms_error_search_document_message_header";
3754
3777
  this.documentService.findDocuments(key)
3755
3778
  .pipe(catchError(err => {
3756
- if (err.error && err.error.message.includes("404")) {
3757
- this.utils.message("error", "yms.int.wms_error_search_document_message_header", "yms.int.wms_error_search_document_not_found_message_content");
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");
3758
3784
  }
3759
3785
  else {
3760
- this.utils.translateMessage("error", "yms.int.wms_error_search_document_message_header", "yms.int.wms_error_unknown_search_document_message_content " + err.error.message);
3786
+ this.utils.translateMessage("error", errorSearch, "yms.int.wms_error_unknown_search_document_message_content " + err.error.message);
3761
3787
  }
3762
3788
  this.confirmInvoiceDialog();
3763
3789
  return throwError(err);
@@ -3884,7 +3910,7 @@ __decorate([
3884
3910
  InsertKeyComponent = __decorate([
3885
3911
  Component({
3886
3912
  selector: "insert-key",
3887
- 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",
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",
3888
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}"]
3889
3915
  }),
3890
3916
  __metadata("design:paramtypes", [FormBuilder,
@@ -3915,13 +3941,38 @@ InsertKeyModule = __decorate([
3915
3941
  })
3916
3942
  ], InsertKeyModule);
3917
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
+
3918
3969
  let DocumentGridModule = class DocumentGridModule {
3919
3970
  };
3920
3971
  DocumentGridModule = __decorate([
3921
3972
  NgModule({
3922
- declarations: [DocumentGridComponent],
3973
+ declarations: [DocumentGridComponent, CpfCnpjFormatPipe],
3923
3974
  entryComponents: [DocumentGridComponent],
3924
- exports: [DocumentGridComponent],
3975
+ exports: [DocumentGridComponent, CpfCnpjFormatPipe],
3925
3976
  providers: [ExternalTenantService],
3926
3977
  imports: [
3927
3978
  CommonModule,
@@ -13791,5 +13842,5 @@ DockModule = __decorate([
13791
13842
  })
13792
13843
  ], DockModule);
13793
13844
 
13794
- 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 };
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 };
13795
13846
  //# sourceMappingURL=seniorsistemas-yms-integration.js.map