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