62 lines
1.5 KiB
Vue
62 lines
1.5 KiB
Vue
<script lang="ts" setup>
|
|
import teamRoutes from '@/routes/teams';
|
|
import { Form, Head, useForm } from '@inertiajs/vue3';
|
|
import { Card, CardContent } from '@/components/ui/card';
|
|
import { Input } from '@/components/ui/input';
|
|
import InputError from '@/components/InputError.vue';
|
|
import { Button } from '@/components/ui/button';
|
|
|
|
defineOptions({
|
|
layout: {
|
|
breadcrumbs: [
|
|
{
|
|
title: 'Teams',
|
|
href: teamRoutes.index(),
|
|
},
|
|
{
|
|
title: 'Invite',
|
|
href: teamRoutes.invite.create(),
|
|
},
|
|
],
|
|
},
|
|
});
|
|
|
|
const props = defineProps<{
|
|
inviteToken?: string;
|
|
}>();
|
|
|
|
const form = useForm({
|
|
inviteToken: props.inviteToken,
|
|
});
|
|
|
|
const submit = () => form.post(teamRoutes.invite.store().url);
|
|
</script>
|
|
|
|
<template>
|
|
<Head title="Team Invite" />
|
|
|
|
<div class="flex flex-col justify-center p-16">
|
|
<Card class="w-full">
|
|
<CardContent>
|
|
<h1 class="text-2xl font-bold">Team Einladung</h1>
|
|
<form class="grid gap-y-3" @submit.prevent="submit">
|
|
<div class="grid items-start gap-3">
|
|
<Input
|
|
id="inviteToken"
|
|
v-model="form.inviteToken"
|
|
name="inviteToken"
|
|
placeholder="Token"
|
|
/>
|
|
<InputError :message="form.errors.inviteToken" />
|
|
</div>
|
|
<div class="flex w-full justify-end">
|
|
<Button :disabled="form.processing" type="submit"
|
|
>Team Beitreten</Button
|
|
>
|
|
</div>
|
|
</form>
|
|
</CardContent>
|
|
</Card>
|
|
</div>
|
|
</template>
|