@seniorsistemas/yms-integration 1.27.3 → 1.29.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 (32) hide show
  1. package/bundles/seniorsistemas-yms-integration.umd.js +155 -11
  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/index.js +3 -1
  6. package/esm2015/src/wms/components/document-grid/document-grid.component.js +37 -9
  7. package/esm2015/src/wms/components/document-grid/insert-key/insert-key.component.js +2 -2
  8. package/esm2015/src/wms/components/document-grid/register-document/register-document.component.js +3 -1
  9. package/esm2015/src/wms/components/document-list/document-list.component.js +88 -0
  10. package/esm2015/src/wms/components/document-list/document-list.module.js +32 -0
  11. package/esm2015/src/wms/entities/agenda/agenda-dto.js +1 -0
  12. package/esm2015/src/wms/entities/document/document.service.js +4 -1
  13. package/esm5/index.js +3 -1
  14. package/esm5/src/wms/components/document-grid/document-grid.component.js +38 -11
  15. package/esm5/src/wms/components/document-grid/insert-key/insert-key.component.js +2 -2
  16. package/esm5/src/wms/components/document-grid/register-document/register-document.component.js +3 -1
  17. package/esm5/src/wms/components/document-list/document-list.component.js +93 -0
  18. package/esm5/src/wms/components/document-list/document-list.module.js +33 -0
  19. package/esm5/src/wms/entities/agenda/agenda-dto.js +1 -0
  20. package/esm5/src/wms/entities/document/document.service.js +4 -1
  21. package/fesm2015/seniorsistemas-yms-integration.js +147 -10
  22. package/fesm2015/seniorsistemas-yms-integration.js.map +1 -1
  23. package/fesm5/seniorsistemas-yms-integration.js +154 -12
  24. package/fesm5/seniorsistemas-yms-integration.js.map +1 -1
  25. package/index.d.ts +2 -0
  26. package/package.json +1 -1
  27. package/seniorsistemas-yms-integration.metadata.json +1 -1
  28. package/src/wms/components/document-grid/document-grid.component.d.ts +11 -3
  29. package/src/wms/components/document-list/document-list.component.d.ts +26 -0
  30. package/src/wms/components/document-list/document-list.module.d.ts +5 -0
  31. package/src/wms/entities/agenda/agenda-dto.d.ts +12 -0
  32. package/src/wms/entities/document/document.service.d.ts +1 -0
@@ -3187,6 +3187,9 @@
3187
3187
  DocumentService.prototype.findDocuments = function (input) {
3188
3188
  return this.http.post('yms_int/wms/queries/findDocuments', input);
3189
3189
  };
3190
+ DocumentService.prototype.getSystemIntegration = function () {
3191
+ return this.http.get('yms_int/wms/queries/getSystemIntegration');
3192
+ };
3190
3193
  DocumentService = __decorate([
3191
3194
  core.Injectable(),
3192
3195
  __metadata("design:paramtypes", [http.HttpClient, api.MessageService])
@@ -3207,10 +3210,12 @@
3207
3210
  this.selection = [];
3208
3211
  }
3209
3212
  DocumentGridComponent.prototype.ngOnInit = function () {
3210
- this.gridColumns = this.getGridColumns();
3211
3213
  this.getProcessTypeByScheduling();
3212
3214
  this.listDocuments();
3213
3215
  };
3216
+ DocumentGridComponent.prototype.ngAfterContentChecked = function () {
3217
+ this.gridColumns = this.getGridColumns();
3218
+ };
3214
3219
  DocumentGridComponent.prototype.getProcessTypeByScheduling = function () {
3215
3220
  var _this = this;
3216
3221
  this.integrationService.getProcessTypeByScheduling(this.agenda.tipoAgendamento.id)
@@ -3224,7 +3229,7 @@
3224
3229
  var _this = this;
3225
3230
  return [
3226
3231
  {
3227
- label: this.translate.instant("yms.int.wms_add_document_invoice_key"),
3232
+ label: this.translate.instant("yms.int.wms_search"),
3228
3233
  command: function () {
3229
3234
  _this.selection = [];
3230
3235
  _this.visibleInvoiceKey = true;
@@ -3328,17 +3333,42 @@
3328
3333
  });
3329
3334
  };
3330
3335
  DocumentGridComponent.prototype.getGridColumns = function () {
3331
- return [
3332
- { field: "logistcUnitName", header: this.translate.instant("yms.int.wms_register_document_logistc_unit_name") },
3333
- { field: "logistcUnitDocument", header: this.translate.instant("yms.int.wms_register_document_logistc_unit_document") },
3334
- { field: "invoiceKey", header: this.translate.instant("yms.int.wms_register_document_invoice_key") },
3335
- { field: "invoiceNumber", header: this.translate.instant("yms.int.wms_register_document_invoice_number") },
3336
- { field: "invoiceSerialNumber", header: this.translate.instant("yms.int.wms_register_document_invoice_serial_number") },
3336
+ if (this.isWmsSeniorConnect()) {
3337
+ return __spread([
3338
+ { field: "key", header: this.translate.instant("yms.int.wms_purchaseOrder") }
3339
+ ], this.getColumnPartner());
3340
+ }
3341
+ if (this.isWmsWIS()) {
3342
+ return this.getColumnInvoiceAndlogistcUnit();
3343
+ }
3344
+ return __spread([
3345
+ { field: "invoiceKey", header: this.translate.instant("yms.int.wms_register_document_invoice_key") }
3346
+ ], this.getColumnInvoiceAndlogistcUnit(), [
3337
3347
  { field: "ownerName", header: this.translate.instant("yms.int.wms_register_document_owner_name") },
3338
3348
  { field: "ownerDocument", header: this.translate.instant("yms.int.wms_register_document_owner_document") },
3339
- { field: "code", header: this.translate.instant("yms.int.wms_register_document_order_receiving_code") },
3349
+ ]);
3350
+ };
3351
+ DocumentGridComponent.prototype.getColumnInvoiceAndlogistcUnit = function () {
3352
+ return __spread([
3353
+ { field: "invoiceNumber", header: this.translate.instant("yms.int.wms_register_document_invoice_number") },
3354
+ { field: "invoiceSerialNumber", header: this.translate.instant("yms.int.wms_register_document_invoice_serial_number") }
3355
+ ], this.getColumnPartner(), [
3356
+ { field: "logistcUnitName", header: this.translate.instant("yms.int.wms_register_document_logistc_unit_name") },
3357
+ { field: "logistcUnitDocument", header: this.translate.instant("yms.int.wms_register_document_logistc_unit_document") },
3358
+ ]);
3359
+ };
3360
+ DocumentGridComponent.prototype.getColumnPartner = function () {
3361
+ return [
3362
+ { field: "partnerName", header: this.translate.instant("yms.int.wms_register_document_partner_name") },
3363
+ { field: "partnerDocument", header: this.translate.instant("yms.int.wms_register_document_partner_document") },
3340
3364
  ];
3341
3365
  };
3366
+ DocumentGridComponent.prototype.isWmsSeniorConnect = function () {
3367
+ return this.wmsSystem === WmsSystem.SENIOR_CONNECT;
3368
+ };
3369
+ DocumentGridComponent.prototype.isWmsWIS = function () {
3370
+ return this.wmsSystem === WmsSystem.WIS;
3371
+ };
3342
3372
  DocumentGridComponent.prototype.message = function (severity, summary, detail) {
3343
3373
  this.messageService.add({
3344
3374
  severity: severity,
@@ -3393,7 +3423,7 @@
3393
3423
  DocumentGridComponent = __decorate([
3394
3424
  core.Component({
3395
3425
  selector: 'document-grid',
3396
- template: "<div *ngIf=\"this.processType === 'RECEBIMENTO_WMS'; else processNotConfigured\">\n <p-panel>\n <p-header>\n <div class=\"buttons\">\n <div>\n <s-button\n label=\"{{'yms.int.wms_add_document' | translate}}\"\n priority=\"primary\"\n [model]=\"getActions()\"\n [auxiliary]=\"false\">\n </s-button>\n <s-button\n label=\"{{'yms.wms_view_button' | translate}}\"\n priority=\"secondary\"\n [auxiliary]=\"false\"\n [disabled]=\"!selection || selection.length !== 1\"\n (onClick)=\"view()\">\n </s-button>\n <s-button\n label=\"{{'yms.wms_delete_button' | translate}}\"\n priority=\"secondary\"\n [disabled]=\"!selection || !selection.length\"\n (click)=\"onDelete()\">\n </s-button>\n </div>\n <s-button\n id=\"refresh-button\"\n priority=\"default\"\n iconClass=\"fa fa-refresh\"\n (onClick)=\"listDocuments()\"\n >\n </s-button>\n </div>\n </p-header>\n <div class=\"ui-g\">\n <div class=\"ui-g-12\" *ngIf=\"gridData && gridData.length; else emptyList\">\n <p-table #documentTable [value]=\"gridData\"\n [columns]=\"gridColumns\" dataKey=\"id\" [lazy]=\"true\" [scrollable]=\"true\" [resizableColumns]=\"true\"\n sortMode=\"multiple\" [paginator]=\"true\" [totalRecords]=\"documentTotalRecords\" rows=\"10\"\n [rowsPerPageOptions]=\"[10, 20, 50, 100]\" [(selection)]=\"selection\"\n [loading]=\"loading\">\n <ng-template pTemplate=\"colgroup\" let-columns>\n <colgroup>\n <col *ngFor=\"let col of columns\" [style.width]=\"col.width\"/>\n </colgroup>\n </ng-template>\n <ng-template pTemplate=\"header\" let-columns>\n <tr>\n <th id=\"checkbox\" class=\"table-checkbox\">\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\n </th>\n <th id=\"col\" *ngFor=\"let col of columns\" [pSortableColumn]=\"col.field\" pResizableColumn>\n <div class=\"senior-header\">\n <span class=\"senior-header-title\">{{ col.header }}</span>\n <p-sortIcon [field]=\"col.field\"></p-sortIcon>\n </div>\n </th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-rowData let-columns let-expanded=\"expanded\">\n <tr [pSelectableRow]=\"rowData\">\n <td class=\"table-checkbox\">\n <p-tableCheckbox [value]=\"rowData\"></p-tableCheckbox>\n </td>\n <td (click)=\"selection = [rowData]\">\n <span>{{ rowData[\"logistcUnitName\"] }}</span>\n </td>\n <td (click)=\"selection = [rowData]\">\n <span>{{ rowData[\"logistcUnitDocument\"] }}</span>\n </td>\n <td (click)=\"selection = [rowData]\">\n <span>{{ rowData[\"key\"] }}</span>\n </td>\n <td (click)=\"selection = [rowData]\">\n <span>{{ rowData[\"invoiceNumber\"] }}</span>\n </td>\n <td (click)=\"selection = [rowData]\">\n <span>{{ rowData[\"invoiceSerialNumber\"] }}</span>\n </td>\n <td (click)=\"selection = [rowData]\">\n <span>{{ rowData[\"ownerName\"] }}</span>\n </td>\n <td (click)=\"selection = [rowData]\">\n <span>{{ rowData[\"ownerDocument\"] }}</span>\n </td>\n <td (click)=\"selection = [rowData]\">\n <span>{{ rowData[\"code\"] }}</span>\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"paginatorright\">\n <span [translate]=\"'total_records'\" [translateParams]=\"{ value: documentTotalRecords }\"></span>\n </ng-template>\n </p-table> \n </div>\n </div>\n <register-document\n [wmsSystem]=\"wmsSystem\"\n [edit]=\"edit\"\n [viewDocument]=\"selection\"\n (document)=\"onChangeDocument($event)\"\n [(visible)]=\"visibleDocumentRegister\"\n [agenda]=\"agenda\">\n </register-document> \n <insert-key [wmsSystem]=\"wmsSystem\" \n (document)=\"onChangeDocument($event)\" [(visible)]=\"visibleInvoiceKey\"></insert-key>\n </p-panel>\n</div>\n <div class=\"button-save\">\n <s-button \n priority=\"primary\" [label]=\"'save' | translate\" [disabled]=\"disabled || !this.gridData\" (click)=\"save()\">\n </s-button>\n </div>\n <register-document\n [wmsSystem]=\"wmsSystem\"\n [edit]=\"edit\"\n [viewDocument]=\"selection\"\n (document)=\"onChangeDocument($event)\"\n [(visible)]=\"visibleDocumentRegister\"\n [agenda]=\"agenda\">\n </register-document> \n <insert-key [wmsSystem]=\"wmsSystem\" \n (document)=\"onChangeDocument($event)\" [(visible)]=\"visibleInvoiceKey\"></insert-key>\n\n<ng-template #emptyList>\n <div class=\"center\">\n <s-empty-state\n iconClass=\"fa fa-exclamation-triangle\" [title]=\"'detail_empty_state_title' | translate\"\n [description]=\"'detail_empty_state_description' | translate\">\n </s-empty-state>\n </div>\n</ng-template>\n\n<ng-template #processNotConfigured>\n <div class=\"center\">\n <s-empty-state\n iconClass=\"fa fa-exclamation-triangle\"\n [title]=\"'yms.int.wms_there_no_process_type_configured_for_this_type_scheduling' | translate\"\n >\n </s-empty-state>\n </div>\n</ng-template>",
3426
+ template: "<div *ngIf=\"this.processType === 'RECEBIMENTO_WMS'; else processNotConfigured\">\n <p-panel>\n <p-header>\n <div class=\"buttons\">\n <div>\n <s-button\n label=\"{{'yms.int.wms_add_document' | translate}}\"\n priority=\"primary\"\n [model]=\"getActions()\"\n [auxiliary]=\"false\">\n </s-button>\n <s-button\n label=\"{{'yms.wms_view_button' | translate}}\"\n priority=\"secondary\"\n [auxiliary]=\"false\"\n [disabled]=\"!selection || selection.length !== 1\"\n (onClick)=\"view()\">\n </s-button>\n <s-button\n label=\"{{'yms.wms_delete_button' | translate}}\"\n priority=\"secondary\"\n [disabled]=\"!selection || !selection.length\"\n (click)=\"onDelete()\">\n </s-button>\n </div>\n <s-button\n id=\"refresh-button\"\n priority=\"default\"\n iconClass=\"fa fa-refresh\"\n (onClick)=\"listDocuments()\"\n >\n </s-button>\n </div>\n </p-header>\n <div class=\"ui-g\">\n <div class=\"ui-g-12\" *ngIf=\"gridData && gridData.length; else emptyList\">\n <p-table #documentTable [value]=\"gridData\"\n [columns]=\"gridColumns\" dataKey=\"id\" [lazy]=\"true\" [scrollable]=\"true\" [resizableColumns]=\"true\"\n sortMode=\"multiple\" [paginator]=\"true\" [totalRecords]=\"documentTotalRecords\" rows=\"10\"\n [rowsPerPageOptions]=\"[10, 20, 50, 100]\" [(selection)]=\"selection\"\n [loading]=\"loading\">\n <ng-template pTemplate=\"colgroup\" let-columns>\n <colgroup>\n <col *ngFor=\"let col of columns\" [style.width]=\"col.width\"/>\n </colgroup>\n </ng-template>\n <ng-template pTemplate=\"header\" let-columns>\n <tr>\n <th id=\"checkbox\" class=\"table-checkbox\">\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\n </th>\n <th id=\"col\" *ngFor=\"let col of columns\" [pSortableColumn]=\"col.field\" pResizableColumn>\n <div class=\"senior-header\">\n <span class=\"senior-header-title\">{{ col.header }}</span>\n <p-sortIcon [field]=\"col.field\"></p-sortIcon>\n </div>\n </th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-rowData let-columns let-expanded=\"expanded\">\n <tr [pSelectableRow]=\"rowData\">\n <td class=\"table-checkbox\">\n <p-tableCheckbox [value]=\"rowData\"></p-tableCheckbox>\n </td>\n <td *ngFor=\"let column of getGridColumns()\" (click)=\"selection = [rowData]\">\n <span>{{ rowData[ column.field ] }}</span>\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"paginatorright\">\n <span [translate]=\"'total_records'\" [translateParams]=\"{ value: documentTotalRecords }\"></span>\n </ng-template>\n </p-table> \n </div>\n </div>\n <register-document\n [wmsSystem]=\"wmsSystem\"\n [edit]=\"edit\"\n [viewDocument]=\"selection\"\n (document)=\"onChangeDocument($event)\"\n [(visible)]=\"visibleDocumentRegister\"\n [agenda]=\"agenda\">\n </register-document> \n <insert-key [wmsSystem]=\"wmsSystem\" \n (document)=\"onChangeDocument($event)\" [(visible)]=\"visibleInvoiceKey\"></insert-key>\n </p-panel>\n</div>\n <div class=\"button-save\">\n <s-button \n priority=\"primary\" [label]=\"'save' | translate\" [disabled]=\"disabled || !this.gridData\" (click)=\"save()\">\n </s-button>\n </div>\n <register-document\n [wmsSystem]=\"wmsSystem\"\n [edit]=\"edit\"\n [viewDocument]=\"selection\"\n (document)=\"onChangeDocument($event)\"\n [(visible)]=\"visibleDocumentRegister\"\n [agenda]=\"agenda\">\n </register-document> \n <insert-key [wmsSystem]=\"wmsSystem\" \n (document)=\"onChangeDocument($event)\" [(visible)]=\"visibleInvoiceKey\"></insert-key>\n\n<ng-template #emptyList>\n <div class=\"center\">\n <s-empty-state\n iconClass=\"fa fa-exclamation-triangle\" [title]=\"'detail_empty_state_title' | translate\"\n [description]=\"'detail_empty_state_description' | translate\">\n </s-empty-state>\n </div>\n</ng-template>\n\n<ng-template #processNotConfigured>\n <div class=\"center\">\n <s-empty-state\n iconClass=\"fa fa-exclamation-triangle\"\n [title]=\"'yms.int.wms_there_no_process_type_configured_for_this_type_scheduling' | translate\"\n >\n </s-empty-state>\n </div>\n</ng-template>",
3397
3427
  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}"]
3398
3428
  }),
3399
3429
  __metadata("design:paramtypes", [core$1.TranslateService,
@@ -3486,6 +3516,8 @@
3486
3516
  this.formGroup.get('logistcUnitName').setValue(document.logistcUnitName);
3487
3517
  this.formGroup.get('notes').setValue(document.notes);
3488
3518
  this.formGroup.get('code').setValue(document.code);
3519
+ this.formGroup.get('partnerName').setValue(document.partnerName);
3520
+ this.formGroup.get('partnerDocument').setValue(document.partnerDocument);
3489
3521
  this.formGroup.get('ownerDocument').setValue(document.ownerDocument);
3490
3522
  this.formGroup.get('ownerName').setValue(document.ownerName);
3491
3523
  };
@@ -3681,7 +3713,7 @@
3681
3713
  InsertKeyComponent = __decorate([
3682
3714
  core.Component({
3683
3715
  selector: "insert-key",
3684
- template: "<form [formGroup]=\"formGroup\">\n <p-dialog [(visible)]=\"visible\" [modal]=\"true\" (visibleChange)=\"cancel()\">\n <p-header>{{'yms.int.wms_search_document' | translate}} {{ wmsSystem }}</p-header>\n <div class=\"flex py-2 justify-content-center spacing-bottom\" \n *ngIf=\"!isWmsSeniorConnect() && !isWmsWis()\">\n <label for=\"key\">{{'yms.int.wms_insert_key_label' | translate}}</label>\n <input id=\"key\" class=\"size-input\" pInputText type=\"text\" formControlName=\"key\">\n </div>\n <div class=\"flex py-2 justify-content-center spacing-bottom\" *ngIf=\"isWmsSeniorConnect()\">\n <label for=\"purchaseOrder\">{{'yms.int.wms_purchaseOrder' | translate}} </label>\n <input id=\"purchaseOrder\" class=\"size-input\" pInputText type=\"text\" formControlName=\"purchaseOrder\">\n </div>\n <div class=\"flex py-2 justify-content-center spacing-bottom\" *ngIf=\"isWmsWis()\">\n <label for=\"invoiceNumber\">{{'yms.int.wms_invoice_number' | translate}}</label>\n <input id=\"invoiceNumber\" class=\"size-input\" pInputText type=\"text\" formControlName=\"invoiceNumber\">\n </div>\n <div class=\"flex py-2 justify-content-center spacing-bottom\" *ngIf=\"isWmsWis()\">\n <label for=\"invoiceSerie\">{{'yms.int.wms_invoice_serie' | translate}}</label>\n <input id=\"invoiceSerie\" class=\"size-input\" pInputText type=\"text\" formControlName=\"invoiceSerie\">\n </div>\n <div class=\"flex py-2 justify-content-center spacing-bottom\" *ngIf=\"isWmsWis()\">\n <label for=\"partnerDocument\">{{'yms.int.wms_partner_document' | translate}}</label>\n <input id=\"partnerDocument\" class=\"size-input\" pInputText type=\"text\" formControlName=\"partnerDocument\">\n </div>\n <div class=\"separator\"></div>\n <div class=\"spacing-top\">\n <s-button pButton label=\"{{'save' | translate}}\" (click)=\"add()\"></s-button>\n <s-button\n type=\"button\"\n class=\"ui-button-link\"\n pButton label=\"{{'cancel' | translate}}\"\n (click)=\"cancel()\">\n </s-button>\n </div>\n </p-dialog>\n</form>",
3716
+ template: "<form [formGroup]=\"formGroup\">\n <p-dialog [(visible)]=\"visible\" [modal]=\"true\" [draggable]=\"false\" (visibleChange)=\"cancel()\">\n <p-header>{{'yms.int.wms_search_document' | translate}} {{ wmsSystem }}</p-header>\n <div class=\"flex py-2 justify-content-center spacing-bottom\" \n *ngIf=\"!isWmsSeniorConnect() && !isWmsWis()\">\n <label for=\"key\">{{'yms.int.wms_insert_key_label' | translate}}</label>\n <input id=\"key\" class=\"size-input\" pInputText type=\"text\" formControlName=\"key\">\n </div>\n <div class=\"flex py-2 justify-content-center spacing-bottom\" *ngIf=\"isWmsSeniorConnect()\">\n <label for=\"purchaseOrder\">{{'yms.int.wms_purchaseOrder' | translate}} </label>\n <input id=\"purchaseOrder\" class=\"size-input\" pInputText type=\"text\" formControlName=\"purchaseOrder\">\n </div>\n <div class=\"flex py-2 justify-content-center spacing-bottom\" *ngIf=\"isWmsWis()\">\n <label for=\"invoiceNumber\">{{'yms.int.wms_invoice_number' | translate}}</label>\n <input id=\"invoiceNumber\" class=\"size-input\" pInputText type=\"text\" formControlName=\"invoiceNumber\">\n </div>\n <div class=\"flex py-2 justify-content-center spacing-bottom\" *ngIf=\"isWmsWis()\">\n <label for=\"invoiceSerie\">{{'yms.int.wms_invoice_serie' | translate}}</label>\n <input id=\"invoiceSerie\" class=\"size-input\" pInputText type=\"text\" formControlName=\"invoiceSerie\">\n </div>\n <div class=\"flex py-2 justify-content-center spacing-bottom\" *ngIf=\"isWmsWis()\">\n <label for=\"partnerDocument\">{{'yms.int.wms_partner_document' | translate}}</label>\n <input id=\"partnerDocument\" class=\"size-input\" pInputText type=\"text\" formControlName=\"partnerDocument\">\n </div>\n <div class=\"separator\"></div>\n <div class=\"spacing-top\">\n <s-button pButton label=\"{{'yms.int.wms_search' | translate}}\" (click)=\"add()\"></s-button>\n <s-button\n type=\"button\"\n class=\"ui-button-link\"\n pButton label=\"{{'cancel' | translate}}\"\n (click)=\"cancel()\">\n </s-button>\n </div>\n </p-dialog>\n</form>",
3685
3717
  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}"]
3686
3718
  }),
3687
3719
  __metadata("design:paramtypes", [forms.FormBuilder,
@@ -3789,6 +3821,116 @@
3789
3821
  return WmsModule;
3790
3822
  }());
3791
3823
 
3824
+ var INFORMACAOES_ADICIONAIS_HEADER$1 = "Informações adicionais";
3825
+ var DocumentListDescritor = /** @class */ (function () {
3826
+ function DocumentListDescritor() {
3827
+ }
3828
+ DocumentListDescritor = __decorate([
3829
+ ymsRoutines.ControleCircuito({
3830
+ header: INFORMACAOES_ADICIONAIS_HEADER$1,
3831
+ name: 'yms.integracao.wms'
3832
+ })
3833
+ ], DocumentListDescritor);
3834
+ return DocumentListDescritor;
3835
+ }());
3836
+ var DocumentListComponent = /** @class */ (function (_super) {
3837
+ __extends(DocumentListComponent, _super);
3838
+ function DocumentListComponent(documentService) {
3839
+ var _this = _super.call(this) || this;
3840
+ _this.documentService = documentService;
3841
+ _this.getColumns = [];
3842
+ _this.documents = [];
3843
+ _this.labels = [];
3844
+ return _this;
3845
+ }
3846
+ DocumentListComponent.prototype.ngOnInit = function () {
3847
+ this.getSystemIntegration();
3848
+ };
3849
+ DocumentListComponent.prototype.getSystemIntegration = function () {
3850
+ var _this = this;
3851
+ this.documentService.getSystemIntegration().subscribe(function (system) {
3852
+ _this.wmsSystem = system.system;
3853
+ _this.getDocumentBySchedulingId();
3854
+ });
3855
+ };
3856
+ DocumentListComponent.prototype.getDocumentBySchedulingId = function () {
3857
+ var _this = this;
3858
+ this.documentService.list({
3859
+ filterQuery: "schedulingId eq '" + this.agenda.id + "'"
3860
+ }).subscribe(function (contents) {
3861
+ if (contents.totalElements > 0) {
3862
+ _this.documents = contents.contents;
3863
+ _this.getColumns = _this.getColumnLabels();
3864
+ }
3865
+ });
3866
+ };
3867
+ DocumentListComponent.prototype.getColumnLabels = function () {
3868
+ if (this.isWmsWIS()) {
3869
+ return __spread(this.getLabelsInvoice());
3870
+ }
3871
+ if (this.isWmsSeniorConnect()) {
3872
+ return [
3873
+ { label: 'yms.int.wms_purchaseOrder' },
3874
+ { label: 'yms.int.wms_register_document_partner_name' },
3875
+ { label: 'yms.int.wms_register_document_partner_document' }
3876
+ ];
3877
+ }
3878
+ return __spread([
3879
+ { label: 'yms.int.wms_register_document_invoice_key' }
3880
+ ], this.getLabelsInvoice());
3881
+ };
3882
+ DocumentListComponent.prototype.isWmsSeniorConnect = function () {
3883
+ return this.wmsSystem === WmsSystem.SENIOR_CONNECT;
3884
+ };
3885
+ DocumentListComponent.prototype.isWmsWIS = function () {
3886
+ return this.wmsSystem === WmsSystem.WIS;
3887
+ };
3888
+ DocumentListComponent.prototype.getLabelsInvoice = function () {
3889
+ return [
3890
+ { label: 'yms.int.wms_register_document_invoice_number' },
3891
+ { label: 'yms.int.wms_register_document_invoice_serial_number' }
3892
+ ];
3893
+ };
3894
+ __decorate([
3895
+ core.Input(),
3896
+ __metadata("design:type", Object)
3897
+ ], DocumentListComponent.prototype, "agenda", void 0);
3898
+ __decorate([
3899
+ core.Input(),
3900
+ __metadata("design:type", String)
3901
+ ], DocumentListComponent.prototype, "wmsSystem", void 0);
3902
+ DocumentListComponent = __decorate([
3903
+ core.Component({
3904
+ template: "<div> \n <p-table [value]=\"documents\">\n <ng-template pTemplate=\"header\">\n <tr>\n <th id=\"columns\" *ngFor=\"let column of getColumns\">\n <div class=\"senior-header\">\n <span class=\"senior-header-title\">{{ column.label | translate }}</span>\n </div>\n </th>\n </tr>\n </ng-template>\n <ng-template let-rowData pTemplate=\"body\">\n <tr *ngIf=\"isWmsWIS()\">\n <td id=\"\">{{rowData?.invoiceNumber}}</td>\n <td id=\"\">{{rowData?.invoiceSerialNumber}}</td>\n </tr>\n <tr *ngIf=\"isWmsSeniorConnect()\">\n <td id=\"\">{{rowData?.key}}</td>\n <td id=\"\">{{rowData?.partnerName}}</td>\n <td id=\"\">{{rowData?.partnerDocument}}</td>\n </tr>\n <tr *ngIf=\"!isWmsWIS() && !isWmsSeniorConnect()\">\n <td id=\"\">{{rowData?.invoiceKey}}</td>\n <td id=\"\">{{rowData?.invoiceNumber}}</td>\n <td id=\"\">{{rowData?.invoiceSerialNumber}}</td>\n </tr>\n </ng-template>\n </p-table>\n</div>"
3905
+ }),
3906
+ __metadata("design:paramtypes", [DocumentService])
3907
+ ], DocumentListComponent);
3908
+ return DocumentListComponent;
3909
+ }(DocumentListDescritor));
3910
+
3911
+ var DocumentListModule = /** @class */ (function () {
3912
+ function DocumentListModule(dispatcher) {
3913
+ this.dispatcher = dispatcher;
3914
+ this.dispatcher.dispatch(DocumentListComponent);
3915
+ }
3916
+ DocumentListModule = __decorate([
3917
+ core.NgModule({
3918
+ imports: [
3919
+ common.CommonModule,
3920
+ core$1.TranslateModule,
3921
+ angularComponents.LoadingStateModule,
3922
+ table.TableModule
3923
+ ],
3924
+ declarations: [DocumentListComponent],
3925
+ entryComponents: [DocumentListComponent],
3926
+ exports: [DocumentListComponent],
3927
+ providers: [DocumentService]
3928
+ }),
3929
+ __metadata("design:paramtypes", [ymsRoutines.IntegrationDispatcher])
3930
+ ], DocumentListModule);
3931
+ return DocumentListModule;
3932
+ }());
3933
+
3792
3934
  var EntityService$1 = /** @class */ (function () {
3793
3935
  function EntityService(http, messageService, entityUrl, actionsUrl) {
3794
3936
  this.http = http;
@@ -13998,6 +14140,8 @@
13998
14140
  exports.CoreModule = CoreModule;
13999
14141
  exports.DockModule = DockModule;
14000
14142
  exports.DockService = DockService;
14143
+ exports.DocumentListComponent = DocumentListComponent;
14144
+ exports.DocumentListModule = DocumentListModule;
14001
14145
  exports.ERP_ENVIRONMENT = ERP_ENVIRONMENT;
14002
14146
  exports.ERP_SENIOR_HEADER = ERP_SENIOR_HEADER;
14003
14147
  exports.EmpresaModule = EmpresaModule;