2020-06-14 15:51:20 +02:00
|
|
|
<!--
|
|
|
|
|
- ExampleComponent.vue
|
|
|
|
|
- Copyright (c) 2019 james@firefly-iii.org
|
|
|
|
|
-
|
|
|
|
|
- This file is part of Firefly III (https://github.com/firefly-iii).
|
|
|
|
|
-
|
|
|
|
|
- This program is free software: you can redistribute it and/or modify
|
|
|
|
|
- it under the terms of the GNU Affero General Public License as
|
|
|
|
|
- published by the Free Software Foundation, either version 3 of the
|
|
|
|
|
- License, or (at your option) any later version.
|
|
|
|
|
-
|
|
|
|
|
- This program is distributed in the hope that it will be useful,
|
|
|
|
|
- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
- GNU Affero General Public License for more details.
|
|
|
|
|
-
|
|
|
|
|
- You should have received a copy of the GNU Affero General Public License
|
|
|
|
|
- along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
|
-->
|
|
|
|
|
|
|
|
|
|
<template>
|
2020-11-12 05:58:06 +01:00
|
|
|
<div>
|
2020-11-15 14:05:04 +01:00
|
|
|
|
2020-11-21 12:06:43 +01:00
|
|
|
<top-boxes/>
|
2020-11-15 14:05:04 +01:00
|
|
|
<div class="row">
|
|
|
|
|
<div class="col">
|
2020-11-21 12:06:43 +01:00
|
|
|
<main-account/>
|
2020-11-15 14:05:04 +01:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2020-11-21 12:06:43 +01:00
|
|
|
<main-account-list/>
|
2020-11-15 14:05:04 +01:00
|
|
|
|
2020-11-12 05:58:06 +01:00
|
|
|
<div class="row">
|
2020-11-15 14:05:04 +01:00
|
|
|
<div class="col">
|
2020-11-21 12:06:43 +01:00
|
|
|
<main-budget-list/>
|
2020-11-12 05:58:06 +01:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2020-06-14 15:51:20 +02:00
|
|
|
|
2020-11-21 12:06:43 +01:00
|
|
|
|
|
|
|
|
<!--
|
|
|
|
|
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
|
|
|
|
|
<main-category />
|
|
|
|
|
</div>
|
|
|
|
|
-->
|
2020-11-07 20:13:06 +01:00
|
|
|
|
2020-11-15 14:05:04 +01:00
|
|
|
<!--
|
2020-11-12 05:58:06 +01:00
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-lg-8 col-md-8 col-sm-12 col-xs-12">
|
|
|
|
|
<main-debit/>
|
2020-06-17 07:06:45 +02:00
|
|
|
</div>
|
2020-11-12 05:58:06 +01:00
|
|
|
<div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
|
|
|
|
|
<main-credit/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2020-06-14 15:51:20 +02:00
|
|
|
|
2020-11-12 05:58:06 +01:00
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
|
|
|
|
|
<main-piggy-list/>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
|
|
|
|
|
<main-bills-list/>
|
2020-06-14 15:51:20 +02:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2020-11-12 05:58:06 +01:00
|
|
|
-->
|
|
|
|
|
</div>
|
2020-06-14 15:51:20 +02:00
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
2020-11-12 05:58:06 +01:00
|
|
|
export default {
|
|
|
|
|
name: "Dashboard",
|
|
|
|
|
mounted() {
|
|
|
|
|
if (!localStorage.currencyPreference) {
|
|
|
|
|
this.getCurrencyPreference();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
getCurrencyPreference: function () {
|
|
|
|
|
axios.get('./api/v1/currencies/default')
|
|
|
|
|
.then(response => {
|
|
|
|
|
localStorage.currencyPreference = JSON.stringify({
|
|
|
|
|
id: parseInt(response.data.data.id),
|
|
|
|
|
name: response.data.data.attributes.name,
|
|
|
|
|
symbol: response.data.data.attributes.symbol,
|
|
|
|
|
code: response.data.data.attributes.code,
|
|
|
|
|
decimal_places: parseInt(response.data.data.attributes.decimal_places),
|
|
|
|
|
});
|
|
|
|
|
}).catch(err => {
|
|
|
|
|
console.log('Got error response.');
|
|
|
|
|
console.error(err);
|
|
|
|
|
localStorage.currencyPreference = JSON.stringify({
|
|
|
|
|
id: 1,
|
|
|
|
|
name: 'Euro',
|
|
|
|
|
symbol: '€',
|
|
|
|
|
code: 'EUR',
|
|
|
|
|
decimal_places: 2
|
|
|
|
|
});
|
|
|
|
|
});
|
2020-06-14 15:51:20 +02:00
|
|
|
}
|
2020-11-12 05:58:06 +01:00
|
|
|
}
|
|
|
|
|
}
|
2020-06-14 15:51:20 +02:00
|
|
|
</script>
|