diff --git a/web/src/pages/Profile.tsx b/web/src/pages/Profile.tsx index 37eaa20..6bc61d4 100644 --- a/web/src/pages/Profile.tsx +++ b/web/src/pages/Profile.tsx @@ -106,18 +106,18 @@ export default function Profile() { if (!authId) { return ( -
-
- +
+
+
-

Sessão não encontrada

-

Faz login para ver o teu perfil.

+

Sessão expirada

+

Faz login para aceder ao teu cofre pessoal.

) @@ -137,123 +137,99 @@ export default function Profile() { /> )} -
- {/* Cabeçalho do Perfil */} -
-
-
-
-
-
- - -
-
-
-
- - Utilizador Registado +
+ {/* Profile Glass Header */} +
+
+
+ {/* Background elements */} +
+
+ +
+
+
+
+ + +
+
+
+
+
+ Membro Verificado +
+
+

+ {displayName} +

+

{authEmail}

+
-

- {displayName} -

-

{authEmail}

- {/* 🔔 Notificações */} - {myNotifications.filter(n => !n.read).length > 0 && ( -
-
- -

Notificações

-
-
- {myNotifications.filter(n => !n.read).map(n => ( -
-
-

{n.message}

-

{new Date(n.createdAt).toLocaleString('pt-PT')}

-
- -
- ))} -
-
- )} - - {/* Navegação por Tabs no Perfil */} -
-
+ {/* Floating Navigation Tabs */} +
+
{[ - { id: 'favoritos', label: 'Favoritos', icon: Heart, count: favoriteShops.length }, - { id: 'agenda', label: 'Minha Agenda', icon: Calendar, count: myAppointments.length }, - { id: 'pedidos', label: 'Pedidos', icon: ShoppingBag, count: myOrders.length }, + { id: 'favoritos', label: 'Favoritos', icon: Heart, color: 'text-rose-500' }, + { id: 'agenda', label: 'Agenda', icon: Calendar, color: 'text-indigo-500' }, + { id: 'pedidos', label: 'Pedidos', icon: ShoppingBag, color: 'text-emerald-500' }, ].map((t) => ( ))}
-
+ {/* Tab Content with Animation */} +
{activeTab === 'favoritos' && ( -
+
+
+

Cofre de Favoritos

+ {favoriteShops.length} ESPAÇOS +
{!favoriteShops.length ? ( - - -

Sem Favoritos

-

Ainda não escolheste os teus espaços preferidos.

- -
+
+ +

Nenhuma barbearia favorita ainda.

+
) : ( -
+
{favoriteShops.map((shop) => ( - - -
-
+ + +
+
{shop.imageUrl ? ( {shop.name} ) : ( -
- +
+
)}
-
-

{shop.name}

-
-
+
+

{shop.name}

+
+
{shop.rating.toFixed(1)}
-
+
{shop.address.split(',')[0]}
@@ -265,65 +241,71 @@ export default function Profile() { ))}
)} -
+
)} {activeTab === 'agenda' && ( -
+
+
+

Minha Agenda

+ {myAppointments.length} RESERVAS +
{!myAppointments.length ? ( - - -

Sem Reservas

-

Sua jornada de estilo ainda não começou.

- -
+
+ +

Sem agendamentos futuros.

+
) : ( -
+
{myAppointments.map((a) => { const shop = shops.find((s) => s.id === a.shopId) const service = shop?.services.find((s) => s.id === a.serviceId) const canReview = a.status === 'concluido' && !reviewedAppointments.has(a.id) return ( - -
-
-
-
-

{shop?.name}

-
+ +
+
+
+
+

{shop?.name}

+ {statusLabel[a.status]} -
+ +
+
+ + {a.date}
-

{a.date}

-
+
{currency(a.total)}
-
+
{service && ( -
- - {service.name} · {service.duration} MIN +
+
+ +
+
+ SERVIÇO + {service.name} · {service.duration} MIN +
)} - {canReview && ( + {canReview ? ( - )} - - {a.status === 'concluido' && reviewedAppointments.has(a.id) && ( -
+ ) : a.status === 'concluido' && ( +
Avaliado
@@ -335,35 +317,52 @@ export default function Profile() { })}
)} -
+
)} {activeTab === 'pedidos' && ( -
+
+
+

Meus Pedidos

+ {myOrders.length} ITEMS +
{!myOrders.length ? ( - - -

Sem encomendas efetuadas.

-
+
+ +

Ainda não compraste produtos.

+
) : ( -
+
{myOrders.map((o) => { const shop = shops.find((s) => s.id === o.shopId) return ( - -
+ +
+
-

{shop?.name}

-
{currency(o.total)}
+

{shop?.name}

+
{currency(o.total)}
-

{new Date(o.createdAt).toLocaleString('pt-PT')}

-
-
- {o.items.length} {o.items.length === 1 ? 'Item' : 'Itens'} +
+ + {new Date(o.createdAt).toLocaleString('pt-PT')} +
+
+
+ {o.items.slice(0, 3).map((_, i) => ( +
+ +
+ ))} + {o.items.length > 3 && ( +
+ +{o.items.length - 3} +
+ )}
-
+ {statusLabel[o.status]} -
+
@@ -371,7 +370,7 @@ export default function Profile() { })}
)} -
+
)}