From a510efc496eb3a986f03e14b31b67e421ef28015 Mon Sep 17 00:00:00 2001 From: Tony AVERTY Date: Wed, 7 Oct 2026 13:35:07 +0200 Subject: [PATCH] App : onglets Scan | Configuration pour le Dirigeant MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Scan : scanner, chiffres du jour, campagne, statistiques, historique. Configuration : modules, employés, carte de fidélité (espace web), mon compte. L'employé garde un écran unique sans onglets. Co-Authored-By: Claude Opus 5.5 --- pro/app/index.tsx | 132 ++++++++++++++++++++++++++++++++-------------- 1 file changed, 93 insertions(+), 39 deletions(-) diff --git a/pro/app/index.tsx b/pro/app/index.tsx index a5eaa24..883784f 100644 --- a/pro/app/index.tsx +++ b/pro/app/index.tsx @@ -59,6 +59,7 @@ function Counter() { const store = useStore(); const [summary, setSummary] = useState(null); const [refreshing, setRefreshing] = useState(false); + const [tab, setTab] = useState<'scan' | 'config'>('scan'); const load = useCallback(async () => { try { @@ -113,49 +114,102 @@ function Counter() { - router.push('/scan')} - style={({ pressed }) => ({ - backgroundColor: pressed ? c.primaryPressed : c.primary, - borderRadius: 24, - paddingVertical: 48, - alignItems: 'center', - gap: 14, - })} - > - - - - Scanner une carte - QR code du Wallet du client - - - - {isManager ? "Aujourd'hui au magasin" : "Mes opérations aujourd'hui"} - - {[ - [summary?.operations ?? '—', 'opérations'], - [summary?.pointsGiven ?? '—', `${u} donnés`], - [summary?.rewards ?? '—', 'récompenses'], - ].map(([n, l]) => ( - - {n} - {l} - + {isManager && ( + + {( + [ + ['scan', 'Scan'], + ['config', 'Configuration'], + ] as const + ).map(([k, label]) => ( + setTab(k)} + style={{ flex: 1, paddingVertical: 10, borderRadius: 10, alignItems: 'center', backgroundColor: tab === k ? c.primary : 'transparent' }} + > + {label} + ))} - + )} - - {isManager &&