Add frontend/modules/loyalty with types, API client, design system, feature pages and thin App Router routes under app/loyalty/. BFF proxy at app/api/loyalty/. Include loyalty frontend docs. Co-authored-by: Cursor <cursoragent@cursor.com>
34 lines
1.1 KiB
TypeScript
34 lines
1.1 KiB
TypeScript
"use client";
|
||
|
||
import { PageHeader } from "@/components/ds";
|
||
import { useTenantId } from "@/hooks/useTenantId";
|
||
import { LoyaltyBreadcrumbs } from "@/modules/loyalty/components/LoyaltyBreadcrumbs";
|
||
import {
|
||
LoyaltyCountsGrid,
|
||
LoyaltyPageLoader,
|
||
LoyaltyServiceBadge,
|
||
useLoyaltyHealth,
|
||
} from "@/modules/loyalty/pages/shared";
|
||
|
||
export default function ExecutiveDashboard() {
|
||
const { tenantId } = useTenantId();
|
||
const health = useLoyaltyHealth();
|
||
if (!tenantId) return <LoyaltyPageLoader />;
|
||
return (
|
||
<div className="space-y-6">
|
||
<LoyaltyBreadcrumbs items={[{ label: "داشبورد مدیریتی" }]} />
|
||
<PageHeader
|
||
title="داشبورد مدیریتی"
|
||
description="نمای اجرایی پلتفرم وفاداری — آمار واقعی از API."
|
||
actions={<LoyaltyServiceBadge />}
|
||
/>
|
||
<LoyaltyCountsGrid tenantId={tenantId} />
|
||
{health.data ? (
|
||
<p className="text-xs text-[var(--muted)]">
|
||
سرویس {health.data.service} نسخه {health.data.version} — وضعیت {health.data.status}
|
||
</p>
|
||
) : null}
|
||
</div>
|
||
);
|
||
}
|