mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-21 18:51:21 +00:00
Fix #4988
This commit is contained in:
@@ -279,8 +279,8 @@ export default {
|
|||||||
// console.log('end of finaliseSubmission');
|
// console.log('end of finaliseSubmission');
|
||||||
},
|
},
|
||||||
handleSubmissionError: function (errors) {
|
handleSubmissionError: function (errors) {
|
||||||
console.log('Bad');
|
console.error('Bad');
|
||||||
console.log(errors);
|
console.error(errors);
|
||||||
this.inError = true;
|
this.inError = true;
|
||||||
this.submitting = false;
|
this.submitting = false;
|
||||||
this.errors = lodashClonedeep(this.defaultErrors);
|
this.errors = lodashClonedeep(this.defaultErrors);
|
||||||
@@ -320,12 +320,12 @@ export default {
|
|||||||
this.parseAccount(response.data);
|
this.parseAccount(response.data);
|
||||||
}
|
}
|
||||||
).catch(error => {
|
).catch(error => {
|
||||||
console.log('I failed :(');
|
console.error('I failed :(');
|
||||||
console.log(error);
|
console.error(error);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
storeField: function (payload) {
|
storeField: function (payload) {
|
||||||
console.log(payload);
|
//console.log(payload);
|
||||||
if ('location' === payload.field) {
|
if ('location' === payload.field) {
|
||||||
if (true === payload.value.hasMarker) {
|
if (true === payload.value.hasMarker) {
|
||||||
this.account.location = payload.value;
|
this.account.location = payload.value;
|
||||||
|
|||||||
@@ -55,15 +55,13 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<TransactionListLarge
|
<TransactionListLarge
|
||||||
:transactions="transactions"
|
:entries="rawTransactions"
|
||||||
:current-page="currentPage"
|
:page="currentPage"
|
||||||
:total="total"
|
:total="total"
|
||||||
:per-page="perPage"
|
:per-page="perPage"
|
||||||
:loading="loading"
|
|
||||||
:sort-desc="sortDesc"
|
:sort-desc="sortDesc"
|
||||||
:account-id="accountId"
|
v-on:jump-page="jumpToPage($event)"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-12 col-md-6 col-sm-12 col-xs-12">
|
<div class="col-lg-12 col-md-6 col-sm-12 col-xs-12">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
@@ -85,6 +83,7 @@
|
|||||||
import TransactionListLarge from "../transactions/TransactionListLarge";
|
import TransactionListLarge from "../transactions/TransactionListLarge";
|
||||||
import format from "date-fns/format";
|
import format from "date-fns/format";
|
||||||
import {mapGetters} from "vuex";
|
import {mapGetters} from "vuex";
|
||||||
|
import {configureAxios} from "../../shared/forageStore";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Show",
|
name: "Show",
|
||||||
@@ -98,14 +97,15 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
accountId: 0,
|
accountId: 0,
|
||||||
transactions: [],
|
rawTransactions: [],
|
||||||
ready: false,
|
ready: false,
|
||||||
loading: true,
|
loading: false,
|
||||||
total: 0,
|
total: 0,
|
||||||
sortDesc: false,
|
sortDesc: false,
|
||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
perPage: 51,
|
perPage: 51,
|
||||||
locale: 'en-US'
|
locale: 'en-US',
|
||||||
|
api: null,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@@ -121,19 +121,34 @@ export default {
|
|||||||
components: {TransactionListLarge},
|
components: {TransactionListLarge},
|
||||||
methods: {
|
methods: {
|
||||||
getTransactions: function () {
|
getTransactions: function () {
|
||||||
console.log('goooooo');
|
if (this.showReady && !this.loading) {
|
||||||
if (this.showReady) {
|
this.loading = true;
|
||||||
|
configureAxios().then(async (api) => {
|
||||||
|
// console.log('Now getTransactions() x Start');
|
||||||
let startStr = format(this.start, 'y-MM-dd');
|
let startStr = format(this.start, 'y-MM-dd');
|
||||||
let endStr = format(this.end, 'y-MM-dd');
|
let endStr = format(this.end, 'y-MM-dd');
|
||||||
axios.get('./api/v1/accounts/' + this.accountId + '/transactions?page=1&limit=' + this.perPage + '&start=' + startStr + '&end=' + endStr)
|
this.rawTransactions = [];
|
||||||
|
|
||||||
|
let url = './api/v1/accounts/' + this.accountId + '/transactions?page=1&limit=' + this.perPage + '&start=' + startStr + '&end=' + endStr;
|
||||||
|
|
||||||
|
|
||||||
|
api.get(url)
|
||||||
.then(response => {
|
.then(response => {
|
||||||
this.transactions = response.data.data;
|
// console.log('Now getTransactions() DONE!');
|
||||||
//this.loading = false;
|
this.total = parseInt(response.data.meta.pagination.total);
|
||||||
//this.error = false;
|
this.rawTransactions = response.data.data;
|
||||||
|
this.loading = false;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
jumpToPage: function (event) {
|
||||||
|
// console.log('noticed a change!');
|
||||||
|
this.currentPage = event.page;
|
||||||
|
this.downloadTransactionList(event.page);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
start: function () {
|
start: function () {
|
||||||
|
|||||||
Reference in New Issue
Block a user