diff --git a/client/src/pages/SalesAnalysisPage.tsx b/client/src/pages/SalesAnalysisPage.tsx index 1b64665..c942eb1 100644 --- a/client/src/pages/SalesAnalysisPage.tsx +++ b/client/src/pages/SalesAnalysisPage.tsx @@ -1,6 +1,7 @@ +import { useState } from "react"; import { useQuery } from "@tanstack/react-query"; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; -import { Loader2, TrendingUp, AlertCircle } from "lucide-react"; +import { Loader2, TrendingUp, AlertCircle, RefreshCw } from "lucide-react"; import { Link } from "wouter"; import { Button } from "@/components/ui/button"; @@ -12,10 +13,18 @@ interface UtilitiesConfig { } export default function SalesAnalysisPage() { + // State pour forcer le rechargement de l'iframe + const [iframeKey, setIframeKey] = useState(0); + // Récupérer l'URL configurée const { data: config, isLoading } = useQuery({ queryKey: ['/api/utilities'] }); + + // Fonction pour recharger l'iframe + const handleRefresh = () => { + setIframeKey(prev => prev + 1); + }; if (isLoading) { return ( @@ -52,8 +61,24 @@ export default function SalesAnalysisPage() { } return ( -
+
+ {/* Bouton de rechargement flottant */} +
+ +
+ + {/* iframe avec clé pour forcer le rechargement */}