Strict done!!
This commit is contained in:
@@ -18,9 +18,9 @@ import { ClosingStockDataSource } from './closing-stock-datasource';
|
||||
export class ClosingStockComponent implements OnInit {
|
||||
@ViewChild(MatPaginator, { static: true }) paginator?: MatPaginator;
|
||||
@ViewChild(MatSort, { static: true }) sort?: MatSort;
|
||||
dataSource: ClosingStockDataSource;
|
||||
info: ClosingStock = new ClosingStock();
|
||||
dataSource: ClosingStockDataSource = new ClosingStockDataSource(this.info.body);
|
||||
form: FormGroup;
|
||||
info: ClosingStock;
|
||||
/** Columns displayed in the table. Columns IDs can be added, removed, or reordered. */
|
||||
displayedColumns = ['product', 'group', 'quantity', 'amount'];
|
||||
|
||||
@@ -44,7 +44,7 @@ export class ClosingStockComponent implements OnInit {
|
||||
date: moment(this.info.date, 'DD-MMM-YYYY').toDate(),
|
||||
});
|
||||
});
|
||||
this.dataSource = new ClosingStockDataSource(this.paginator, this.sort, this.info.body);
|
||||
this.dataSource = new ClosingStockDataSource(this.info.body, this.paginator, this.sort);
|
||||
}
|
||||
|
||||
show() {
|
||||
@@ -55,9 +55,9 @@ export class ClosingStockComponent implements OnInit {
|
||||
getInfo(): ClosingStock {
|
||||
const formModel = this.form.value;
|
||||
|
||||
return {
|
||||
return new ClosingStock({
|
||||
date: moment(formModel.date).format('DD-MMM-YYYY'),
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
exportCsv() {
|
||||
|
||||
Reference in New Issue
Block a user