Fix/team security review #1
@@ -1,10 +1,10 @@
|
||||
<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";
|
||||
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: {
|
||||
@@ -22,32 +22,37 @@ defineOptions({
|
||||
});
|
||||
|
||||
const props = defineProps<{
|
||||
inviteToken?: string,
|
||||
}>()
|
||||
inviteToken?: string;
|
||||
}>();
|
||||
|
||||
const form = useForm({
|
||||
inviteToken: props.inviteToken
|
||||
})
|
||||
|
||||
const submit = () => form.post(teamRoutes.invite.store().url)
|
||||
inviteToken: props.inviteToken,
|
||||
});
|
||||
|
||||
const submit = () => form.post(teamRoutes.invite.store().url);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Head title="Team Invite"/>
|
||||
<Head title="Team Invite" />
|
||||
|
||||
<div class="flex flex-col justify-center p-16">
|
||||
<Card class="w-full">
|
||||
<CardContent>
|
||||
<h1 class="font-bold text-2xl">Team Einladung</h1>
|
||||
<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"/>
|
||||
<Input
|
||||
id="inviteToken"
|
||||
v-model="form.inviteToken"
|
||||
name="inviteToken"
|
||||
placeholder="Token"
|
||||
/>
|
||||
<InputError :message="form.errors.inviteToken" />
|
||||
</div>
|
||||
<div class="w-full flex justify-end">
|
||||
|
||||
<Button :disabled="form.processing" type="submit">Team Beitreten</Button>
|
||||
<div class="flex w-full justify-end">
|
||||
<Button :disabled="form.processing" type="submit"
|
||||
>Team Beitreten</Button
|
||||
>
|
||||
</div>
|
||||
</form>
|
||||
</CardContent>
|
||||
|
||||
Reference in New Issue
Block a user