76 lines
2.6 KiB
TypeScript
76 lines
2.6 KiB
TypeScript
"use client";
|
||
|
||
// ============================================================================
|
||
// Creatives Analytics Page
|
||
// ============================================================================
|
||
|
||
import { DashboardHeader } from "@/components/layout/dashboard-header";
|
||
import { useParams } from "next/navigation";
|
||
import { Card, CardContent } from "@/components/ui/card";
|
||
import { Lock } from "lucide-react";
|
||
import { useWorkspace } from "@/components/providers/workspace-provider";
|
||
|
||
export default function CreativesAnalyticsPage() {
|
||
const params = useParams();
|
||
const workspaceId = params?.workspaceId as string;
|
||
const { hasAnyAnalyticsPermission } = useWorkspace();
|
||
const hasPermission = hasAnyAnalyticsPermission;
|
||
|
||
if (!hasPermission) {
|
||
return (
|
||
<>
|
||
<DashboardHeader
|
||
breadcrumbs={[
|
||
{ label: "Главная", href: `/dashboard/${workspaceId}` },
|
||
{ label: "Аналитика", href: `/dashboard/${workspaceId}/analytics` },
|
||
{ label: "По креативам" },
|
||
]}
|
||
/>
|
||
|
||
<div className="flex flex-1 flex-col gap-4 p-4 pt-0 mt-4">
|
||
<Card>
|
||
<CardContent className="flex flex-col items-center justify-center py-16">
|
||
<Lock className="h-12 w-12 text-muted-foreground mb-4" />
|
||
<h3 className="text-lg font-semibold mb-2">Доступ ограничен</h3>
|
||
<p className="text-muted-foreground text-center">
|
||
У вас нет разрешения на просмотр аналитики. Обратитесь к администратору рабочего пространства.
|
||
</p>
|
||
</CardContent>
|
||
</Card>
|
||
</div>
|
||
</>
|
||
);
|
||
}
|
||
|
||
return (
|
||
<>
|
||
<DashboardHeader
|
||
breadcrumbs={[
|
||
{ label: "Главная", href: `/dashboard/${workspaceId}` },
|
||
{ label: "Аналитика", href: `/dashboard/${workspaceId}/analytics` },
|
||
{ label: "По креативам" },
|
||
]}
|
||
/>
|
||
|
||
<div className="flex flex-1 flex-col gap-4 p-4 pt-0 mt-4">
|
||
<div>
|
||
<h1 className="text-2xl font-bold tracking-tight">
|
||
Аналитика по креативам
|
||
</h1>
|
||
<p className="text-muted-foreground">
|
||
Раздел в разработке
|
||
</p>
|
||
</div>
|
||
|
||
<Card>
|
||
<CardContent className="flex items-center justify-center py-16">
|
||
<p className="text-muted-foreground">
|
||
Раздел будет реализован позже
|
||
</p>
|
||
</CardContent>
|
||
</Card>
|
||
</div>
|
||
</>
|
||
);
|
||
}
|