From 97d62a61f15c2d9e9d8017502ca94c785e345de8 Mon Sep 17 00:00:00 2001 From: 230417 <230417@epvc.pt> Date: Tue, 3 Mar 2026 14:59:19 +0000 Subject: [PATCH] =?UTF-8?q?atualiza=C3=A7=C3=B5es=20do=20dashboard?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/pages/Dashboard.tsx | 53 ++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/web/src/pages/Dashboard.tsx b/web/src/pages/Dashboard.tsx index 63a86e8..dddf65a 100644 --- a/web/src/pages/Dashboard.tsx +++ b/web/src/pages/Dashboard.tsx @@ -13,7 +13,7 @@ import { Tabs } from '../components/ui/tabs'; import { currency } from '../lib/format'; import { useApp } from '../context/AppContext'; import { supabase } from '../lib/supabase'; -import { Product } from '../types'; +import { Product, BarberShop } from '../types'; import { BarChart, Bar, CartesianGrid, ResponsiveContainer, Tooltip, XAxis } from 'recharts'; import { CalendarWeekView } from '../components/CalendarWeekView'; import { @@ -71,12 +71,35 @@ const parseDate = (value: string) => new Date(value.replace(' ', 'T')); type TabId = 'overview' | 'appointments' | 'history' | 'orders' | 'services' | 'products' | 'barbers' | 'settings'; export default function Dashboard() { + const { user, shops, shopsReady } = useApp(); + const shop = shops.find((s) => s.id === user?.shopId); + + if (!user || user.role !== 'barbearia') return
A carregar painel...
+ +A carregar painel...
- -