mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
feat: initial commit
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
import { isCloud } from '$lib/system';
|
||||
import { plansInfo } from '$lib/stores/billing';
|
||||
import { formatCurrency } from '$lib/helpers/numbers';
|
||||
import InputSelect from '$lib/elements/forms/inputSelect.svelte';
|
||||
|
||||
export let showCreate = false;
|
||||
|
||||
@@ -20,13 +21,36 @@
|
||||
const url = `${$page.url.origin}/invite`;
|
||||
$: plan = $plansInfo?.get($organization?.billingPlan);
|
||||
|
||||
let email: string, name: string, error: string;
|
||||
let email: string, name: string, error: string, role: string = 'owner';
|
||||
|
||||
const roles = [
|
||||
{
|
||||
label: 'Owner',
|
||||
value: 'owner'
|
||||
},
|
||||
{
|
||||
label: 'Developer',
|
||||
value: 'developer'
|
||||
},
|
||||
{
|
||||
label: 'Editor',
|
||||
value: 'editor'
|
||||
},
|
||||
{
|
||||
label: 'Analyst',
|
||||
value: 'analyst'
|
||||
},
|
||||
{
|
||||
label: 'Billing',
|
||||
value: 'billing'
|
||||
}
|
||||
];
|
||||
|
||||
async function create() {
|
||||
try {
|
||||
const team = await sdk.forConsole.teams.createMembership(
|
||||
$organization.$id,
|
||||
['owner'],
|
||||
[role],
|
||||
email,
|
||||
undefined,
|
||||
undefined,
|
||||
@@ -81,6 +105,11 @@
|
||||
label="Name (optional)"
|
||||
placeholder="Enter name"
|
||||
bind:value={name} />
|
||||
<InputSelect
|
||||
id="role"
|
||||
label="Role"
|
||||
options={roles}
|
||||
bind:value={role} />
|
||||
</FormList>
|
||||
<svelte:fragment slot="footer">
|
||||
<Button secondary on:click={() => (showCreate = false)}>Cancel</Button>
|
||||
|
||||
Reference in New Issue
Block a user