Strict done!!
This commit is contained in:
@@ -16,10 +16,10 @@ import { NetTransactionsDataSource } from './net-transactions-datasource';
|
||||
export class NetTransactionsComponent implements OnInit {
|
||||
@ViewChild(MatPaginator, { static: true }) paginator?: MatPaginator;
|
||||
@ViewChild(MatSort, { static: true }) sort?: MatSort;
|
||||
dataSource: NetTransactionsDataSource;
|
||||
info: NetTransactions = new NetTransactions();
|
||||
dataSource: NetTransactionsDataSource = new NetTransactionsDataSource(this.info.body);
|
||||
form: FormGroup;
|
||||
info: NetTransactions;
|
||||
selectedRowId: string;
|
||||
selectedRowId = '';
|
||||
/** Columns displayed in the table. Columns IDs can be added, removed, or reordered. */
|
||||
displayedColumns = ['type', 'name', 'debit', 'credit'];
|
||||
|
||||
@@ -39,7 +39,7 @@ export class NetTransactionsComponent implements OnInit {
|
||||
startDate: moment(this.info.startDate, 'DD-MMM-YYYY').toDate(),
|
||||
finishDate: moment(this.info.finishDate, 'DD-MMM-YYYY').toDate(),
|
||||
});
|
||||
this.dataSource = new NetTransactionsDataSource(this.paginator, this.sort, this.info.body);
|
||||
this.dataSource = new NetTransactionsDataSource(this.info.body, this.paginator, this.sort);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -56,10 +56,9 @@ export class NetTransactionsComponent implements OnInit {
|
||||
prepareSubmit(): NetTransactions {
|
||||
const formModel = this.form.value;
|
||||
|
||||
return {
|
||||
return new NetTransactions({
|
||||
startDate: moment(formModel.startDate).format('DD-MMM-YYYY'),
|
||||
finishDate: moment(formModel.finishDate).format('DD-MMM-YYYY'),
|
||||
body: [],
|
||||
};
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user