TorbatYar/frontend/modules/communication/features/settings.tsx
Mortezakoohjani 10c3c43a75 feat(communication): add SMS MVP frontend with governance artifacts.
Ship the full Communication portal (real SMS API, feature-locked future channels), BFF proxy, docs, snapshot, and phase handover.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-27 11:11:25 +03:30

34 lines
1.4 KiB
TypeScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"use client";
import Link from "next/link";
import { communicationApi } from "@/modules/communication/services/communication-api";
import { useTenantId } from "@/hooks/useTenantId";
import { useQuery } from "@tanstack/react-query";
import { CommunicationPageLoader } from "@/modules/communication/pages/shared";
import { PageHeader, Card, CardContent, Button } from "@/components/ds";
import { CommunicationBreadcrumbs } from "@/modules/communication/components/CommunicationBreadcrumbs";
export function SettingsPage() {
const { tenantId } = useTenantId();
const q = useQuery({
queryKey: ["communication", tenantId, "settings-providers"],
queryFn: () => communicationApi.providers.list(tenantId!),
enabled: !!tenantId,
});
if (!tenantId || q.isLoading) return <CommunicationPageLoader />;
return (
<div className="space-y-6">
<CommunicationBreadcrumbs current="تنظیمات" />
<PageHeader title="تنظیمات" description="مدیریت ارائه‌دهندگان و پیکربندی SMS" />
<Card>
<CardContent className="space-y-2 p-4">
<p className="text-sm text-[var(--muted)]">{q.data?.length ?? 0} ارائهدهنده فعال</p>
<Link href="/communication/sms/providers"><Button variant="outline">مدیریت ارائهدهندگان</Button></Link>
</CardContent>
</Card>
</div>
);
}
export default SettingsPage;