Reports
This commit is contained in:
parent
cf9271dd96
commit
74160d64a8
|
|
@ -8,6 +8,7 @@ ReportsUIState reportsUIReducer(ReportsUIState state, dynamic action) {
|
|||
return state.rebuild((b) => b
|
||||
..group = ''
|
||||
..subgroup = ''
|
||||
..selectedGroup = ''
|
||||
..chart = '');
|
||||
} else if (action is UpdateReportSettings) {
|
||||
if (action.report != null &&
|
||||
|
|
@ -18,6 +19,7 @@ ReportsUIState reportsUIReducer(ReportsUIState state, dynamic action) {
|
|||
return state.rebuild((b) => b
|
||||
..report = action.report ?? state.report
|
||||
..group = action.group ?? state.group
|
||||
..selectedGroup = action.selectedGroup ?? state.selectedGroup
|
||||
..subgroup = action.subgroup ?? state.subgroup
|
||||
..chart = action.chart ?? state.chart
|
||||
..customStartDate = action.customStartDate ?? state.customStartDate
|
||||
|
|
|
|||
|
|
@ -179,7 +179,7 @@ class ReportsScreen extends StatelessWidget {
|
|||
blankValue: '',
|
||||
showBlank: true,
|
||||
onChanged: (dynamic value) {
|
||||
viewModel.onSettingsChanged(group: value);
|
||||
viewModel.onSettingsChanged(group: value, selectedGroup: '');
|
||||
},
|
||||
items: reportResult.columns
|
||||
.where((column) =>
|
||||
|
|
|
|||
|
|
@ -72,6 +72,7 @@ class ReportsScreenVM {
|
|||
String customStartDate,
|
||||
String customEndDate,
|
||||
String group,
|
||||
String selectedGroup,
|
||||
String subgroup,
|
||||
String chart,
|
||||
}) onSettingsChanged;
|
||||
|
|
@ -193,6 +194,7 @@ class ReportsScreenVM {
|
|||
store.dispatch(UpdateReportSettings(
|
||||
report: report,
|
||||
filters: filterMap,
|
||||
selectedGroup: '',
|
||||
));
|
||||
},
|
||||
onReportColumnsChanged: (context, columns) {
|
||||
|
|
@ -233,6 +235,7 @@ class ReportsScreenVM {
|
|||
onSettingsChanged: ({
|
||||
String report,
|
||||
String group,
|
||||
String selectedGroup,
|
||||
String subgroup,
|
||||
String chart,
|
||||
String customStartDate,
|
||||
|
|
@ -245,6 +248,7 @@ class ReportsScreenVM {
|
|||
group: group,
|
||||
chart: chart,
|
||||
subgroup: subgroup,
|
||||
selectedGroup: '',
|
||||
customStartDate: '',
|
||||
customEndDate: '',
|
||||
filters: BuiltMap<String, String>(),
|
||||
|
|
@ -253,6 +257,7 @@ class ReportsScreenVM {
|
|||
store.dispatch(UpdateReportSettings(
|
||||
report: report ?? reportState.report,
|
||||
group: group,
|
||||
selectedGroup: selectedGroup,
|
||||
subgroup: subgroup,
|
||||
chart: chart,
|
||||
customStartDate: customStartDate,
|
||||
|
|
|
|||
Loading…
Reference in New Issue