@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
@@ -3128,6 +3128,9 @@ var DocumentService = /** @class */ (function (_super) {
3128
3128
  DocumentService.prototype.findDocuments = function (input) {
3129
3129
  return this.http.post('yms_int/wms/queries/findDocuments', input);
3130
3130
  };
3131
+ DocumentService.prototype.getSystemIntegration = function () {
3132
+ return this.http.get('yms_int/wms/queries/getSystemIntegration');
3133
+ };
3131
3134
  DocumentService = __decorate([
3132
3135
  Injectable(),
3133
3136
  __metadata("design:paramtypes", [HttpClient, MessageService])
@@ -3148,10 +3151,12 @@ var DocumentGridComponent = /** @class */ (function () {
3148
3151
  this.selection = [];
3149
3152
  }
3150
3153
  DocumentGridComponent.prototype.ngOnInit = function () {
3151
- this.gridColumns = this.getGridColumns();
3152
3154
  this.getProcessTypeByScheduling();
3153
3155
  this.listDocuments();
3154
3156
  };
3157
+ DocumentGridComponent.prototype.ngAfterContentChecked = function () {
3158
+ this.gridColumns = this.getGridColumns();
3159
+ };
3155
3160
  DocumentGridComponent.prototype.getProcessTypeByScheduling = function () {
3156
3161
  var _this = this;
3157
3162
  this.integrationService.getProcessTypeByScheduling(this.agenda.tipoAgendamento.id)
@@ -3165,7 +3170,7 @@ var DocumentGridComponent = /** @class */ (function () {
3165
3170
  var _this = this;
3166
3171
  return [
3167
3172
  {
3168
- label: this.translate.instant("yms.int.wms_add_document_invoice_key"),
3173
+ label: this.translate.instant("yms.int.wms_search"),
3169
3174
  command: function () {
3170
3175
  _this.selection = [];
3171
3176
  _this.visibleInvoiceKey = true;
@@ -3269,17 +3274,42 @@ var DocumentGridComponent = /** @class */ (function () {
3269
3274
  });
3270
3275
  };
3271
3276
  DocumentGridComponent.prototype.getGridColumns = function () {
3272
- return [
3273
- { field: "logistcUnitName", header: this.translate.instant("yms.int.wms_register_document_logistc_unit_name") },
3274
- { field: "logistcUnitDocument", header: this.translate.instant("yms.int.wms_register_document_logistc_unit_document") },
3275
- { field: "invoiceKey", header: this.translate.instant("yms.int.wms_register_document_invoice_key") },
3276
- { field: "invoiceNumber", header: this.translate.instant("yms.int.wms_register_document_invoice_number") },
3277
- { field: "invoiceSerialNumber", header: this.translate.instant("yms.int.wms_register_document_invoice_serial_number") },
3277
+ if (this.isWmsSeniorConnect()) {
3278
+ return __spread([
3279
+ { field: "key", header: this.translate.instant("yms.int.wms_purchaseOrder") }
3280
+ ], this.getColumnPartner());
3281
+ }
3282
+ if (this.isWmsWIS()) {
3283
+ return this.getColumnInvoiceAndlogistcUnit();
3284
+ }
3285
+ return __spread([
3286
+ { field: "invoiceKey", header: this.translate.instant("yms.int.wms_register_document_invoice_key") }
3287
+ ], this.getColumnInvoiceAndlogistcUnit(), [
3278
3288
  { field: "ownerName", header: this.translate.instant("yms.int.wms_register_document_owner_name") },
3279
3289
  { field: "ownerDocument", header: this.translate.instant("yms.int.wms_register_document_owner_document") },
3280
- { field: "code", header: this.translate.instant("yms.int.wms_register_document_order_receiving_code") },
3290
+ ]);
3291
+ };
3292
+ DocumentGridComponent.prototype.getColumnInvoiceAndlogistcUnit = function () {
3293
+ return __spread([
3294
+ { field: "invoiceNumber", header: this.translate.instant("yms.int.wms_register_document_invoice_number") },
3295
+ { field: "invoiceSerialNumber", header: this.translate.instant("yms.int.wms_register_document_invoice_serial_number") }
3296
+ ], this.getColumnPartner(), [
3297
+ { field: "logistcUnitName", header: this.translate.instant("yms.int.wms_register_document_logistc_unit_name") },
3298
+ { field: "logistcUnitDocument", header: this.translate.instant("yms.int.wms_register_document_logistc_unit_document") },
3299
+ ]);
3300
+ };
3301
+ DocumentGridComponent.prototype.getColumnPartner = function () {
3302
+ return [
3303
+ { field: "partnerName", header: this.translate.instant("yms.int.wms_register_document_partner_name") },
3304
+ { field: "partnerDocument", header: this.translate.instant("yms.int.wms_register_document_partner_document") },
3281
3305
  ];
3282
3306
  };
3307
+ DocumentGridComponent.prototype.isWmsSeniorConnect = function () {
3308
+ return this.wmsSystem === WmsSystem.SENIOR_CONNECT;
3309
+ };
3310
+ DocumentGridComponent.prototype.isWmsWIS = function () {
3311
+ return this.wmsSystem === WmsSystem.WIS;
3312
+ };
3283
3313
  DocumentGridComponent.prototype.message = function (severity, summary, detail) {
3284
3314
  this.messageService.add({
3285
3315
  severity: severity,
@@ -3334,7 +3364,7 @@ var DocumentGridComponent = /** @class */ (function () {
3334
3364
  DocumentGridComponent = __decorate([
3335
3365
  Component({
3336
3366
  selector: 'document-grid',
3337
- 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>",
3367
+ 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>",
3338
3368
  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}"]
3339
3369
  }),
3340
3370
  __metadata("design:paramtypes", [TranslateService,
@@ -3427,6 +3457,8 @@ var RegisterDocumentComponent = /** @class */ (function () {
3427
3457
  this.formGroup.get('logistcUnitName').setValue(document.logistcUnitName);
3428
3458
  this.formGroup.get('notes').setValue(document.notes);
3429
3459
  this.formGroup.get('code').setValue(document.code);
3460
+ this.formGroup.get('partnerName').setValue(document.partnerName);
3461
+ this.formGroup.get('partnerDocument').setValue(document.partnerDocument);
3430
3462
  this.formGroup.get('ownerDocument').setValue(document.ownerDocument);
3431
3463
  this.formGroup.get('ownerName').setValue(document.ownerName);
3432
3464
  };
@@ -3622,7 +3654,7 @@ var InsertKeyComponent = /** @class */ (function () {
3622
3654
  InsertKeyComponent = __decorate([
3623
3655
  Component({
3624
3656
  selector: "insert-key",
3625
- 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>",
3657
+ 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>",
3626
3658
  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}"]
3627
3659
  }),
3628
3660
  __metadata("design:paramtypes", [FormBuilder,
@@ -3730,6 +3762,116 @@ var WmsModule = /** @class */ (function () {
3730
3762
  return WmsModule;
3731
3763
  }());
3732
3764
 
3765
+ var INFORMACAOES_ADICIONAIS_HEADER$1 = "Informações adicionais";
3766
+ var DocumentListDescritor = /** @class */ (function () {
3767
+ function DocumentListDescritor() {
3768
+ }
3769
+ DocumentListDescritor = __decorate([
3770
+ ControleCircuito({
3771
+ header: INFORMACAOES_ADICIONAIS_HEADER$1,
3772
+ name: 'yms.integracao.wms'
3773
+ })
3774
+ ], DocumentListDescritor);
3775
+ return DocumentListDescritor;
3776
+ }());
3777
+ var DocumentListComponent = /** @class */ (function (_super) {
3778
+ __extends(DocumentListComponent, _super);
3779
+ function DocumentListComponent(documentService) {
3780
+ var _this = _super.call(this) || this;
3781
+ _this.documentService = documentService;
3782
+ _this.getColumns = [];
3783
+ _this.documents = [];
3784
+ _this.labels = [];
3785
+ return _this;
3786
+ }
3787
+ DocumentListComponent.prototype.ngOnInit = function () {
3788
+ this.getSystemIntegration();
3789
+ };
3790
+ DocumentListComponent.prototype.getSystemIntegration = function () {
3791
+ var _this = this;
3792
+ this.documentService.getSystemIntegration().subscribe(function (system) {
3793
+ _this.wmsSystem = system.system;
3794
+ _this.getDocumentBySchedulingId();
3795
+ });
3796
+ };
3797
+ DocumentListComponent.prototype.getDocumentBySchedulingId = function () {
3798
+ var _this = this;
3799
+ this.documentService.list({
3800
+ filterQuery: "schedulingId eq '" + this.agenda.id + "'"
3801
+ }).subscribe(function (contents) {
3802
+ if (contents.totalElements > 0) {
3803
+ _this.documents = contents.contents;
3804
+ _this.getColumns = _this.getColumnLabels();
3805
+ }
3806
+ });
3807
+ };
3808
+ DocumentListComponent.prototype.getColumnLabels = function () {
3809
+ if (this.isWmsWIS()) {
3810
+ return __spread(this.getLabelsInvoice());
3811
+ }
3812
+ if (this.isWmsSeniorConnect()) {
3813
+ return [
3814
+ { label: 'yms.int.wms_purchaseOrder' },
3815
+ { label: 'yms.int.wms_register_document_partner_name' },
3816
+ { label: 'yms.int.wms_register_document_partner_document' }
3817
+ ];
3818
+ }
3819
+ return __spread([
3820
+ { label: 'yms.int.wms_register_document_invoice_key' }
3821
+ ], this.getLabelsInvoice());
3822
+ };
3823
+ DocumentListComponent.prototype.isWmsSeniorConnect = function () {
3824
+ return this.wmsSystem === WmsSystem.SENIOR_CONNECT;
3825
+ };
3826
+ DocumentListComponent.prototype.isWmsWIS = function () {
3827
+ return this.wmsSystem === WmsSystem.WIS;
3828
+ };
3829
+ DocumentListComponent.prototype.getLabelsInvoice = function () {
3830
+ return [
3831
+ { label: 'yms.int.wms_register_document_invoice_number' },
3832
+ { label: 'yms.int.wms_register_document_invoice_serial_number' }
3833
+ ];
3834
+ };
3835
+ __decorate([
3836
+ Input(),
3837
+ __metadata("design:type", Object)
3838
+ ], DocumentListComponent.prototype, "agenda", void 0);
3839
+ __decorate([
3840
+ Input(),
3841
+ __metadata("design:type", String)
3842
+ ], DocumentListComponent.prototype, "wmsSystem", void 0);
3843
+ DocumentListComponent = __decorate([
3844
+ Component({
3845
+ 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>"
3846
+ }),
3847
+ __metadata("design:paramtypes", [DocumentService])
3848
+ ], DocumentListComponent);
3849
+ return DocumentListComponent;
3850
+ }(DocumentListDescritor));
3851
+
3852
+ var DocumentListModule = /** @class */ (function () {
3853
+ function DocumentListModule(dispatcher) {
3854
+ this.dispatcher = dispatcher;
3855
+ this.dispatcher.dispatch(DocumentListComponent);
3856
+ }
3857
+ DocumentListModule = __decorate([
3858
+ NgModule({
3859
+ imports: [
3860
+ CommonModule,
3861
+ TranslateModule,
3862
+ LoadingStateModule,
3863
+ TableModule
3864
+ ],
3865
+ declarations: [DocumentListComponent],
3866
+ entryComponents: [DocumentListComponent],
3867
+ exports: [DocumentListComponent],
3868
+ providers: [DocumentService]
3869
+ }),
3870
+ __metadata("design:paramtypes", [IntegrationDispatcher])
3871
+ ], DocumentListModule);
3872
+ return DocumentListModule;
3873
+ }());
3874
+
3733
3875
  var EntityService$1 = /** @class */ (function () {
3734
3876
  function EntityService(http, messageService, entityUrl, actionsUrl) {
3735
3877
  this.http = http;
@@ -13920,5 +14062,5 @@ var DockModule = /** @class */ (function () {
13920
14062
  return DockModule;
13921
14063
  }());
13922
14064
 
13923
- export { AgendaModule, AgendaService, BalancaModule, BalancasService, CamerasModule, CamerasService, CancelasModule, CidadeModule, CidadeService, ContratoCompraItemModule, ContratoCompraItemService, ContratoCompraModule, ContratoCompraService, ControladorCancelaComponent, ControladorCancelaDescritor, ControladorCancelasService, CoreModule, DockModule, DockService, 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, RegisterDocumentComponent as ɵba, InsertKeyModule as ɵbb, InsertKeyComponent as ɵbc, EntityService$1 as ɵbd, IntegrationService$1 as ɵbe, RecebimentoFormComponent as ɵbf, DerivacaoService as ɵbg, NotaValidatorService as ɵbh, TransgeniaService as ɵbi, VerificaNotafiscal as ɵbj, BuildFormField as ɵbk, ExpedicaoFormComponent as ɵbl, ExpedicaoInfoComponent as ɵbm, RecebimentoInfoComponent as ɵbn, DevolucaoFormComponent as ɵbo, DevolucaoService as ɵbp, DevolucaoChegadaVeiculoOverride as ɵbq, RecebimentoOrdemCompraFormComponent as ɵbr, OrdemCompraService as ɵbs, RecebimentoOrdemCompraService as ɵbt, RecebimentoOrdemCompraChegadaVeiculoOverride as ɵbu, RecebimentoOrdemCompraInfoComponent as ɵbv, DevolucaoInfoComponent as ɵbw, ContratoFormComponent as ɵbx, OrdemCompraFormComponent as ɵby, ProcessoAvulsoFormComponent as ɵbz, ViewImageComponent as ɵc, ProcessoAvulsoService as ɵca, ProcessoAvulsoChegadaVeiculoOverride as ɵcb, ProcessoAvulsoInfoComponent as ɵcc, LogIntegracaoDescritor as ɵcd, LogIntegracaoComponent as ɵce, LogIntegracaoService as ɵcf, DerivacaoModule as ɵcg, DevolucaoModule as ɵch, OrdemCompraModule as ɵci, RecebimentoOrdemCompraModule as ɵcj, TransgeniaModule as ɵck, ProcessoAvulsoModule as ɵcl, LogIntegracaoModule as ɵcm, NotaFormModule as ɵcn, DirectivesModule as ɵco, TrimDirective as ɵcp, NotaFormComponent as ɵcq, 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, RegisterDocumentModule as ɵz };
14065
+ export { AgendaModule, 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, RegisterDocumentComponent as ɵba, InsertKeyModule as ɵbb, InsertKeyComponent as ɵbc, EntityService$1 as ɵbd, IntegrationService$1 as ɵbe, RecebimentoFormComponent as ɵbf, DerivacaoService as ɵbg, NotaValidatorService as ɵbh, TransgeniaService as ɵbi, VerificaNotafiscal as ɵbj, BuildFormField as ɵbk, ExpedicaoFormComponent as ɵbl, ExpedicaoInfoComponent as ɵbm, RecebimentoInfoComponent as ɵbn, DevolucaoFormComponent as ɵbo, DevolucaoService as ɵbp, DevolucaoChegadaVeiculoOverride as ɵbq, RecebimentoOrdemCompraFormComponent as ɵbr, OrdemCompraService as ɵbs, RecebimentoOrdemCompraService as ɵbt, RecebimentoOrdemCompraChegadaVeiculoOverride as ɵbu, RecebimentoOrdemCompraInfoComponent as ɵbv, DevolucaoInfoComponent as ɵbw, ContratoFormComponent as ɵbx, OrdemCompraFormComponent as ɵby, ProcessoAvulsoFormComponent as ɵbz, ViewImageComponent as ɵc, ProcessoAvulsoService as ɵca, ProcessoAvulsoChegadaVeiculoOverride as ɵcb, ProcessoAvulsoInfoComponent as ɵcc, LogIntegracaoDescritor as ɵcd, LogIntegracaoComponent as ɵce, LogIntegracaoService as ɵcf, DerivacaoModule as ɵcg, DevolucaoModule as ɵch, OrdemCompraModule as ɵci, RecebimentoOrdemCompraModule as ɵcj, TransgeniaModule as ɵck, ProcessoAvulsoModule as ɵcl, LogIntegracaoModule as ɵcm, NotaFormModule as ɵcn, DirectivesModule as ɵco, TrimDirective as ɵcp, NotaFormComponent as ɵcq, 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, RegisterDocumentModule as ɵz };
13924
14066
  //# sourceMappingURL=seniorsistemas-yms-integration.js.map