Created a checkpoint

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 1e4433b5-47ab-464c-b663-fea2e53367dd
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Event-Id: 0a1b1aa1-ca7d-4f74-8ecb-8057b6feb3f6
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/1e4433b5-47ab-464c-b663-fea2e53367dd/7RN8LqE
This commit is contained in:
michaelschal committed 2025-10-31 09:03:53 +00:00
1 parent 345a2d968f
commit 0cf817e03f
18 files changed
+658 -33310

No files matched your search

+82
View File
@@ -0,0 +1,82 @@
import { useQuery } from "@tanstack/react-query";
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
import { Loader2, TrendingUp, AlertCircle } from "lucide-react";
import { Link } from "wouter";
import { Button } from "@/components/ui/button";
interface UtilitiesConfig {
id?: number;
salesAnalysisUrl?: string | null;
createdAt?: Date;
updatedAt?: Date;
}
export default function SalesAnalysisPage() {
// Récupérer l'URL configurée
const { data: config, isLoading } = useQuery<UtilitiesConfig>({
queryKey: ['/api/utilities']
});
if (isLoading) {
return (
<div className="flex-1 flex items-center justify-center">
<Loader2 className="w-8 h-8 animate-spin text-blue-600" />
</div>
);
}
const salesAnalysisUrl = config?.salesAnalysisUrl;
if (!salesAnalysisUrl) {
return (
<div className="flex-1 flex items-center justify-center">
<Card className="w-96">
<CardHeader className="text-center">
<AlertCircle className="w-12 h-12 text-orange-500 mx-auto mb-4" />
<CardTitle>URL non configurée</CardTitle>
<CardDescription>
L'URL d'analyse des ventes n'a pas encore été configurée.
Veuillez la définir dans les utilitaires.
</CardDescription>
</CardHeader>
<CardContent className="flex justify-center">
<Link href="/utilities">
<Button variant="default" data-testid="button-configure-url">
Configurer l'URL
</Button>
</Link>
</CardContent>
</Card>
</div>
);
}
return (
<div className="flex-1 flex flex-col overflow-hidden">
{/* Header */}
<div className="bg-white shadow-sm border-b border-gray-200 p-6">
<div className="flex items-center">
<TrendingUp className="w-8 h-8 text-blue-600 mr-3" />
<div>
<h2 className="text-2xl font-bold text-gray-900">
Analyse des Ventes
</h2>
<p className="text-gray-600 text-sm">
{salesAnalysisUrl}
</p>
</div>
</div>
</div>
{/* Iframe Content */}
<div className="flex-1 overflow-hidden">
<iframe
src={salesAnalysisUrl}
className="w-full h-full border-0"
title="Analyse des Ventes"
data-testid="iframe-sales-analysis"
/>
</div>
</div>
);
}