mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-03 19:41:54 +00:00
Rebuild all for new release.
This commit is contained in:
114
frontend/src/components/budgets/Index.vue
Normal file
114
frontend/src/components/budgets/Index.vue
Normal file
@@ -0,0 +1,114 @@
|
||||
<!--
|
||||
- Index.vue
|
||||
- Copyright (c) 2021 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>
|
||||
<div>
|
||||
<p>
|
||||
<span class="d-block">(all)</span>
|
||||
<span class="d-none d-xl-block">xl</span>
|
||||
<span class="d-none d-lg-block d-xl-none">lg</span>
|
||||
<span class="d-none d-md-block d-lg-none">md</span>
|
||||
<span class="d-none d-sm-block d-md-none">sm</span>
|
||||
<span class="d-block d-sm-none">xs</span>
|
||||
</p>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xl-2 col-lg-4 col-md-4 col-sm-4 col-6">
|
||||
<div class="card card-primary">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">Budgets</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
Budget X<br>
|
||||
Budget Y<br>
|
||||
Budget X<br>
|
||||
Budget Y<br>
|
||||
Budget X<br>
|
||||
Budget Y<br>
|
||||
Budget X<br>
|
||||
Budget Y<br>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xl-10 col-lg-8 col-md-8 col-sm-8 col-6">
|
||||
<div class="container-fluid" style="overflow:scroll;">
|
||||
<div class="d-flex flex-row flex-nowrap">
|
||||
<div class="card card-body-budget" v-for="n in 5">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">Maand yXz</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
Some text<br>
|
||||
Some text<br>
|
||||
Some text<br>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "Index",
|
||||
created() {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
.card-body-budget {
|
||||
min-width: 300px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.holder-titles {
|
||||
display: flex;
|
||||
flex-direction: column-reverse;
|
||||
}
|
||||
|
||||
.title-block {
|
||||
border: 1px red solid;
|
||||
}
|
||||
|
||||
.holder-blocks {
|
||||
display: flex;
|
||||
flex-direction: column-reverse;
|
||||
}
|
||||
|
||||
.budget-block {
|
||||
border: 1px blue solid;
|
||||
}
|
||||
|
||||
.budget-block-unused {
|
||||
border: 1px green solid;
|
||||
}
|
||||
|
||||
.budget-block-unset {
|
||||
border: 1px purple solid;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -27,7 +27,7 @@
|
||||
<td style="vertical-align: middle">
|
||||
<div class="progress progress active">
|
||||
<div :aria-valuenow="budgetLimit.pctGreen" :style="'width: '+ budgetLimit.pctGreen + '%;'"
|
||||
aria-valuemax="100" aria-valuemin="0" class="progress-bar bg-success progress-bar-striped" role="progressbar">
|
||||
aria-valuemax="100" aria-valuemin="0" class="progress-bar bg-success" role="progressbar">
|
||||
<span v-if="budgetLimit.pctGreen > 35">
|
||||
{{ $t('firefly.spent_x_of_y', {amount: Intl.NumberFormat(locale, {style: 'currency', currency: budgetLimit.currency_code}).format(budgetLimit.spent), total: Intl.NumberFormat(locale, {style: 'currency', currency: budgetLimit.currency_code}).format(budgetLimit.amount)}) }}
|
||||
<!-- -->
|
||||
@@ -37,14 +37,14 @@
|
||||
</div>
|
||||
|
||||
<div :aria-valuenow="budgetLimit.pctOrange" :style="'width: '+ budgetLimit.pctOrange + '%;'"
|
||||
aria-valuemax="100" aria-valuemin="0" class="progress-bar bg-warning progress-bar-striped" role="progressbar">
|
||||
aria-valuemax="100" aria-valuemin="0" class="progress-bar bg-warning" role="progressbar">
|
||||
<span v-if="budgetLimit.pctRed <= 50 && budgetLimit.pctOrange > 35">
|
||||
{{ $t('firefly.spent_x_of_y', {amount: Intl.NumberFormat(locale, {style: 'currency', currency: budgetLimit.currency_code}).format(budgetLimit.spent), total: Intl.NumberFormat(locale, {style: 'currency', currency: budgetLimit.currency_code}).format(budgetLimit.amount)}) }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div :aria-valuenow="budgetLimit.pctRed" :style="'width: '+ budgetLimit.pctRed + '%;'"
|
||||
aria-valuemax="100" aria-valuemin="0" class="progress-bar bg-danger progress-bar-striped" role="progressbar">
|
||||
aria-valuemax="100" aria-valuemin="0" class="progress-bar bg-danger" role="progressbar">
|
||||
<span v-if="budgetLimit.pctOrange <= 50 && budgetLimit.pctRed > 35" class="text-muted">
|
||||
{{ $t('firefly.spent_x_of_y', {amount: Intl.NumberFormat(locale, {style: 'currency', currency: budgetLimit.currency_code}).format(budgetLimit.spent), total: Intl.NumberFormat(locale, {style: 'currency', currency: budgetLimit.currency_code}).format(budgetLimit.amount)}) }}
|
||||
</span>
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
<td class="align-middle">
|
||||
<div v-if="entry.pct > 0" class="progress">
|
||||
<div :aria-valuenow="entry.pct" :style="{ width: entry.pct + '%'}" aria-valuemax="100"
|
||||
aria-valuemin="0" class="progress-bar progress-bar-striped bg-success"
|
||||
aria-valuemin="0" class="progress-bar bg-success"
|
||||
role="progressbar">
|
||||
<span v-if="entry.pct > 20">
|
||||
{{ Intl.NumberFormat(locale, {style: 'currency', currency: entry.currency_code}).format(entry.difference_float) }}
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
<td class="align-middle">
|
||||
<div v-if="entry.pct > 0" class="progress">
|
||||
<div :aria-valuenow="entry.pct" :style="{ width: entry.pct + '%'}" aria-valuemax="100"
|
||||
aria-valuemin="0" class="progress-bar progress-bar-striped bg-danger"
|
||||
aria-valuemin="0" class="progress-bar bg-danger"
|
||||
role="progressbar">
|
||||
<span v-if="entry.pct > 20">
|
||||
{{ Intl.NumberFormat(locale, {style: 'currency', currency: entry.currency_code}).format(entry.difference_float) }}
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
<td>
|
||||
<div class="progress-group">
|
||||
<div class="progress progress-sm">
|
||||
<div v-if="piggy.attributes.pct < 100" :style="{'width': piggy.attributes.pct + '%'}" class="progress-bar progress-bar-striped primary"></div>
|
||||
<div v-if="piggy.attributes.pct < 100" :style="{'width': piggy.attributes.pct + '%'}" class="progress-bar primary"></div>
|
||||
<div v-if="100 === piggy.attributes.pct" :style="{'width': piggy.attributes.pct + '%'}"
|
||||
class="progress-bar progress-bar-striped bg-success"></div>
|
||||
</div>
|
||||
|
||||
@@ -42,10 +42,10 @@
|
||||
"categories": "Kategorien",
|
||||
"go_to_budgets": "Budgets anzeigen",
|
||||
"income": "Einnahmen \/ Einkommen",
|
||||
"go_to_deposits": "Zu Einlagen wechseln",
|
||||
"go_to_deposits": "Einnahmen anzeigen",
|
||||
"go_to_categories": "Kategorien anzeigen",
|
||||
"expense_accounts": "Ausgabekonten",
|
||||
"go_to_expenses": "Zu Ausgaben wechseln",
|
||||
"go_to_expenses": "Ausgaben anzeigen",
|
||||
"go_to_bills": "Rechnungen anzeigen",
|
||||
"bills": "Rechnungen",
|
||||
"last_thirty_days": "Letzte 30 Tage",
|
||||
|
||||
48
frontend/src/pages/budgets/index.js
vendored
Normal file
48
frontend/src/pages/budgets/index.js
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* index.js
|
||||
* Copyright (c) 2020 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/>.
|
||||
*/
|
||||
require('../../bootstrap');
|
||||
|
||||
import Vue from "vue";
|
||||
import Index from "../../components/budgets/Index";
|
||||
import store from "../../components/store";
|
||||
|
||||
// i18n
|
||||
let i18n = require('../../i18n');
|
||||
let props = {};
|
||||
|
||||
new Vue({
|
||||
i18n,
|
||||
store,
|
||||
el: "#budgets",
|
||||
render: (createElement) => {
|
||||
return createElement(Index, {props: props});
|
||||
},
|
||||
beforeCreate() {
|
||||
// init the old root store (TODO remove me)
|
||||
//this.$store.commit('initialiseStore');
|
||||
//this.$store.dispatch('updateCurrencyPreference');
|
||||
|
||||
// init the new root store (dont care about results)
|
||||
this.$store.dispatch('root/initialiseStore');
|
||||
|
||||
// also init the dashboard store.
|
||||
//this.$store.dispatch('dashboard/index/initialiseStore');
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user