mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-22 03:56:42 +00:00
Sortable account list.
This commit is contained in:
@@ -34,52 +34,17 @@
|
||||
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
|
||||
<!--
|
||||
<div class="card-tools">
|
||||
<div class="input-group input-group-sm" style="width: 150px;">
|
||||
<input class="form-control float-right" name="table_search" :placeholder="$t('firefly.search')" type="text">
|
||||
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-default" type="submit">
|
||||
<i class="fas fa-search"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
|
||||
|
||||
</div>
|
||||
<div class="card-body p-0">
|
||||
<!--
|
||||
<td style="text-align: right;">
|
||||
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<div class="btn-group btn-group-sm dropleft">
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-light btn-sm dropdown-toggle" type="button" :id="'dropdownMenuButton' + account.id" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
{{ $t('firefly.actions') }}
|
||||
</button>
|
||||
<div class="dropdown-menu" :aria-labelledby="'dropdownMenuButton' + account.id">
|
||||
<a class="dropdown-item" :href="'./accounts/edit/' + account.id"><i class="fa fas fa-pencil-alt"></i> {{ $t('firefly.edit') }}</a>
|
||||
<a class="dropdown-item" :href="'./accounts/delete/' + account.id"><i class="fa far fa-trash"></i> {{ $t('firefly.delete') }}</a>
|
||||
<a v-if="'asset' === type" class="dropdown-item" :href="'./accounts/reconcile/' + account.id"><i class="fas fa-check"></i> {{ $t('firefly.reconcile_this_account') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
-->
|
||||
|
||||
<b-table id="my-table" striped hover primary-key="id"
|
||||
:items="accounts" :fields="fields"
|
||||
:per-page="perPage"
|
||||
sort-icon-left
|
||||
ref="table"
|
||||
:current-page="currentPage"
|
||||
:busy.sync="loading"
|
||||
:sort-by.sync="sortBy"
|
||||
:sort-desc.sync="sortDesc"
|
||||
>
|
||||
<template #cell(title)="data">
|
||||
<a :href="'./accounts/show/' + data.item.id" :title="data.value">{{ data.value }}</a>
|
||||
@@ -135,13 +100,25 @@
|
||||
data.item.currency_code
|
||||
}).format(data.item.balance_diff)
|
||||
}}</span>)
|
||||
|
||||
|
||||
</span>
|
||||
</template>
|
||||
<template #cell(menu)="data">
|
||||
<div class="btn-group btn-group-sm">
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-light btn-sm dropdown-toggle" type="button" :id="'dropdownMenuButton' + data.item.id" data-toggle="dropdown"
|
||||
aria-haspopup="true" aria-expanded="false">
|
||||
{{ $t('firefly.actions') }}
|
||||
</button>
|
||||
<div class="dropdown-menu" :aria-labelledby="'dropdownMenuButton' + data.item.id">
|
||||
<a class="dropdown-item" :href="'./accounts/edit/' + data.item.id"><i class="fa fas fa-pencil-alt"></i> {{ $t('firefly.edit') }}</a>
|
||||
<a class="dropdown-item" :href="'./accounts/delete/' + data.item.id"><i class="fa far fa-trash"></i> {{ $t('firefly.delete') }}</a>
|
||||
<a v-if="'asset' === type" class="dropdown-item" :href="'./accounts/reconcile/' + data.item.id"><i class="fas fa-check"></i>
|
||||
{{ $t('firefly.reconcile_this_account') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</b-table>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<a :href="'./accounts/create/' + type" class="btn btn-success" :title="$t('firefly.create_new_' + type)">{{ $t('firefly.create_new_' + type) }}</a>
|
||||
@@ -154,11 +131,8 @@
|
||||
|
||||
<script>
|
||||
|
||||
import {createNamespacedHelpers} from "vuex";
|
||||
import {mapGetters} from "vuex";
|
||||
// import {createNamespacedHelpers}
|
||||
//const {mapState, mapGetters, mapActions, mapMutations} = createNamespacedHelpers('');
|
||||
//const {rootMapState, rootMapGetters, rootMapActions, rootMapMutations} = createNamespacedHelpers('')
|
||||
import Sortable from "sortablejs";
|
||||
|
||||
export default {
|
||||
name: "Index",
|
||||
@@ -169,29 +143,52 @@ export default {
|
||||
return {
|
||||
accounts: [],
|
||||
type: 'all',
|
||||
loading: true,
|
||||
loading: false,
|
||||
ready: false,
|
||||
fields: [],
|
||||
currentPage: 1,
|
||||
perPage: 50,
|
||||
total: 0
|
||||
perPage: 5,
|
||||
total: 0,
|
||||
sortBy: 'order',
|
||||
sortDesc: false,
|
||||
sortableOptions: {
|
||||
disabled: false,
|
||||
chosenClass: 'is-selected',
|
||||
onEnd: null
|
||||
},
|
||||
sortable: null
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
datesReady: function (value) {
|
||||
if (true === value) {
|
||||
this.getAccountList();
|
||||
}
|
||||
storeReady: function () {
|
||||
this.getAccountList();
|
||||
},
|
||||
start: function () {
|
||||
this.getAccountList();
|
||||
},
|
||||
end: function () {
|
||||
this.getAccountList();
|
||||
},
|
||||
orderMode: function (value) {
|
||||
this.updateFieldList();
|
||||
this.sortableOptions.disabled = !value;
|
||||
this.sortableOptions.onEnd = this.saveAccountSort;
|
||||
if (true === value) {
|
||||
this.reorderAccountList();
|
||||
}
|
||||
// make sortable of table:
|
||||
if (null === this.sortable) {
|
||||
this.sortable = Sortable.create(this.$refs.table.$el.querySelector('tbody'), this.sortableOptions);
|
||||
}
|
||||
this.sortable.option('disabled', this.sortableOptions.disabled);
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('', ['listPageSize']),
|
||||
...mapGetters('dashboard/index', [
|
||||
'start',
|
||||
'end',
|
||||
]),
|
||||
'datesReady': function () {
|
||||
return null !== this.start && null !== this.end && this.ready;
|
||||
...mapGetters('root', ['listPageSize']),
|
||||
...mapGetters('accounts/index', ['orderMode']),
|
||||
...mapGetters('dashboard/index', ['start', 'end',]),
|
||||
'indexReady': function () {
|
||||
return null !== this.start && null !== this.end && null !== this.listPageSize && this.ready;
|
||||
},
|
||||
cardTitle: function () {
|
||||
return this.$t('firefly.' + this.type + '_accounts');
|
||||
@@ -204,66 +201,54 @@ export default {
|
||||
|
||||
let params = new URLSearchParams(window.location.search);
|
||||
this.currentPage = params.get('page') ? parseInt(params.get('page')) : 1;
|
||||
|
||||
|
||||
// per page:
|
||||
//this.perPage = this.get
|
||||
|
||||
this.fields = [
|
||||
{
|
||||
key: 'title',
|
||||
label: this.$t('list.name'),
|
||||
sortable: true
|
||||
}
|
||||
];
|
||||
// TODO sortable handle
|
||||
// TODO menu.
|
||||
// add extra field
|
||||
if ('asset' === this.type) {
|
||||
this.fields.push(
|
||||
{
|
||||
key: 'role',
|
||||
label: this.$t('list.role'),
|
||||
sortable: true
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
// add the rest
|
||||
this.fields.push(
|
||||
{
|
||||
key: 'number',
|
||||
label: this.$t('list.iban'),
|
||||
sortable: false
|
||||
}
|
||||
);
|
||||
this.fields.push(
|
||||
{
|
||||
key: 'current_balance',
|
||||
label: this.$t('list.currentBalance'),
|
||||
sortable: true
|
||||
}
|
||||
);
|
||||
this.fields.push(
|
||||
{
|
||||
key: 'menu',
|
||||
label: ' ',
|
||||
sortable: false
|
||||
}
|
||||
);
|
||||
this.updateFieldList();
|
||||
this.ready = true;
|
||||
},
|
||||
|
||||
methods: {
|
||||
getAccountList: function () {
|
||||
this.perPage = this.listPageSize;
|
||||
this.accounts = [];
|
||||
// needs to be async so call itself again:
|
||||
this.downloadAccountList(1);
|
||||
saveAccountSort: function (event) {
|
||||
let oldIndex = parseInt(event.oldIndex);
|
||||
let newIndex = parseInt(event.newIndex);
|
||||
let identifier = parseInt(event.item.attributes.getNamedItem('data-pk').value);
|
||||
for (let i in this.accounts) {
|
||||
if (this.accounts.hasOwnProperty(i) && /^0$|^[1-9]\d*$/.test(i) && i <= 4294967294) {
|
||||
let current = this.accounts[i];
|
||||
if (current.id === identifier) {
|
||||
let newOrder = parseInt(current.order) + (newIndex - oldIndex);
|
||||
let url = './api/v1/accounts/' + current.id;
|
||||
axios.put(url, {order: newOrder}).then(response => {
|
||||
// TODO should update local account list, not refresh the whole thing.
|
||||
this.getAccountList();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
reorderAccountList() {
|
||||
this.sortBy = 'order';
|
||||
this.sortDesc = false;
|
||||
},
|
||||
updateFieldList() {
|
||||
this.fields = [];
|
||||
|
||||
this.fields = [{key: 'title', label: this.$t('list.name'), sortable: !this.orderMode}];
|
||||
if ('asset' === this.type) {
|
||||
this.fields.push({key: 'role', label: this.$t('list.role'), sortable: !this.orderMode});
|
||||
}
|
||||
// add the rest
|
||||
this.fields.push({key: 'number', label: this.$t('list.iban'), sortable: !this.orderMode});
|
||||
this.fields.push({key: 'current_balance', label: this.$t('list.currentBalance'), sortable: !this.orderMode});
|
||||
this.fields.push({key: 'menu', label: ' ', sortable: false});
|
||||
},
|
||||
getAccountList: function () {
|
||||
if (this.indexReady && !this.loading) {
|
||||
this.loading = true;
|
||||
this.perPage = this.listPageSize ?? 51;
|
||||
this.accounts = [];
|
||||
this.downloadAccountList(1);
|
||||
}
|
||||
},
|
||||
downloadAccountList(page) {
|
||||
console.log('Downloading page ' + page);
|
||||
axios.get('./api/v1/accounts?type=' + this.type + '&page=' + page)
|
||||
.then(response => {
|
||||
let currentPage = parseInt(response.data.meta.pagination.current_page);
|
||||
@@ -273,6 +258,8 @@ export default {
|
||||
if (currentPage < totalPage) {
|
||||
let nextPage = currentPage + 1;
|
||||
this.downloadAccountList(nextPage);
|
||||
} else {
|
||||
this.loading = false;
|
||||
}
|
||||
}
|
||||
);
|
||||
@@ -291,15 +278,19 @@ export default {
|
||||
if (data.hasOwnProperty(key) && /^0$|^[1-9]\d*$/.test(key) && key <= 4294967294) {
|
||||
let current = data[key];
|
||||
let acct = {};
|
||||
acct.id = current.id;
|
||||
acct.id = parseInt(current.id);
|
||||
acct.order = current.attributes.order;
|
||||
acct.title = current.attributes.name;
|
||||
acct.role = this.roleTranslate(current.attributes.account_role);
|
||||
acct.iban = current.attributes.iban;
|
||||
acct.account_number = current.attributes.account_number;
|
||||
acct.current_balance = current.attributes.current_balance;
|
||||
acct.currency_code = current.attributes.currency_code;
|
||||
acct.balance_diff = 'loading';
|
||||
|
||||
if (null !== current.attributes.iban) {
|
||||
acct.iban = current.attributes.iban.match(/.{1,4}/g).join(' ');
|
||||
}
|
||||
|
||||
|
||||
this.accounts.push(acct);
|
||||
if ('asset' === this.type) {
|
||||
|
59
frontend/src/components/accounts/IndexOptions.vue
Normal file
59
frontend/src/components/accounts/IndexOptions.vue
Normal file
@@ -0,0 +1,59 @@
|
||||
<!--
|
||||
- IndexOptions.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 v-if="'asset' === type">
|
||||
<input type="checkbox" name="order_mode" id="order_mode" v-model="orderMode"> <label for="order_mode">Enable order mode</label>
|
||||
</p>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: "IndexOptions",
|
||||
data() {
|
||||
return {
|
||||
type: 'invalid'
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
orderMode: {
|
||||
get() {
|
||||
return this.$store.getters["accounts/index/orderMode"];
|
||||
},
|
||||
set(value) {
|
||||
this.$store.commit('accounts/index/setOrderMode', value);
|
||||
}
|
||||
},
|
||||
|
||||
},
|
||||
created() {
|
||||
let pathName = window.location.pathname;
|
||||
let parts = pathName.split('/');
|
||||
this.type = parts[parts.length - 1];
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
@@ -76,9 +76,13 @@
|
||||
<script>
|
||||
|
||||
import {createNamespacedHelpers} from "vuex";
|
||||
|
||||
import Vue from "vue";
|
||||
import DatePicker from "v-calendar/lib/components/date-picker.umd";
|
||||
const {mapState, mapGetters, mapActions, mapMutations} = createNamespacedHelpers('dashboard/index')
|
||||
|
||||
|
||||
Vue.component('date-picker', DatePicker)
|
||||
|
||||
export default {
|
||||
name: "Calendar",
|
||||
created() {
|
||||
|
36
frontend/src/components/store/index.js
vendored
36
frontend/src/components/store/index.js
vendored
@@ -23,13 +23,17 @@ import Vuex, {createLogger} from 'vuex'
|
||||
import transactions_create from './modules/transactions/create';
|
||||
import transactions_edit from './modules/transactions/edit';
|
||||
import dashboard_index from './modules/dashboard/index';
|
||||
import root_store from './modules/root';
|
||||
import accounts_index from './modules/accounts/index';
|
||||
|
||||
Vue.use(Vuex)
|
||||
const debug = process.env.NODE_ENV !== 'production'
|
||||
|
||||
export default new Vuex.Store(
|
||||
{
|
||||
namespaced: true,
|
||||
modules: {
|
||||
root: root_store,
|
||||
transactions: {
|
||||
namespaced: true,
|
||||
modules: {
|
||||
@@ -37,6 +41,12 @@ export default new Vuex.Store(
|
||||
edit: transactions_edit
|
||||
}
|
||||
},
|
||||
accounts: {
|
||||
namespaced: true,
|
||||
modules: {
|
||||
index: accounts_index
|
||||
},
|
||||
},
|
||||
dashboard: {
|
||||
namespaced: true,
|
||||
modules: {
|
||||
@@ -53,18 +63,15 @@ export default new Vuex.Store(
|
||||
},
|
||||
mutations: {
|
||||
setCurrencyPreference(state, payload) {
|
||||
//console.log('setCurrencyPreference', payload);
|
||||
state.currencyPreference = payload.payload;
|
||||
},
|
||||
setListPageSizePreference(state, payload) {
|
||||
state.listPageSize = payload.length;
|
||||
},
|
||||
initialiseStore(state) {
|
||||
// if locale in local storage:
|
||||
if (localStorage.locale) {
|
||||
state.locale = localStorage.locale;
|
||||
return;
|
||||
}
|
||||
|
||||
// set locale from HTML:
|
||||
let localeToken = document.head.querySelector('meta[name="locale"]');
|
||||
if (localeToken) {
|
||||
@@ -85,29 +92,12 @@ export default new Vuex.Store(
|
||||
},
|
||||
locale: state => {
|
||||
return state.locale;
|
||||
}
|
||||
},
|
||||
listPageSize: state => {
|
||||
return state.listPageSize
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
updateListPageSizePreference: function (context) {
|
||||
if (localStorage.listPageSize) {
|
||||
context.commit('updateListPageSizePreference', {payload: JSON.parse(localStorage.listPageSize)});
|
||||
return;
|
||||
}
|
||||
axios.get('./api/v1/preferences/listPageSize')
|
||||
.then(response => {
|
||||
console.log('listPageSize is ' + parseInt(response.data.data.attributes.data));
|
||||
context.commit('setListPageSizePreference', {length: parseInt(response.data.data.attributes.data)});
|
||||
}
|
||||
);
|
||||
},
|
||||
|
||||
updateCurrencyPreference(context) {
|
||||
if (localStorage.currencyPreference) {
|
||||
//console.log('set from local storage.');
|
||||
//console.log(localStorage.currencyPreference);
|
||||
//console.log({payload: JSON.parse(localStorage.currencyPreference)});
|
||||
context.commit('setCurrencyPreference', {payload: JSON.parse(localStorage.currencyPreference)});
|
||||
return;
|
||||
}
|
||||
|
52
frontend/src/components/store/modules/accounts/index.js
vendored
Normal file
52
frontend/src/components/store/modules/accounts/index.js
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* index.js
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
// initial state
|
||||
const state = () => (
|
||||
{
|
||||
orderMode: false
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
// getters
|
||||
const getters = {
|
||||
orderMode: state => {
|
||||
return state.orderMode;
|
||||
},
|
||||
}
|
||||
|
||||
// actions
|
||||
const actions = {}
|
||||
|
||||
// mutations
|
||||
const mutations = {
|
||||
setOrderMode(state, payload) {
|
||||
state.orderMode = payload;
|
||||
},
|
||||
}
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state,
|
||||
getters,
|
||||
actions,
|
||||
mutations
|
||||
}
|
79
frontend/src/components/store/modules/root.js
vendored
Normal file
79
frontend/src/components/store/modules/root.js
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
* root.js
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
// initial state
|
||||
const state = () => (
|
||||
{
|
||||
listPageSize: 33,
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
// getters
|
||||
const getters = {
|
||||
listPageSize: state => {
|
||||
// console.log('Wil return ' + state.listPageSize);
|
||||
return state.listPageSize;
|
||||
},
|
||||
}
|
||||
|
||||
// actions
|
||||
const actions = {
|
||||
initialiseStore(context) {
|
||||
// console.log('Now in root initialiseStore');
|
||||
// if list length in local storage:
|
||||
if (localStorage.listPageSize) {
|
||||
// console.log('listPageSize is in localStorage')
|
||||
// console.log('Init list page size with value ');
|
||||
// console.log(localStorage.listPageSize);
|
||||
state.listPageSize = localStorage.listPageSize;
|
||||
context.commit('setListPageSize', {length: localStorage.listPageSize});
|
||||
}
|
||||
if (!localStorage.listPageSize) {
|
||||
axios.get('./api/v1/preferences/listPageSize')
|
||||
.then(response => {
|
||||
// console.log('from API: listPageSize is ' + parseInt(response.data.data.attributes.data));
|
||||
context.commit('setListPageSize', {length: parseInt(response.data.data.attributes.data)});
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// mutations
|
||||
const mutations = {
|
||||
setListPageSize(state, payload) {
|
||||
// console.log('Got a payload in setListPageSize');
|
||||
// console.log(payload);
|
||||
let number = parseInt(payload.length);
|
||||
if (0 !== number) {
|
||||
state.listPageSize = number;
|
||||
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state,
|
||||
getters,
|
||||
actions,
|
||||
mutations
|
||||
}
|
@@ -66,6 +66,8 @@
|
||||
"monthly_budgets": "\u041c\u0435\u0441\u0435\u0447\u043d\u0438 \u0431\u044e\u0434\u0436\u0435\u0442\u0438",
|
||||
"quarterly_budgets": "\u0422\u0440\u0438\u043c\u0435\u0441\u0435\u0447\u043d\u0438 \u0431\u044e\u0434\u0436\u0435\u0442\u0438",
|
||||
"create_new_expense": "\u0421\u044a\u0437\u0434\u0430\u0439 \u043d\u043e\u0432\u0430 \u0441\u043c\u0435\u0442\u043a\u0430 \u0437\u0430 \u0440\u0430\u0437\u0445\u043e\u0434\u0438",
|
||||
"create_new_revenue": "\u0421\u044a\u0437\u0434\u0430\u0439 \u043d\u043e\u0432\u0430 \u0441\u043c\u0435\u0442\u043a\u0430 \u0437\u0430 \u043f\u0440\u0438\u0445\u043e\u0434\u0438",
|
||||
"create_new_liabilities": "Create new liability",
|
||||
"half_year_budgets": "\u0428\u0435\u0441\u0442\u043c\u0435\u0441\u0435\u0447\u043d\u0438 \u0431\u044e\u0434\u0436\u0435\u0442\u0438",
|
||||
"yearly_budgets": "\u0413\u043e\u0434\u0438\u0448\u043d\u0438 \u0431\u044e\u0434\u0436\u0435\u0442\u0438",
|
||||
"split_transaction_title": "\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043d\u0430 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0430 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f",
|
||||
|
@@ -66,6 +66,8 @@
|
||||
"monthly_budgets": "Monthly budgets",
|
||||
"quarterly_budgets": "Quarterly budgets",
|
||||
"create_new_expense": "Vytvo\u0159it v\u00fddajov\u00fd \u00fa\u010det",
|
||||
"create_new_revenue": "Vytvo\u0159it nov\u00fd p\u0159\u00edjmov\u00fd \u00fa\u010det",
|
||||
"create_new_liabilities": "Create new liability",
|
||||
"half_year_budgets": "Half-yearly budgets",
|
||||
"yearly_budgets": "Yearly budgets",
|
||||
"split_transaction_title": "Popis roz\u00fa\u010dtov\u00e1n\u00ed",
|
||||
|
@@ -66,6 +66,8 @@
|
||||
"monthly_budgets": "Monatsbudgets",
|
||||
"quarterly_budgets": "Quartalsbudgets",
|
||||
"create_new_expense": "Neues Ausgabenkonto erstellen",
|
||||
"create_new_revenue": "Neues Einnahmenkonto erstellen",
|
||||
"create_new_liabilities": "Create new liability",
|
||||
"half_year_budgets": "Halbjahresbudgets",
|
||||
"yearly_budgets": "Jahresbudgets",
|
||||
"split_transaction_title": "Beschreibung der Splittbuchung",
|
||||
|
@@ -66,6 +66,8 @@
|
||||
"monthly_budgets": "\u039c\u03b7\u03bd\u03b9\u03b1\u03af\u03bf\u03b9 \u03c0\u03c1\u03bf\u03cb\u03c0\u03bf\u03bb\u03bf\u03b3\u03b9\u03c3\u03bc\u03bf\u03af",
|
||||
"quarterly_budgets": "\u03a4\u03c1\u03b9\u03bc\u03b7\u03bd\u03b9\u03b1\u03af\u03bf\u03b9 \u03c0\u03c1\u03bf\u03cb\u03c0\u03bf\u03bb\u03bf\u03b3\u03b9\u03c3\u03bc\u03bf\u03af",
|
||||
"create_new_expense": "\u0394\u03b7\u03bc\u03b9\u03bf\u03c5\u03c1\u03b3\u03af\u03b1 \u03bd\u03ad\u03bf\u03c5 \u03bb\u03bf\u03b3\u03b1\u03c1\u03b9\u03b1\u03c3\u03bc\u03bf\u03cd \u03b4\u03b1\u03c0\u03b1\u03bd\u03ce\u03bd",
|
||||
"create_new_revenue": "\u0394\u03b7\u03bc\u03b9\u03bf\u03c5\u03c1\u03b3\u03af\u03b1 \u03bd\u03ad\u03bf\u03c5 \u03bb\u03bf\u03b3\u03b1\u03c1\u03b9\u03b1\u03c3\u03bc\u03bf\u03cd \u03b5\u03c3\u03cc\u03b4\u03c9\u03bd",
|
||||
"create_new_liabilities": "Create new liability",
|
||||
"half_year_budgets": "\u0395\u03be\u03b1\u03bc\u03b7\u03bd\u03b9\u03b1\u03af\u03bf\u03b9 \u03c0\u03c1\u03bf\u03cb\u03c0\u03bf\u03bb\u03bf\u03b3\u03b9\u03c3\u03bc\u03bf\u03af",
|
||||
"yearly_budgets": "\u0395\u03c4\u03ae\u03c3\u03b9\u03bf\u03b9 \u03c0\u03c1\u03bf\u03cb\u03c0\u03bf\u03bb\u03bf\u03b3\u03b9\u03c3\u03bc\u03bf\u03af",
|
||||
"split_transaction_title": "\u03a0\u03b5\u03c1\u03b9\u03b3\u03c1\u03b1\u03c6\u03ae \u03c4\u03b7\u03c2 \u03c3\u03c5\u03bd\u03b1\u03bb\u03bb\u03b1\u03b3\u03ae\u03c2 \u03bc\u03b5 \u03b4\u03b9\u03b1\u03c7\u03c9\u03c1\u03b9\u03c3\u03bc\u03cc",
|
||||
|
@@ -66,6 +66,8 @@
|
||||
"monthly_budgets": "Monthly budgets",
|
||||
"quarterly_budgets": "Quarterly budgets",
|
||||
"create_new_expense": "Create new expense account",
|
||||
"create_new_revenue": "Create new revenue account",
|
||||
"create_new_liabilities": "Create new liability",
|
||||
"half_year_budgets": "Half-yearly budgets",
|
||||
"yearly_budgets": "Yearly budgets",
|
||||
"split_transaction_title": "Description of the split transaction",
|
||||
|
@@ -66,6 +66,8 @@
|
||||
"monthly_budgets": "Monthly budgets",
|
||||
"quarterly_budgets": "Quarterly budgets",
|
||||
"create_new_expense": "Create new expense account",
|
||||
"create_new_revenue": "Create new revenue account",
|
||||
"create_new_liabilities": "Create new liability",
|
||||
"half_year_budgets": "Half-yearly budgets",
|
||||
"yearly_budgets": "Yearly budgets",
|
||||
"split_transaction_title": "Description of the split transaction",
|
||||
|
@@ -66,6 +66,8 @@
|
||||
"monthly_budgets": "Presupuestos mensuales",
|
||||
"quarterly_budgets": "Presupuestos trimestrales",
|
||||
"create_new_expense": "Crear nueva cuenta de gastos",
|
||||
"create_new_revenue": "Crear nueva cuenta de ingresos",
|
||||
"create_new_liabilities": "Create new liability",
|
||||
"half_year_budgets": "Presupuestos semestrales",
|
||||
"yearly_budgets": "Presupuestos anuales",
|
||||
"split_transaction_title": "Descripci\u00f3n de la transacci\u00f3n dividida",
|
||||
|
@@ -66,6 +66,8 @@
|
||||
"monthly_budgets": "Monthly budgets",
|
||||
"quarterly_budgets": "Quarterly budgets",
|
||||
"create_new_expense": "Luo uusi maksutili",
|
||||
"create_new_revenue": "Luo uusi tuottotili",
|
||||
"create_new_liabilities": "Create new liability",
|
||||
"half_year_budgets": "Half-yearly budgets",
|
||||
"yearly_budgets": "Yearly budgets",
|
||||
"split_transaction_title": "Jaetun tapahtuman kuvaus",
|
||||
|
@@ -66,6 +66,8 @@
|
||||
"monthly_budgets": "Budgets mensuels",
|
||||
"quarterly_budgets": "Budgets trimestriels",
|
||||
"create_new_expense": "Cr\u00e9er nouveau compte de d\u00e9penses",
|
||||
"create_new_revenue": "Cr\u00e9er nouveau compte de recettes",
|
||||
"create_new_liabilities": "Create new liability",
|
||||
"half_year_budgets": "Budgets semestriels",
|
||||
"yearly_budgets": "Budgets annuels",
|
||||
"split_transaction_title": "Description de l'op\u00e9ration ventil\u00e9e",
|
||||
|
@@ -66,6 +66,8 @@
|
||||
"monthly_budgets": "Monthly budgets",
|
||||
"quarterly_budgets": "Quarterly budgets",
|
||||
"create_new_expense": "\u00daj k\u00f6lts\u00e9gsz\u00e1mla l\u00e9trehoz\u00e1sa",
|
||||
"create_new_revenue": "\u00daj j\u00f6vedelemsz\u00e1mla l\u00e9trehoz\u00e1sa",
|
||||
"create_new_liabilities": "Create new liability",
|
||||
"half_year_budgets": "Half-yearly budgets",
|
||||
"yearly_budgets": "Yearly budgets",
|
||||
"split_transaction_title": "Felosztott tranzakci\u00f3 le\u00edr\u00e1sa",
|
||||
|
@@ -66,6 +66,8 @@
|
||||
"monthly_budgets": "Budget mensili",
|
||||
"quarterly_budgets": "Bilanci trimestrali",
|
||||
"create_new_expense": "Crea un nuovo conto di spesa",
|
||||
"create_new_revenue": "Crea un nuovo conto entrate",
|
||||
"create_new_liabilities": "Create new liability",
|
||||
"half_year_budgets": "Bilanci semestrali",
|
||||
"yearly_budgets": "Budget annuali",
|
||||
"split_transaction_title": "Descrizione della transazione suddivisa",
|
||||
|
@@ -66,6 +66,8 @@
|
||||
"monthly_budgets": "Monthly budgets",
|
||||
"quarterly_budgets": "Quarterly budgets",
|
||||
"create_new_expense": "Opprett ny utgiftskonto",
|
||||
"create_new_revenue": "Opprett ny inntektskonto",
|
||||
"create_new_liabilities": "Create new liability",
|
||||
"half_year_budgets": "Half-yearly budgets",
|
||||
"yearly_budgets": "Yearly budgets",
|
||||
"split_transaction_title": "Description of the split transaction",
|
||||
|
@@ -66,6 +66,8 @@
|
||||
"monthly_budgets": "Maandelijkse budgetten",
|
||||
"quarterly_budgets": "Driemaandelijkse budgetten",
|
||||
"create_new_expense": "Nieuwe crediteur",
|
||||
"create_new_revenue": "Nieuwe debiteur",
|
||||
"create_new_liabilities": "Create new liability",
|
||||
"half_year_budgets": "Halfjaarlijkse budgetten",
|
||||
"yearly_budgets": "Jaarlijkse budgetten",
|
||||
"split_transaction_title": "Beschrijving van de gesplitste transactie",
|
||||
|
@@ -66,6 +66,8 @@
|
||||
"monthly_budgets": "Bud\u017cety miesi\u0119czne",
|
||||
"quarterly_budgets": "Bud\u017cety kwartalne",
|
||||
"create_new_expense": "Utw\u00f3rz nowe konto wydatk\u00f3w",
|
||||
"create_new_revenue": "Utw\u00f3rz nowe konto przychod\u00f3w",
|
||||
"create_new_liabilities": "Create new liability",
|
||||
"half_year_budgets": "Bud\u017cety p\u00f3\u0142roczne",
|
||||
"yearly_budgets": "Bud\u017cety roczne",
|
||||
"split_transaction_title": "Opis podzielonej transakcji",
|
||||
|
@@ -66,6 +66,8 @@
|
||||
"monthly_budgets": "Or\u00e7amentos mensais",
|
||||
"quarterly_budgets": "Or\u00e7amentos trimestrais",
|
||||
"create_new_expense": "Criar nova conta de despesa",
|
||||
"create_new_revenue": "Criar nova conta de receita",
|
||||
"create_new_liabilities": "Create new liability",
|
||||
"half_year_budgets": "Or\u00e7amentos semestrais",
|
||||
"yearly_budgets": "Or\u00e7amentos anuais",
|
||||
"split_transaction_title": "Descri\u00e7\u00e3o da transa\u00e7\u00e3o dividida",
|
||||
|
@@ -66,6 +66,8 @@
|
||||
"monthly_budgets": "Or\u00e7amento mensal",
|
||||
"quarterly_budgets": "Or\u00e7amento trimestral",
|
||||
"create_new_expense": "Criar nova conta de despesas",
|
||||
"create_new_revenue": "Criar nova conta de receitas",
|
||||
"create_new_liabilities": "Create new liability",
|
||||
"half_year_budgets": "Or\u00e7amento semestral",
|
||||
"yearly_budgets": "Or\u00e7amento anual",
|
||||
"split_transaction_title": "Descri\u00e7\u00e3o da transac\u00e7\u00e3o dividida",
|
||||
|
@@ -66,6 +66,8 @@
|
||||
"monthly_budgets": "Monthly budgets",
|
||||
"quarterly_budgets": "Quarterly budgets",
|
||||
"create_new_expense": "Crea\u021bi un nou cont de cheltuieli",
|
||||
"create_new_revenue": "Crea\u021bi un nou cont de venituri",
|
||||
"create_new_liabilities": "Create new liability",
|
||||
"half_year_budgets": "Half-yearly budgets",
|
||||
"yearly_budgets": "Yearly budgets",
|
||||
"split_transaction_title": "Descrierea tranzac\u021biei divizate",
|
||||
|
@@ -66,6 +66,8 @@
|
||||
"monthly_budgets": "\u0411\u044e\u0434\u0436\u0435\u0442\u044b \u043d\u0430 \u043c\u0435\u0441\u044f\u0446",
|
||||
"quarterly_budgets": "\u0411\u044e\u0434\u0436\u0435\u0442\u044b \u043d\u0430 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
|
||||
"create_new_expense": "\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0441\u0447\u0451\u0442 \u0440\u0430\u0441\u0445\u043e\u0434\u0430",
|
||||
"create_new_revenue": "\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0441\u0447\u0451\u0442 \u0434\u043e\u0445\u043e\u0434\u0430",
|
||||
"create_new_liabilities": "Create new liability",
|
||||
"half_year_budgets": "\u0411\u044e\u0434\u0436\u0435\u0442\u044b \u043d\u0430 \u043f\u043e\u043b\u0433\u043e\u0434\u0430",
|
||||
"yearly_budgets": "\u0413\u043e\u0434\u043e\u0432\u044b\u0435 \u0431\u044e\u0434\u0436\u0435\u0442\u044b",
|
||||
"split_transaction_title": "\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0439 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438",
|
||||
|
@@ -66,6 +66,8 @@
|
||||
"monthly_budgets": "Mesa\u010dn\u00e9 rozpo\u010dty",
|
||||
"quarterly_budgets": "\u0160tvr\u0165ro\u010dn\u00e9 rozpo\u010dty",
|
||||
"create_new_expense": "Vytvori\u0165 v\u00fddavko\u00fd \u00fa\u010det",
|
||||
"create_new_revenue": "Vytvori\u0165 nov\u00fd pr\u00edjmov\u00fd \u00fa\u010det",
|
||||
"create_new_liabilities": "Create new liability",
|
||||
"half_year_budgets": "Polro\u010dn\u00e9 rozpo\u010dty",
|
||||
"yearly_budgets": "Ro\u010dn\u00e9 rozpo\u010dty",
|
||||
"split_transaction_title": "Popis roz\u00fa\u010dtovania",
|
||||
|
@@ -66,6 +66,8 @@
|
||||
"monthly_budgets": "M\u00e5natliga budgetar",
|
||||
"quarterly_budgets": "Kvartalsbudgetar",
|
||||
"create_new_expense": "Skapa ett nytt utgiftskonto",
|
||||
"create_new_revenue": "Skapa ett nytt int\u00e4ktskonto",
|
||||
"create_new_liabilities": "Create new liability",
|
||||
"half_year_budgets": "Halv\u00e5rsbudgetar",
|
||||
"yearly_budgets": "\u00c5rliga budgetar",
|
||||
"split_transaction_title": "Beskrivning av delad transaktion",
|
||||
|
@@ -66,6 +66,8 @@
|
||||
"monthly_budgets": "Monthly budgets",
|
||||
"quarterly_budgets": "Quarterly budgets",
|
||||
"create_new_expense": "T\u1ea1o t\u00e0i kho\u1ea3n chi ph\u00ed m\u1edbi",
|
||||
"create_new_revenue": "T\u1ea1o t\u00e0i kho\u1ea3n doanh thu m\u1edbi",
|
||||
"create_new_liabilities": "Create new liability",
|
||||
"half_year_budgets": "Half-yearly budgets",
|
||||
"yearly_budgets": "Yearly budgets",
|
||||
"split_transaction_title": "M\u00f4 t\u1ea3 giao d\u1ecbch t\u00e1ch",
|
||||
|
@@ -66,6 +66,8 @@
|
||||
"monthly_budgets": "\u6bcf\u6708\u9884\u7b97",
|
||||
"quarterly_budgets": "\u6bcf\u5b63\u5ea6\u9884\u7b97",
|
||||
"create_new_expense": "\u521b\u5efa\u65b0\u652f\u51fa\u8d26\u6237",
|
||||
"create_new_revenue": "\u521b\u5efa\u65b0\u6536\u5165\u8d26\u6237",
|
||||
"create_new_liabilities": "Create new liability",
|
||||
"half_year_budgets": "\u6bcf\u534a\u5e74\u9884\u7b97",
|
||||
"yearly_budgets": "\u6bcf\u5e74\u9884\u7b97",
|
||||
"split_transaction_title": "\u62c6\u5206\u4ea4\u6613\u7684\u63cf\u8ff0",
|
||||
|
@@ -66,6 +66,8 @@
|
||||
"monthly_budgets": "Monthly budgets",
|
||||
"quarterly_budgets": "Quarterly budgets",
|
||||
"create_new_expense": "\u5efa\u7acb\u65b0\u652f\u51fa\u5e33\u6236",
|
||||
"create_new_revenue": "\u5efa\u7acb\u65b0\u6536\u5165\u5e33\u6236",
|
||||
"create_new_liabilities": "Create new liability",
|
||||
"half_year_budgets": "Half-yearly budgets",
|
||||
"yearly_budgets": "Yearly budgets",
|
||||
"split_transaction_title": "\u62c6\u5206\u4ea4\u6613\u7684\u63cf\u8ff0",
|
||||
|
38
frontend/src/pages/accounts/index.js
vendored
38
frontend/src/pages/accounts/index.js
vendored
@@ -17,23 +17,23 @@
|
||||
* 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/accounts/Index";
|
||||
import store from "../../components/store";
|
||||
import {BTable, BPagination} from 'bootstrap-vue';
|
||||
|
||||
require('../../bootstrap');
|
||||
import {BPagination, BTable} from 'bootstrap-vue';
|
||||
import Calendar from "../../components/dashboard/Calendar";
|
||||
import IndexOptions from "../../components/accounts/IndexOptions";
|
||||
//import Vuex from "vuex";
|
||||
|
||||
// i18n
|
||||
let i18n = require('../../i18n');
|
||||
|
||||
let props = {};
|
||||
|
||||
|
||||
Vue.component('b-table', BTable);
|
||||
Vue.component('b-pagination', BPagination);
|
||||
|
||||
//Vue.use(Vuex);
|
||||
|
||||
new Vue({
|
||||
i18n,
|
||||
@@ -43,10 +43,34 @@ new Vue({
|
||||
return createElement(Index, {props: props});
|
||||
},
|
||||
beforeCreate() {
|
||||
// init the old root store (TODO remove me)
|
||||
this.$store.commit('initialiseStore');
|
||||
this.$store.dispatch('updateCurrencyPreference');
|
||||
this.$store.dispatch('updateListPageSizePreference');
|
||||
|
||||
// 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');
|
||||
},
|
||||
});
|
||||
|
||||
new Vue({
|
||||
i18n,
|
||||
store,
|
||||
el: "#calendar",
|
||||
render: (createElement) => {
|
||||
return createElement(Calendar, {props: props});
|
||||
},
|
||||
// TODO init store as well?
|
||||
});
|
||||
|
||||
new Vue({
|
||||
i18n,
|
||||
store,
|
||||
el: "#indexOptions",
|
||||
render: (createElement) => {
|
||||
return createElement(IndexOptions, {props: props});
|
||||
},
|
||||
// TODO init store as well?
|
||||
});
|
3
frontend/src/pages/dashboard.js
vendored
3
frontend/src/pages/dashboard.js
vendored
@@ -30,7 +30,6 @@ import MainPiggyList from "../components/dashboard/MainPiggyList";
|
||||
import TransactionListLarge from "../components/transactions/TransactionListLarge";
|
||||
import TransactionListMedium from "../components/transactions/TransactionListMedium";
|
||||
import TransactionListSmall from "../components/transactions/TransactionListSmall";
|
||||
import DatePicker from 'v-calendar/lib/components/date-picker.umd'
|
||||
import Calendar from "../components/dashboard/Calendar";
|
||||
import MainCategoryList from "../components/dashboard/MainCategoryList";
|
||||
import Vue from "vue";
|
||||
@@ -51,7 +50,7 @@ Vue.component('transaction-list-medium', TransactionListMedium);
|
||||
Vue.component('transaction-list-small', TransactionListSmall);
|
||||
|
||||
// components as an example
|
||||
Vue.component('date-picker', DatePicker)
|
||||
|
||||
Vue.component('dashboard', Dashboard);
|
||||
Vue.component('top-boxes', TopBoxes);
|
||||
Vue.component('main-account', MainAccount);
|
||||
|
Reference in New Issue
Block a user