1 import {Component, Input, ViewChild} from '@angular/core';
2 import {Pager} from '@eg/share/util/pager';
3 import {NetService} from '@eg/core/net.service';
4 import {PcrudService} from '@eg/core/pcrud.service';
5 import {AuthService} from '@eg/core/auth.service';
6 import {GridComponent} from '@eg/share/grid/grid.component';
7 import {GridDataSource} from '@eg/share/grid/grid';
8 import {VandelayService} from './vandelay.service';
11 selector: 'eg-queued-record-items',
12 templateUrl: 'record-items.component.html'
14 export class RecordItemsComponent {
16 @Input() recordId: number;
18 gridSource: GridDataSource;
19 @ViewChild('itemsGrid', { static: true }) itemsGrid: GridComponent;
22 private net: NetService,
23 private auth: AuthService,
24 private pcrud: PcrudService,
25 private vandelay: VandelayService) {
27 this.gridSource = new GridDataSource();
29 // queue API does not support sorting
30 this.gridSource.getRows = (pager: Pager) => {
31 return this.pcrud.search('vii',
32 {record: this.recordId}, {order_by: {vii: ['id']}});