From 2ba5f03f35986d03e16cb0a7a269839ec71fcfba Mon Sep 17 00:00:00 2001 From: 230417 <230417@epvc.pt> Date: Tue, 28 Apr 2026 15:51:52 +0100 Subject: [PATCH] refactor: optimize mobile layout with improved responsiveness, overflow handling, and touch interactions --- web/src/components/ServiceList.tsx | 22 ++++++------- web/src/components/ui/tabs.tsx | 8 ++--- web/src/index.css | 4 ++- web/src/pages/Dashboard.tsx | 51 ++++++++++++++++-------------- web/src/pages/ShopDetails.tsx | 26 ++++++++------- 5 files changed, 60 insertions(+), 51 deletions(-) diff --git a/web/src/components/ServiceList.tsx b/web/src/components/ServiceList.tsx index a66a346..c286d6e 100644 --- a/web/src/components/ServiceList.tsx +++ b/web/src/components/ServiceList.tsx @@ -13,28 +13,28 @@ export const ServiceList = ({ }) => (
{services.map((s) => ( - -
-
-

{s.name}

-
-
- + +
+
+

{s.name}

+
+
+ {s.duration} min
-
+
{currency(s.price)}
{onSelect && ( -
-

Lugar disponível hoje

+
+

Lugar disponível hoje

diff --git a/web/src/components/ui/tabs.tsx b/web/src/components/ui/tabs.tsx index ac781a5..07c8650 100644 --- a/web/src/components/ui/tabs.tsx +++ b/web/src/components/ui/tabs.tsx @@ -3,21 +3,21 @@ import { cn } from '../../lib/cn'; type Tab = { id: string; label: string; badge?: number }; export const Tabs = ({ tabs, active, onChange, className }: { tabs: Tab[]; active: string; onChange: (id: string) => void; className?: string }) => ( -
+
{tabs.map((t) => (
{/* Tabs */} - ({ id: t.id, label: t.label, badge: t.badge }))} active={activeTab} onChange={(v) => setActiveTab(v as TabId)} /> +
+ ({ id: t.id, label: t.label, badge: t.badge }))} active={activeTab} onChange={(v) => setActiveTab(v as TabId)} /> +
{/* Tab Content */} {activeTab === 'overview' && ( @@ -430,40 +432,43 @@ function DashboardInner({ shop }: { shop: BarberShop }) {
{/* Stats Cards Principais */} -
- -
-
- +
+ +
+
+ +
-

Total de reservas

-

{allShopAppointments.length}

-

Reservas da plataforma: {allShopAppointments.length}

+

Total de reservas

+

{allShopAppointments.length}

+

Reservas da plataforma: {allShopAppointments.length}

- -
-
- + +
+
+ +
-

Reservas online

-

{allShopAppointments.length}

-

Marcações feitas pela plataforma

+

Reservas online

+

{allShopAppointments.length}

+

Marcações feitas pela plataforma

- -
-
- + +
+
+ +
-

Novos clientes

-

+

Novos clientes

+

{new Set(allShopAppointments.map(a => a.customerId)).size}

-

Clientes únicos

+

Clientes únicos

diff --git a/web/src/pages/ShopDetails.tsx b/web/src/pages/ShopDetails.tsx index c69aaf6..f00a5bf 100644 --- a/web/src/pages/ShopDetails.tsx +++ b/web/src/pages/ShopDetails.tsx @@ -98,18 +98,20 @@ export default function ShopDetails() {
- setTab(v as typeof tab)} - className="border-none bg-transparent" - /> -
+
+ setTab(v as typeof tab)} + className="border-none bg-transparent" + /> +
+
{(shop.services || []).length} SERVIÇOS · {(shop.barbers || []).length} BARBEIROS