mirror of
https://github.com/wger-project/flutter.git
synced 2026-02-18 00:17:48 +01:00
Fix order of log entries
This commit is contained in:
@@ -415,7 +415,7 @@ class NutritionPlansProvider with ChangeNotifier {
|
||||
final data = await baseProvider.fetchPaginated(
|
||||
baseProvider.makeUrl(
|
||||
_nutritionDiaryPath,
|
||||
query: {'plan': plan.id.toString(), 'limit': '999'},
|
||||
query: {'plan': plan.id.toString(), 'limit': '999', 'ordering': 'datetime'},
|
||||
),
|
||||
);
|
||||
|
||||
|
||||
@@ -470,9 +470,9 @@ class FlNutritionalDiaryChartWidgetState extends State<FlNutritionalDiaryChartWi
|
||||
List<BarChartGroupData> showingGroups() {
|
||||
final logEntries = widget._nutritionalPlan.logEntriesValues;
|
||||
final List<BarChartGroupData> out = [];
|
||||
final dateList = getDatesBetween(logEntries.keys.last, logEntries.keys.first);
|
||||
final dateList = getDatesBetween(logEntries.keys.first, logEntries.keys.last);
|
||||
|
||||
for (final date in dateList) {
|
||||
for (final date in dateList.reversed) {
|
||||
out.add(
|
||||
makeGroupData(
|
||||
date.millisecondsSinceEpoch,
|
||||
|
||||
Reference in New Issue
Block a user