Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6,756 changes: 2,470 additions & 4,286 deletions frontend/package-lock.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
"dependencies": {
"@chakra-ui/react": "^3.8.0",
"@emotion/react": "^11.14.0",
"@tanstack/react-query": "^5.28.14",
"@tanstack/react-query-devtools": "^5.74.9",
"@tanstack/react-router": "1.19.1",
"@tanstack/react-query": "^5.85.6",
"@tanstack/react-query-devtools": "^5.85.6",
"@tanstack/react-router": "^1.131.31",
"axios": "1.9.0",
"form-data": "4.0.4",
"next-themes": "^0.4.6",
Expand All @@ -29,8 +29,8 @@
"@biomejs/biome": "1.9.4",
"@hey-api/openapi-ts": "^0.57.0",
"@playwright/test": "^1.52.0",
"@tanstack/router-devtools": "1.19.1",
"@tanstack/router-vite-plugin": "1.19.0",
"@tanstack/router-devtools": "^1.131.31",
"@tanstack/router-plugin": "^1.131.31",
"@types/node": "^22.15.3",
"@types/react": "^18.2.37",
"@types/react-dom": "^18.2.15",
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/UserSettings/Appearance.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const Appearance = () => {
</Heading>

<RadioGroup
onValueChange={(e) => setTheme(e.value)}
onValueChange={(e) => setTheme(e.value ?? "system")}
value={theme}
colorPalette="teal"
>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
QueryClient,
QueryClientProvider,
} from "@tanstack/react-query"
import { RouterProvider, createRouter } from "@tanstack/react-router"
import { Router, RouterProvider } from "@tanstack/react-router"
import React, { StrictMode } from "react"
import ReactDOM from "react-dom/client"
import { routeTree } from "./routeTree.gen"
Expand Down Expand Up @@ -32,7 +32,7 @@ const queryClient = new QueryClient({
}),
})

const router = createRouter({ routeTree })
const router = new Router({routeTree: routeTree})
declare module "@tanstack/react-router" {
interface Register {
router: typeof router
Expand Down
270 changes: 188 additions & 82 deletions frontend/src/routeTree.gen.ts
Original file line number Diff line number Diff line change
@@ -1,129 +1,235 @@
/* prettier-ignore-start */

/* eslint-disable */

// @ts-nocheck

// noinspection JSUnusedGlobalSymbols

// This file is auto-generated by TanStack Router

// Import Routes

import { Route as rootRoute } from './routes/__root'
import { Route as SignupImport } from './routes/signup'
import { Route as ResetPasswordImport } from './routes/reset-password'
import { Route as RecoverPasswordImport } from './routes/recover-password'
import { Route as LoginImport } from './routes/login'
import { Route as LayoutImport } from './routes/_layout'
import { Route as LayoutIndexImport } from './routes/_layout/index'
import { Route as LayoutSettingsImport } from './routes/_layout/settings'
import { Route as LayoutItemsImport } from './routes/_layout/items'
import { Route as LayoutAdminImport } from './routes/_layout/admin'

// Create/Update Routes

const SignupRoute = SignupImport.update({
// This file was automatically generated by TanStack Router.
// You should NOT make any changes in this file as it will be overwritten.
// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.

import { Route as rootRouteImport } from './routes/__root'
import { Route as SignupRouteImport } from './routes/signup'
import { Route as ResetPasswordRouteImport } from './routes/reset-password'
import { Route as RecoverPasswordRouteImport } from './routes/recover-password'
import { Route as LoginRouteImport } from './routes/login'
import { Route as LayoutRouteImport } from './routes/_layout'
import { Route as LayoutIndexRouteImport } from './routes/_layout/index'
import { Route as LayoutSettingsRouteImport } from './routes/_layout/settings'
import { Route as LayoutItemsRouteImport } from './routes/_layout/items'
import { Route as LayoutAdminRouteImport } from './routes/_layout/admin'

const SignupRoute = SignupRouteImport.update({
id: '/signup',
path: '/signup',
getParentRoute: () => rootRoute,
getParentRoute: () => rootRouteImport,
} as any)

const ResetPasswordRoute = ResetPasswordImport.update({
const ResetPasswordRoute = ResetPasswordRouteImport.update({
id: '/reset-password',
path: '/reset-password',
getParentRoute: () => rootRoute,
getParentRoute: () => rootRouteImport,
} as any)

const RecoverPasswordRoute = RecoverPasswordImport.update({
const RecoverPasswordRoute = RecoverPasswordRouteImport.update({
id: '/recover-password',
path: '/recover-password',
getParentRoute: () => rootRoute,
getParentRoute: () => rootRouteImport,
} as any)

const LoginRoute = LoginImport.update({
const LoginRoute = LoginRouteImport.update({
id: '/login',
path: '/login',
getParentRoute: () => rootRoute,
getParentRoute: () => rootRouteImport,
} as any)

const LayoutRoute = LayoutImport.update({
const LayoutRoute = LayoutRouteImport.update({
id: '/_layout',
getParentRoute: () => rootRoute,
getParentRoute: () => rootRouteImport,
} as any)

const LayoutIndexRoute = LayoutIndexImport.update({
const LayoutIndexRoute = LayoutIndexRouteImport.update({
id: '/',
path: '/',
getParentRoute: () => LayoutRoute,
} as any)

const LayoutSettingsRoute = LayoutSettingsImport.update({
const LayoutSettingsRoute = LayoutSettingsRouteImport.update({
id: '/settings',
path: '/settings',
getParentRoute: () => LayoutRoute,
} as any)

const LayoutItemsRoute = LayoutItemsImport.update({
const LayoutItemsRoute = LayoutItemsRouteImport.update({
id: '/items',
path: '/items',
getParentRoute: () => LayoutRoute,
} as any)

const LayoutAdminRoute = LayoutAdminImport.update({
const LayoutAdminRoute = LayoutAdminRouteImport.update({
id: '/admin',
path: '/admin',
getParentRoute: () => LayoutRoute,
} as any)

// Populate the FileRoutesByPath interface
export interface FileRoutesByFullPath {
'/login': typeof LoginRoute
'/recover-password': typeof RecoverPasswordRoute
'/reset-password': typeof ResetPasswordRoute
'/signup': typeof SignupRoute
'/admin': typeof LayoutAdminRoute
'/items': typeof LayoutItemsRoute
'/settings': typeof LayoutSettingsRoute
'/': typeof LayoutIndexRoute
}
export interface FileRoutesByTo {
'/login': typeof LoginRoute
'/recover-password': typeof RecoverPasswordRoute
'/reset-password': typeof ResetPasswordRoute
'/signup': typeof SignupRoute
'/admin': typeof LayoutAdminRoute
'/items': typeof LayoutItemsRoute
'/settings': typeof LayoutSettingsRoute
'/': typeof LayoutIndexRoute
}
export interface FileRoutesById {
__root__: typeof rootRouteImport
'/_layout': typeof LayoutRouteWithChildren
'/login': typeof LoginRoute
'/recover-password': typeof RecoverPasswordRoute
'/reset-password': typeof ResetPasswordRoute
'/signup': typeof SignupRoute
'/_layout/admin': typeof LayoutAdminRoute
'/_layout/items': typeof LayoutItemsRoute
'/_layout/settings': typeof LayoutSettingsRoute
'/_layout/': typeof LayoutIndexRoute
}
export interface FileRouteTypes {
fileRoutesByFullPath: FileRoutesByFullPath
fullPaths:
| '/login'
| '/recover-password'
| '/reset-password'
| '/signup'
| '/admin'
| '/items'
| '/settings'
| '/'
fileRoutesByTo: FileRoutesByTo
to:
| '/login'
| '/recover-password'
| '/reset-password'
| '/signup'
| '/admin'
| '/items'
| '/settings'
| '/'
id:
| '__root__'
| '/_layout'
| '/login'
| '/recover-password'
| '/reset-password'
| '/signup'
| '/_layout/admin'
| '/_layout/items'
| '/_layout/settings'
| '/_layout/'
fileRoutesById: FileRoutesById
}
export interface RootRouteChildren {
LayoutRoute: typeof LayoutRouteWithChildren
LoginRoute: typeof LoginRoute
RecoverPasswordRoute: typeof RecoverPasswordRoute
ResetPasswordRoute: typeof ResetPasswordRoute
SignupRoute: typeof SignupRoute
}

declare module '@tanstack/react-router' {
interface FileRoutesByPath {
'/_layout': {
preLoaderRoute: typeof LayoutImport
parentRoute: typeof rootRoute
'/signup': {
id: '/signup'
path: '/signup'
fullPath: '/signup'
preLoaderRoute: typeof SignupRouteImport
parentRoute: typeof rootRouteImport
}
'/login': {
preLoaderRoute: typeof LoginImport
parentRoute: typeof rootRoute
'/reset-password': {
id: '/reset-password'
path: '/reset-password'
fullPath: '/reset-password'
preLoaderRoute: typeof ResetPasswordRouteImport
parentRoute: typeof rootRouteImport
}
'/recover-password': {
preLoaderRoute: typeof RecoverPasswordImport
parentRoute: typeof rootRoute
}
'/reset-password': {
preLoaderRoute: typeof ResetPasswordImport
parentRoute: typeof rootRoute
id: '/recover-password'
path: '/recover-password'
fullPath: '/recover-password'
preLoaderRoute: typeof RecoverPasswordRouteImport
parentRoute: typeof rootRouteImport
}
'/signup': {
preLoaderRoute: typeof SignupImport
parentRoute: typeof rootRoute
'/login': {
id: '/login'
path: '/login'
fullPath: '/login'
preLoaderRoute: typeof LoginRouteImport
parentRoute: typeof rootRouteImport
}
'/_layout/admin': {
preLoaderRoute: typeof LayoutAdminImport
parentRoute: typeof LayoutImport
'/_layout': {
id: '/_layout'
path: ''
fullPath: ''
preLoaderRoute: typeof LayoutRouteImport
parentRoute: typeof rootRouteImport
}
'/_layout/items': {
preLoaderRoute: typeof LayoutItemsImport
parentRoute: typeof LayoutImport
'/_layout/': {
id: '/_layout/'
path: '/'
fullPath: '/'
preLoaderRoute: typeof LayoutIndexRouteImport
parentRoute: typeof LayoutRoute
}
'/_layout/settings': {
preLoaderRoute: typeof LayoutSettingsImport
parentRoute: typeof LayoutImport
id: '/_layout/settings'
path: '/settings'
fullPath: '/settings'
preLoaderRoute: typeof LayoutSettingsRouteImport
parentRoute: typeof LayoutRoute
}
'/_layout/': {
preLoaderRoute: typeof LayoutIndexImport
parentRoute: typeof LayoutImport
'/_layout/items': {
id: '/_layout/items'
path: '/items'
fullPath: '/items'
preLoaderRoute: typeof LayoutItemsRouteImport
parentRoute: typeof LayoutRoute
}
'/_layout/admin': {
id: '/_layout/admin'
path: '/admin'
fullPath: '/admin'
preLoaderRoute: typeof LayoutAdminRouteImport
parentRoute: typeof LayoutRoute
}
}
}

// Create and export the route tree
interface LayoutRouteChildren {
LayoutAdminRoute: typeof LayoutAdminRoute
LayoutItemsRoute: typeof LayoutItemsRoute
LayoutSettingsRoute: typeof LayoutSettingsRoute
LayoutIndexRoute: typeof LayoutIndexRoute
}

const LayoutRouteChildren: LayoutRouteChildren = {
LayoutAdminRoute: LayoutAdminRoute,
LayoutItemsRoute: LayoutItemsRoute,
LayoutSettingsRoute: LayoutSettingsRoute,
LayoutIndexRoute: LayoutIndexRoute,
}

export const routeTree = rootRoute.addChildren([
LayoutRoute.addChildren([
LayoutAdminRoute,
LayoutItemsRoute,
LayoutSettingsRoute,
LayoutIndexRoute,
]),
LoginRoute,
RecoverPasswordRoute,
ResetPasswordRoute,
SignupRoute,
])
const LayoutRouteWithChildren =
LayoutRoute._addFileChildren(LayoutRouteChildren)

/* prettier-ignore-end */
const rootRouteChildren: RootRouteChildren = {
LayoutRoute: LayoutRouteWithChildren,
LoginRoute: LoginRoute,
RecoverPasswordRoute: RecoverPasswordRoute,
ResetPasswordRoute: ResetPasswordRoute,
SignupRoute: SignupRoute,
}
export const routeTree = rootRouteImport
._addFileChildren(rootRouteChildren)
._addFileTypes<FileRouteTypes>()
6 changes: 4 additions & 2 deletions frontend/src/routes/_layout/admin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,12 @@ function UsersTable() {
placeholderData: (prevData) => prevData,
})

const setPage = (page: number) =>
const setPage = (page: number) => {
navigate({
search: (prev: { [key: string]: string }) => ({ ...prev, page }),
to: "/_layout/admin",
search: { page: page },
})
}

const users = data?.data.slice(0, PER_PAGE) ?? []
const count = data?.count ?? 0
Expand Down
6 changes: 4 additions & 2 deletions frontend/src/routes/_layout/items.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,12 @@ function ItemsTable() {
placeholderData: (prevData) => prevData,
})

const setPage = (page: number) =>
const setPage = (page: number) => {
navigate({
search: (prev: { [key: string]: string }) => ({ ...prev, page }),
to: "/_layout/items",
search: { page: page },
})
}

const items = data?.data.slice(0, PER_PAGE) ?? []
const count = data?.count ?? 0
Expand Down
Loading
Loading