Files
lislgosms/src/layouts/ClientLayout.tsx
T

82 lines
2.9 KiB
TypeScript

import {
BadgeDollarSign,
ClipboardList,
FileText,
Home,
ImageIcon,
MessageSquareText,
PenLine,
ReceiptText,
ShieldCheck,
Users,
} from 'lucide-react';
import { Navigate } from 'react-router-dom';
import { readSession } from '@/api/session';
import { AppShell } from '@/layouts/AppShell';
export function ClientLayout() {
const session = readSession();
if (session?.portal !== 'client') {
return <Navigate to="/client/login" replace />;
}
return (
<AppShell
title="短信平台客户端"
subtitle="短信服务控制台"
workspaceName={session.user.tenantName ?? '企业客户空间'}
loginPath="/client/login"
userName={session.user.displayName}
userRole="企业管理员"
navSections={[
{
title: '概览',
items: [{ label: '工作台', to: '/client', icon: Home }],
},
{
title: '短信业务',
items: [
{ label: '短信发送', to: '/client/send', icon: MessageSquareText },
{ label: '查看批量任务', to: '/client/batch-tasks', icon: ClipboardList },
{ label: '短信发送详情', to: '/client/send-detail', icon: ClipboardList },
{ label: '查看上行短信', to: '/client/uplink-messages', icon: MessageSquareText },
],
},
{
title: '短信基础配置',
items: [
{ label: '短信应用', to: '/client/applications', icon: FileText },
{ label: '签名与引流信息', to: '/client/signatures', icon: PenLine },
{ label: '模板管理', to: '/client/templates', icon: FileText },
],
},
{
title: '彩信服务',
items: [
{ label: '签名报备', to: '/client/mms-signatures', icon: PenLine, pending: true },
{ label: '彩信模板管理', to: '/client/mms-templates', icon: ImageIcon, pending: true },
{ label: '发送彩信', to: '/client/mms-send', icon: MessageSquareText, pending: true },
{ label: '查看批量任务', to: '/client/mms-batch-tasks', icon: ClipboardList, pending: true },
{ label: '彩信发送详情', to: '/client/mms-send-detail', icon: ClipboardList, pending: true },
{ label: '查看上行彩信', to: '/client/mms-uplink-messages', icon: ImageIcon, pending: true },
],
},
{
title: '账户',
items: [
{ label: '充值套餐', to: '/client/billing', icon: BadgeDollarSign },
],
},
{
title: '系统管理',
items: [
{ label: '企业认证', to: '/client/enterprise-auth', icon: ShieldCheck },
{ label: '用户管理', to: '/client/users', icon: Users },
{ label: '系统日志', to: '/client/system-logs', icon: FileText },
],
},
]}
/>
);
}