Skip to content

Fix Roles #1842

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
if (isCloud && $organization) {
await checkForUsageLimit($organization);
}
showDelete = false;
addNotification({
type: 'success',
message: `${selectedMember.userName || 'User'} was deleted from ${selectedMember.teamName}`
Expand All @@ -45,6 +44,8 @@
message: error.message
});
trackError(error, Submit.MemberDelete);
} finally {
showDelete = false;
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
import Delete from '../deleteMember.svelte';
import type { PageData } from './$types';
import Edit from './edit.svelte';
import { isCloud } from '$lib/system';
import { BillingPlan } from '$lib/constants';

export let data: PageData;

Expand Down Expand Up @@ -74,8 +76,8 @@
buttonText={$isOwner ? 'Invite' : ''}
buttonMethod={() => newMemberModal.set(true)}
customPillText="Members limited"
showPillMessage={!$currentPlan?.addons?.seats?.supported}
buttonDisabled={!$currentPlan?.addons?.seats?.supported} />
showPillMessage={isCloud && !$currentPlan?.addons?.seats?.supported}
buttonDisabled={isCloud && !$currentPlan?.addons?.seats?.supported} />

<TableScroll>
<TableHeader>
Expand Down Expand Up @@ -164,15 +166,18 @@
<span class="icon-dots-horizontal" aria-hidden="true" />
</button>
<svelte:fragment slot="list">
<DropListItem
icon="pencil"
on:click={() => {
selectedMember = member;
showEdit = true;
showDropdown[index] = false;
}}>
Edit role
</DropListItem>
<!-- TODO: not good, we need data from backend! -->
{#if isCloud && $currentPlan.$id !== BillingPlan.FREE}
<DropListItem
icon="pencil"
on:click={() => {
selectedMember = member;
showEdit = true;
showDropdown[index] = false;
}}>
Edit role
</DropListItem>
{/if}
{#if member.invited && !member.joined}
<DropListItem
icon="refresh"
Expand Down