mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-25 06:51:08 +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>
|
||||||
<template #cell(description)="data">
|
<template #cell(description)="data">
|
||||||
<span><i class="fas fa-angle-right" v-if="data.item.split && data.item.split_parent !== null"></i></span>
|
<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>
|
||||||
<template #cell(amount)="data">
|
<template #cell(amount)="data">
|
||||||
<span class="text-success" v-if="'deposit' === data.item.type">
|
<span class="text-success" v-if="'deposit' === data.item.type">
|
||||||
@@ -76,10 +78,12 @@
|
|||||||
{{ data.item.date_formatted }}
|
{{ data.item.date_formatted }}
|
||||||
</template>
|
</template>
|
||||||
<template #cell(source_account)="data">
|
<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>
|
||||||
<template #cell(destination_account)="data">
|
<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>
|
||||||
<template #cell(menu)="data">
|
<template #cell(menu)="data">
|
||||||
<div class="btn-group btn-group-sm" v-if="! data.item.split || data.item.split_parent === null">
|
<div class="btn-group btn-group-sm" v-if="! data.item.split || data.item.split_parent === null">
|
||||||
@@ -111,7 +115,8 @@
|
|||||||
</b-table>
|
</b-table>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-footer">
|
<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>
|
<a href="#" class="btn btn-info"><i class="fas fa-sync"></i></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -248,19 +253,22 @@ export default {
|
|||||||
let endStr = format(this.end, '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)
|
||||||
.then(response => {
|
.then(response => {
|
||||||
|
|
||||||
let currentPage = parseInt(response.data.meta.pagination.current_page);
|
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);
|
this.total = parseInt(response.data.meta.pagination.total);
|
||||||
|
console.log('total is ' + this.total);
|
||||||
this.transactions.push(...response.data.data);
|
this.transactions.push(...response.data.data);
|
||||||
if (currentPage < totalPage) {
|
// if (currentPage < totalPage) {
|
||||||
let nextPage = currentPage + 1;
|
// let nextPage = currentPage + 1;
|
||||||
this.downloadTransactionList(nextPage);
|
// this.downloadTransactionList(nextPage);
|
||||||
}
|
// }
|
||||||
if (currentPage >= totalPage) {
|
// if (currentPage >= totalPage) {
|
||||||
// console.log('Looks like all downloaded.');
|
// console.log('Looks like all downloaded.');
|
||||||
this.downloaded = true;
|
this.downloaded = true;
|
||||||
this.createTransactionRows();
|
this.createTransactionRows();
|
||||||
}
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user