fixed if statement, if some npm warnings
This commit is contained in:
@@ -122,7 +122,7 @@ export default {
|
||||
item[k] = setFullTank(row)
|
||||
} else if (this.invertFullTank) {
|
||||
item[k] = !row[headings[k]]
|
||||
} else if ('date') {
|
||||
} else if (k === 'date') {
|
||||
item[k] = new Date(row[headings[k]]).toISOString()
|
||||
} else {
|
||||
item[k] = row[headings[k]]
|
||||
@@ -138,7 +138,7 @@ export default {
|
||||
const content = {
|
||||
data: this.csvToJson(),
|
||||
vehicleId: this.selectedVehicle.Id,
|
||||
timezone: this.getTimezone()
|
||||
timezone: this.getTimezone(),
|
||||
}
|
||||
axios
|
||||
.post('/api/import/generic', content)
|
||||
@@ -200,7 +200,9 @@ export default {
|
||||
<li>{{ $t('importhintvehiclecreated') }}</li>
|
||||
<li v-html="$t('importhintcurrdist')"></li>
|
||||
<li v-html="$t('importhintunits')"></li>
|
||||
<li><b>{{ $t('dontimportagain') }}</b></li>
|
||||
<li
|
||||
><b>{{ $t('dontimportagain') }}</b></li
|
||||
>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
@@ -268,8 +270,7 @@ export default {
|
||||
</option>
|
||||
</b-select>
|
||||
</b-field>
|
||||
<b-field
|
||||
:label="$t('per', { '0': $t('price'), '1': $t('unit.short.' + selectedVehicle.fuelUnitDetail.key) })">
|
||||
<b-field :label="$t('per', { '0': $t('price'), '1': $t('unit.short.' + selectedVehicle.fuelUnitDetail.key) })">
|
||||
<b-select v-model.number="fileHeadingMap.perUnitPrice" type="number" min="0" step=".001" expanded required>
|
||||
<option v-for="(option, index) in fileHeadings" :key="index" :value="index">
|
||||
{{ option }}
|
||||
@@ -296,7 +297,7 @@ export default {
|
||||
<b-radio-button v-model="invertFullTank" native-value="true">{{ $t('partialfillup') }}</b-radio-button>
|
||||
</b-field>
|
||||
<b-field>
|
||||
<b-select v-model="fileHeadingMap.isTankFull" @input="checkFieldString" required>
|
||||
<b-select v-model="fileHeadingMap.isTankFull" required @input="checkFieldString">
|
||||
<option v-for="(option, index) in fileHeadings" :key="index" :value="index">
|
||||
{{ option }}
|
||||
</option>
|
||||
@@ -333,8 +334,7 @@ export default {
|
||||
</b-field>
|
||||
<br />
|
||||
<b-field>
|
||||
<b-button tag="button" native-type="submit" type="is-primary" :value="$t('save')" :label="$t('import')"
|
||||
expanded />
|
||||
<b-button tag="button" native-type="submit" type="is-primary" :value="$t('save')" :label="$t('import')" expanded />
|
||||
<p v-if="authError"> There was an error logging in to your account. </p>
|
||||
</b-field>
|
||||
</span>
|
||||
|
||||
Reference in New Issue
Block a user