Files
carparkvalidation/UI/angularUI/src/app/models/picklist.ts
T
2026-06-18 21:39:20 +10:00

46 lines
993 B
TypeScript

import { BehaviorSubject } from 'rxjs';
import { treeLookupCode } from './lookupcode';
enum EnumLookup {
BodyPart = 16,
Location = 17,
Equipment = 18,
LocationType = 19,
CheckList = 20
}
export class DataNode {
loaded: boolean = false;
name: string ='';
id: number = 0;
children: DataNode[] =[];
}
export class UIDataNode {
allowMultiSelect: boolean = false;
pickListTitle: string = '';
enumPickType: number = 0;
children: treeLookupCode[] = [];
}
/** Nested node */
export class DataNode$ {
childrenChange = new BehaviorSubject<DataNode$[]>([]);
expanable = new BehaviorSubject<boolean>(true);
get children(): DataNode$[] {
return this.childrenChange.value;
}
get isExpanable(): boolean {
return this.expanable.value;
}
constructor(public id: number,
public name: string,
public canCheck: boolean,
public hasChildren: boolean,
public parentId: number,
public loadMoreParentItem: number | null = null) { }
}