Copy last odometer value to new fillup
This commit is contained in:
@@ -76,6 +76,9 @@ export default {
|
|||||||
this.fetchVehicleFuelSubTypes()
|
this.fetchVehicleFuelSubTypes()
|
||||||
if (!this.fillup.id) {
|
if (!this.fillup.id) {
|
||||||
this.fillupModel = this.getEmptyFillup()
|
this.fillupModel = this.getEmptyFillup()
|
||||||
|
if (this.vehicle.fillups.length > 0) {
|
||||||
|
this.fillupModel.odoReading = this.vehicle.fillups[0].odoReading
|
||||||
|
}
|
||||||
this.fillupModel.userId = this.me.id
|
this.fillupModel.userId = this.me.id
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -277,7 +280,15 @@ export default {
|
|||||||
</b-field>
|
</b-field>
|
||||||
<br />
|
<br />
|
||||||
<b-field>
|
<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">
|
<p v-if="authError">
|
||||||
There was an error logging in to your account.
|
There was an error logging in to your account.
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
Reference in New Issue
Block a user