added and fixed minor details

This commit is contained in:
2026-05-30 00:02:55 +02:00
parent 1d7fb194fa
commit b435b5f638
6 changed files with 198 additions and 8 deletions
+1 -1
View File
@@ -74,7 +74,7 @@ export const Sidebar = () => {
Cookies.remove("token");
navigate({ to: "/login" });
}}
variant={variant("/login")}
color="danger"
startDecorator={<ExitToAppIcon />}
className={btnClass}
>
+1 -1
View File
@@ -280,7 +280,7 @@ export const InventoryPage = () => {
description: product?.description ?? "",
imageUrl: product?.picture ?? undefined,
price: product?.price ?? "-",
stock: `${product?.amount ?? 0} Stk.`,
stock: `${product?.amount ?? 0} ${t("pcs")}`,
location: product?.storage_location_name ?? "-",
locationDetail: "",
expiryDate: formatDate(product?.expiry_date),
+16 -4
View File
@@ -1,9 +1,21 @@
import { createFileRoute } from '@tanstack/react-router'
import { isAuthenticated } from "../utils/auth";
import { createFileRoute, redirect } from "@tanstack/react-router";
export const Route = createFileRoute('/')({
export const Route = createFileRoute("/")({
beforeLoad: async () => {
if (!(await isAuthenticated())) {
throw redirect({
to: "/login",
});
} else {
throw redirect({
to: "/app/inventory",
});
}
},
component: RouteComponent,
})
});
function RouteComponent() {
return <div>Index "/"!</div>
return;
}
+2 -1
View File
@@ -2,5 +2,6 @@
"username": "Benutzername",
"password": "Passwort",
"eu001": "Falscher Benutzername oder Passwort!",
"login": "Login"
"login": "Login",
"pcs": "Stk."
}
+2 -1
View File
@@ -40,5 +40,6 @@
"settings-sub": "Manage your app preferences and store defaults.",
"preferences": "Preferences",
"selected": "selected",
"logout": "Logout"
"logout": "Logout",
"pcs": "pcs."
}