added logo

This commit is contained in:
StefanoPutelli 2025-07-02 22:58:41 +02:00
parent cc883f2a11
commit 5a64d262f1
3 changed files with 35 additions and 38 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

View file

@ -15,6 +15,7 @@ import { EditItemDialog } from '@/components/EditItemDialog';
import { QuantityControls } from '@/components/QuantityControls';
import { QuantityUsedControls } from './QuantityUsedControls';
import { useToast } from '@/hooks/use-toast';
import logo from '@/assets/logo.png';
export const InventoryDashboard = () => {
const [items, setItems] = useState<InventoryItem[]>([]);
@ -84,12 +85,12 @@ export const InventoryDashboard = () => {
if (!itemToDelete) return;
setIsDeletingItem(true);
try {
await inventoryService.deleteItem(itemToDelete._id);
setItems(prev => prev.filter(item => item._id !== itemToDelete._id));
setItemToDelete(null);
toast({
title: "Oggetto eliminato",
description: `${itemToDelete.name} è stato eliminato dall'inventario`,
@ -126,13 +127,13 @@ export const InventoryDashboard = () => {
};
const handleItemUpdated = (updatedItem: InventoryItem) => {
setItems(prev => prev.map(item =>
setItems(prev => prev.map(item =>
item._id === updatedItem._id ? updatedItem : item
));
};
const handleQuantityUpdate = (updatedItem: InventoryItem) => {
setItems(prev => prev.map(item =>
setItems(prev => prev.map(item =>
item._id === updatedItem._id ? updatedItem : item
));
};
@ -179,9 +180,7 @@ export const InventoryDashboard = () => {
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div className="flex justify-between items-center py-4">
<div className="flex items-center space-x-4">
<div className="w-10 h-10 bg-gradient-to-br from-blue-600 to-green-500 rounded-xl flex items-center justify-center">
<span className="text-white font-bold">HIP</span>
</div>
<img src={logo} alt="Hackinpovo Logo" className="w-10 h-10 rounded-xl" />
<div>
<h1 className="text-2xl font-bold text-gray-900">Inventario Hackinpovo</h1>
<p className="text-sm text-gray-500">Gestisci oggetti e componenti</p>
@ -259,21 +258,20 @@ export const InventoryDashboard = () => {
{tags.map(tag => {
console.log(tag);
return <Badge
key={tag._id}
variant="outline"
className={`cursor-pointer transition-all ${
selectedTagIds.includes(tag._id)
? 'bg-blue-100 border-blue-300'
: 'hover:bg-gray-100'
}`}
onClick={() => toggleTagFilter(tag._id)}
>
<div
className="w-3 h-3 rounded-full mr-2"
style={{ backgroundColor: tag.color }}
/>
{tag.name}
</Badge>
key={tag._id}
variant="outline"
className={`cursor-pointer transition-all ${selectedTagIds.includes(tag._id)
? 'bg-blue-100 border-blue-300'
: 'hover:bg-gray-100'
}`}
onClick={() => toggleTagFilter(tag._id)}
>
<div
className="w-3 h-3 rounded-full mr-2"
style={{ backgroundColor: tag.color }}
/>
{tag.name}
</Badge>
})}
</div>
</div>
@ -332,27 +330,27 @@ export const InventoryDashboard = () => {
<div className="flex flex-wrap gap-1">
{item.tags.map(tag => (
<Badge
key={tag._id}
variant="outline"
>
<div
className="w-3 h-3 rounded-full mr-2"
style={{ backgroundColor: tag.color }}
/>
{tag.name}
</Badge>
key={tag._id}
variant="outline"
>
<div
className="w-3 h-3 rounded-full mr-2"
style={{ backgroundColor: tag.color }}
/>
{tag.name}
</Badge>
))}
</div>
</TableCell>
<TableCell>
<QuantityControls
item={item}
<QuantityControls
item={item}
onQuantityUpdate={handleQuantityUpdate}
/>
</TableCell>
<TableCell>
<QuantityUsedControls
item={item}
<QuantityUsedControls
item={item}
onQuantityUpdate={handleQuantityUpdate}
/>
</TableCell>

View file

@ -6,6 +6,7 @@ import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/com
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs';
import { useAuth } from '@/hooks/useAuth';
import { useToast } from '@/hooks/use-toast';
import logo from '@/assets/logo.png'; // Adjust the path as necessary
export const LoginForm = () => {
const [isLoading, setIsLoading] = useState(false);
@ -67,9 +68,7 @@ export const LoginForm = () => {
<div className="min-h-screen bg-gradient-to-br from-slate-900 via-blue-900 to-slate-800 flex items-center justify-center p-4">
<Card className="w-full max-w-md shadow-2xl border-0 bg-white/95 backdrop-blur">
<CardHeader className="text-center pb-2">
<div className="w-16 h-16 bg-gradient-to-br from-blue-600 to-green-500 rounded-2xl mx-auto mb-4 flex items-center justify-center">
<span className="text-white font-bold text-xl">HIP</span>
</div>
<img src={logo} alt="Hackinpovo Logo" className="w-16 h-16 mx-auto mb-4 rounded-2xl" />
<CardTitle className="text-2xl bg-gradient-to-r from-blue-600 to-green-500 bg-clip-text text-transparent">
Inventario Hackinpovo
</CardTitle>