mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Rebuild + some placeholders.
This commit is contained in:
parent
3e31752a8f
commit
1f176c93d5
@ -261,23 +261,23 @@ export default {
|
||||
this.ready = true;
|
||||
|
||||
// make object thing:
|
||||
let token = document.head.querySelector('meta[name="csrf-token"]');
|
||||
this.api = setup(
|
||||
{
|
||||
// `axios` options
|
||||
//baseURL: './',
|
||||
headers: {'X-CSRF-TOKEN': token.content, 'X-James': 'yes'},
|
||||
|
||||
// `axios-cache-adapter` options
|
||||
cache: {
|
||||
maxAge: 15 * 60 * 1000,
|
||||
readHeaders: false,
|
||||
exclude: {
|
||||
query: false,
|
||||
},
|
||||
debug: true
|
||||
}
|
||||
});
|
||||
// let token = document.head.querySelector('meta[name="csrf-token"]');
|
||||
// this.api = setup(
|
||||
// {
|
||||
// // `axios` options
|
||||
// //baseURL: './',
|
||||
// headers: {'X-CSRF-TOKEN': token.content, 'X-James': 'yes'},
|
||||
//
|
||||
// // `axios-cache-adapter` options
|
||||
// cache: {
|
||||
// maxAge: 15 * 60 * 1000,
|
||||
// readHeaders: false,
|
||||
// exclude: {
|
||||
// query: false,
|
||||
// },
|
||||
// debug: true
|
||||
// }
|
||||
// });
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
@ -46,7 +46,7 @@
|
||||
></b-pagination>
|
||||
</div>
|
||||
<div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
|
||||
(refresh)
|
||||
<button @click="newCacheKey" class="btn btn-sm float-right btn-info"><span class="fas fa-sync"></span></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
@ -136,14 +136,13 @@
|
||||
<div class="card-footer">
|
||||
<a :href="'./transactions/create/' + type" class="btn btn-success"
|
||||
:title="$t('firefly.create_new_transaction')">{{ $t('firefly.create_new_transaction') }}</a>
|
||||
<a href="#" class="btn btn-info"><span class="fas fa-sync"></span></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
Box previous period
|
||||
Box previous periods
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -158,7 +157,7 @@
|
||||
></b-pagination>
|
||||
</div>
|
||||
<div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
|
||||
(refresh)
|
||||
<button @click="newCacheKey" class="btn btn-sm float-right btn-info"><span class="fas fa-sync"></span></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -166,9 +165,8 @@
|
||||
|
||||
<script>
|
||||
|
||||
import {mapGetters} from "vuex";
|
||||
import {mapGetters, mapMutations} from "vuex";
|
||||
import format from "date-fns/format";
|
||||
import {setup} from 'axios-cache-adapter';
|
||||
import {configureAxios} from "../../shared/forageStore";
|
||||
|
||||
export default {
|
||||
@ -211,7 +209,7 @@ export default {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('root', ['listPageSize']),
|
||||
...mapGetters('root', ['listPageSize', 'cacheKey']),
|
||||
...mapGetters('dashboard/index', ['start', 'end',]),
|
||||
'indexReady': function () {
|
||||
return null !== this.start && null !== this.end && null !== this.listPageSize && this.ready;
|
||||
@ -233,25 +231,26 @@ export default {
|
||||
this.ready = true;
|
||||
|
||||
// make object thing:
|
||||
let token = document.head.querySelector('meta[name="csrf-token"]');
|
||||
this.api = setup(
|
||||
{
|
||||
// `axios` options
|
||||
//baseURL: './',
|
||||
headers: {'X-CSRF-TOKEN': token.content, 'X-James': 'yes'},
|
||||
|
||||
// `axios-cache-adapter` options
|
||||
cache: {
|
||||
maxAge: 15 * 60 * 1000,
|
||||
readHeaders: false,
|
||||
exclude: {
|
||||
query: false,
|
||||
},
|
||||
debug: true
|
||||
}
|
||||
});
|
||||
// let token = document.head.querySelector('meta[name="csrf-token"]');
|
||||
// this.api = setup(
|
||||
// {
|
||||
// // `axios` options
|
||||
// //baseURL: './',
|
||||
// headers: {'X-CSRF-TOKEN': token.content, 'X-James': 'yes'},
|
||||
//
|
||||
// // `axios-cache-adapter` options
|
||||
// cache: {
|
||||
// maxAge: 15 * 60 * 1000,
|
||||
// readHeaders: false,
|
||||
// exclude: {
|
||||
// query: false,
|
||||
// },
|
||||
// debug: true
|
||||
// }
|
||||
// });
|
||||
},
|
||||
methods: {
|
||||
...mapMutations('root', ['refreshCacheKey',]),
|
||||
updateFieldList: function () {
|
||||
this.fields = [
|
||||
{key: 'type', label: ' ', sortable: false},
|
||||
@ -264,6 +263,12 @@ export default {
|
||||
{key: 'menu', label: ' ', sortable: false},
|
||||
];
|
||||
},
|
||||
newCacheKey: function () {
|
||||
this.refreshCacheKey();
|
||||
this.downloaded = false;
|
||||
this.accounts = [];
|
||||
this.getTransactionList();
|
||||
},
|
||||
getTransactionList: function () {
|
||||
console.log('getTransactionList()');
|
||||
if (this.indexReady && !this.loading && !this.downloaded) {
|
||||
@ -280,7 +285,7 @@ export default {
|
||||
configureAxios().then(async (api) => {
|
||||
let startStr = format(this.start, 'y-MM-dd');
|
||||
let endStr = format(this.end, 'y-MM-dd');
|
||||
api.get('./api/v1/transactions?type=' + this.type + '&page=' + page + "&start=" + startStr + "&end=" + endStr)
|
||||
api.get('./api/v1/transactions?type=' + this.type + '&page=' + page + "&start=" + startStr + "&end=" + endStr + '&cache=' + this.cacheKey)
|
||||
.then(response => {
|
||||
|
||||
//let currentPage = parseInt(response.data.meta.pagination.current_page);
|
||||
|
8
public/v2/css/app.css
vendored
8
public/v2/css/app.css
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
public/v2/js/accounts/create.js
vendored
2
public/v2/js/accounts/create.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
public/v2/js/accounts/delete.js
vendored
2
public/v2/js/accounts/delete.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
public/v2/js/accounts/index.js
vendored
2
public/v2/js/accounts/index.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
public/v2/js/accounts/show.js
vendored
2
public/v2/js/accounts/show.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
public/v2/js/budgets/index.js
vendored
2
public/v2/js/budgets/index.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
public/v2/js/dashboard.js
vendored
2
public/v2/js/dashboard.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
public/v2/js/transactions/create.js
vendored
2
public/v2/js/transactions/create.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
public/v2/js/transactions/edit.js
vendored
2
public/v2/js/transactions/edit.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
public/v2/js/transactions/index.js
vendored
2
public/v2/js/transactions/index.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
public/v2/js/vendor.js
vendored
2
public/v2/js/vendor.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user