mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-14 00:04:24 +00:00
This commit is contained in:
@@ -153,7 +153,7 @@ export default {
|
|||||||
this.getTransactionList();
|
this.getTransactionList();
|
||||||
},
|
},
|
||||||
jumpToPage: function (event) {
|
jumpToPage: function (event) {
|
||||||
// console.log('noticed a change!');
|
console.log('noticed a change in transactions/index.vue!');
|
||||||
this.currentPage = event.page;
|
this.currentPage = event.page;
|
||||||
this.downloadTransactionList(event.page);
|
this.downloadTransactionList(event.page);
|
||||||
},
|
},
|
||||||
|
@@ -70,10 +70,10 @@
|
|||||||
<span class="fas fa-angle-right" @click="toggleCollapse(data.item.id)" style="cursor: pointer;"></span>
|
<span class="fas fa-angle-right" @click="toggleCollapse(data.item.id)" style="cursor: pointer;"></span>
|
||||||
<a :href="'./transactions/show/' + data.item.id" :title="data.value">
|
<a :href="'./transactions/show/' + data.item.id" :title="data.value">
|
||||||
{{ data.item.description }}
|
{{ data.item.description }}
|
||||||
</a><br />
|
</a><br/>
|
||||||
<span v-if="!data.item.collapsed">
|
<span v-if="!data.item.collapsed">
|
||||||
<span v-for="(split, index) in data.item.splits" v-bind:key="index">
|
<span v-for="(split, index) in data.item.splits" v-bind:key="index">
|
||||||
{{ split.description }}<br />
|
{{ split.description }}<br/>
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
@@ -89,11 +89,11 @@
|
|||||||
<span :class="'text-muted ' + (!data.item.collapsed ? 'font-weight-bold' : '')" v-if="'transfer' === data.item.type.toLowerCase()">
|
<span :class="'text-muted ' + (!data.item.collapsed ? 'font-weight-bold' : '')" v-if="'transfer' === data.item.type.toLowerCase()">
|
||||||
{{ Intl.NumberFormat(locale, {style: 'currency', currency: data.item.currency_code}).format(data.item.amount) }}
|
{{ Intl.NumberFormat(locale, {style: 'currency', currency: data.item.currency_code}).format(data.item.amount) }}
|
||||||
</span>
|
</span>
|
||||||
<br />
|
<br/>
|
||||||
<!-- splits -->
|
<!-- splits -->
|
||||||
<span v-if="!data.item.collapsed">
|
<span v-if="!data.item.collapsed">
|
||||||
<span v-for="(split, index) in data.item.splits" v-bind:key="index">
|
<span v-for="(split, index) in data.item.splits" v-bind:key="index">
|
||||||
{{ Intl.NumberFormat(locale, {style: 'currency', currency: split.currency_code}).format(split.amount) }}<br />
|
{{ Intl.NumberFormat(locale, {style: 'currency', currency: split.currency_code}).format(split.amount) }}<br/>
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
@@ -103,29 +103,31 @@
|
|||||||
<template #cell(source_account)="data">
|
<template #cell(source_account)="data">
|
||||||
<!-- extra break for splits -->
|
<!-- extra break for splits -->
|
||||||
<span v-if="true===data.item.split && !data.item.collapsed">
|
<span v-if="true===data.item.split && !data.item.collapsed">
|
||||||
<br />
|
<br/>
|
||||||
</span>
|
</span>
|
||||||
<em v-if="true===data.item.split && data.item.collapsed">
|
<em v-if="true===data.item.split && data.item.collapsed">
|
||||||
...
|
...
|
||||||
</em>
|
</em>
|
||||||
|
|
||||||
<!-- loop all accounts, hidden if split -->
|
<!-- loop all accounts, hidden if split -->
|
||||||
<span v-for="(split, index) in data.item.splits" v-bind:key="index" v-if="false===data.item.split || (true===data.item.split && !data.item.collapsed)">
|
<span v-for="(split, index) in data.item.splits" v-bind:key="index"
|
||||||
<a :href="'./accounts/show/' + split.source_id" :title="split.source_name">{{ split.source_name }}</a><br />
|
v-if="false===data.item.split || (true===data.item.split && !data.item.collapsed)">
|
||||||
|
<a :href="'./accounts/show/' + split.source_id" :title="split.source_name">{{ split.source_name }}</a><br/>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<template #cell(destination_account)="data">
|
<template #cell(destination_account)="data">
|
||||||
<!-- extra break for splits -->
|
<!-- extra break for splits -->
|
||||||
<span v-if="true===data.item.split && !data.item.collapsed">
|
<span v-if="true===data.item.split && !data.item.collapsed">
|
||||||
<br />
|
<br/>
|
||||||
</span>
|
</span>
|
||||||
<em v-if="true===data.item.split && data.item.collapsed">
|
<em v-if="true===data.item.split && data.item.collapsed">
|
||||||
...
|
...
|
||||||
</em>
|
</em>
|
||||||
|
|
||||||
<!-- loop all accounts, hidden if split -->
|
<!-- loop all accounts, hidden if split -->
|
||||||
<span v-for="(split, index) in data.item.splits" v-bind:key="index" v-if="false===data.item.split || (true===data.item.split && !data.item.collapsed)">
|
<span v-for="(split, index) in data.item.splits" v-bind:key="index"
|
||||||
<a :href="'./accounts/show/' + split.destination_id" :title="split.destination_name">{{ split.destination_name }}</a><br />
|
v-if="false===data.item.split || (true===data.item.split && !data.item.collapsed)">
|
||||||
|
<a :href="'./accounts/show/' + split.destination_id" :title="split.destination_name">{{ split.destination_name }}</a><br/>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<template #cell(menu)="data">
|
<template #cell(menu)="data">
|
||||||
@@ -149,15 +151,16 @@
|
|||||||
<template #cell(category_name)="data">
|
<template #cell(category_name)="data">
|
||||||
<!-- extra break for splits -->
|
<!-- extra break for splits -->
|
||||||
<span v-if="true===data.item.split && !data.item.collapsed">
|
<span v-if="true===data.item.split && !data.item.collapsed">
|
||||||
<br />
|
<br/>
|
||||||
</span>
|
</span>
|
||||||
<em v-if="true===data.item.split && data.item.collapsed">
|
<em v-if="true===data.item.split && data.item.collapsed">
|
||||||
...
|
...
|
||||||
</em>
|
</em>
|
||||||
|
|
||||||
<!-- loop all categories, hidden if split -->
|
<!-- loop all categories, hidden if split -->
|
||||||
<span v-for="(split, index) in data.item.splits" v-bind:key="index" v-if="false===data.item.split || (true===data.item.split && !data.item.collapsed)">
|
<span v-for="(split, index) in data.item.splits" v-bind:key="index"
|
||||||
<a :href="'./categories/show/' + split.category_id" :title="split.category_name">{{ split.category_name }}</a><br />
|
v-if="false===data.item.split || (true===data.item.split && !data.item.collapsed)">
|
||||||
|
<a :href="'./categories/show/' + split.category_id" :title="split.category_name">{{ split.category_name }}</a><br/>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</BTable>
|
</BTable>
|
||||||
@@ -220,10 +223,10 @@ export default {
|
|||||||
this.$emit('jump-page', {page: value});
|
this.$emit('jump-page', {page: value});
|
||||||
},
|
},
|
||||||
entries: function (value) {
|
entries: function (value) {
|
||||||
console.log('detected new transactions!');
|
console.log('detected new transactions! (' + value.length + ')');
|
||||||
this.parseTransactions();
|
this.parseTransactions();
|
||||||
},
|
},
|
||||||
value: function(value) {
|
value: function (value) {
|
||||||
console.log('Watch value!');
|
console.log('Watch value!');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -234,12 +237,12 @@ export default {
|
|||||||
// console.log('Start of parseTransactions. Count of entries is ' + this.entries.length + ' and page is ' + this.page);
|
// console.log('Start of parseTransactions. Count of entries is ' + this.entries.length + ' and page is ' + this.page);
|
||||||
// console.log('Reported total is ' + this.total);
|
// console.log('Reported total is ' + this.total);
|
||||||
if (0 === this.entries.length) {
|
if (0 === this.entries.length) {
|
||||||
console.log('Will not render now');
|
console.log('Will not render now because length is 0.');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
console.log('Now have ' + this.transactions.length + ' transactions');
|
console.log('Now have ' + this.transactions.length + ' transactions');
|
||||||
for (let i = 0; i < this.total; i++) {
|
for (let i = 0; i < this.total; i++) {
|
||||||
this.transactions.push({dummy: true,type: 'x'});
|
this.transactions.push({dummy: true, type: 'x'});
|
||||||
// console.log('Push dummy to index ' + i);
|
// console.log('Push dummy to index ' + i);
|
||||||
// console.log('Now have ' + this.transactions.length + ' transactions');
|
// console.log('Now have ' + this.transactions.length + ' transactions');
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user