diff --git a/lib/ui/app/presenters/entity_presenter.dart b/lib/ui/app/presenters/entity_presenter.dart index da4b6b703..c6ed615c2 100644 --- a/lib/ui/app/presenters/entity_presenter.dart +++ b/lib/ui/app/presenters/entity_presenter.dart @@ -49,7 +49,7 @@ class EntityPresenter { isNarrow) { return name; } else { - return '$type $name'; + return '$type: $name'; } } diff --git a/lib/ui/reports/reports_screen.dart b/lib/ui/reports/reports_screen.dart index bdff19f57..aaa3a2a69 100644 --- a/lib/ui/reports/reports_screen.dart +++ b/lib/ui/reports/reports_screen.dart @@ -545,6 +545,15 @@ class ReportsScreen extends StatelessWidget { }, ), ), + SizedBox(width: kGutterWidth), + Expanded( + child: AppButton( + label: localization.schedule, + onPressed: () { + viewModel.onSchedulePressed(context); + }, + ), + ), ], ), ), diff --git a/lib/ui/schedule/edit/schedule_edit.dart b/lib/ui/schedule/edit/schedule_edit.dart index 24d97e1a1..3b4b50771 100644 --- a/lib/ui/schedule/edit/schedule_edit.dart +++ b/lib/ui/schedule/edit/schedule_edit.dart @@ -251,6 +251,27 @@ class _ScheduleEditState extends State { child: Text(localization.lookup('$importType')))) .toList()), + AppDropdownButton( + labelText: localization.dateRange, + blankValue: null, + value: parameters.dateRange!.isNotEmpty + ? DateRange.valueOf( + toCamelCase(parameters.dateRange!)) + : null, + onChanged: (dynamic value) { + viewModel.onChanged(schedule.rebuild((b) => b + ..parameters.dateRange = + (value as DateRange).snakeCase)); + }, + items: DateRange.values + .where((value) => value != DateRange.custom) + .map((dateRange) => DropdownMenuItem( + child: Text(localization + .lookup(dateRange.toString())), + value: dateRange, + )) + .toList(), + ), ], ), ] else if (schedule.template == diff --git a/lib/ui/schedule/view/schedule_view.dart b/lib/ui/schedule/view/schedule_view.dart index 0e84f6ce7..40879b17a 100644 --- a/lib/ui/schedule/view/schedule_view.dart +++ b/lib/ui/schedule/view/schedule_view.dart @@ -100,6 +100,7 @@ class _ScheduleViewState extends State { : '${schedule.remainingCycles}', localization.report: localization.lookup(schedule.parameters.reportName), + localization.dateRange: localization.lookup(parameters.dateRange), }) ], ),