import * as React from 'react'; import { Page, nav } from 'tonva-tools'; import { List, Muted, FA, LMR, EasyDate } from 'tonva-react-form'; import { VEntity } from '../CVEntity'; import { Sheet } from '../../entities'; import { CSheet, SheetUI } from './cSheet'; export class VSheetList extends VEntity { protected row: (values) => JSX.Element; stateName: string; stateLabel: string; async open(item:any) { this.row = this.ui.listRow || this.rowContent; this.stateName = item.state; this.stateLabel = this.controller.getStateLabel(this.stateName); //await this.controller.getStateSheets(this.stateName, 0, 10); await this.controller.pageStateItems.first(this.stateName); this.openPage(this.view); } rowClick = async (brief:any) => { if (brief.processing===1) { this.event('processing', brief.id); return; } this.event('action', brief.id); } private onScrollBottom = () => { console.log('onScrollBottom'); this.controller.pageStateItems.more(); } protected rowContent = (row:any):JSX.Element => { let {id, no, discription, date, processing} = row; let left = <> {no}   {discription} {processing===1? '...' : ''} ; let right = ; return ; } private renderRow = (row:any, index:number) => protected view = () => { //let sheets = this.controller.stateSheets; let {pageStateItems} = this.controller; return ; } }