Reports
This commit is contained in:
parent
720b05925f
commit
8cfaa34a50
|
|
@ -193,13 +193,10 @@ class ReportsScreen extends StatelessWidget {
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
FormCard(
|
ReportDataTable(
|
||||||
child: ReportDataTable(
|
key: ValueKey(
|
||||||
//key: ObjectKey(viewModel.reportResult.columns),
|
'${viewModel.state.isSaving} ${reportsUIState.group}'),
|
||||||
key: ValueKey(
|
viewModel: viewModel,
|
||||||
'${viewModel.state.isSaving} ${reportsUIState.group}'),
|
|
||||||
viewModel: viewModel,
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
@ -274,27 +271,43 @@ class _ReportDataTableState extends State<ReportDataTable> {
|
||||||
?.reportSettings[state.uiState.reportsUIState.report] ??
|
?.reportSettings[state.uiState.reportsUIState.report] ??
|
||||||
ReportSettingsEntity();
|
ReportSettingsEntity();
|
||||||
|
|
||||||
return SingleChildScrollView(
|
return Column(
|
||||||
scrollDirection: Axis.horizontal,
|
children: <Widget>[
|
||||||
child: DataTable(
|
FormCard(
|
||||||
sortColumnIndex: reportSettings.sortIndex,
|
child: DataTable(
|
||||||
sortAscending: reportSettings.sortAscending,
|
columns: [
|
||||||
columns: reportResult.tableColumns(
|
DataColumn(
|
||||||
context,
|
label: Text(AppLocalization.of(context).totals),
|
||||||
(index, ascending) =>
|
)
|
||||||
widget.viewModel.onReportSorted(index, ascending)),
|
],
|
||||||
rows: [
|
rows: [],
|
||||||
reportResult.tableFilters(context,
|
),
|
||||||
_textEditingControllers[state.uiState.reportsUIState.report],
|
),
|
||||||
(column, value) {
|
FormCard(
|
||||||
widget.viewModel.onReportFiltersChanged(
|
child: SingleChildScrollView(
|
||||||
context,
|
scrollDirection: Axis.horizontal,
|
||||||
state.uiState.reportsUIState.filters
|
child: DataTable(
|
||||||
.rebuild((b) => b..addAll({column: value})));
|
sortColumnIndex: reportSettings.sortIndex,
|
||||||
}),
|
sortAscending: reportSettings.sortAscending,
|
||||||
...reportResult.tableRows(context),
|
columns: reportResult.tableColumns(
|
||||||
],
|
context,
|
||||||
),
|
(index, ascending) =>
|
||||||
|
widget.viewModel.onReportSorted(index, ascending)),
|
||||||
|
rows: [
|
||||||
|
reportResult.tableFilters(context,
|
||||||
|
_textEditingControllers[state.uiState.reportsUIState.report],
|
||||||
|
(column, value) {
|
||||||
|
widget.viewModel.onReportFiltersChanged(
|
||||||
|
context,
|
||||||
|
state.uiState.reportsUIState.filters
|
||||||
|
.rebuild((b) => b..addAll({column: value})));
|
||||||
|
}),
|
||||||
|
...reportResult.tableRows(context),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ abstract class LocaleCodeAware {
|
||||||
mixin LocalizationsProvider on LocaleCodeAware {
|
mixin LocalizationsProvider on LocaleCodeAware {
|
||||||
static final Map<String, Map<String, String>> _localizedValues = {
|
static final Map<String, Map<String, String>> _localizedValues = {
|
||||||
'en': {
|
'en': {
|
||||||
|
'totals': 'Totals',
|
||||||
'blank': 'Blank',
|
'blank': 'Blank',
|
||||||
'day': 'Day',
|
'day': 'Day',
|
||||||
'month': 'Month',
|
'month': 'Month',
|
||||||
|
|
@ -14600,6 +14601,8 @@ mixin LocalizationsProvider on LocaleCodeAware {
|
||||||
|
|
||||||
String get total => _localizedValues[localeCode]['total'];
|
String get total => _localizedValues[localeCode]['total'];
|
||||||
|
|
||||||
|
String get totals => _localizedValues[localeCode]['totals'];
|
||||||
|
|
||||||
String get percent => _localizedValues[localeCode]['percent'];
|
String get percent => _localizedValues[localeCode]['percent'];
|
||||||
|
|
||||||
String get edit => _localizedValues[localeCode]['edit'];
|
String get edit => _localizedValues[localeCode]['edit'];
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue