added taken_by_name + some links

This commit is contained in:
Dovi Cowan 2023-10-18 00:08:23 +01:00
parent b646b28a66
commit 44ce8eb0c0
Signed by: dcowan
GPG key ID: C110D77558FBC227
3 changed files with 9 additions and 5 deletions

View file

@ -36,8 +36,9 @@
>
{/if}
{#each lists.documents as list}
<Link class="text-blue-400" to="/list/{list['$id']}">{list['title']}</Link>
<Link class="text-blue-400" to="/list/{list['$id']}">{list['title']}</Link><br>
{/each}
<Link class="text-blue-400" to="/lists/create">Create new list</Link>
{/await}
</div>
</main>

View file

@ -35,6 +35,7 @@
{#await members}
Loading...
{:then members}
<Link to="/list/{id}" class="text-blue-400">Back to {members.memberships[0].teamName}</Link><br>
{#each members.memberships as member}
<div class="m-1">
{member.userName} - {member.userEmail}

View file

@ -33,11 +33,11 @@
perek: perek,
taken: true,
taken_by: loggedInUser["$id"],
taken_by_name: loggedInUser['name']
},
[
Permission.read(Role.team(id)),
Permission.write(Role.user(loggedInUser["$id"])),
Permission.write(Role.team("admins-" + id)),
],
)
.then(() => {
@ -111,7 +111,7 @@
{:then list}
<h1 class="text-2xl">List {list.title}</h1>
<br />
<Link class="text-blue-400" to="/list/{id}/members">Members</Link><br>
<Link class="text-blue-400" to="/list/{id}/members">Members</Link><br />
{#await perakimPromise then perakimResolved}
{#each Array.from(Array(150 + 1).keys()).slice(1) as i}
{#if perekIndex(i) !== -1}
@ -141,8 +141,10 @@
class="dark:bg-gray-600 bg-gray-400 border p-1 mt-2 rounded"
>Uncomplete</button
>
{:else if perakim[perekIndex(i)].completed == false}
Perek {i} - Taken by {perakim[perekIndex(i)].taken_by_name}
{:else}
Perek {i} - Taken
Perek {i} - Completed by {perakim[perekIndex(i)].taken_by_name}
{/if}
{:else}
Perek {i}