Add system status and invitations cards to admin page
Introduces SystemStatusCard and InvitationsListCard components to the admin dashboard for displaying system metrics and active invitations. Refactors InviteVendorCard to generate and display invitation codes, and updates card layouts for consistent sizing. Improves admin page structure and enhances visibility of system and invitation data.
This commit is contained in:
@@ -3,6 +3,8 @@ export const dynamic = "force-dynamic";
|
||||
import InviteVendorCard from "@/components/admin/InviteVendorCard";
|
||||
import BanUserCard from "@/components/admin/BanUserCard";
|
||||
import RecentOrdersCard from "@/components/admin/RecentOrdersCard";
|
||||
import SystemStatusCard from "@/components/admin/SystemStatusCard";
|
||||
import InvitationsListCard from "@/components/admin/InvitationsListCard";
|
||||
|
||||
export default function AdminPage() {
|
||||
return (
|
||||
@@ -12,18 +14,10 @@ export default function AdminPage() {
|
||||
<p className="text-sm text-muted-foreground mt-1">Restricted area. Only admin1 can access.</p>
|
||||
</div>
|
||||
|
||||
<div className="grid gap-4 md:grid-cols-2 lg:grid-cols-3">
|
||||
<a href="#" className="group rounded-lg border border-border/60 bg-background p-4 hover:bg-muted/40 transition-colors">
|
||||
<div className="flex items-start justify-between">
|
||||
<div>
|
||||
<h2 className="font-medium">System status</h2>
|
||||
<p className="text-sm text-muted-foreground mt-1">Uptime, versions, environment</p>
|
||||
</div>
|
||||
<span className="text-xs px-2 py-0.5 rounded bg-emerald-500/15 text-emerald-400">OK</span>
|
||||
</div>
|
||||
</a>
|
||||
<div className="grid gap-6 md:grid-cols-2 lg:grid-cols-3 items-stretch">
|
||||
<SystemStatusCard />
|
||||
|
||||
<a href="#" className="group rounded-lg border border-border/60 bg-background p-4 hover:bg-muted/40 transition-colors">
|
||||
<a href="#" className="group rounded-lg border border-border/60 bg-background p-4 hover:bg-muted/40 transition-colors h-full min-h-[200px]">
|
||||
<div className="flex items-start justify-between">
|
||||
<div>
|
||||
<h2 className="font-medium">Logs</h2>
|
||||
@@ -36,6 +30,7 @@ export default function AdminPage() {
|
||||
<InviteVendorCard />
|
||||
<BanUserCard />
|
||||
<RecentOrdersCard />
|
||||
<InvitationsListCard />
|
||||
|
||||
<a href="#" className="group rounded-lg border border-border/60 bg-background p-4 hover:bg-muted/40 transition-colors">
|
||||
<div className="flex items-start justify-between">
|
||||
@@ -47,7 +42,7 @@ export default function AdminPage() {
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<a href="#" className="group rounded-lg border border-border/60 bg-background p-4 hover:bg-muted/40 transition-colors">
|
||||
<a href="#" className="group rounded-lg border border-border/60 bg-background p-4 hover:bg-muted/40 transition-colors h-full min-h-[200px]">
|
||||
<div className="flex items-start justify-between">
|
||||
<div>
|
||||
<h2 className="font-medium">Config</h2>
|
||||
@@ -57,7 +52,7 @@ export default function AdminPage() {
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<a href="#" className="group rounded-lg border border-border/60 bg-background p-4 hover:bg-muted/40 transition-colors">
|
||||
<a href="#" className="group rounded-lg border border-border/60 bg-background p-4 hover:bg-muted/40 transition-colors h-full min-h-[200px]">
|
||||
<div className="flex items-start justify-between">
|
||||
<div>
|
||||
<h2 className="font-medium">Payments</h2>
|
||||
|
||||
Reference in New Issue
Block a user