Reports
This commit is contained in:
parent
73420cf2be
commit
5bfa6c33fc
|
|
@ -5,12 +5,15 @@ import 'package:invoiceninja_flutter/data/models/company_model.dart';
|
|||
import 'package:invoiceninja_flutter/data/models/entities.dart';
|
||||
import 'package:invoiceninja_flutter/redux/reports/reports_state.dart';
|
||||
import 'package:invoiceninja_flutter/ui/reports/reports_screen.dart';
|
||||
import 'package:memoize/memoize.dart';
|
||||
|
||||
ReportResult clientReport({
|
||||
UserCompanyEntity userCompany,
|
||||
ReportsUIState reportsUIState,
|
||||
BuiltMap<String, ClientEntity> clientMap,
|
||||
}) {
|
||||
var memoizedClientReport = memo3((UserCompanyEntity userCompany,
|
||||
ReportsUIState reportsUIState,
|
||||
BuiltMap<String, ClientEntity> clientMap) =>
|
||||
clientReport(userCompany, reportsUIState, clientMap));
|
||||
|
||||
ReportResult clientReport(UserCompanyEntity userCompany,
|
||||
ReportsUIState reportsUIState, BuiltMap<String, ClientEntity> clientMap) {
|
||||
final List<List<ReportElement>> data = [];
|
||||
BuiltList<String> columns;
|
||||
|
||||
|
|
|
|||
|
|
@ -56,10 +56,10 @@ class ReportsScreenVM {
|
|||
|
||||
switch (state.uiState.reportsUIState.report) {
|
||||
default:
|
||||
reportResult = clientReport(
|
||||
userCompany: state.userCompany,
|
||||
clientMap: state.clientState.map,
|
||||
reportsUIState: state.uiState.reportsUIState,
|
||||
reportResult = memoizedClientReport(
|
||||
state.userCompany,
|
||||
state.uiState.reportsUIState,
|
||||
state.clientState.map,
|
||||
);
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue