implemented storing selectedweights for logged-in user

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
2026-03-02 23:55:38 +01:00
parent 800ac35997
commit 1589bbe471
11 changed files with 178 additions and 6 deletions

View File

@@ -40,7 +40,12 @@
} else error(res);
}
function open(poll){
router.navigate(`/poll/${poll.id}/view`);
}
function share(poll){
}
onMount(load);
@@ -61,9 +66,9 @@
<tbody>
{#each polls as poll}
<tr>
<td>{poll.name}</td>
<td onclick={e => open(poll)}>{poll.name}</td>
<td>{@html poll.description.rendered}</td>
<td>{poll.owner.name}</td>
<td onclick={e => open(poll)}>{poll.owner.name}</td>
<td>
{#if user.id == poll.owner.id || poll.shares[user.id].permission == 2}
<button onclick={e => edit(poll)}>{t('edit')}</button>