scheduleSource: GridDataSource = new GridDataSource();
- handleResourceTypeChange: ($event: ComboboxEntry) => void;
-
resources: IdlObject[] = [];
limitByAttr: (attributeId: number, $event: ComboboxEntry) => void;
console.log('event: ' + JSON.stringify($event));
};
- this.handleResourceTypeChange = ($event: ComboboxEntry) => {
- // TODO: unset resource barcode
- this.attributes = [];
- if ($event.id) {
- this.pcrud.search('bra', {resource_type : $event.id}, {
- order_by: 'name ASC',
- flesh: 1,
- flesh_fields: {'bra' : ['valid_values']}
- }).subscribe(
- a => { this.attributes.push(a); });
- this.fetchData('type', $event.id);
- }
- };
}
showNewDialog(idlThing: IdlObject) {
err => {}
);
}
+
+ this.handleResourceTypeChange($event: ComboboxEntry) {
+ // TODO: unset resource barcode
+ this.attributes = [];
+ if ($event.id) {
+ this.pcrud.search('bra', {resource_type : $event.id}, {
+ order_by: 'name ASC',
+ flesh: 1,
+ flesh_fields: {'bra' : ['valid_values']}
+ }).subscribe(
+ a => { this.attributes.push(a); });
+ this.fetchData('type', $event.id);
+ }
+ }
+
private _firstTimeIsSmaller(first: NgbTimeStruct, second: NgbTimeStruct) {
if (first.hour < second.hour) { return true; }
if ((first.hour === second.hour) && (first.minute < second.minute)) { return true; }