Copy last odometer value to new fillup

This commit is contained in:
Alf Sebastian Houge
2023-07-14 16:25:47 +02:00
parent 01f9b455cf
commit afe4078897

View File

@@ -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 {
</b-field>
<br />
<b-field>
<b-button tag="button" native-type="submit" :disabled="tryingToCreate" type="is-primary" :value="$t('save')" :label="$t('createfillup')" expanded/>
<b-button
tag="button"
native-type="submit"
:disabled="tryingToCreate"
type="is-primary"
:value="$t('save')"
:label="$t('createfillup')"
expanded
/>
<p v-if="authError">
There was an error logging in to your account.
</p>