implemented account list

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
2026-04-02 13:57:08 +02:00
parent bba5fd36b4
commit 246bb887b0
5 changed files with 29 additions and 4 deletions

View File

@@ -0,0 +1,5 @@
<script>
let { id } = $props();
</script>
<h1>Account {id}</h1>

View File

@@ -22,11 +22,29 @@
router.navigate('/accounting/new');
}
function onclick(e){
e.preventDefault();
let href = e.target.getAttribute('href');
if (href) router.navigate(href);
return false;
}
onMount(load);
</script>
<fieldset>
<legend>{t('accounts')}</legend>
<button onclick={newAccount}>{t('create_new_object',{'object':t('account')})}</button>
<span></span>
<span>
<button onclick={newAccount}>{t('create_new_object',{'object':t('account')})}</button>
</span>
<ul>
{#each accounts as account (account.id)}
<li>
<a {onclick} href="account/{account.id}">{account.name} ({account.id})</a>
</li>
{/each}
</ul>
</fieldset>