Update buefy
This commit is contained in:
78
ui/package-lock.json
generated
78
ui/package-lock.json
generated
@@ -8,11 +8,11 @@
|
|||||||
"name": "frontend",
|
"name": "frontend",
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fortawesome/fontawesome-svg-core": "^6.2.1",
|
"@fortawesome/fontawesome-svg-core": "^6.3.0",
|
||||||
"@fortawesome/free-solid-svg-icons": "^6.2.1",
|
"@fortawesome/free-solid-svg-icons": "^6.3.0",
|
||||||
"@fortawesome/vue-fontawesome": "^2.0.10",
|
"@fortawesome/vue-fontawesome": "^2.0.10",
|
||||||
"axios": "^1.3.2",
|
"axios": "^1.3.2",
|
||||||
"buefy": "^0.9.7",
|
"buefy": "^0.9.22",
|
||||||
"chart.js": "^2.9.4",
|
"chart.js": "^2.9.4",
|
||||||
"core-js": "^3.27.2",
|
"core-js": "^3.27.2",
|
||||||
"currency-formatter": "^1.5.9",
|
"currency-formatter": "^1.5.9",
|
||||||
@@ -4459,33 +4459,33 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@fortawesome/fontawesome-common-types": {
|
"node_modules/@fortawesome/fontawesome-common-types": {
|
||||||
"version": "6.2.1",
|
"version": "6.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-6.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-6.3.0.tgz",
|
||||||
"integrity": "sha512-Sz07mnQrTekFWLz5BMjOzHl/+NooTdW8F8kDQxjWwbpOJcnoSg4vUDng8d/WR1wOxM0O+CY9Zw0nR054riNYtQ==",
|
"integrity": "sha512-4BC1NMoacEBzSXRwKjZ/X/gmnbp/HU5Qqat7E8xqorUtBFZS+bwfGH5/wqOC2K6GV0rgEobp3OjGRMa5fK9pFg==",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6"
|
"node": ">=6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@fortawesome/fontawesome-svg-core": {
|
"node_modules/@fortawesome/fontawesome-svg-core": {
|
||||||
"version": "6.2.1",
|
"version": "6.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-6.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-6.3.0.tgz",
|
||||||
"integrity": "sha512-HELwwbCz6C1XEcjzyT1Jugmz2NNklMrSPjZOWMlc+ZsHIVk+XOvOXLGGQtFBwSyqfJDNgRq4xBCwWOaZ/d9DEA==",
|
"integrity": "sha512-uz9YifyKlixV6AcKlOX8WNdtF7l6nakGyLYxYaCa823bEBqyj/U2ssqtctO38itNEwXb8/lMzjdoJ+aaJuOdrw==",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fortawesome/fontawesome-common-types": "6.2.1"
|
"@fortawesome/fontawesome-common-types": "6.3.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6"
|
"node": ">=6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@fortawesome/free-solid-svg-icons": {
|
"node_modules/@fortawesome/free-solid-svg-icons": {
|
||||||
"version": "6.2.1",
|
"version": "6.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-6.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-6.3.0.tgz",
|
||||||
"integrity": "sha512-oKuqrP5jbfEPJWTij4sM+/RvgX+RMFwx3QZCZcK9PrBDgxC35zuc7AOFsyMjMd/PIFPeB2JxyqDr5zs/DZFPPw==",
|
"integrity": "sha512-x5tMwzF2lTH8pyv8yeZRodItP2IVlzzmBuD1M7BjawWgg9XAvktqJJ91Qjgoaf8qJpHQ8FEU9VxRfOkLhh86QA==",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fortawesome/fontawesome-common-types": "6.2.1"
|
"@fortawesome/fontawesome-common-types": "6.3.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6"
|
"node": ">=6"
|
||||||
@@ -9656,11 +9656,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/buefy": {
|
"node_modules/buefy": {
|
||||||
"version": "0.9.7",
|
"version": "0.9.22",
|
||||||
"resolved": "https://registry.npmjs.org/buefy/-/buefy-0.9.7.tgz",
|
"resolved": "https://registry.npmjs.org/buefy/-/buefy-0.9.22.tgz",
|
||||||
"integrity": "sha512-Fli0ZjNDgtFtHm0LItWmfhNJ1oLjDwPzUWccvwXXoo2mADXaH8JQxyhY+drUuUV5/GMu5PtwqQSqPgZy942VZg==",
|
"integrity": "sha512-rA9Bf7+2lZupL1PlQU60o7cc0Og4MRz9it5LZlKOIwPENM1uEOjH48EFnNFniLyxIcz6vln0EicS96GsVCFx1Q==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bulma": "0.9.2"
|
"bulma": "0.9.4"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 4.0.0",
|
"node": ">= 4.0.0",
|
||||||
@@ -9743,9 +9743,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/bulma": {
|
"node_modules/bulma": {
|
||||||
"version": "0.9.2",
|
"version": "0.9.4",
|
||||||
"resolved": "https://registry.npmjs.org/bulma/-/bulma-0.9.2.tgz",
|
"resolved": "https://registry.npmjs.org/bulma/-/bulma-0.9.4.tgz",
|
||||||
"integrity": "sha512-e14EF+3VSZ488yL/lJH0tR8mFWiEQVCMi/BQUMi2TGMBOk+zrDg4wryuwm/+dRSHJw0gMawp2tsW7X1JYUCE3A=="
|
"integrity": "sha512-86FlT5+1GrsgKbPLRRY7cGDg8fsJiP/jzTqXXVqiUZZ2aZT8uemEOHlU1CDU+TxklPEZ11HZNNWclRBBecP4CQ=="
|
||||||
},
|
},
|
||||||
"node_modules/bundle-require": {
|
"node_modules/bundle-require": {
|
||||||
"version": "2.1.8",
|
"version": "2.1.8",
|
||||||
@@ -36546,24 +36546,24 @@
|
|||||||
"requires": {}
|
"requires": {}
|
||||||
},
|
},
|
||||||
"@fortawesome/fontawesome-common-types": {
|
"@fortawesome/fontawesome-common-types": {
|
||||||
"version": "6.2.1",
|
"version": "6.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-6.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-6.3.0.tgz",
|
||||||
"integrity": "sha512-Sz07mnQrTekFWLz5BMjOzHl/+NooTdW8F8kDQxjWwbpOJcnoSg4vUDng8d/WR1wOxM0O+CY9Zw0nR054riNYtQ=="
|
"integrity": "sha512-4BC1NMoacEBzSXRwKjZ/X/gmnbp/HU5Qqat7E8xqorUtBFZS+bwfGH5/wqOC2K6GV0rgEobp3OjGRMa5fK9pFg=="
|
||||||
},
|
},
|
||||||
"@fortawesome/fontawesome-svg-core": {
|
"@fortawesome/fontawesome-svg-core": {
|
||||||
"version": "6.2.1",
|
"version": "6.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-6.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-6.3.0.tgz",
|
||||||
"integrity": "sha512-HELwwbCz6C1XEcjzyT1Jugmz2NNklMrSPjZOWMlc+ZsHIVk+XOvOXLGGQtFBwSyqfJDNgRq4xBCwWOaZ/d9DEA==",
|
"integrity": "sha512-uz9YifyKlixV6AcKlOX8WNdtF7l6nakGyLYxYaCa823bEBqyj/U2ssqtctO38itNEwXb8/lMzjdoJ+aaJuOdrw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@fortawesome/fontawesome-common-types": "6.2.1"
|
"@fortawesome/fontawesome-common-types": "6.3.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@fortawesome/free-solid-svg-icons": {
|
"@fortawesome/free-solid-svg-icons": {
|
||||||
"version": "6.2.1",
|
"version": "6.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-6.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-6.3.0.tgz",
|
||||||
"integrity": "sha512-oKuqrP5jbfEPJWTij4sM+/RvgX+RMFwx3QZCZcK9PrBDgxC35zuc7AOFsyMjMd/PIFPeB2JxyqDr5zs/DZFPPw==",
|
"integrity": "sha512-x5tMwzF2lTH8pyv8yeZRodItP2IVlzzmBuD1M7BjawWgg9XAvktqJJ91Qjgoaf8qJpHQ8FEU9VxRfOkLhh86QA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@fortawesome/fontawesome-common-types": "6.2.1"
|
"@fortawesome/fontawesome-common-types": "6.3.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@fortawesome/vue-fontawesome": {
|
"@fortawesome/vue-fontawesome": {
|
||||||
@@ -40837,11 +40837,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"buefy": {
|
"buefy": {
|
||||||
"version": "0.9.7",
|
"version": "0.9.22",
|
||||||
"resolved": "https://registry.npmjs.org/buefy/-/buefy-0.9.7.tgz",
|
"resolved": "https://registry.npmjs.org/buefy/-/buefy-0.9.22.tgz",
|
||||||
"integrity": "sha512-Fli0ZjNDgtFtHm0LItWmfhNJ1oLjDwPzUWccvwXXoo2mADXaH8JQxyhY+drUuUV5/GMu5PtwqQSqPgZy942VZg==",
|
"integrity": "sha512-rA9Bf7+2lZupL1PlQU60o7cc0Og4MRz9it5LZlKOIwPENM1uEOjH48EFnNFniLyxIcz6vln0EicS96GsVCFx1Q==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"bulma": "0.9.2"
|
"bulma": "0.9.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"buffer": {
|
"buffer": {
|
||||||
@@ -40914,9 +40914,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"bulma": {
|
"bulma": {
|
||||||
"version": "0.9.2",
|
"version": "0.9.4",
|
||||||
"resolved": "https://registry.npmjs.org/bulma/-/bulma-0.9.2.tgz",
|
"resolved": "https://registry.npmjs.org/bulma/-/bulma-0.9.4.tgz",
|
||||||
"integrity": "sha512-e14EF+3VSZ488yL/lJH0tR8mFWiEQVCMi/BQUMi2TGMBOk+zrDg4wryuwm/+dRSHJw0gMawp2tsW7X1JYUCE3A=="
|
"integrity": "sha512-86FlT5+1GrsgKbPLRRY7cGDg8fsJiP/jzTqXXVqiUZZ2aZT8uemEOHlU1CDU+TxklPEZ11HZNNWclRBBecP4CQ=="
|
||||||
},
|
},
|
||||||
"bundle-require": {
|
"bundle-require": {
|
||||||
"version": "2.1.8",
|
"version": "2.1.8",
|
||||||
|
|||||||
@@ -23,11 +23,11 @@
|
|||||||
"pre-commit": "cross-env PRE_COMMIT=true lint-staged"
|
"pre-commit": "cross-env PRE_COMMIT=true lint-staged"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fortawesome/fontawesome-svg-core": "^6.2.1",
|
"@fortawesome/fontawesome-svg-core": "^6.3.0",
|
||||||
"@fortawesome/free-solid-svg-icons": "^6.2.1",
|
"@fortawesome/free-solid-svg-icons": "^6.3.0",
|
||||||
"@fortawesome/vue-fontawesome": "^2.0.10",
|
"@fortawesome/vue-fontawesome": "^2.0.10",
|
||||||
"axios": "^1.3.2",
|
"axios": "^1.3.2",
|
||||||
"buefy": "^0.9.7",
|
"buefy": "^0.9.22",
|
||||||
"chart.js": "^2.9.4",
|
"chart.js": "^2.9.4",
|
||||||
"core-js": "^3.27.2",
|
"core-js": "^3.27.2",
|
||||||
"currency-formatter": "^1.5.9",
|
"currency-formatter": "^1.5.9",
|
||||||
|
|||||||
@@ -95,11 +95,10 @@ export default {
|
|||||||
</div>
|
</div>
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<b-button
|
<b-button
|
||||||
tag="input"
|
tag="button"
|
||||||
native-type="submit"
|
native-type="submit"
|
||||||
:disabled="tryingToCreate"
|
:disabled="tryingToCreate"
|
||||||
type="is-primary"
|
type="is-primary"
|
||||||
:value="this.$t('uploadfile')"
|
|
||||||
class="control"
|
class="control"
|
||||||
>
|
>
|
||||||
{{ $t('uploadfile') }}
|
{{ $t('uploadfile') }}
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ export default {
|
|||||||
<b-select
|
<b-select
|
||||||
v-if="unprocessedQuickEntries.length"
|
v-if="unprocessedQuickEntries.length"
|
||||||
v-model="quickEntry"
|
v-model="quickEntry"
|
||||||
:placeholder="this.$t('referquickentry')"
|
:placeholder="$t('referquickentry')"
|
||||||
expanded
|
expanded
|
||||||
@input="showQuickEntry($event)"
|
@input="showQuickEntry($event)"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ export default {
|
|||||||
<div class="box" style="max-width:600px">
|
<div class="box" style="max-width:600px">
|
||||||
<h1 class="subtitle">{{ $t('share') }} {{ vehicle.nickname }}</h1>
|
<h1 class="subtitle">{{ $t('share') }} {{ vehicle.nickname }}</h1>
|
||||||
<section>
|
<section>
|
||||||
<div class="columns is-mobile" v-for="model in models" :key="model.id">
|
<div v-for="model in models" :key="model.id" class="columns is-mobile">
|
||||||
<div class="column is-one-third">
|
<div class="column is-one-third">
|
||||||
<b-field>
|
<b-field>
|
||||||
<b-switch v-model="model.isShared" :disabled="model.isOwner" @input="changeShareStatus(model)">
|
<b-switch v-model="model.isShared" :disabled="model.isOwner" @input="changeShareStatus(model)">
|
||||||
|
|||||||
@@ -34,7 +34,6 @@ import '@components/_globals'
|
|||||||
import 'buefy/dist/buefy.css'
|
import 'buefy/dist/buefy.css'
|
||||||
import 'nprogress/nprogress.css'
|
import 'nprogress/nprogress.css'
|
||||||
|
|
||||||
Vue.component('vue-fontawesome', FontAwesomeIcon)
|
|
||||||
library.add(
|
library.add(
|
||||||
faCheck,
|
faCheck,
|
||||||
faTimes,
|
faTimes,
|
||||||
@@ -54,11 +53,12 @@ library.add(
|
|||||||
faShare,
|
faShare,
|
||||||
faUserFriends,
|
faUserFriends,
|
||||||
faTimesCircle
|
faTimesCircle
|
||||||
)
|
);
|
||||||
|
Vue.component('VueFontawesome', FontAwesomeIcon)
|
||||||
|
|
||||||
Vue.use(Buefy, {
|
Vue.use(Buefy, {
|
||||||
defaultIconComponent: 'vue-fontawesome',
|
defaultIconComponent: 'vue-fontawesome',
|
||||||
defaultIconPack: 'fas',
|
defaultIconPack: 'fa',
|
||||||
})
|
})
|
||||||
|
|
||||||
// Don't warn about using the dev version of Vue in development.
|
// Don't warn about using the dev version of Vue in development.
|
||||||
|
|||||||
@@ -162,41 +162,41 @@ export default {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<form @submit.prevent="createExpense">
|
<form @submit.prevent="createExpense">
|
||||||
<b-field :label="this.$t('selectvehicle')">
|
<b-field :label="$t('selectvehicle')">
|
||||||
<b-select v-model="selectedVehicle" :placeholder="this.$t('vehicle')" required expanded :disabled="expense.id">
|
<b-select v-model="selectedVehicle" :placeholder="$t('vehicle')" required expanded :disabled="expense.id">
|
||||||
<option v-for="option in myVehicles" :key="option.id" :value="option">
|
<option v-for="option in myVehicles" :key="option.id" :value="option">
|
||||||
{{ option.nickname }}
|
{{ option.nickname }}
|
||||||
</option>
|
</option>
|
||||||
</b-select>
|
</b-select>
|
||||||
</b-field>
|
</b-field>
|
||||||
<b-field :label="this.$t('expenseby')">
|
<b-field :label="$t('expenseby')">
|
||||||
<b-select v-model="expenseModel.userId" :placeholder="this.$t('user')" required expanded :disabled="expense.id">
|
<b-select v-model="expenseModel.userId" :placeholder="$t('user')" required expanded :disabled="expense.id">
|
||||||
<option v-for="option in users" :key="option.userId" :value="option.userId">
|
<option v-for="option in users" :key="option.userId" :value="option.userId">
|
||||||
{{ option.name }}
|
{{ option.name }}
|
||||||
</option>
|
</option>
|
||||||
</b-select>
|
</b-select>
|
||||||
</b-field>
|
</b-field>
|
||||||
<b-field :label="this.$t('expensedate')">
|
<b-field :label="$t('expensedate')">
|
||||||
<b-datepicker
|
<b-datepicker
|
||||||
v-model="expenseModel.date"
|
v-model="expenseModel.date"
|
||||||
:date-formatter="formatDate"
|
:date-formatter="formatDate"
|
||||||
:placeholder="this.$t('clicktoselect')"
|
:placeholder="$t('clicktoselect')"
|
||||||
icon="calendar"
|
icon="calendar"
|
||||||
:max-date="new Date()"
|
:max-date="new Date()"
|
||||||
>
|
>
|
||||||
</b-datepicker>
|
</b-datepicker>
|
||||||
</b-field>
|
</b-field>
|
||||||
<b-field :label="this.$t('expensetype') + `*`">
|
<b-field :label="$t('expensetype') + `*`">
|
||||||
<b-input v-model="expenseModel.expenseType" expanded required></b-input>
|
<b-input v-model="expenseModel.expenseType" expanded required></b-input>
|
||||||
</b-field>
|
</b-field>
|
||||||
|
|
||||||
<b-field :label="this.$t('totalamountpaid')">
|
<b-field :label="$t('totalamountpaid')">
|
||||||
<p class="control">
|
<p class="control">
|
||||||
<span class="button is-static">{{ me.currency }}</span>
|
<span class="button is-static">{{ me.currency }}</span>
|
||||||
</p>
|
</p>
|
||||||
<b-input v-model.number="expenseModel.amount" type="number" min="0" expanded step=".001" required></b-input>
|
<b-input v-model.number="expenseModel.amount" type="number" min="0" expanded step=".001" required></b-input>
|
||||||
</b-field>
|
</b-field>
|
||||||
<b-field :label="this.$t('odometer')">
|
<b-field :label="$t('odometer')">
|
||||||
<p class="control">
|
<p class="control">
|
||||||
<span class="button is-static">{{ $t('unit.short.' + me.distanceUnitDetail.key) }}</span>
|
<span class="button is-static">{{ $t('unit.short.' + me.distanceUnitDetail.key) }}</span>
|
||||||
</p>
|
</p>
|
||||||
@@ -207,7 +207,7 @@ export default {
|
|||||||
<b-switch v-model="showMore">{{ $t('fillmoredetails') }}</b-switch>
|
<b-switch v-model="showMore">{{ $t('fillmoredetails') }}</b-switch>
|
||||||
</b-field>
|
</b-field>
|
||||||
<fieldset v-if="showMore">
|
<fieldset v-if="showMore">
|
||||||
<b-field :label="this.$t('details')">
|
<b-field :label="$t('details')">
|
||||||
<b-input v-model="expenseModel.comments" type="textarea" expanded></b-input>
|
<b-input v-model="expenseModel.comments" type="textarea" expanded></b-input>
|
||||||
</b-field>
|
</b-field>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
@@ -216,7 +216,7 @@ export default {
|
|||||||
</b-field>
|
</b-field>
|
||||||
<br />
|
<br />
|
||||||
<b-field>
|
<b-field>
|
||||||
<b-button tag="input" native-type="submit" :value="this.$t('save')" :disabled="tryingToCreate" type="is-primary" label="Create Expense" expanded> </b-button>
|
<b-button tag="button" native-type="submit" :value="$t('save')" :disabled="tryingToCreate" type="is-primary" label="Create Expense" expanded/>
|
||||||
</b-field>
|
</b-field>
|
||||||
</form>
|
</form>
|
||||||
</Layout>
|
</Layout>
|
||||||
|
|||||||
@@ -193,21 +193,21 @@ export default {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<form class="" @submit.prevent="createFillup">
|
<form class="" @submit.prevent="createFillup">
|
||||||
<b-field :label="this.$t('selectvehicle')">
|
<b-field :label="$t('selectvehicle')">
|
||||||
<b-select v-model="selectedVehicle" :placeholder="this.$t('vehicle')" required expanded :disabled="fillup.id">
|
<b-select v-model="selectedVehicle" :placeholder="$t('vehicle')" required expanded :disabled="fillup.id">
|
||||||
<option v-for="option in myVehicles" :key="option.id" :value="option">
|
<option v-for="option in myVehicles" :key="option.id" :value="option">
|
||||||
{{ option.nickname }}
|
{{ option.nickname }}
|
||||||
</option>
|
</option>
|
||||||
</b-select>
|
</b-select>
|
||||||
</b-field>
|
</b-field>
|
||||||
<b-field :label="this.$t('expenseby')">
|
<b-field :label="$t('expenseby')">
|
||||||
<b-select v-model="fillupModel.userId" :placeholder="this.$t('user')" required expanded :disabled="fillup.id">
|
<b-select v-model="fillupModel.userId" :placeholder="$t('user')" required expanded :disabled="fillup.id">
|
||||||
<option v-for="option in users" :key="option.userId" :value="option.userId">
|
<option v-for="option in users" :key="option.userId" :value="option.userId">
|
||||||
{{ option.name }}
|
{{ option.name }}
|
||||||
</option>
|
</option>
|
||||||
</b-select>
|
</b-select>
|
||||||
</b-field>
|
</b-field>
|
||||||
<b-field :label="this.$t('fillupdate')">
|
<b-field :label="$t('fillupdate')">
|
||||||
<b-datepicker
|
<b-datepicker
|
||||||
v-model="fillupModel.date"
|
v-model="fillupModel.date"
|
||||||
:date-formatter="formatDate"
|
:date-formatter="formatDate"
|
||||||
@@ -218,7 +218,7 @@ export default {
|
|||||||
>
|
>
|
||||||
</b-datepicker>
|
</b-datepicker>
|
||||||
</b-field>
|
</b-field>
|
||||||
<b-field :label="this.$t('fuelsubtype')">
|
<b-field :label="$t('fuelsubtype')">
|
||||||
<b-autocomplete
|
<b-autocomplete
|
||||||
v-model="fillupModel.fuelSubType"
|
v-model="fillupModel.fuelSubType"
|
||||||
:data="filteredFuelSubtypes"
|
:data="filteredFuelSubtypes"
|
||||||
@@ -229,27 +229,27 @@ export default {
|
|||||||
>
|
>
|
||||||
</b-autocomplete>
|
</b-autocomplete>
|
||||||
</b-field>
|
</b-field>
|
||||||
<b-field :label="this.$t('quantity') + `*`" addons>
|
<b-field :label="$t('quantity') + `*`" addons>
|
||||||
<b-input v-model.number="fillupModel.fuelQuantity" type="number" step=".001" min="0" expanded required></b-input>
|
<b-input v-model.number="fillupModel.fuelQuantity" type="number" step=".001" min="0" expanded required></b-input>
|
||||||
<b-select v-model="fillupModel.fuelUnit" :placeholder="this.$t('fuelunit')" required>
|
<b-select v-model="fillupModel.fuelUnit" :placeholder="$t('fuelunit')" required>
|
||||||
<option v-for="(option, key) in fuelUnitMasters" :key="key" :value="key">
|
<option v-for="(option, key) in fuelUnitMasters" :key="key" :value="key">
|
||||||
{{ $t('unit.long.' + option.key) }}
|
{{ $t('unit.long.' + option.key) }}
|
||||||
</option>
|
</option>
|
||||||
</b-select>
|
</b-select>
|
||||||
</b-field>
|
</b-field>
|
||||||
<b-field :label="this.$t('per', { '0': this.$t('price'), '1': $t('unit.short.' + vehicle.fuelUnitDetail.key) })"
|
<b-field :label="$t('per', { '0': $t('price'), '1': $t('unit.short.' + vehicle.fuelUnitDetail.key) })"
|
||||||
><p class="control">
|
><p class="control">
|
||||||
<span class="button is-static">{{ me.currency }}</span>
|
<span class="button is-static">{{ me.currency }}</span>
|
||||||
</p>
|
</p>
|
||||||
<b-input v-model.number="fillupModel.perUnitPrice" type="number" min="0" step=".001" expanded required></b-input>
|
<b-input v-model.number="fillupModel.perUnitPrice" type="number" min="0" step=".001" expanded required></b-input>
|
||||||
</b-field>
|
</b-field>
|
||||||
<b-field :label="this.$t('totalamountpaid')">
|
<b-field :label="$t('totalamountpaid')">
|
||||||
<p class="control">
|
<p class="control">
|
||||||
<span class="button is-static">{{ me.currency }}</span>
|
<span class="button is-static">{{ me.currency }}</span>
|
||||||
</p>
|
</p>
|
||||||
<b-input v-model.number="fillupModel.totalAmount" type="number" min="0" step=".001" expanded required></b-input>
|
<b-input v-model.number="fillupModel.totalAmount" type="number" min="0" step=".001" expanded required></b-input>
|
||||||
</b-field>
|
</b-field>
|
||||||
<b-field :label="this.$t('odometer')">
|
<b-field :label="$t('odometer')">
|
||||||
<p class="control">
|
<p class="control">
|
||||||
<span class="button is-static">{{ $t('unit.short.' + me.distanceUnitDetail.key) }}</span>
|
<span class="button is-static">{{ $t('unit.short.' + me.distanceUnitDetail.key) }}</span>
|
||||||
</p>
|
</p>
|
||||||
@@ -265,10 +265,10 @@ export default {
|
|||||||
<b-switch v-model="showMore">{{ $t('fillmoredetails') }}</b-switch>
|
<b-switch v-model="showMore">{{ $t('fillmoredetails') }}</b-switch>
|
||||||
</b-field>
|
</b-field>
|
||||||
<fieldset v-if="showMore">
|
<fieldset v-if="showMore">
|
||||||
<b-field :label="this.$t('fillingstation')">
|
<b-field :label="$t('fillingstation')">
|
||||||
<b-input v-model="fillupModel.fillingStation" type="text" expanded></b-input>
|
<b-input v-model="fillupModel.fillingStation" type="text" expanded></b-input>
|
||||||
</b-field>
|
</b-field>
|
||||||
<b-field :label="this.$t('comments')">
|
<b-field :label="$t('comments')">
|
||||||
<b-input v-model="fillupModel.comments" type="textarea" expanded></b-input>
|
<b-input v-model="fillupModel.comments" type="textarea" expanded></b-input>
|
||||||
</b-field>
|
</b-field>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
@@ -277,7 +277,7 @@ export default {
|
|||||||
</b-field>
|
</b-field>
|
||||||
<br />
|
<br />
|
||||||
<b-field>
|
<b-field>
|
||||||
<b-button tag="input" native-type="submit" :disabled="tryingToCreate" type="is-primary" :value="this.$t('save')" :label="this.$t('createfillup')" expanded> </b-button>
|
<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>
|
||||||
|
|||||||
@@ -134,53 +134,53 @@ export default {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<form @submit.prevent="createVehicle">
|
<form @submit.prevent="createVehicle">
|
||||||
<b-field :label="this.$t('nickname') + `*`">
|
<b-field :label="$t('nickname') + `*`">
|
||||||
<b-input v-model="vehicleModel.nickname" type="text" expanded required></b-input>
|
<b-input v-model="vehicleModel.nickname" type="text" expanded required></b-input>
|
||||||
</b-field>
|
</b-field>
|
||||||
<b-field :label="this.$t('registration') + `*`">
|
<b-field :label="$t('registration') + `*`">
|
||||||
<b-input v-model="vehicleModel.registration" type="text" expanded required></b-input>
|
<b-input v-model="vehicleModel.registration" type="text" expanded required></b-input>
|
||||||
</b-field>
|
</b-field>
|
||||||
<b-field label="VIN">
|
<b-field label="VIN">
|
||||||
<b-input v-model="vehicleModel.vin" type="text" expanded></b-input>
|
<b-input v-model="vehicleModel.vin" type="text" expanded></b-input>
|
||||||
</b-field>
|
</b-field>
|
||||||
<b-field :label="this.$t('fueltype') + `*`">
|
<b-field :label="$t('fueltype') + `*`">
|
||||||
<b-select v-model.number="vehicleModel.fuelType" :placeholder="this.$t('fueltype')" required expanded>
|
<b-select v-model.number="vehicleModel.fuelType" :placeholder="$t('fueltype')" required expanded>
|
||||||
<option v-for="(option, key) in fuelTypeMasters" :key="key" :value="key">
|
<option v-for="(option, key) in fuelTypeMasters" :key="key" :value="key">
|
||||||
{{ $t('fuel.' + option.key) }}
|
{{ $t('fuel.' + option.key) }}
|
||||||
</option>
|
</option>
|
||||||
</b-select>
|
</b-select>
|
||||||
</b-field>
|
</b-field>
|
||||||
|
|
||||||
<b-field :label="this.$t('fuelunit') + `*`">
|
<b-field :label="$t('fuelunit') + `*`">
|
||||||
<b-select v-model.number="vehicleModel.fuelUnit" :placeholder="this.$t('fuelunit')" required expanded>
|
<b-select v-model.number="vehicleModel.fuelUnit" :placeholder="$t('fuelunit')" required expanded>
|
||||||
<option v-for="(option, key) in fuelUnitMasters" :key="key" :value="key">
|
<option v-for="(option, key) in fuelUnitMasters" :key="key" :value="key">
|
||||||
{{ $t('unit.long.' + option.key) }}
|
{{ $t('unit.long.' + option.key) }}
|
||||||
</option>
|
</option>
|
||||||
</b-select>
|
</b-select>
|
||||||
</b-field>
|
</b-field>
|
||||||
|
|
||||||
<b-field :label="this.$t('make') + `*`">
|
<b-field :label="$t('make') + `*`">
|
||||||
<b-input v-model="vehicleModel.make" type="text" required expanded></b-input>
|
<b-input v-model="vehicleModel.make" type="text" required expanded></b-input>
|
||||||
</b-field>
|
</b-field>
|
||||||
<b-field :label="this.$t('model') + `*`">
|
<b-field :label="$t('model') + `*`">
|
||||||
<b-input v-model="vehicleModel.model" type="text" required expanded></b-input>
|
<b-input v-model="vehicleModel.model" type="text" required expanded></b-input>
|
||||||
</b-field>
|
</b-field>
|
||||||
<b-field :label="this.$t('yearmanufacture') + `*`">
|
<b-field :label="$t('yearmanufacture') + `*`">
|
||||||
<b-input v-model.number="vehicleModel.yearOfManufacture" type="number" expanded number></b-input>
|
<b-input v-model.number="vehicleModel.yearOfManufacture" type="number" expanded number></b-input>
|
||||||
</b-field>
|
</b-field>
|
||||||
<b-field :label="this.$t('enginesize')">
|
<b-field :label="$t('enginesize')">
|
||||||
<b-input v-model.number="vehicleModel.engineSize" type="number" expanded number></b-input>
|
<b-input v-model.number="vehicleModel.engineSize" type="number" expanded number></b-input>
|
||||||
</b-field>
|
</b-field>
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
<b-field>
|
<b-field>
|
||||||
<b-button
|
<b-button
|
||||||
tag="input"
|
tag="button"
|
||||||
native-type="submit"
|
native-type="submit"
|
||||||
:disabled="tryingToCreate"
|
:disabled="tryingToCreate"
|
||||||
type="is-primary"
|
type="is-primary"
|
||||||
:value="this.$t('save')"
|
:value="$t('save')"
|
||||||
:label="this.$t('createvehicle')"
|
:label="$t('createvehicle')"
|
||||||
expanded
|
expanded
|
||||||
>
|
>
|
||||||
<BaseIcon v-if="tryingToCreate" name="sync" spin />
|
<BaseIcon v-if="tryingToCreate" name="sync" spin />
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ export default {
|
|||||||
</b-field>
|
</b-field>
|
||||||
</div>
|
</div>
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<b-button tag="input" native-type="submit" :disabled="tryingToCreate" type="is-primary" value="Upload File" class="control">
|
<b-button tag="button" native-type="submit" :disabled="tryingToCreate" type="is-primary" class="control">
|
||||||
Import
|
Import
|
||||||
</b-button>
|
</b-button>
|
||||||
</div></div
|
</div></div
|
||||||
|
|||||||
@@ -9,6 +9,19 @@ export default {
|
|||||||
meta: [{ name: 'description', content: 'The Import Fuelly page.' }],
|
meta: [{ name: 'description', content: 'The Import Fuelly page.' }],
|
||||||
},
|
},
|
||||||
components: { Layout },
|
components: { Layout },
|
||||||
|
props: {
|
||||||
|
user: {
|
||||||
|
type: Object,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data: function() {
|
||||||
|
return {
|
||||||
|
file: null,
|
||||||
|
tryingToCreate: false,
|
||||||
|
errors: [],
|
||||||
|
}
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState('utils', ['isMobile']),
|
...mapState('utils', ['isMobile']),
|
||||||
uploadButtonLabel() {
|
uploadButtonLabel() {
|
||||||
@@ -27,19 +40,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
props: {
|
|
||||||
user: {
|
|
||||||
type: Object,
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
data: function() {
|
|
||||||
return {
|
|
||||||
file: null,
|
|
||||||
tryingToCreate: false,
|
|
||||||
errors: [],
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
importFuelly() {
|
importFuelly() {
|
||||||
if (this.file == null) {
|
if (this.file == null) {
|
||||||
@@ -121,7 +121,7 @@ export default {
|
|||||||
</b-field>
|
</b-field>
|
||||||
</div>
|
</div>
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<b-button tag="input" native-type="submit" :disabled="tryingToCreate" type="is-primary" :value="this.$t('uploadfile')" class="control">
|
<b-button tag="button" native-type="submit" :disabled="tryingToCreate" type="is-primary" class="control">
|
||||||
{{ $t('import') }}
|
{{ $t('import') }}
|
||||||
</b-button>
|
</b-button>
|
||||||
</div></div
|
</div></div
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ export default {
|
|||||||
{{ connectionError }}
|
{{ connectionError }}
|
||||||
</b-notification>
|
</b-notification>
|
||||||
|
|
||||||
<b-field addons :label="this.$t('mysqlconnstr')">
|
<b-field addons :label="$t('mysqlconnstr')">
|
||||||
<b-input v-model="url" required></b-input>
|
<b-input v-model="url" required></b-input>
|
||||||
</b-field>
|
</b-field>
|
||||||
|
|
||||||
@@ -200,20 +200,20 @@ export default {
|
|||||||
<div v-if="migrationMode === 'fresh'" class="box content">
|
<div v-if="migrationMode === 'fresh'" class="box content">
|
||||||
<h1 class="title">{{ $t('init.fresh.setupadminuser') }}</h1>
|
<h1 class="title">{{ $t('init.fresh.setupadminuser') }}</h1>
|
||||||
<form @submit.prevent="register">
|
<form @submit.prevent="register">
|
||||||
<b-field :label="this.$t('init.fresh.yourname')">
|
<b-field :label="$t('init.fresh.yourname')">
|
||||||
<b-input v-model="registerModel.name" required></b-input>
|
<b-input v-model="registerModel.name" required></b-input>
|
||||||
</b-field>
|
</b-field>
|
||||||
<b-field :label="this.$t('init.fresh.youremail')">
|
<b-field :label="$t('init.fresh.youremail')">
|
||||||
<b-input v-model="registerModel.email" type="email" required></b-input>
|
<b-input v-model="registerModel.email" type="email" required></b-input>
|
||||||
</b-field>
|
</b-field>
|
||||||
<b-field :label="this.$t('init.fresh.yourpassword')">
|
<b-field :label="$t('init.fresh.yourpassword')">
|
||||||
<b-input v-model="registerModel.password" type="password" required minlength="8" password-reveal></b-input>
|
<b-input v-model="registerModel.password" type="password" required minlength="8" password-reveal></b-input>
|
||||||
</b-field>
|
</b-field>
|
||||||
<b-field :label="this.$t('currency')">
|
<b-field :label="$t('currency')">
|
||||||
<b-autocomplete
|
<b-autocomplete
|
||||||
v-model="registerModel.currency"
|
v-model="registerModel.currency"
|
||||||
:custom-formatter="formatCurrency"
|
:custom-formatter="formatCurrency"
|
||||||
:placeholder="this.$t('currency')"
|
:placeholder="$t('currency')"
|
||||||
:data="filteredCurrencyMasters"
|
:data="filteredCurrencyMasters"
|
||||||
:keep-first="true"
|
:keep-first="true"
|
||||||
:open-on-focus="true"
|
:open-on-focus="true"
|
||||||
@@ -221,8 +221,8 @@ export default {
|
|||||||
@select="(option) => (selected = option)"
|
@select="(option) => (selected = option)"
|
||||||
></b-autocomplete>
|
></b-autocomplete>
|
||||||
</b-field>
|
</b-field>
|
||||||
<b-field :label="this.$t('distanceunit')">
|
<b-field :label="$t('distanceunit')">
|
||||||
<b-select v-model.number="registerModel.distanceUnit" :placeholder="this.$t('distanceunit')" required expanded>
|
<b-select v-model.number="registerModel.distanceUnit" :placeholder="$t('distanceunit')" required expanded>
|
||||||
<option v-for="(option, key) in distanceUnitMasters" :key="key" :value="key">
|
<option v-for="(option, key) in distanceUnitMasters" :key="key" :value="key">
|
||||||
{{ `${$t('unit.long.' + option.key)} (${$t('unit.short.' + option.key)})` }}
|
{{ `${$t('unit.long.' + option.key)} (${$t('unit.short.' + option.key)})` }}
|
||||||
</option>
|
</option>
|
||||||
@@ -230,7 +230,7 @@ export default {
|
|||||||
</b-field>
|
</b-field>
|
||||||
<br />
|
<br />
|
||||||
<div class="buttons">
|
<div class="buttons">
|
||||||
<b-button type="is-primary" native-type="submit" tag="input" :value="this.$t('save')"></b-button>
|
<b-button type="is-primary" native-type="submit" tag="button" :value="$t('save')"></b-button>
|
||||||
|
|
||||||
<b-button type="is-danger is-light" @click="resetMigrationMode">{{ $t('cancel') }}</b-button>
|
<b-button type="is-danger is-light" @click="resetMigrationMode">{{ $t('cancel') }}</b-button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ export default {
|
|||||||
<b-field :label="$t('password')">
|
<b-field :label="$t('password')">
|
||||||
<b-input v-model="password" tag="b-input" name="password" type="password" :placeholder="placeholders.password" />
|
<b-input v-model="password" tag="b-input" name="password" type="password" :placeholder="placeholders.password" />
|
||||||
</b-field>
|
</b-field>
|
||||||
<b-button tag="input" native-type="submit" :value="$t('login')" :disabled="tryingToLogIn" type="is-primary">
|
<b-button tag="button" native-type="submit" :disabled="tryingToLogIn" type="is-primary">
|
||||||
<BaseIcon v-if="tryingToLogIn" name="sync" spin />
|
<BaseIcon v-if="tryingToLogIn" name="sync" spin />
|
||||||
<span v-else>
|
<span v-else>
|
||||||
{{ $t('login') }}
|
{{ $t('login') }}
|
||||||
|
|||||||
@@ -167,7 +167,7 @@ export default {
|
|||||||
</b-field>
|
</b-field>
|
||||||
<br />
|
<br />
|
||||||
<b-field>
|
<b-field>
|
||||||
<b-button tag="input" native-type="submit" :disabled="tryingToSave" type="is-primary" :value="$t('save')" expanded> </b-button>
|
<b-button tag="button" native-type="submit" :disabled="tryingToSave" type="is-primary" expanded> {{ $t('save') }} </b-button>
|
||||||
</b-field>
|
</b-field>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@@ -185,7 +185,8 @@ export default {
|
|||||||
</b-field>
|
</b-field>
|
||||||
<p v-if="!passwordValid" class="help is-danger">{{ $t('passworddontmatch') }}</p>
|
<p v-if="!passwordValid" class="help is-danger">{{ $t('passworddontmatch') }}</p>
|
||||||
<b-field>
|
<b-field>
|
||||||
<b-button tag="input" native-type="submit" :disabled="!passwordValid" type="is-primary" :value="$t('changepassword')" expanded>
|
<b-button tag="button" native-type="submit" :disabled="!passwordValid" type="is-primary" expanded>
|
||||||
|
{{ $t('changepassword') }}
|
||||||
</b-button>
|
</b-button>
|
||||||
</b-field>
|
</b-field>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -72,15 +72,15 @@ export default {
|
|||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<form class="" @submit.prevent="saveSettings">
|
<form class="" @submit.prevent="saveSettings">
|
||||||
<b-field :label="this.$t('currency')">
|
<b-field :label="$t('currency')">
|
||||||
<b-select v-model="settingsModel.currency" :placeholder="this.$t('currency')" required expanded>
|
<b-select v-model="settingsModel.currency" :placeholder="$t('currency')" required expanded>
|
||||||
<option v-for="option in currencyMasters" :key="option.code" :value="option.code">
|
<option v-for="option in currencyMasters" :key="option.code" :value="option.code">
|
||||||
{{ `${option.namePlural} (${option.code})` }}
|
{{ `${option.namePlural} (${option.code})` }}
|
||||||
</option>
|
</option>
|
||||||
</b-select>
|
</b-select>
|
||||||
</b-field>
|
</b-field>
|
||||||
<b-field :label="this.$t('distanceunit')">
|
<b-field :label="$t('distanceunit')">
|
||||||
<b-select v-model.number="settingsModel.distanceUnit" :placeholder="this.$t('distanceunit')" required expanded>
|
<b-select v-model.number="settingsModel.distanceUnit" :placeholder="$t('distanceunit')" required expanded>
|
||||||
<option v-for="(option, key) in distanceUnitMasters" :key="key" :value="key">
|
<option v-for="(option, key) in distanceUnitMasters" :key="key" :value="key">
|
||||||
{{ `${$t('unit.long.' + option.key)} (${$t('unit.short.' + option.key)})` }}
|
{{ `${$t('unit.long.' + option.key)} (${$t('unit.short.' + option.key)})` }}
|
||||||
</option>
|
</option>
|
||||||
@@ -88,7 +88,7 @@ export default {
|
|||||||
</b-field>
|
</b-field>
|
||||||
<br />
|
<br />
|
||||||
<b-field>
|
<b-field>
|
||||||
<b-button tag="input" native-type="submit" :disabled="tryingToSave" type="is-primary" :value="this.$t('save')" expanded> </b-button>
|
<b-button tag="button" native-type="submit" :disabled="tryingToSave" type="is-primary" expanded> {{ $t('save') }}</b-button>
|
||||||
</b-field>
|
</b-field>
|
||||||
</form>
|
</form>
|
||||||
</Layout>
|
</Layout>
|
||||||
|
|||||||
@@ -181,7 +181,7 @@ export default {
|
|||||||
</b-field>
|
</b-field>
|
||||||
<br />
|
<br />
|
||||||
<div class="buttons">
|
<div class="buttons">
|
||||||
<b-button type="is-primary" native-type="submit" tag="input" :value="$t('save')"></b-button>
|
<b-button type="is-primary" native-type="submit" tag="button">{{ $t('save') }}</b-button>
|
||||||
|
|
||||||
<b-button type="is-danger is-light" @click="resetUserForm">{{ $t('cancel') }}</b-button>
|
<b-button type="is-danger is-light" @click="resetUserForm">{{ $t('cancel') }}</b-button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -92,7 +92,10 @@ export default {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('avgfuelcost'),
|
label: this.$t('avgfuelcost'),
|
||||||
value: this.$t('per', {'0': this.formatCurrency(x.avgFuelPrice, x.currency), '1': this.$t('unit.short.' + this.vehicle.fuelUnitDetail.key)}),
|
value: this.$t('per', {
|
||||||
|
0: this.formatCurrency(x.avgFuelPrice, x.currency),
|
||||||
|
1: this.$t('unit.short.' + this.vehicle.fuelUnitDetail.key),
|
||||||
|
}),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
@@ -309,15 +312,15 @@ export default {
|
|||||||
<div class="column is-one-half" :class="isMobile ? 'has-text-centered' : ''">
|
<div class="column is-one-half" :class="isMobile ? 'has-text-centered' : ''">
|
||||||
<p class="title">{{ vehicle.nickname }} - {{ vehicle.registration }}</p>
|
<p class="title">{{ vehicle.nickname }} - {{ vehicle.registration }}</p>
|
||||||
<p class="subtitle">
|
<p class="subtitle">
|
||||||
{{ [vehicle.make, vehicle.model, this.$t('fuel.' + vehicle.fuelTypeDetail.key)].join(' | ') }}
|
{{ [vehicle.make, vehicle.model, $t('fuel.' + vehicle.fuelTypeDetail.key)].join(' | ') }}
|
||||||
|
|
||||||
<template v-if="users.length > 1">
|
<template v-if="users.length > 1">
|
||||||
| {{ $t("sharedwith") }} :
|
| {{ $t('sharedwith') }} :
|
||||||
{{
|
{{
|
||||||
users
|
users
|
||||||
.map((x) => {
|
.map((x) => {
|
||||||
if (x.userId === me.id) {
|
if (x.userId === me.id) {
|
||||||
return this.$t('you')
|
return $t('you')
|
||||||
} else {
|
} else {
|
||||||
return x.name
|
return x.name
|
||||||
}
|
}
|
||||||
@@ -328,8 +331,8 @@ export default {
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div :class="(!isMobile ? 'has-text-right ' : '') + 'column is-one-half buttons'">
|
<div :class="(!isMobile ? 'has-text-right ' : '') + 'column is-one-half buttons'">
|
||||||
<b-button type="is-primary" tag="router-link" :to="`/vehicles/${vehicle.id}/fillup`">{{ this.$t('addfillup') }}</b-button>
|
<b-button type="is-primary" tag="router-link" :to="`/vehicles/${vehicle.id}/fillup`">{{ $t('addfillup') }}</b-button>
|
||||||
<b-button type="is-primary" tag="router-link" :to="`/vehicles/${vehicle.id}/expense`">{{ this.$t('addexpense') }}</b-button>
|
<b-button type="is-primary" tag="router-link" :to="`/vehicles/${vehicle.id}/expense`">{{ $t('addexpense') }}</b-button>
|
||||||
<b-button
|
<b-button
|
||||||
v-if="vehicle.isOwner"
|
v-if="vehicle.isOwner"
|
||||||
tag="router-link"
|
tag="router-link"
|
||||||
@@ -339,9 +342,8 @@ export default {
|
|||||||
props: { vehicle: vehicle },
|
props: { vehicle: vehicle },
|
||||||
params: { id: vehicle.id },
|
params: { id: vehicle.id },
|
||||||
}"
|
}"
|
||||||
>
|
><b-icon size="is-small" pack="fas" icon="edit" type="is-info"> </b-icon>
|
||||||
<b-icon pack="fas" icon="edit" type="is-info"> </b-icon
|
</b-button>
|
||||||
></b-button>
|
|
||||||
<b-button v-if="vehicle.isOwner" :title="$t('sharevehicle')" @click="showShareVehicleModal">
|
<b-button v-if="vehicle.isOwner" :title="$t('sharevehicle')" @click="showShareVehicleModal">
|
||||||
<b-icon pack="fas" icon="user-friends" type="is-info"> </b-icon
|
<b-icon pack="fas" icon="user-friends" type="is-info"> </b-icon
|
||||||
></b-button>
|
></b-button>
|
||||||
@@ -362,46 +364,47 @@ export default {
|
|||||||
<h1 class="title is-4">{{ $t('pastfillups') }}</h1>
|
<h1 class="title is-4">{{ $t('pastfillups') }}</h1>
|
||||||
|
|
||||||
<b-table :data="fillups" hoverable mobile-cards :detailed="isMobile" detail-key="id" paginated per-page="10">
|
<b-table :data="fillups" hoverable mobile-cards :detailed="isMobile" detail-key="id" paginated per-page="10">
|
||||||
<b-table-column v-slot="props" field="date" :label="this.$t('date')" :td-attrs="columnTdAttrs" sortable date>
|
<b-table-column v-slot="props" field="date" :label="$t('date')" :td-attrs="columnTdAttrs" sortable date>
|
||||||
{{ formatDate(props.row.date) }}
|
{{ formatDate(props.row.date) }}
|
||||||
</b-table-column>
|
</b-table-column>
|
||||||
<b-table-column v-slot="props" field="fuelSubType" :label="this.$t('fuelsubtype')" :td-attrs="columnTdAttrs">
|
<b-table-column v-slot="props" field="fuelSubType" :label="$t('fuelsubtype')" :td-attrs="columnTdAttrs">
|
||||||
{{ props.row.fuelSubType }}
|
{{ props.row.fuelSubType }}
|
||||||
</b-table-column>
|
</b-table-column>
|
||||||
<b-table-column v-slot="props" field="fuelQuantity" :label="this.$t('quantity')" :td-attrs="hiddenMobile" numeric>
|
<b-table-column v-slot="props" field="fuelQuantity" :label="$t('quantity')" :td-attrs="hiddenMobile" numeric>
|
||||||
{{ `${props.row.fuelQuantity} ${$t('unit.short.' + props.row.fuelUnitDetail.key)}` }}
|
{{ `${props.row.fuelQuantity} ${$t('unit.short.' + props.row.fuelUnitDetail.key)}` }}
|
||||||
</b-table-column>
|
</b-table-column>
|
||||||
<b-table-column
|
<b-table-column
|
||||||
v-slot="props"
|
v-slot="props"
|
||||||
field="perUnitPrice"
|
field="perUnitPrice"
|
||||||
:label="this.$t('per', { '0': this.$t('price'), '1': this.$t('unit.short.' + vehicle.fuelUnitDetail.key) })"
|
:label="$t('per', { '0': $t('price'), '1': $t('unit.short.' + vehicle.fuelUnitDetail.key) })"
|
||||||
:td-attrs="hiddenMobile"
|
:td-attrs="hiddenMobile"
|
||||||
numeric
|
numeric
|
||||||
sortable
|
sortable
|
||||||
>
|
>
|
||||||
{{ `${formatCurrency(props.row.perUnitPrice, props.row.currency)}` }}
|
{{ `${formatCurrency(props.row.perUnitPrice, props.row.currency)}` }}
|
||||||
</b-table-column>
|
</b-table-column>
|
||||||
<b-table-column v-if="isMobile" v-slot="props" field="totalAmount" :label="this.$t('total')" :td-attrs="hiddenDesktop" sortable numeric>
|
<b-table-column v-if="isMobile" v-slot="props" field="totalAmount" :label="$t('total')" :td-attrs="hiddenDesktop" sortable numeric>
|
||||||
{{ `${me.currency} ${props.row.totalAmount}` }} ({{ `${props.row.fuelQuantity} ${$t('unit.short.' + props.row.fuelUnitDetail.key)}` }} @
|
{{ `${me.currency} ${props.row.totalAmount}` }} ({{ `${props.row.fuelQuantity} ${$t('unit.short.' + props.row.fuelUnitDetail.key)}` }} @
|
||||||
{{ `${me.currency} ${props.row.perUnitPrice}` }})
|
{{ `${me.currency} ${props.row.perUnitPrice}` }})
|
||||||
</b-table-column>
|
</b-table-column>
|
||||||
<b-table-column v-if="!isMobile" v-slot="props" field="totalAmount" :label="this.$t('total')" :td-attrs="hiddenMobile" sortable numeric>
|
<b-table-column v-if="!isMobile" v-slot="props" field="totalAmount" :label="$t('total')" :td-attrs="hiddenMobile" sortable numeric>
|
||||||
{{ `${formatCurrency(props.row.totalAmount, props.row.currency)}` }}
|
{{ `${formatCurrency(props.row.totalAmount, props.row.currency)}` }}
|
||||||
</b-table-column>
|
</b-table-column>
|
||||||
<b-table-column v-slot="props" width="20" field="isTankFull" :label="this.$t('fulltank')" :td-attrs="hiddenMobile">
|
<b-table-column v-slot="props" width="20" field="isTankFull" :label="$t('fulltank')" :td-attrs="hiddenMobile">
|
||||||
<b-icon pack="fas" :icon="props.row.isTankFull ? 'check' : 'times'" type="is-info"> </b-icon>
|
<b-icon pack="fas" :icon="props.row.isTankFull ? 'check' : 'times'" type="is-info"> </b-icon>
|
||||||
</b-table-column>
|
</b-table-column>
|
||||||
<b-table-column v-slot="props" field="odoReading" :label="this.$t('odometer')" :td-attrs="hiddenMobile" numeric>
|
<b-table-column v-slot="props" field="odoReading" :label="$t('odometer')" :td-attrs="hiddenMobile" numeric>
|
||||||
{{ `${props.row.odoReading} ${$t('unit.short.' + me.distanceUnitDetail.key)}` }}
|
{{ `${props.row.odoReading} ${$t('unit.short.' + me.distanceUnitDetail.key)}` }}
|
||||||
</b-table-column>
|
</b-table-column>
|
||||||
<b-table-column v-slot="props" field="fillingStation" :label="this.$t('gasstation')" :td-attrs="hiddenMobile">
|
<b-table-column v-slot="props" field="fillingStation" :label="$t('gasstation')" :td-attrs="hiddenMobile">
|
||||||
{{ `${props.row.fillingStation}` }}
|
{{ `${props.row.fillingStation}` }}
|
||||||
</b-table-column>
|
</b-table-column>
|
||||||
<b-table-column v-slot="props" field="userId" :label="this.$t('by')" :td-attrs="hiddenMobile">
|
<b-table-column v-slot="props" field="userId" :label="$t('by')" :td-attrs="hiddenMobile">
|
||||||
{{ `${props.row.user.name}` }}
|
{{ `${props.row.user.name}` }}
|
||||||
</b-table-column>
|
</b-table-column>
|
||||||
<b-table-column v-slot="props">
|
<b-table-column v-slot="props">
|
||||||
<b-button
|
<b-button
|
||||||
|
size="is-small"
|
||||||
type="is-ghost"
|
type="is-ghost"
|
||||||
tag="router-link"
|
tag="router-link"
|
||||||
:to="{
|
:to="{
|
||||||
@@ -412,7 +415,11 @@ export default {
|
|||||||
>
|
>
|
||||||
<b-icon pack="fas" icon="edit" type="is-info"> </b-icon
|
<b-icon pack="fas" icon="edit" type="is-info"> </b-icon
|
||||||
></b-button>
|
></b-button>
|
||||||
<b-button type="is-ghost" :title="$t('deletefillup')" @click="deleteFillup(props.row.id)">
|
<b-button
|
||||||
|
size="is-small"
|
||||||
|
type="is-ghost"
|
||||||
|
:title="$t('deletefillup')"
|
||||||
|
@click="deleteFillup(props.row.id)">
|
||||||
<b-icon pack="fas" icon="trash" type="is-danger"> </b-icon
|
<b-icon pack="fas" icon="trash" type="is-danger"> </b-icon
|
||||||
></b-button>
|
></b-button>
|
||||||
</b-table-column>
|
</b-table-column>
|
||||||
@@ -427,26 +434,27 @@ export default {
|
|||||||
<h1 class="title is-4">{{ $t('expenses') }}</h1>
|
<h1 class="title is-4">{{ $t('expenses') }}</h1>
|
||||||
|
|
||||||
<b-table :data="expenses" hoverable mobile-cards paginated per-page="10">
|
<b-table :data="expenses" hoverable mobile-cards paginated per-page="10">
|
||||||
<b-table-column v-slot="props" field="date" :label="this.$t('date')" :td-attrs="columnTdAttrs" date>
|
<b-table-column v-slot="props" field="date" :label="$t('date')" :td-attrs="columnTdAttrs" date>
|
||||||
{{ formatDate(props.row.date) }}
|
{{ formatDate(props.row.date) }}
|
||||||
</b-table-column>
|
</b-table-column>
|
||||||
<b-table-column v-slot="props" field="expenseType" :label="this.$t('expensetype')">
|
<b-table-column v-slot="props" field="expenseType" :label="$t('expensetype')">
|
||||||
{{ `${props.row.expenseType}` }}
|
{{ `${props.row.expenseType}` }}
|
||||||
</b-table-column>
|
</b-table-column>
|
||||||
|
|
||||||
<b-table-column v-slot="props" field="amount" :label="this.$t('total')" :td-attrs="hiddenMobile" sortable numeric>
|
<b-table-column v-slot="props" field="amount" :label="$t('total')" :td-attrs="hiddenMobile" sortable numeric>
|
||||||
{{ `${formatCurrency(props.row.amount, props.row.currency)}` }}
|
{{ `${formatCurrency(props.row.amount, props.row.currency)}` }}
|
||||||
</b-table-column>
|
</b-table-column>
|
||||||
|
|
||||||
<b-table-column v-slot="props" field="odoReading" :label="this.$t('odometer')" :td-attrs="columnTdAttrs" numeric>
|
<b-table-column v-slot="props" field="odoReading" :label="$t('odometer')" :td-attrs="columnTdAttrs" numeric>
|
||||||
{{ `${props.row.odoReading} ${$t('unit.short.' + me.distanceUnitDetail.key)}` }}
|
{{ `${props.row.odoReading} ${$t('unit.short.' + me.distanceUnitDetail.key)}` }}
|
||||||
</b-table-column>
|
</b-table-column>
|
||||||
|
|
||||||
<b-table-column v-slot="props" field="userId" :label="this.$t('by')" :td-attrs="columnTdAttrs">
|
<b-table-column v-slot="props" field="userId" :label="$t('by')" :td-attrs="columnTdAttrs">
|
||||||
{{ `${props.row.user.name}` }}
|
{{ `${props.row.user.name}` }}
|
||||||
</b-table-column>
|
</b-table-column>
|
||||||
<b-table-column v-slot="props">
|
<b-table-column v-slot="props">
|
||||||
<b-button
|
<b-button
|
||||||
|
size="is-small"
|
||||||
type="is-ghost"
|
type="is-ghost"
|
||||||
tag="router-link"
|
tag="router-link"
|
||||||
:to="{
|
:to="{
|
||||||
@@ -457,7 +465,7 @@ export default {
|
|||||||
>
|
>
|
||||||
<b-icon pack="fas" icon="edit" type="is-info"> </b-icon
|
<b-icon pack="fas" icon="edit" type="is-info"> </b-icon
|
||||||
></b-button>
|
></b-button>
|
||||||
<b-button type="is-ghost" :title="$t('deleteexpense')" @click="deleteExpense(props.row.id)">
|
<b-button size="is-small" type="is-ghost" :title="$t('deleteexpense')" @click="deleteExpense(props.row.id)">
|
||||||
<b-icon pack="fas" icon="trash" type="is-danger"> </b-icon
|
<b-icon pack="fas" icon="trash" type="is-danger"> </b-icon
|
||||||
></b-button>
|
></b-button>
|
||||||
</b-table-column>
|
</b-table-column>
|
||||||
@@ -467,7 +475,9 @@ export default {
|
|||||||
<br />
|
<br />
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<div class="columns">
|
<div class="columns">
|
||||||
<div class="column is-three-quarters"> <h1 class="title is-4">{{ $t('attachments') }}</h1></div>
|
<div class="column is-three-quarters">
|
||||||
|
<h1 class="title is-4">{{ $t('attachments') }}</h1></div
|
||||||
|
>
|
||||||
<div class="column buttons">
|
<div class="column buttons">
|
||||||
<b-button type="is-primary" @click="showAttachmentForm = true">
|
<b-button type="is-primary" @click="showAttachmentForm = true">
|
||||||
{{ $t('addattachment') }}
|
{{ $t('addattachment') }}
|
||||||
@@ -492,18 +502,18 @@ export default {
|
|||||||
</b-upload>
|
</b-upload>
|
||||||
</b-field>
|
</b-field>
|
||||||
<b-field>
|
<b-field>
|
||||||
<b-input v-model="title" required :placeholder="this.$t('labelforfile')"></b-input>
|
<b-input v-model="title" required :placeholder="$t('labelforfile')"></b-input>
|
||||||
</b-field>
|
</b-field>
|
||||||
|
|
||||||
<b-field class="buttons">
|
<b-field class="buttons">
|
||||||
<b-button tag="input" native-type="submit" :disabled="tryingToUpload" type="is-primary" label="Upload File" value="Upload File">
|
<b-button tag="button" native-type="submit" :disabled="tryingToUpload" type="is-primary" label="Upload File" value="Upload File">
|
||||||
</b-button>
|
</b-button>
|
||||||
<b-button
|
<b-button
|
||||||
tag="input"
|
tag="button"
|
||||||
native-type="submit"
|
native-type="submit"
|
||||||
:disabled="tryingToUpload"
|
:disabled="tryingToUpload"
|
||||||
type="is-danger"
|
type="is-danger"
|
||||||
label="Upload File"
|
label="Cancel"
|
||||||
value="Cancel"
|
value="Cancel"
|
||||||
@click="showAttachmentForm = false"
|
@click="showAttachmentForm = false"
|
||||||
>
|
>
|
||||||
@@ -516,14 +526,14 @@ export default {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<b-table :data="attachments" hoverable mobile-cards>
|
<b-table :data="attachments" hoverable mobile-cards>
|
||||||
<b-table-column v-slot="props" field="title" :label="this.$t('title')" :td-attrs="columnTdAttrs">
|
<b-table-column v-slot="props" field="title" :label="$t('title')" :td-attrs="columnTdAttrs">
|
||||||
{{ `${props.row.title}` }}
|
{{ `${props.row.title}` }}
|
||||||
</b-table-column>
|
</b-table-column>
|
||||||
|
|
||||||
<b-table-column v-slot="props" field="originalName" :label="this.$t('name')" :td-attrs="columnTdAttrs">
|
<b-table-column v-slot="props" field="originalName" :label="$t('name')" :td-attrs="columnTdAttrs">
|
||||||
{{ `${props.row.originalName}` }}
|
{{ `${props.row.originalName}` }}
|
||||||
</b-table-column>
|
</b-table-column>
|
||||||
<b-table-column v-slot="props" field="id" :label="this.$t('download')" :td-attrs="columnTdAttrs">
|
<b-table-column v-slot="props" field="id" :label="$t('download')" :td-attrs="columnTdAttrs">
|
||||||
<b-button tag="a" :href="`/api/attachments/${props.row.id}/file?access_token=${currentUser.token}`" :download="props.row.originalName">
|
<b-button tag="a" :href="`/api/attachments/${props.row.id}/file?access_token=${currentUser.token}`" :download="props.row.originalName">
|
||||||
<b-icon type="is-primary" icon="download"></b-icon>
|
<b-icon type="is-primary" icon="download"></b-icon>
|
||||||
</b-button>
|
</b-button>
|
||||||
@@ -533,7 +543,9 @@ export default {
|
|||||||
</div>
|
</div>
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<div class="columns">
|
<div class="columns">
|
||||||
<div class="column" :class="isMobile ? 'has-text-centered' : ''"> <h1 class="title">{{ $t('statistics') }}</h1></div>
|
<div class="column" :class="isMobile ? 'has-text-centered' : ''">
|
||||||
|
<h1 class="title">{{ $t('statistics') }}</h1></div
|
||||||
|
>
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<div class="columns is-pulled-right is-medium">
|
<div class="columns is-pulled-right is-medium">
|
||||||
<div class="column">
|
<div class="column">
|
||||||
|
|||||||
Reference in New Issue
Block a user