reedo types
This commit is contained in:
@@ -5,13 +5,23 @@ import InputError from '@/components/InputError.vue';
|
||||
import { Label } from '@/components/ui/label';
|
||||
import { Input } from '@/components/ui/input';
|
||||
import { nameToSlug } from '@/routes/teams';
|
||||
import type {
|
||||
TeamSlugProps,
|
||||
TeamSlugRequest,
|
||||
TeamSlugResponse,
|
||||
} from '@/types/team';
|
||||
|
||||
const props = defineProps<TeamSlugProps>();
|
||||
type TeamSlugRequest = {
|
||||
name: string;
|
||||
ignored_slug: string | null;
|
||||
};
|
||||
|
||||
type TeamSlugResponse = {
|
||||
name: string;
|
||||
slug: string;
|
||||
taken: boolean;
|
||||
};
|
||||
|
||||
const props = defineProps<{
|
||||
name: string;
|
||||
ignoredSlug?: string;
|
||||
error?: string;
|
||||
}>();
|
||||
const slug = defineModel<string>('slug', { required: true });
|
||||
const slugTaken = defineModel<boolean>('slugTaken', { required: true });
|
||||
const previewError = ref('');
|
||||
|
||||
@@ -7,12 +7,14 @@ import { Input } from '@/components/ui/input';
|
||||
import { Label } from '@/components/ui/label';
|
||||
import InputError from '@/components/InputError.vue';
|
||||
import { Checkbox } from '@/components/ui/checkbox';
|
||||
import type { TeamEditPageProps } from '@/types/page-props';
|
||||
import type { Team } from '@/types/models';
|
||||
import { ref } from 'vue';
|
||||
import TeamSlug from '@/components/TeamSlug.vue';
|
||||
import { Card, CardContent } from '@/components/ui/card';
|
||||
|
||||
const props = defineProps<TeamEditPageProps>();
|
||||
const props = defineProps<{
|
||||
team: Team;
|
||||
}>();
|
||||
|
||||
setLayoutProps({
|
||||
breadcrumbs: [
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
import teamRoutes from '@/routes/teams';
|
||||
import { Head, Link, router, usePage } from '@inertiajs/vue3';
|
||||
import type { Team } from '@/types/models';
|
||||
import type { TeamIndexPageProps } from '@/types/page-props';
|
||||
import TextLink from '@/components/TextLink.vue';
|
||||
import { Card, CardContent } from '@/components/ui/card';
|
||||
import {
|
||||
@@ -28,7 +27,9 @@ defineOptions({
|
||||
},
|
||||
});
|
||||
|
||||
defineProps<TeamIndexPageProps>();
|
||||
defineProps<{
|
||||
teams: Team[];
|
||||
}>();
|
||||
|
||||
const user = usePage().props.auth.user;
|
||||
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import teamRoutes from '@/routes/teams';
|
||||
import { Head, Link, setLayoutProps, useForm } from '@inertiajs/vue3';
|
||||
import type { TeamInvite } from '@/types/models';
|
||||
import type { TeamShowPageProps } from '@/types/page-props';
|
||||
import type { Team, TeamInvite } from '@/types/models';
|
||||
import InputError from '@/components/InputError.vue';
|
||||
import { Card, CardContent } from '@/components/ui/card';
|
||||
import {
|
||||
@@ -16,7 +15,11 @@ import {
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Pencil, Trash } from '@lucide/vue';
|
||||
|
||||
const props = defineProps<TeamShowPageProps>();
|
||||
const props = defineProps<{
|
||||
team: Team;
|
||||
canManageTeam: boolean;
|
||||
teamInvites?: TeamInvite[];
|
||||
}>();
|
||||
|
||||
setLayoutProps({
|
||||
breadcrumbs: [
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
import type { Team, TeamInvite } from '@/types/models';
|
||||
|
||||
export type TeamEditPageProps = {
|
||||
team: Team;
|
||||
};
|
||||
|
||||
export type TeamShowPageProps = {
|
||||
team: Team;
|
||||
canManageTeam: boolean;
|
||||
teamInvites?: TeamInvite[];
|
||||
};
|
||||
|
||||
export type TeamIndexPageProps = {
|
||||
teams: Team[];
|
||||
};
|
||||
@@ -1,16 +0,0 @@
|
||||
export type TeamSlugProps = {
|
||||
name: string;
|
||||
ignoredSlug?: string;
|
||||
error?: string;
|
||||
};
|
||||
|
||||
export type TeamSlugRequest = {
|
||||
name: string;
|
||||
ignored_slug: string | null;
|
||||
};
|
||||
|
||||
export type TeamSlugResponse = {
|
||||
name: string;
|
||||
slug: string;
|
||||
taken: boolean;
|
||||
};
|
||||
Reference in New Issue
Block a user