switch to types.ts file

This commit is contained in:
unurled 2025-07-07 18:40:26 +00:00
parent ac111154fe
commit 4430dc0293
No known key found for this signature in database
GPG key ID: 63B897371792D3D8
7 changed files with 27 additions and 27 deletions

23
src/app.d.ts vendored
View file

@ -15,26 +15,3 @@ declare global {
// interface Platform {} // interface Platform {}
export {}; 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'
}

View file

@ -5,7 +5,7 @@
BreadcrumbList, BreadcrumbList,
BreadcrumbSeparator BreadcrumbSeparator
} from '$lib/components/ui/breadcrumb'; } 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 { cn } from '$lib/utils';
import { getContext } from 'svelte'; import { getContext } from 'svelte';
import Nav from '$lib/components/nav.svelte'; import Nav from '$lib/components/nav.svelte';

View file

@ -2,7 +2,7 @@
import { getContext } from 'svelte'; import { getContext } from 'svelte';
import { cn } from '$lib/utils'; import { cn } from '$lib/utils';
import { Button } from '$lib/components/ui/button'; 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 { Home, Trophy, Calendar, UserCircle, Settings } from 'lucide-svelte';
import type { User } from '$lib/server/db/schema/users'; import type { User } from '$lib/server/db/schema/users';
import { type Role } from '$lib/server/db/schema/roles'; import { type Role } from '$lib/server/db/schema/roles';

View file

@ -9,7 +9,7 @@
import { zodClient } from 'sveltekit-superforms/adapters'; import { zodClient } from 'sveltekit-superforms/adapters';
import RadioGroup from '../ui/radio-group/radio-group.svelte'; import RadioGroup from '../ui/radio-group/radio-group.svelte';
import RadioGroupItem from '../ui/radio-group/radio-group-item.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(); let { data }: { data: { form: SuperValidated<Infer<FormSchema>> } } = $props();

View file

@ -1,3 +1,4 @@
import { SchedulingMode } from '@/types';
import z from 'zod'; import z from 'zod';
export const formSchema = z.object({ export const formSchema = z.object({

View file

@ -12,7 +12,7 @@
} from '$lib/components/ui/card'; } from '$lib/components/ui/card';
import { Badge } from '$lib/components/ui/badge'; import { Badge } from '$lib/components/ui/badge';
import { Calendar, Users, MapPin } from 'lucide-svelte'; 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 { Skeleton } from '$lib/components/ui/skeleton';
import type { PageProps } from './$types.js'; import type { PageProps } from './$types.js';
import { toast } from 'svelte-sonner'; import { toast } from 'svelte-sonner';

22
src/types.ts Normal file
View 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'
}