Files
barker/bookie/src/app/sales/discount/discount-datasource.ts
tanshu d677cfb1ea Blacked and isorted the python files
Prettied and eslinted the typescript/html files
2020-10-11 10:56:29 +05:30

15 lines
411 B
TypeScript

import { DataSource } from '@angular/cdk/collections';
import { Observable, of as observableOf } from 'rxjs';
export class DiscountDataSource extends DataSource<{ name: string; discount: number }> {
constructor(private data: { name: string; discount: number }[]) {
super();
}
connect(): Observable<{ name: string; discount: number }[]> {
return observableOf(this.data);
}
disconnect() {}
}