Open vKnmnn opened 1 year ago
@AlfHou how would you want to handle this?
It looks like time is ignored in fillups.
Sorting by odometer doesn't seem to be much of a change. We'd just need to add , odoReading
to the Order
for each one of these lines that queries for fillups from the database in server/db/dbModels.go.
I haven't tested it out, just what I see from a quick glance.
@alienp4nda I seem to recall having fixed this in the original Hammond project, but seems like the fix didn't work I guess. I think we can try using the time as well to get the correct order.
Here was my original PR: https://github.com/akhilrex/hammond/pull/77
We can use time, we’ll just have to change front end and backend to actually have time.
is it possible that this affects the calculation of L/100km for graph creation? Out of order entries may cause negative or wrong values.
Possibly, I have a fix that I haven't merged yet for the out of order fillups.
this is on the vehigcle detail page. i'd suggest adding more granularity by making a proper datetime value for a filling and sorting by it, or just sort by odometer