feat: establish reservation portal foundation

This commit is contained in:
2026-08-04 15:24:08 +01:00
commit c96264ae96
226 changed files with 32232 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
export type User = {
id: number;
name: string;
email: string;
avatar?: string;
email_verified_at: string | null;
two_factor_enabled?: boolean;
created_at: string;
updated_at: string;
[key: string]: unknown;
};
export type Auth = {
user: User;
};
/* @chisel-passkeys */
export type Passkey = {
id: number;
name: string;
authenticator: string | null;
created_at_diff: string;
last_used_at_diff: string | null;
};
/* @end-chisel-passkeys */
export type TwoFactorSetupData = {
svg: string;
url: string;
};
export type TwoFactorSecretKey = {
secretKey: string;
};

20
resources/js/types/global.d.ts vendored Normal file
View File

@@ -0,0 +1,20 @@
import type { Auth } from '@/types/auth';
declare module 'react' {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
interface InputHTMLAttributes<T> {
passwordrules?: string;
}
}
declare module '@inertiajs/core' {
export interface InertiaConfig {
sharedPageProps: {
name: string;
auth: Auth;
flash: { success?: string; error?: string };
sidebarOpen: boolean;
[key: string]: unknown;
};
}
}

View File

@@ -0,0 +1,4 @@
export type * from './auth';
export type * from './navigation';
export type * from './portal';
export type * from './ui';

View File

@@ -0,0 +1,14 @@
import type { InertiaLinkProps } from '@inertiajs/react';
import type { LucideIcon } from 'lucide-react';
export type BreadcrumbItem = {
title: string;
href: NonNullable<InertiaLinkProps['href']>;
};
export type NavItem = {
title: string;
href: NonNullable<InertiaLinkProps['href']>;
icon?: LucideIcon | null;
isActive?: boolean;
};

View File

@@ -0,0 +1,43 @@
export type Asset = {
id: number;
name: string;
asset_tag: string;
model_name: string | null;
category_name: string | null;
location_name: string | null;
status_name?: string | null;
image_url?: string | null;
};
export type ReservationItem = {
id: number;
asset: Pick<Asset, 'id' | 'name' | 'asset_tag' | 'category_name'>;
};
export type Reservation = {
id: number;
uuid: string;
reference: string;
purpose: string;
usage_location: string;
starts_at: string;
ends_at: string;
status: string;
items: ReservationItem[];
};
export type PaginationLink = {
url: string | null;
label: string;
active: boolean;
};
export type Paginated<T> = {
data: T[];
current_page: number;
last_page: number;
from: number | null;
to: number | null;
total: number;
links: PaginationLink[];
};

21
resources/js/types/ui.ts Normal file
View File

@@ -0,0 +1,21 @@
import type { ReactNode } from 'react';
import type { BreadcrumbItem } from '@/types/navigation';
export type AppLayoutProps = {
children: ReactNode;
breadcrumbs?: BreadcrumbItem[];
};
export type AppVariant = 'header' | 'sidebar';
export type FlashToast = {
type: 'success' | 'info' | 'warning' | 'error';
message: string;
};
export type AuthLayoutProps = {
children?: ReactNode;
name?: string;
title?: string;
description?: string;
};

1
resources/js/types/vite-env.d.ts vendored Normal file
View File

@@ -0,0 +1 @@
/// <reference types="vite/client" />