mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-24 22:48:18 +00:00
Basic fix for entire page loading: https://github.com/firefly-iii/firefly-iii/pull/4839
This commit is contained in:
@@ -57,7 +57,9 @@
|
||||
</template>
|
||||
<template #cell(description)="data">
|
||||
<span><i class="fas fa-angle-right" v-if="data.item.split && data.item.split_parent !== null"></i></span>
|
||||
<a :class="false === data.item.active ? 'text-muted' : ''" :href="'./transactions/show/' + data.item.id" :title="data.value">{{ data.value }}</a>
|
||||
<a :class="false === data.item.active ? 'text-muted' : ''" :href="'./transactions/show/' + data.item.id" :title="data.value">{{
|
||||
data.value
|
||||
}}</a>
|
||||
</template>
|
||||
<template #cell(amount)="data">
|
||||
<span class="text-success" v-if="'deposit' === data.item.type">
|
||||
@@ -76,10 +78,12 @@
|
||||
{{ data.item.date_formatted }}
|
||||
</template>
|
||||
<template #cell(source_account)="data">
|
||||
<a :class="false === data.item.active ? 'text-muted' : ''" :href="'./accounts/show/' + data.item.source_id" :title="data.item.source_name">{{ data.item.source_name }}</a>
|
||||
<a :class="false === data.item.active ? 'text-muted' : ''" :href="'./accounts/show/' + data.item.source_id"
|
||||
:title="data.item.source_name">{{ data.item.source_name }}</a>
|
||||
</template>
|
||||
<template #cell(destination_account)="data">
|
||||
<a :class="false === data.item.active ? 'text-muted' : ''" :href="'./accounts/show/' + data.item.destination_id" :title="data.item.destination_name">{{ data.item.destination_name }}</a>
|
||||
<a :class="false === data.item.active ? 'text-muted' : ''" :href="'./accounts/show/' + data.item.destination_id"
|
||||
:title="data.item.destination_name">{{ data.item.destination_name }}</a>
|
||||
</template>
|
||||
<template #cell(menu)="data">
|
||||
<div class="btn-group btn-group-sm" v-if="! data.item.split || data.item.split_parent === null">
|
||||
@@ -111,7 +115,8 @@
|
||||
</b-table>
|
||||
</div>
|
||||
<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="'./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"><i class="fas fa-sync"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -248,19 +253,22 @@ export default {
|
||||
let endStr = format(this.end, 'y-MM-dd');
|
||||
api.get('./api/v1/transactions?type=' + this.type + '&page=' + page + "&start=" + startStr + "&end=" + endStr)
|
||||
.then(response => {
|
||||
|
||||
let currentPage = parseInt(response.data.meta.pagination.current_page);
|
||||
let totalPage = parseInt(response.data.meta.pagination.total_pages);
|
||||
let totalPages = parseInt(response.data.meta.pagination.total_pages);
|
||||
this.total = parseInt(response.data.meta.pagination.total);
|
||||
console.log('total is ' + this.total);
|
||||
this.transactions.push(...response.data.data);
|
||||
if (currentPage < totalPage) {
|
||||
let nextPage = currentPage + 1;
|
||||
this.downloadTransactionList(nextPage);
|
||||
}
|
||||
if (currentPage >= totalPage) {
|
||||
// if (currentPage < totalPage) {
|
||||
// let nextPage = currentPage + 1;
|
||||
// this.downloadTransactionList(nextPage);
|
||||
// }
|
||||
// if (currentPage >= totalPage) {
|
||||
// console.log('Looks like all downloaded.');
|
||||
this.downloaded = true;
|
||||
this.createTransactionRows();
|
||||
}
|
||||
// }
|
||||
|
||||
}
|
||||
);
|
||||
});
|
||||
|
Reference in New Issue
Block a user