Schedule reports
This commit is contained in:
parent
ac35e9c031
commit
3a9745ae72
|
|
@ -49,7 +49,7 @@ class EntityPresenter {
|
||||||
isNarrow) {
|
isNarrow) {
|
||||||
return name;
|
return name;
|
||||||
} else {
|
} else {
|
||||||
return '$type $name';
|
return '$type: $name';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -545,6 +545,15 @@ class ReportsScreen extends StatelessWidget {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
SizedBox(width: kGutterWidth),
|
||||||
|
Expanded(
|
||||||
|
child: AppButton(
|
||||||
|
label: localization.schedule,
|
||||||
|
onPressed: () {
|
||||||
|
viewModel.onSchedulePressed(context);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -251,6 +251,27 @@ class _ScheduleEditState extends State<ScheduleEdit> {
|
||||||
child:
|
child:
|
||||||
Text(localization.lookup('$importType'))))
|
Text(localization.lookup('$importType'))))
|
||||||
.toList()),
|
.toList()),
|
||||||
|
AppDropdownButton<DateRange>(
|
||||||
|
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<DateRange>(
|
||||||
|
child: Text(localization
|
||||||
|
.lookup(dateRange.toString())),
|
||||||
|
value: dateRange,
|
||||||
|
))
|
||||||
|
.toList(),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
] else if (schedule.template ==
|
] else if (schedule.template ==
|
||||||
|
|
|
||||||
|
|
@ -100,6 +100,7 @@ class _ScheduleViewState extends State<ScheduleView> {
|
||||||
: '${schedule.remainingCycles}',
|
: '${schedule.remainingCycles}',
|
||||||
localization.report:
|
localization.report:
|
||||||
localization.lookup(schedule.parameters.reportName),
|
localization.lookup(schedule.parameters.reportName),
|
||||||
|
localization.dateRange: localization.lookup(parameters.dateRange),
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue