update the adminpage ui

This commit is contained in:
2026-09-25 16:29:41 +05:30
parent 91e4db8217
commit b36a30385c
168 changed files with 10535 additions and 1008 deletions

View File

@@ -0,0 +1,10 @@
import type {Metadata} from 'next';
import {PlatformCommerce} from '@/features/admin/components/PlatformPages';
export const metadata: Metadata = {
title: 'Commerce',
};
export default function PlatformCommercePage() {
return <PlatformCommerce />;
}

View File

@@ -0,0 +1,10 @@
import type {Metadata} from 'next';
import {PlatformFootfall} from '@/features/admin/components/PlatformPages';
export const metadata: Metadata = {
title: 'Footfall',
};
export default function PlatformFootfallPage() {
return <PlatformFootfall />;
}

View File

@@ -0,0 +1,15 @@
import type {Metadata} from 'next';
import {CompanyDetail} from '@/features/admin/components/CompanyDetail';
export const metadata: Metadata = {
title: 'Merchant',
};
export default async function MerchantPage({
params,
}: {
params: Promise<{merchantId: string}>;
}) {
const {merchantId} = await params;
return <CompanyDetail companyId={merchantId} />;
}

View File

@@ -0,0 +1,17 @@
import type {Metadata} from 'next';
import {CameraDetail} from '@/features/admin/components/CameraDetail';
export const metadata: Metadata = {
title: 'Camera',
};
export default async function CameraPage({
params,
}: {
params: Promise<{merchantId: string; shopId: string; cameraId: string}>;
}) {
const {merchantId, shopId, cameraId} = await params;
return (
<CameraDetail companyId={merchantId} storeId={shopId} cameraId={cameraId} />
);
}

View File

@@ -0,0 +1,15 @@
import type {Metadata} from 'next';
import {StoreDetail} from '@/features/admin/components/StoreDetail';
export const metadata: Metadata = {
title: 'Shop',
};
export default async function ShopPage({
params,
}: {
params: Promise<{merchantId: string; shopId: string}>;
}) {
const {merchantId, shopId} = await params;
return <StoreDetail companyId={merchantId} storeId={shopId} />;
}

View File

@@ -0,0 +1,25 @@
import type {Metadata} from 'next';
import {VStack} from '@astryxdesign/core/Layout';
import {MerchantsPanel} from '@/features/admin/components/MerchantsPanel';
import {AdminPageHeader} from '@/features/admin/components/common/AdminPageHeader';
export const metadata: Metadata = {
title: 'Merchants',
};
/**
* Every merchant on the platform as a card: search, filter, sort, create,
* suspend, reinstate, reset the owner's password, delete — and the way into
* each one.
*/
export default function MerchantsPage() {
return (
<VStack gap={6} width="100%">
<AdminPageHeader
title="Merchants"
subtitle="Create, suspend and remove the merchants on this platform."
/>
<MerchantsPanel />
</VStack>
);
}

View File

@@ -1,35 +1,19 @@
import type {Metadata} from 'next';
import {VStack} from '@astryxdesign/core/Layout';
import {Text} from '@astryxdesign/core/Text';
import {CompaniesPanel} from '@/features/admin/components/CompaniesPanel';
import {PlatformOverview} from '@/features/admin/components/PlatformOverview';
export const metadata: Metadata = {
title: 'Platform admin · Loyaly',
title: 'Overview',
};
/**
* The platform console.
* The platform console's landing page — where a platform admin arrives after
* sign-in (the proxy sends them to /admin).
*
* Company administration and nothing else — that is the whole of the platform's
* admin surface upstream (`/api/admin/*`), and this page deliberately does not
* grow past it. There is no endpoint to browse a tenant's visitors, cameras,
* reports or shops, and no impersonation: seeing a company's data means signing
* in as that company's owner, which is a different decision with a different
* audit trail.
* Merchant CRUD lives at /admin/merchants; this page is the overview above it.
* What the console can and cannot read today is recorded in
* features/admin/config/capabilities.ts, and the endpoints still needed in
* docs/ADMIN-MONITORING-API.md.
*/
export default function AdminPage() {
return (
<VStack gap={6} width="100%">
<VStack gap={1}>
<Text type="display-3" weight="medium">
Platform admin
</Text>
<Text size="sm" color="secondary">
Create, suspend and remove the merchant companies on this platform.
</Text>
</VStack>
<CompaniesPanel />
</VStack>
);
export default function AdminOverviewPage() {
return <PlatformOverview />;
}

View File

@@ -0,0 +1,10 @@
import type {Metadata} from 'next';
import {AdminProfile} from '@/features/admin/components/AdminAccount';
export const metadata: Metadata = {
title: 'Profile',
};
export default function AdminProfilePage() {
return <AdminProfile />;
}

View File

@@ -0,0 +1,10 @@
import type {Metadata} from 'next';
import {AdminSettings} from '@/features/admin/components/AdminAccount';
export const metadata: Metadata = {
title: 'Settings',
};
export default function AdminSettingsPage() {
return <AdminSettings />;
}