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