Various code cleanup.

This commit is contained in:
James Cole
2021-06-13 08:10:30 +02:00
parent c98706fac0
commit 5262c0240e
62 changed files with 82 additions and 211 deletions

View File

@@ -90,6 +90,3 @@ export default {
}
</script>
<style scoped>
</style>

View File

@@ -334,6 +334,3 @@ export default {
}
</script>
<style scoped>
</style>

View File

@@ -110,6 +110,3 @@ export default {
}
</script>
<style scoped>
</style>

View File

@@ -180,6 +180,3 @@ export default {
}
</script>
<style scoped>
</style>

View File

@@ -28,6 +28,3 @@ export default {
}
</script>
<style scoped>
</style>

View File

@@ -45,7 +45,7 @@
:sort-desc.sync="sortDesc"
>
<template #table-busy>
<i class="fas fa-spinner fa-spin"></i>
<span class="fas fa-spinner fa-spin"></span>
</template>
<template #cell(name)="data">
<a :class="false === data.item.active ? 'text-muted' : ''" :href="'./accounts/show/' + data.item.id" :title="data.value">{{ data.value }}</a>
@@ -55,7 +55,7 @@
</template>
<template #cell(last_activity)="data">
<span v-if="'asset' === type && 'loading' === data.item.last_activity">
<i class="fas fa-spinner fa-spin"></i>
<span class="fas fa-spinner fa-spin"></span>
</span>
<span v-if="'asset' === type && 'none' === data.item.last_activity" class="text-muted">
{{ $t('firefly.never') }}
@@ -149,7 +149,7 @@
</div>
<div class="card-footer">
<a :href="'./accounts/create/' + type" class="btn btn-success" :title="$t('firefly.create_new_' + type)">{{ $t('firefly.create_new_' + type) }}</a>
<a href="#" class="btn btn-info"><i class="fas fa-sync"></i></a>
<a href="#" class="btn btn-info"><span class="fas fa-sync"></span></a>
</div>
</div>
</div>

View File

@@ -88,6 +88,3 @@ export default {
}
</script>
<style scoped>
</style>

View File

@@ -68,6 +68,3 @@ name: "Interest",
}
</script>
<style scoped>
</style>

View File

@@ -91,6 +91,3 @@ export default {
}
</script>
<style scoped>
</style>

View File

@@ -66,6 +66,3 @@ export default {
}
</script>
<style scoped>
</style>

View File

@@ -66,6 +66,3 @@ export default {
}
</script>
<style scoped>
</style>

View File

@@ -69,6 +69,3 @@ export default {
}
</script>
<style scoped>
</style>

View File

@@ -91,6 +91,3 @@ export default {
}
</script>
<style scoped>
</style>

View File

@@ -30,6 +30,3 @@ export default {
}
</script>
<style scoped>
</style>

View File

@@ -111,6 +111,3 @@ export default {
}
</script>
<style scoped>
</style>

View File

@@ -173,6 +173,3 @@ export default {
}
</script>
<style scoped>
</style>

View File

@@ -28,6 +28,3 @@ export default {
}
</script>
<style scoped>
</style>

View File

@@ -116,6 +116,3 @@ export default {
}
</script>
<style scoped>
</style>

View File

@@ -60,6 +60,3 @@ export default {
}
</script>
<style scoped>
</style>

View File

@@ -52,6 +52,3 @@ export default {
}
</script>
<style scoped>
</style>

View File

@@ -179,6 +179,3 @@ export default {
}
</script>
<style scoped>
</style>

View File

@@ -265,6 +265,3 @@ export default {
}
</script>
<style scoped>
</style>

View File

@@ -248,6 +248,3 @@ export default {
}
</script>
<style scoped>
</style>

View File

@@ -127,6 +127,3 @@ export default {
}
</script>
<style scoped>
</style>

View File

@@ -22,7 +22,7 @@
<div class="row">
<div class="col" v-if="0 !== prefCurrencyBalances.length || 0 !== notPrefCurrencyBalances.length">
<div class="info-box">
<span class="info-box-icon"><i class="far fa-bookmark text-info"></i></span>
<span class="info-box-icon"><span class="far fa-bookmark text-info"></span></span>
<div class="info-box-content">
<span v-if="!loading && !error" class="info-box-text">{{ $t("firefly.balance") }}</span>
@@ -47,7 +47,7 @@
<div class="col" v-if="0!==prefBillsUnpaid.length || 0 !== notPrefBillsUnpaid.length">
<div class="info-box">
<span class="info-box-icon"><i class="far fa-calendar-alt text-teal"></i></span>
<span class="info-box-icon"><span class="far fa-calendar-alt text-teal"></span></span>
<div class="info-box-content">
<span v-if="!loading && !error" class="info-box-text">{{ $t('firefly.bills_to_pay') }}</span>
@@ -72,7 +72,7 @@
<!-- left to spend -->
<div class="col" v-if="0 !== prefLeftToSpend.length || 0 !== notPrefLeftToSpend.length">
<div class="info-box">
<span class="info-box-icon"><i class="fas fa-money-bill text-success"></i></span>
<span class="info-box-icon"><span class="fas fa-money-bill text-success"></span></span>
<div class="info-box-content">
<span v-if="!loading && !error" class="info-box-text">{{ $t('firefly.left_to_spend') }}</span>
@@ -99,7 +99,7 @@
<!-- net worth -->
<div class="col" v-if="0 !== notPrefNetWorth.length || 0 !== prefNetWorth.length">
<div class="info-box">
<span class="info-box-icon"><i class="fas fa-money-bill text-success"></i></span>
<span class="info-box-icon"><span class="fas fa-money-bill text-success"></span></span>
<div class="info-box-content">
<span v-if="!loading && !error" class="info-box-text">{{ $t('firefly.net_worth') }}</span>

View File

@@ -77,6 +77,3 @@ export default {
}
</script>
<style scoped>
</style>

View File

@@ -81,6 +81,3 @@ export default {
}
</script>
<style scoped>
</style>

View File

@@ -185,6 +185,3 @@ export default {
}
</script>
<style scoped>
</style>

View File

@@ -94,6 +94,3 @@ export default {
}
</script>
<style scoped>
</style>

View File

@@ -78,6 +78,3 @@ name: "GenericTextarea",
}
</script>
<style scoped>
</style>

View File

@@ -108,6 +108,3 @@ export default {
}
</script>
<style scoped>
</style>

View File

@@ -898,6 +898,3 @@ export default {
}
</script>
<style scoped>
</style>

View File

@@ -1182,6 +1182,3 @@ export default {
}
</script>
<style scoped>
</style>

View File

@@ -46,17 +46,17 @@
:sort-compare="tableSortCompare"
>
<template #table-busy>
<i class="fa fa-spinner"></i>
<span class="fa fa-spinner"></span>
</template>
<template #cell(type)="data">
<span v-if="! data.item.split || data.item.split_parent === null">
<i class="fas fa-long-arrow-alt-right" v-if="'deposit' === data.item.type"></i>
<i class="fas fa-long-arrow-alt-left" v-else-if="'withdrawal' === data.item.type"></i>
<i class="fas fa-long-arrows-alt-h" v-else-if="'transfer' === data.item.type"></i>
<span class="fas fa-long-arrow-alt-right" v-if="'deposit' === data.item.type"></span>
<span class="fas fa-long-arrow-alt-left" v-else-if="'withdrawal' === data.item.type"></span>
<span class="fas fa-long-arrows-alt-h" v-else-if="'transfer' === data.item.type"></span>
</span>
</template>
<template #cell(description)="data">
<span><i class="fas fa-angle-right" v-if="data.item.split && data.item.split_parent !== null"></i></span>
<span><span class="fas fa-angle-right" v-if="data.item.split && data.item.split_parent !== null"></span></span>
<a :class="false === data.item.active ? 'text-muted' : ''" :href="'./transactions/show/' + data.item.id" :title="data.value">{{
data.value
}}</a>
@@ -93,19 +93,19 @@
{{ $t('firefly.actions') }}
</button>
<div class="dropdown-menu" :aria-labelledby="'dropdownMenuButton' + data.item.id">
<a class="dropdown-item" :href="'./transactions/edit/' + data.item.id"><i class="fa fas fa-pencil-alt"></i> {{ $t('firefly.edit') }}</a>
<a class="dropdown-item" :href="'./transactions/delete/' + data.item.id"><i class="fa far fa-trash"></i> {{ $t('firefly.delete') }}</a>
<a class="dropdown-item" :href="'./transactions/edit/' + data.item.id"><span class="fa fas fa-pencil-alt"></span> {{ $t('firefly.edit') }}</a>
<a class="dropdown-item" :href="'./transactions/delete/' + data.item.id"><span class="fa far fa-trash"></span> {{ $t('firefly.delete') }}</a>
</div>
</div>
</div>
<div class="btn btn-light btn-sm" v-if="data.item.split && data.item.split_parent === null && data.item.collapsed === true"
v-on:click="toggleCollapse(data.item)">
<i class="fa fa-caret-down"></i>
<span class="fa fa-caret-down"></span>
Expand split
</div>
<div class="btn btn-light btn-sm" v-else-if="data.item.split && data.item.split_parent === null && data.item.collapsed === false"
v-on:click="toggleCollapse(data.item)">
<i class="fa fa-caret-up"></i>
<span class="fa fa-caret-up"></span>
Collapse split
</div>
</template>
@@ -117,7 +117,7 @@
<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"><i class="fas fa-sync"></i></a>
<a href="#" class="btn btn-info"><span class="fas fa-sync"></span></a>
</div>
</div>
</div>
@@ -254,10 +254,10 @@ export default {
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 totalPages = parseInt(response.data.meta.pagination.total_pages);
//let currentPage = parseInt(response.data.meta.pagination.current_page);
//let totalPages = parseInt(response.data.meta.pagination.total_pages);
this.total = parseInt(response.data.meta.pagination.total);
console.log('total is ' + this.total);
//console.log('total is ' + this.total);
this.transactions.push(...response.data.data);
// if (currentPage < totalPage) {
// let nextPage = currentPage + 1;

View File

@@ -41,6 +41,3 @@ export default {
}
</script>
<style scoped>
</style>

View File

@@ -112,6 +112,3 @@ export default {
}
</script>
<style scoped>
</style>

View File

@@ -138,6 +138,3 @@ export default {
}
</script>
<style scoped>
</style>

View File

@@ -71,6 +71,3 @@ export default {
}
</script>
<style scoped>
</style>

View File

@@ -94,6 +94,3 @@ export default {
}
</script>
<style scoped>
</style>

View File

@@ -124,6 +124,3 @@ export default {
}
</script>
<style scoped>
</style>

View File

@@ -99,6 +99,3 @@ export default {
}
</script>
<style scoped>
</style>

View File

@@ -106,6 +106,3 @@ export default {
}
</script>
<style scoped>
</style>

View File

@@ -94,6 +94,3 @@ export default {
}
</script>
<style scoped>
</style>

View File

@@ -86,6 +86,3 @@ export default {
}
</script>
<style scoped>
</style>

View File

@@ -166,6 +166,3 @@ export default {
}
</script>
<style scoped>
</style>

View File

@@ -72,6 +72,3 @@ export default {
}
</script>
<style scoped>
</style>