Add option for not importing location

This commit is contained in:
Alf Sebastian Houge
2022-04-06 12:06:45 +02:00
parent 15cf09f326
commit dc33aaad49
3 changed files with 24 additions and 6 deletions

View File

@@ -22,6 +22,7 @@ export default {
selectedVehicle: null,
tryingToCreate: false,
errors: [],
importLocation: true,
}
},
computed: {
@@ -56,6 +57,7 @@ export default {
this.errorMessage = ''
const formData = new FormData()
formData.append('vehicleID', this.selectedVehicle)
formData.append('importLocation', this.importLocation)
formData.append('file', this.file, this.file.name)
axios
.post(`/api/import/drivvo`, formData)
@@ -129,6 +131,13 @@ export default {
</b-select>
</b-field>
</div>
<div class="column">
<b-field>
<b-tooltip label="Whether to import the location for fillups and services or not." multilined>
<b-checkbox v-model="importLocation">Import Location?</b-checkbox>
</b-tooltip>
</b-field>
</div>
<div class="column">
<b-field class="file is-primary" :class="{ 'has-name': !!file }">