switch to types.ts file
This commit is contained in:
parent
ac111154fe
commit
4430dc0293
7 changed files with 27 additions and 27 deletions
23
src/app.d.ts
vendored
23
src/app.d.ts
vendored
|
@ -15,26 +15,3 @@ declare global {
|
|||
|
||||
// interface Platform {}
|
||||
export {};
|
||||
|
||||
export interface BreadcrumbItem {
|
||||
title: string;
|
||||
href: string;
|
||||
}
|
||||
|
||||
export type BreadcrumbItemType = BreadcrumbItem;
|
||||
|
||||
export interface NavItem {
|
||||
title: string;
|
||||
href: string;
|
||||
icon?: any;
|
||||
isActive?: boolean;
|
||||
requireAdmin?: boolean;
|
||||
}
|
||||
|
||||
export enum SchedulingMode {
|
||||
single = 'signle',
|
||||
double = 'double',
|
||||
swiss = 'swiss',
|
||||
round_robin = 'round_robin',
|
||||
double_round_robin = 'double_round_robin'
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
BreadcrumbList,
|
||||
BreadcrumbSeparator
|
||||
} from '$lib/components/ui/breadcrumb';
|
||||
import type { BreadcrumbItem as BreadcrumbItemType } from '../../app';
|
||||
import type { BreadcrumbItem as BreadcrumbItemType } from '@/types';
|
||||
import { cn } from '$lib/utils';
|
||||
import { getContext } from 'svelte';
|
||||
import Nav from '$lib/components/nav.svelte';
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
import { getContext } from 'svelte';
|
||||
import { cn } from '$lib/utils';
|
||||
import { Button } from '$lib/components/ui/button';
|
||||
import type { NavItem } from '../../app';
|
||||
import type { NavItem } from '@/types';
|
||||
import { Home, Trophy, Calendar, UserCircle, Settings } from 'lucide-svelte';
|
||||
import type { User } from '$lib/server/db/schema/users';
|
||||
import { type Role } from '$lib/server/db/schema/roles';
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
import { zodClient } from 'sveltekit-superforms/adapters';
|
||||
import RadioGroup from '../ui/radio-group/radio-group.svelte';
|
||||
import RadioGroupItem from '../ui/radio-group/radio-group-item.svelte';
|
||||
import { SchedulingMode } from '@/app';
|
||||
import { SchedulingMode } from '@/types';
|
||||
|
||||
let { data }: { data: { form: SuperValidated<Infer<FormSchema>> } } = $props();
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import { SchedulingMode } from '@/types';
|
||||
import z from 'zod';
|
||||
|
||||
export const formSchema = z.object({
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
} from '$lib/components/ui/card';
|
||||
import { Badge } from '$lib/components/ui/badge';
|
||||
import { Calendar, Users, MapPin } from 'lucide-svelte';
|
||||
import type { BreadcrumbItem } from '../app';
|
||||
import type { BreadcrumbItem } from '@/types';
|
||||
import { Skeleton } from '$lib/components/ui/skeleton';
|
||||
import type { PageProps } from './$types.js';
|
||||
import { toast } from 'svelte-sonner';
|
||||
|
|
22
src/types.ts
Normal file
22
src/types.ts
Normal file
|
@ -0,0 +1,22 @@
|
|||
export interface BreadcrumbItem {
|
||||
title: string;
|
||||
href: string;
|
||||
}
|
||||
|
||||
export type BreadcrumbItemType = BreadcrumbItem;
|
||||
|
||||
export interface NavItem {
|
||||
title: string;
|
||||
href: string;
|
||||
icon?: any;
|
||||
isActive?: boolean;
|
||||
requireAdmin?: boolean;
|
||||
}
|
||||
|
||||
export enum SchedulingMode {
|
||||
single = 'signle',
|
||||
double = 'double',
|
||||
swiss = 'swiss',
|
||||
round_robin = 'round_robin',
|
||||
double_round_robin = 'double_round_robin'
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue