Clean up transactions, first attempt at navigation.

This commit is contained in:
James Cole
2024-04-21 06:26:17 +02:00
parent dcea6b757b
commit 2317037655
4 changed files with 79 additions and 285 deletions

View File

@@ -18,11 +18,6 @@
:optionalDateFields="$optionalDateFields"></x-transaction-split>
</template>
</div>
<div class="row">
<div class="col text-end">
<button class="btn btn-success" :disabled="formStates.isSubmitting" @click="submitTransaction()">Update</button>
</div>
</div>
</div>
</div>

View File

@@ -40,60 +40,38 @@
</div>
<div class="row mb-3">
<div class="col">
Nav
</div>
</div>
<div class="row mb-3">
<div class="col-xl-10 col-lg-12 col-md-12 col-sm-12 col-xs-12">
<div class="card mb-3">
<div class="card-header">
<div class="row">
<div class="col">
<h3 class="card-title">Transactions</h3>
</div>
<div class="col text-end">
</div>
</div>
</div>
<div class="card-body p-0">
<div id="grid" class="ag-theme-alpine-auto-dark ag-theme-firefly-iii" style="height: 500px">
</div>
</div>
</div>
<template x-if="!notifications.wait.show">
<nav aria-label="TODO Page navigation">
<ul class="pagination">
<template x-if="page > 1">
<li class="page-item"><a class="page-link" @click.prevent="previousPage">Previous</a></li>
</template>
<template x-for="i in totalPages">
<li :class="{'page-item': true, 'active': i === page}">
<a class="page-link" href="#" x-text="i" @click.prevent="gotoPage(i)"></a>
</li>
</template>
<template x-if="page < totalPages">
<li class="page-item"><a class="page-link" @click.prevent="nextPage" href="#">Next</a></li>
</template>
</ul>
</nav>
</template>
<div class="card">
<div class="card-header">
<div class="row">
<div class="col">
<h3 class="card-title">Transactions</h3>
</div>
<div class="col text-end">
<div class="btn-group">
<button class="btn btn-secondary btn-sm dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
Options
</button>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="#">
<em class="text-danger fa-regular fa-circle-xmark"></em>
Category</a></li>
<li><a class="dropdown-item" href="#">
<em class="text-success fa-regular fa-circle-check"></em>
Budget</a></li>
<li><a class="dropdown-item" href="#">Another action</a></li>
<li><a class="dropdown-item" href="#">Something else here</a></li>
<li><hr class="dropdown-divider"></li>
<li><a class="dropdown-item" href="#">Separated link</a></li>
</ul>
</div>
</div>
<h3 class="card-title">Transactions</h3>
</div>
</div>
<div class="card-body p-0">
<table class="table table-hover table-striped">
<thead>
<tr>
@@ -145,7 +123,8 @@
<template x-if="transaction.split && transaction.firstSplit">
<span>I AM FIRST SPLIT</span>
</template>
<a :href="'./transactions/show/' + transaction.id" x-text="transaction.description"></a>
<a :href="'./transactions/show/' + transaction.id"
x-text="transaction.description"></a>
</td>
</template>
<template x-if="tableColumns.source.enabled">
@@ -164,16 +143,19 @@
<td>
<template x-if="'withdrawal' === transaction.type">
<span class="text-danger" x-text="formatMoney(transaction.amount*-1, transaction.currency_code)"></span>
<span class="text-danger"
x-text="formatMoney(transaction.amount*-1, transaction.currency_code)"></span>
</template>
<template x-if="'deposit' === transaction.type">
<span class="text-success" x-text="formatMoney(transaction.amount, transaction.currency_code)"></span>
<span class="text-success"
x-text="formatMoney(transaction.amount, transaction.currency_code)"></span>
</template>
<template x-if="'transfer' === transaction.type">
<span class="text-info" x-text="formatMoney(transaction.amount, transaction.currency_code)"></span>
<span class="text-info"
x-text="formatMoney(transaction.amount, transaction.currency_code)"></span>
</template>
<template
x-if="'transfer' !== transaction.type && 'deposit' !== transaction.type && 'withdrawal' !== transaction.type">