implemented proper messages for accounting events

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
2026-05-05 10:01:03 +02:00
parent cfd5362b1d
commit cc3a3a23a2
13 changed files with 99 additions and 40 deletions
@@ -8,6 +8,16 @@
let { account, addToFilter = tag => {}, transaction, users } = $props();
let hidden = $state(false);
function deleteTransaction(ev){
if (confirm(t('confirm_delete',{element:transaction.purpose}))){
const url = api(`accounting/transaction/${transaction.id}`);
const res = drop(url);
if (res.ok){
yikes();
} else error(res);
}
}
async function dropTag(tag){
var url = api(`accounting/transaction/${transaction.id}/tag`)
var res = await drop(url,{tag});
@@ -127,5 +137,8 @@
<Autocomplete {getCandidates} {onCommit} />
</span>
</td>
<td class="actions">
<button class="symbol" onclick={deleteTransaction}></button>
</td>
</tr>
{/if}