Introduces modules/hospitality with 54 routes, BFF proxy, capability-gated nav, CRUD factory, and architecture validation docs. Co-authored-by: Cursor <cursoragent@cursor.com>
34 lines
1.4 KiB
TypeScript
34 lines
1.4 KiB
TypeScript
"use client";
|
||
|
||
import Link from "next/link";
|
||
import { useMe } from "@/hooks/useMe";
|
||
import { HOSPITALITY_PORTAL } from "@/modules/hospitality/constants/portals";
|
||
import { Card, CardContent, Button, LoadingState, ErrorState } from "@/components/ds";
|
||
|
||
export const HospitalityHub = function HospitalityHubPage() {
|
||
const { me, loading, error, reload } = useMe();
|
||
if (loading) return <LoadingState label="در حال بارگذاری تربت فود…" />;
|
||
if (error) return <ErrorState message={error} onRetry={reload} />;
|
||
if (!me?.current_tenant_id) {
|
||
return <ErrorState message="برای استفاده از تربت فود workspace فعال لازم است." />;
|
||
}
|
||
|
||
return (
|
||
<div className="mx-auto max-w-lg p-6">
|
||
<h1 className="mb-2 text-2xl font-bold text-secondary">تربت فود</h1>
|
||
<p className="mb-6 text-sm text-[var(--muted)]">پلتفرم مهماننوازی سازمانی</p>
|
||
<Card>
|
||
<CardContent className="space-y-4 p-6">
|
||
<p className="font-medium">{HOSPITALITY_PORTAL.label}</p>
|
||
<p className="text-sm text-[var(--muted)]">{HOSPITALITY_PORTAL.description}</p>
|
||
<Link href={HOSPITALITY_PORTAL.basePath}>
|
||
<Button className="w-full">ورود به پنل مدیریت</Button>
|
||
</Link>
|
||
</CardContent>
|
||
</Card>
|
||
</div>
|
||
);
|
||
};
|
||
|
||
export default HospitalityHub;
|