Sortable account list.

This commit is contained in:
James Cole
2021-03-27 10:19:22 +01:00
parent fbed65d464
commit 381b09d68b
50 changed files with 485 additions and 212 deletions

View File

@@ -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?
});

View File

@@ -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);