chore: hide login fields if logged in user matches invite email
This commit is contained in:
@@ -179,7 +179,7 @@
|
|||||||
|
|
||||||
$: isLoading = loading || $user.fetchingUser;
|
$: isLoading = loading || $user.fetchingUser;
|
||||||
$: console.log('$profile', $profile);
|
$: console.log('$profile', $profile);
|
||||||
$: console.log('data.invite.profile', data.invite.profile);
|
$: console.log('data.invite', data.invite);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
@@ -212,6 +212,7 @@
|
|||||||
inputClassName="w-full"
|
inputClassName="w-full"
|
||||||
isDisabled={true}
|
isDisabled={true}
|
||||||
/>
|
/>
|
||||||
|
{#if $profile?.email !== data.invite.email}
|
||||||
{#if !data.invite.profile}
|
{#if !data.invite.profile}
|
||||||
<TextField
|
<TextField
|
||||||
label={$t('login.fields.full_name')}
|
label={$t('login.fields.full_name')}
|
||||||
@@ -226,7 +227,6 @@
|
|||||||
isRequired
|
isRequired
|
||||||
/>
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
{#if $profile?.email !== data.invite.email}
|
|
||||||
<TextField
|
<TextField
|
||||||
label={$t('login.fields.password')}
|
label={$t('login.fields.password')}
|
||||||
bind:value={fields.password}
|
bind:value={fields.password}
|
||||||
@@ -239,7 +239,6 @@
|
|||||||
helperMessage={$t('login.fields.password_helper_message')}
|
helperMessage={$t('login.fields.password_helper_message')}
|
||||||
isRequired
|
isRequired
|
||||||
/>
|
/>
|
||||||
{/if}
|
|
||||||
{#if !data.invite.profile}
|
{#if !data.invite.profile}
|
||||||
<TextField
|
<TextField
|
||||||
label={$t('login.fields.confirm_password')}
|
label={$t('login.fields.confirm_password')}
|
||||||
@@ -253,6 +252,7 @@
|
|||||||
isRequired
|
isRequired
|
||||||
/>
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
|
{/if}
|
||||||
{#if submitError}
|
{#if submitError}
|
||||||
<p class="text-sm text-red-500">{submitError}</p>
|
<p class="text-sm text-red-500">{submitError}</p>
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
Reference in New Issue
Block a user