@@ -673,8 +960,13 @@ export function DataManagement() {
{isLoading && !tableStatus.length ? (
-
-
+
+ {Array.from({ length: 4 }).map((_, i) => (
+
+
+
+
+ ))}
) : tableStatus.length > 0 ? (
tableStatus.map((table) => (
@@ -689,13 +981,14 @@ export function DataManagement() {
))
) : (
-
- {hasError ? (
- "Failed to load data. Please try refreshing."
- ) : (
- <>No imports have been performed yet.
Run a full update or reset to import data.>
- )}
-
+
No imports have been performed yet.
Run a full update or reset to import data.>
+ )
+ }
+ />
)}
@@ -709,8 +1002,13 @@ export function DataManagement() {
{isLoading && !moduleStatus.length ? (
-
-
+
+ {Array.from({ length: 7 }).map((_, i) => (
+
+
+
+
+ ))}
) : moduleStatus.length > 0 ? (
moduleStatus.map((module) => (
@@ -725,13 +1023,14 @@ export function DataManagement() {
))
) : (
-
- {hasError ? (
- "Failed to load data. Please try refreshing."
- ) : (
- <>No metrics have been calculated yet.
Run a full update or reset to calculate metrics.>
- )}
-
+
No metrics have been calculated yet.
Run a full update or reset to calculate metrics.>
+ )
+ }
+ />
)}
@@ -751,14 +1050,7 @@ export function DataManagement() {
{isLoading && !importHistory.length ? (
-
-
-
-
- Loading import history...
-
-
-
+
) : importHistory.length > 0 ? (
importHistory.slice(0, 20).map((record) => (
@@ -838,15 +1130,12 @@ export function DataManagement() {
))
) : (
-
-
- {hasError ? (
- "Failed to load import history. Please try refreshing."
- ) : (
- "No import history available"
- )}
-
-
+
)}
@@ -862,14 +1151,7 @@ export function DataManagement() {
{isLoading && !calculateHistory.length ? (
-
-
-
-
- Loading calculation history...
-
-
-
+
) : calculateHistory.length > 0 ? (
calculateHistory.slice(0, 20).map((record) => (
@@ -954,15 +1236,12 @@ export function DataManagement() {
))
) : (
-
-
- {hasError ? (
- "Failed to load calculation history. Please try refreshing."
- ) : (
- "No calculation history available"
- )}
-
-
+
)}
diff --git a/inventory/src/index.css b/inventory/src/index.css
index a2fa817..150883b 100644
--- a/inventory/src/index.css
+++ b/inventory/src/index.css
@@ -96,17 +96,15 @@
@apply border-border;
}
body {
- @apply bg-background text-foreground;
+ @apply bg-background text-foreground font-sans;
}
}
-
-
@layer base {
* {
@apply border-border outline-ring/50;
}
body {
- @apply bg-background text-foreground;
+ @apply bg-background text-foreground font-sans;
}
}
diff --git a/inventory/src/main.tsx b/inventory/src/main.tsx
index 69ddf4f..b7df181 100644
--- a/inventory/src/main.tsx
+++ b/inventory/src/main.tsx
@@ -1,6 +1,7 @@
import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client'
import './index.css'
+import './App.css'
import App from './App.tsx'
import { BrowserRouter as Router } from 'react-router-dom'
diff --git a/inventory/src/pages/Login.tsx b/inventory/src/pages/Login.tsx
index 665037f..d69296f 100644
--- a/inventory/src/pages/Login.tsx
+++ b/inventory/src/pages/Login.tsx
@@ -1,28 +1,31 @@
import { useState, useContext } from "react";
import { useNavigate, useSearchParams } from "react-router-dom";
+import { AuthContext } from "@/contexts/AuthContext";
+import { toast } from "sonner";
+import { cn } from "@/lib/utils";
import { Button } from "@/components/ui/button";
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
import { Input } from "@/components/ui/input";
-import { toast } from "sonner";
-import { Loader2, Box } from "lucide-react";
-import { motion } from "framer-motion";
-import { AuthContext } from "@/contexts/AuthContext";
+import { Label } from "@/components/ui/label";
+import { motion } from "motion/react";
export function Login() {
- const [username, setUsername] = useState("");
- const [password, setPassword] = useState("");
const [isLoading, setIsLoading] = useState(false);
const navigate = useNavigate();
const [searchParams] = useSearchParams();
const { login } = useContext(AuthContext);
- const handleLogin = async (e: React.FormEvent) => {
+ const handleSubmit = async (e: React.FormEvent
) => {
e.preventDefault();
setIsLoading(true);
+ const formData = new FormData(e.currentTarget);
+ const username = formData.get("username") as string;
+ const password = formData.get("password") as string;
+
try {
await login(username, password);
-
+
// Login successful, redirect to the requested page or home
const redirectTo = searchParams.get("redirect") || "/";
navigate(redirectTo);
@@ -36,70 +39,77 @@ export function Login() {
};
return (
-
-
-
-
-
- Inventory Manager
-
+
+
+
+
+
+
+

+
+
A Cherry On Bottom
+
+
+ supporting the cherry on top
+
-
-
-
-
-
-
-
-
- Log in to continue
-
-
-
-
-
-
-
-
+
+
+
+
+
+ );
+}
+
+interface LoginFormProps {
+ className?: string;
+ isLoading?: boolean;
+ onSubmit: (e: React.FormEvent
) => void;
+}
+
+function LoginForm({ className, isLoading, onSubmit, ...props }: LoginFormProps) {
+ return (
+
+
+
+ Log in to your account
+
+
+
+
+
+
);
}
diff --git a/inventory/tailwind.config.js b/inventory/tailwind.config.js
index c04f2f5..0e14d50 100644
--- a/inventory/tailwind.config.js
+++ b/inventory/tailwind.config.js
@@ -14,6 +14,9 @@ export default {
}
},
extend: {
+ fontFamily: {
+ sans: ['Inter', 'sans-serif'],
+ },
colors: {
border: 'hsl(var(--border))',
input: 'hsl(var(--input))',