From afe4078897acefd72de7b631f1f52e20c98bb21e Mon Sep 17 00:00:00 2001 From: Alf Sebastian Houge Date: Fri, 14 Jul 2023 16:25:47 +0200 Subject: [PATCH] Copy last odometer value to new fillup --- ui/src/router/views/createFillup.vue | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/ui/src/router/views/createFillup.vue b/ui/src/router/views/createFillup.vue index a2769dc..d54a6cf 100644 --- a/ui/src/router/views/createFillup.vue +++ b/ui/src/router/views/createFillup.vue @@ -76,6 +76,9 @@ export default { this.fetchVehicleFuelSubTypes() if (!this.fillup.id) { this.fillupModel = this.getEmptyFillup() + if (this.vehicle.fillups.length > 0) { + this.fillupModel.odoReading = this.vehicle.fillups[0].odoReading + } this.fillupModel.userId = this.me.id } }, @@ -277,7 +280,15 @@ export default {
- +

There was an error logging in to your account.