fix invites + add pending user tag + home link

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

View file

@ -5,9 +5,9 @@
import { navigate } from "svelte-navigator/src/history"; import { navigate } from "svelte-navigator/src/history";
const searchParams = new URLSearchParams(document.location.search); const searchParams = new URLSearchParams(document.location.search);
let confirmed = true; let confirmed = false;
let alreadyConfirmed = false; let alreadyConfirmed = false;
let newUser = true; let newUser = false;
let name = ""; let name = "";
let email = ""; let email = "";
@ -78,7 +78,7 @@
You're trying to accept an invitation for a different user. Please sign You're trying to accept an invitation for a different user. Please sign
out to accept this invitation. out to accept this invitation.
{:else if confirmed == true} {:else if confirmed == true}
Invitation confirmed! Invitation confirmed! <Link class="text-blue-400" to="/list/{searchParams.get('teamId')}">Go to list</Link>
{#if newUser == true} {#if newUser == true}
Welcome to Tehillim Split! Complete your new user profile below. Welcome to Tehillim Split! Complete your new user profile below.

View file

@ -35,13 +35,18 @@
{#await members} {#await members}
Loading... Loading...
{:then members} {:then members}
<Link to="/list/{id}" class="text-blue-400">Back to {members.memberships[0].teamName}</Link><br> <Link to="/list/{id}" class="text-blue-400"
>Back to {members.memberships[0].teamName}</Link
><br />
{#each members.memberships as member} {#each members.memberships as member}
<div class="m-1"> <div class="m-1">
{member.userName} - {member.userEmail} {member.userName} - {member.userEmail}
{#if rolesIndex(member, 'admin') !== -1} {#if rolesIndex(member, "admin") !== -1}
<span class="border p-1">List Admin</span> <span class="border p-1">List Admin</span>
{/if} {/if}
{#if member.confirm == false}
<span class="border p-1">Pending</span>
{/if}
</div> </div>
{/each} {/each}
<Link class="text-blue-400" to="#" on:click={inviteMember} <Link class="text-blue-400" to="#" on:click={inviteMember}

View file

@ -106,6 +106,7 @@
<Header /> <Header />
<div class="my-5"> <div class="my-5">
<Link class="text-blue-400" to="/">Home</Link>
{#await list} {#await list}
Loading... Loading...
{:then list} {:then list}