Added recategorization from UI

This commit is contained in:
Manuel Forcén Muñoz 2024-05-16 23:08:56 +02:00
parent 128cd85a9b
commit 1ad1e66470
4 changed files with 25 additions and 12 deletions

View file

@ -22,6 +22,7 @@
</div>
<div class="mb-2">
<h2>Last transactions</h2>
<button class="ars-button" onclick="onRecategorize()">Recategorize</button>
<table width="100%">
<thead>
<tr>
@ -75,6 +76,13 @@
<script src="https://cdn.jsdelivr.net/npm/litepicker/dist/litepicker.js"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script>
function onRecategorize() {
fetch(
'/api/v1/accounts/id/{{account.account_id}}/recategorize',
{method: 'POST'}
).then(e=>console.log(e));
}
function onDateChange(e) {
let date_val = document.getElementById('amount-date-range').value.split(' - ');