@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
@@ -2918,6 +2918,9 @@ let DocumentService = class DocumentService extends EntityService {
2918
2918
  findDocuments(input) {
2919
2919
  return this.http.post('yms_int/wms/queries/findDocuments', input);
2920
2920
  }
2921
+ getSystemIntegration() {
2922
+ return this.http.get('yms_int/wms/queries/getSystemIntegration');
2923
+ }
2921
2924
  };
2922
2925
  DocumentService = __decorate([
2923
2926
  Injectable(),
@@ -2937,10 +2940,12 @@ let DocumentGridComponent = class DocumentGridComponent {
2937
2940
  this.selection = [];
2938
2941
  }
2939
2942
  ngOnInit() {
2940
- this.gridColumns = this.getGridColumns();
2941
2943
  this.getProcessTypeByScheduling();
2942
2944
  this.listDocuments();
2943
2945
  }
2946
+ ngAfterContentChecked() {
2947
+ this.gridColumns = this.getGridColumns();
2948
+ }
2944
2949
  getProcessTypeByScheduling() {
2945
2950
  this.integrationService.getProcessTypeByScheduling(this.agenda.tipoAgendamento.id)
2946
2951
  .subscribe((result) => this.processType = result.processType);
@@ -2952,7 +2957,7 @@ let DocumentGridComponent = class DocumentGridComponent {
2952
2957
  getActions() {
2953
2958
  return [
2954
2959
  {
2955
- label: this.translate.instant("yms.int.wms_add_document_invoice_key"),
2960
+ label: this.translate.instant("yms.int.wms_search"),
2956
2961
  command: () => {
2957
2962
  this.selection = [];
2958
2963
  this.visibleInvoiceKey = true;
@@ -3052,17 +3057,43 @@ let DocumentGridComponent = class DocumentGridComponent {
3052
3057
  });
3053
3058
  }
3054
3059
  getGridColumns() {
3060
+ if (this.isWmsSeniorConnect()) {
3061
+ return [
3062
+ { field: "key", header: this.translate.instant("yms.int.wms_purchaseOrder") },
3063
+ ...this.getColumnPartner()
3064
+ ];
3065
+ }
3066
+ if (this.isWmsWIS()) {
3067
+ return this.getColumnInvoiceAndlogistcUnit();
3068
+ }
3055
3069
  return [
3056
- { field: "logistcUnitName", header: this.translate.instant("yms.int.wms_register_document_logistc_unit_name") },
3057
- { field: "logistcUnitDocument", header: this.translate.instant("yms.int.wms_register_document_logistc_unit_document") },
3058
3070
  { field: "invoiceKey", header: this.translate.instant("yms.int.wms_register_document_invoice_key") },
3059
- { field: "invoiceNumber", header: this.translate.instant("yms.int.wms_register_document_invoice_number") },
3060
- { field: "invoiceSerialNumber", header: this.translate.instant("yms.int.wms_register_document_invoice_serial_number") },
3071
+ ...this.getColumnInvoiceAndlogistcUnit(),
3061
3072
  { field: "ownerName", header: this.translate.instant("yms.int.wms_register_document_owner_name") },
3062
3073
  { field: "ownerDocument", header: this.translate.instant("yms.int.wms_register_document_owner_document") },
3063
- { field: "code", header: this.translate.instant("yms.int.wms_register_document_order_receiving_code") },
3064
3074
  ];
3065
3075
  }
3076
+ getColumnInvoiceAndlogistcUnit() {
3077
+ return [
3078
+ { field: "invoiceNumber", header: this.translate.instant("yms.int.wms_register_document_invoice_number") },
3079
+ { field: "invoiceSerialNumber", header: this.translate.instant("yms.int.wms_register_document_invoice_serial_number") },
3080
+ ...this.getColumnPartner(),
3081
+ { field: "logistcUnitName", header: this.translate.instant("yms.int.wms_register_document_logistc_unit_name") },
3082
+ { field: "logistcUnitDocument", header: this.translate.instant("yms.int.wms_register_document_logistc_unit_document") },
3083
+ ];
3084
+ }
3085
+ getColumnPartner() {
3086
+ return [
3087
+ { field: "partnerName", header: this.translate.instant("yms.int.wms_register_document_partner_name") },
3088
+ { field: "partnerDocument", header: this.translate.instant("yms.int.wms_register_document_partner_document") },
3089
+ ];
3090
+ }
3091
+ isWmsSeniorConnect() {
3092
+ return this.wmsSystem === WmsSystem.SENIOR_CONNECT;
3093
+ }
3094
+ isWmsWIS() {
3095
+ return this.wmsSystem === WmsSystem.WIS;
3096
+ }
3066
3097
  message(severity, summary, detail) {
3067
3098
  this.messageService.add({
3068
3099
  severity,
@@ -3118,7 +3149,7 @@ __decorate([
3118
3149
  DocumentGridComponent = __decorate([
3119
3150
  Component({
3120
3151
  selector: 'document-grid',
3121
- 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>",
3152
+ 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>",
3122
3153
  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}"]
3123
3154
  }),
3124
3155
  __metadata("design:paramtypes", [TranslateService,
@@ -3206,6 +3237,8 @@ let RegisterDocumentComponent = class RegisterDocumentComponent {
3206
3237
  this.formGroup.get('logistcUnitName').setValue(document.logistcUnitName);
3207
3238
  this.formGroup.get('notes').setValue(document.notes);
3208
3239
  this.formGroup.get('code').setValue(document.code);
3240
+ this.formGroup.get('partnerName').setValue(document.partnerName);
3241
+ this.formGroup.get('partnerDocument').setValue(document.partnerDocument);
3209
3242
  this.formGroup.get('ownerDocument').setValue(document.ownerDocument);
3210
3243
  this.formGroup.get('ownerName').setValue(document.ownerName);
3211
3244
  }
@@ -3397,7 +3430,7 @@ __decorate([
3397
3430
  InsertKeyComponent = __decorate([
3398
3431
  Component({
3399
3432
  selector: "insert-key",
3400
- 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>",
3433
+ 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>",
3401
3434
  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}"]
3402
3435
  }),
3403
3436
  __metadata("design:paramtypes", [FormBuilder,
@@ -3496,6 +3529,110 @@ WmsModule = __decorate([
3496
3529
  __metadata("design:paramtypes", [IntegrationDispatcher])
3497
3530
  ], WmsModule);
3498
3531
 
3532
+ const INFORMACAOES_ADICIONAIS_HEADER$1 = "Informações adicionais";
3533
+ let DocumentListDescritor = class DocumentListDescritor {
3534
+ };
3535
+ DocumentListDescritor = __decorate([
3536
+ ControleCircuito({
3537
+ header: INFORMACAOES_ADICIONAIS_HEADER$1,
3538
+ name: 'yms.integracao.wms'
3539
+ })
3540
+ ], DocumentListDescritor);
3541
+ let DocumentListComponent = class DocumentListComponent extends DocumentListDescritor {
3542
+ constructor(documentService) {
3543
+ super();
3544
+ this.documentService = documentService;
3545
+ this.getColumns = [];
3546
+ this.documents = [];
3547
+ this.labels = [];
3548
+ }
3549
+ ngOnInit() {
3550
+ this.getSystemIntegration();
3551
+ }
3552
+ getSystemIntegration() {
3553
+ this.documentService.getSystemIntegration().subscribe((system) => {
3554
+ this.wmsSystem = system.system;
3555
+ this.getDocumentBySchedulingId();
3556
+ });
3557
+ }
3558
+ getDocumentBySchedulingId() {
3559
+ this.documentService.list({
3560
+ filterQuery: `schedulingId eq '${this.agenda.id}'`
3561
+ }).subscribe((contents) => {
3562
+ if (contents.totalElements > 0) {
3563
+ this.documents = contents.contents;
3564
+ this.getColumns = this.getColumnLabels();
3565
+ }
3566
+ });
3567
+ }
3568
+ getColumnLabels() {
3569
+ if (this.isWmsWIS()) {
3570
+ return [
3571
+ ...this.getLabelsInvoice()
3572
+ ];
3573
+ }
3574
+ if (this.isWmsSeniorConnect()) {
3575
+ return [
3576
+ { label: 'yms.int.wms_purchaseOrder' },
3577
+ { label: 'yms.int.wms_register_document_partner_name' },
3578
+ { label: 'yms.int.wms_register_document_partner_document' }
3579
+ ];
3580
+ }
3581
+ return [
3582
+ { label: 'yms.int.wms_register_document_invoice_key' },
3583
+ ...this.getLabelsInvoice()
3584
+ ];
3585
+ }
3586
+ isWmsSeniorConnect() {
3587
+ return this.wmsSystem === WmsSystem.SENIOR_CONNECT;
3588
+ }
3589
+ isWmsWIS() {
3590
+ return this.wmsSystem === WmsSystem.WIS;
3591
+ }
3592
+ getLabelsInvoice() {
3593
+ return [
3594
+ { label: 'yms.int.wms_register_document_invoice_number' },
3595
+ { label: 'yms.int.wms_register_document_invoice_serial_number' }
3596
+ ];
3597
+ }
3598
+ };
3599
+ __decorate([
3600
+ Input(),
3601
+ __metadata("design:type", Object)
3602
+ ], DocumentListComponent.prototype, "agenda", void 0);
3603
+ __decorate([
3604
+ Input(),
3605
+ __metadata("design:type", String)
3606
+ ], DocumentListComponent.prototype, "wmsSystem", void 0);
3607
+ DocumentListComponent = __decorate([
3608
+ Component({
3609
+ 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>"
3610
+ }),
3611
+ __metadata("design:paramtypes", [DocumentService])
3612
+ ], DocumentListComponent);
3613
+
3614
+ let DocumentListModule = class DocumentListModule {
3615
+ constructor(dispatcher) {
3616
+ this.dispatcher = dispatcher;
3617
+ this.dispatcher.dispatch(DocumentListComponent);
3618
+ }
3619
+ };
3620
+ DocumentListModule = __decorate([
3621
+ NgModule({
3622
+ imports: [
3623
+ CommonModule,
3624
+ TranslateModule,
3625
+ LoadingStateModule,
3626
+ TableModule
3627
+ ],
3628
+ declarations: [DocumentListComponent],
3629
+ entryComponents: [DocumentListComponent],
3630
+ exports: [DocumentListComponent],
3631
+ providers: [DocumentService]
3632
+ }),
3633
+ __metadata("design:paramtypes", [IntegrationDispatcher])
3634
+ ], DocumentListModule);
3635
+
3499
3636
  class EntityService$1 {
3500
3637
  constructor(http, messageService, entityUrl, actionsUrl) {
3501
3638
  this.http = http;
@@ -13201,5 +13338,5 @@ DockModule = __decorate([
13201
13338
  })
13202
13339
  ], DockModule);
13203
13340
 
13204
- 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 };
13341
+ 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 };
13205
13342
  //# sourceMappingURL=seniorsistemas-yms-integration.js.map