Commit 14d77c2f authored by Administrator's avatar Administrator

improve lap and interval lists

parent 04b2cbaf
......@@ -84,6 +84,7 @@ class Interval {
int get totalAscent => _db.totalAscent;
int get totalDescent => _db.totalDescent;
set timeStamp(DateTime value) => _db.timeStamp = value;
set firstRecordId(int value) => _db.firstRecordId = value;
set lastRecordId(int value) => _db.lastRecordId = value;
set athletesId(int value) => _db.athletesId = value;
......
......@@ -306,6 +306,7 @@ class _ActivityIntervalsChartState extends State<ActivityIntervalsChart> {
interval = encrateia.Interval();
interval.athletesId = widget.athlete.id;
interval.activitiesId = widget.activity.id;
interval.timeStamp = widget.records.first.timeStamp;
widget.activity.cachedIntervals = <encrateia.Interval>[];
setState(() {});
},
......
......@@ -59,12 +59,13 @@ class _IntervalsListWidgetState extends State<IntervalsListWidget> {
showCheckboxColumn: false,
onSelectAll: (_) {},
columns: const <DataColumn>[
DataColumn(label: Text('Lap'), numeric: true),
DataColumn(label: Text('Interval'), numeric: true),
DataColumn(label: Text('Heart Rate'), numeric: true),
DataColumn(label: Text('Pace\n(calculated)'), numeric: true),
DataColumn(label: Text('Power'), numeric: true),
DataColumn(label: Text('Distance'), numeric: true),
DataColumn(label: Text('Ascent'), numeric: true),
DataColumn(label: Text('Moving Time'), numeric: true),
],
rows: intervals.map((encrateia.Interval interval) {
return DataRow(
......@@ -102,6 +103,10 @@ class _IntervalsListWidgetState extends State<IntervalsListWidget> {
pq: PQ.elevation,
),
),
DataCell(PQText(
value: interval.movingTime,
pq: PQ.shortDuration,
))
],
);
}).toList(),
......
......@@ -40,7 +40,7 @@ class _LapsListWidgetState extends State<LapsListWidget> {
onSelectAll: (_) {},
columns: const <DataColumn>[
DataColumn(label: Text('Lap'), numeric: true),
DataColumn(label: Text('HR'), numeric: true),
DataColumn(label: Text('Heart Rate'), numeric: true),
DataColumn(label: Text('Pace'), numeric: true),
DataColumn(label: Text('Power'), numeric: true),
DataColumn(label: Text('Dist.'), numeric: true),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment