@@ -42,7 +42,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
getEmptyVehicle(veh) {
|
||||
if (!veh.id) {
|
||||
if (!veh || !veh.id) {
|
||||
return {
|
||||
fuelUnit: null,
|
||||
fuelType: null,
|
||||
|
||||
@@ -5,6 +5,7 @@ import appConfig from '@src/app.config'
|
||||
import Layout from '@layouts/main.vue'
|
||||
import CreateQuickEntry from '@components/createQuickEntry.vue'
|
||||
import StatsWidget from '@components/statsWidget.vue'
|
||||
import { chunk } from 'lodash'
|
||||
|
||||
import { parseAndFormatDate } from '@utils/format-date'
|
||||
// import store from '@state/store'
|
||||
@@ -35,6 +36,9 @@ export default {
|
||||
...mapState('vehicles', ['vehicles']),
|
||||
...mapState('utils', ['isMobile']),
|
||||
...mapGetters('vehicles', ['unprocessedQuickEntries']),
|
||||
chunkedVehicles() {
|
||||
return chunk(this.myVehicles, 3)
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
vehicles(old, newOne) {
|
||||
@@ -103,8 +107,9 @@ export default {
|
||||
</div></div
|
||||
>
|
||||
|
||||
<div v-if="myVehicles.length" class="columns">
|
||||
<div v-for="vehicle in myVehicles" :key="vehicle.id" class="column is-4">
|
||||
<div v-if="myVehicles.length">
|
||||
<div v-for="chunk,index in chunkedVehicles" :key="index" class="columns">
|
||||
<div v-for="vehicle in chunk" :key="vehicle.id" class="column is-4">
|
||||
<b-collapse animation="slide" aria-id="contentIdForA11y3" class="card" :open="!isMobile">
|
||||
<template v-slot:trigger="props">
|
||||
<div class="card-header" role="button" aria-controls="contentIdForA11y3">
|
||||
@@ -155,6 +160,7 @@ export default {
|
||||
</footer>
|
||||
</b-collapse>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</Layout>
|
||||
|
||||
@@ -226,7 +226,7 @@ export default {
|
||||
v-model="registerModel.password"
|
||||
type="password"
|
||||
required
|
||||
minlength="6"
|
||||
minlength="8"
|
||||
password-reveal
|
||||
></b-input>
|
||||
</b-field>
|
||||
|
||||
Reference in New Issue
Block a user