implemented proper messages for accounting events
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user