Files
firefly-iii/frontend/src/components/dashboard/Dashboard.vue

104 lines
2.6 KiB
Vue
Raw Normal View History

<!--
- 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-22 07:50:55 +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-11-22 07:50:55 +01:00
<div class="row">
<div class="col">
<main-category-list />
2020-11-21 12:06:43 +01:00
</div>
2020-11-22 07:50:55 +01:00
</div>
2020-11-12 05:58:06 +01:00
<div class="row">
2020-11-27 06:14:10 +01:00
<div class="col-lg-6 col-md-12 col-sm-12 col-xs-12">
2020-11-25 06:32:30 +01:00
<main-debit-list />
</div>
2020-11-27 06:14:10 +01:00
<div class="col-lg-6 col-md-12 col-sm-12 col-xs-12">
2020-11-29 07:06:55 +01:00
<main-credit-list />
2020-11-25 06:32:30 +01:00
</div>
2020-11-12 05:58:06 +01:00
</div>
2020-11-25 06:32:30 +01: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/>
</div>
</div>
2020-11-12 05:58:06 +01:00
-->
</div>
</template>
<script>
2020-11-12 05:58:06 +01:00
export default {
name: "Dashboard",
2020-11-22 07:50:55 +01:00
created() {
2020-11-12 05:58:06 +01:00
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-11-12 05:58:06 +01:00
}
}
</script>