Files
base/apps/web/src/pages/Messages.tsx
iven 3772afd987 chore: 干净 ERP 基座 — 删除 health/ai/wechat 业务代码
删除内容:
- 前端: health/(67文件), ai/(2文件), Copilot, MediaPicker, 相关API/Store/Hook
- 后端: wechat_handler, wechat_service, wechat_user entity, analytics handler, ai_workflow_seed
- 配置: WechatConfig, AppConfig.wechat, AuthState wechat 字段
- 启动: 微信凭据检查块, ensure_ai_workflows() 调用
- 迁移: 新增 m20260613_000170_drop_wechat_users.rs
- 脚本: api_test_health_alert.py, api_test_mp.py, mpsync.sh/ps1
- E2E: health-data page, flows/ 目录

保留: erp-core/auth/workflow/message/config/plugin + 基座前端 + 通用组件
2026-06-13 00:32:50 +08:00

73 lines
2.3 KiB
TypeScript

import { useState } from 'react';
import { Tabs } from 'antd';
import { BellOutlined, MailOutlined, FileTextOutlined, SettingOutlined } from '@ant-design/icons';
import NotificationList from './messages/NotificationList';
import MessageTemplates from './messages/MessageTemplates';
import NotificationPreferences from './messages/NotificationPreferences';
import type { MessageQuery } from '../api/messages';
const UNREAD_FILTER: MessageQuery = { is_read: false };
export default function Messages() {
const [activeKey, setActiveKey] = useState('all');
return (
<div>
<div className="erp-page-header" style={{ borderBottom: 'none', marginBottom: 0, paddingBottom: 8 }}>
<div>
<h4></h4>
<div className="erp-page-subtitle"></div>
</div>
</div>
<Tabs
activeKey={activeKey}
onChange={setActiveKey}
style={{ marginTop: 8 }}
items={[
{
key: 'all',
label: (
<span style={{ display: 'flex', alignItems: 'center', gap: 6 }}>
<MailOutlined style={{ fontSize: 14 }} />
</span>
),
children: <NotificationList />,
},
{
key: 'unread',
label: (
<span style={{ display: 'flex', alignItems: 'center', gap: 6 }}>
<BellOutlined style={{ fontSize: 14 }} />
</span>
),
children: <NotificationList queryFilter={UNREAD_FILTER} />,
},
{
key: 'templates',
label: (
<span style={{ display: 'flex', alignItems: 'center', gap: 6 }}>
<FileTextOutlined style={{ fontSize: 14 }} />
</span>
),
children: <MessageTemplates />,
},
{
key: 'preferences',
label: (
<span style={{ display: 'flex', alignItems: 'center', gap: 6 }}>
<SettingOutlined style={{ fontSize: 14 }} />
</span>
),
children: <NotificationPreferences />,
},
]}
/>
</div>
);
}