feat: complete cmpp gateway delivery recovery workflows
This commit is contained in:
@@ -17,6 +17,7 @@ import {
|
||||
Layers3,
|
||||
MessageSquare,
|
||||
Phone,
|
||||
RefreshCw,
|
||||
TrendingUp,
|
||||
RadioTower,
|
||||
ReceiptText,
|
||||
@@ -37,10 +38,17 @@ import { AppShell } from '@/layouts/AppShell';
|
||||
export function AdminLayout() {
|
||||
const session = readSession();
|
||||
const [pendingAuditCount, setPendingAuditCount] = useState(0);
|
||||
const [downstreamAlertCount, setDownstreamAlertCount] = useState(0);
|
||||
const loadPendingAuditCount = useCallback(() => {
|
||||
adminApi.getDashboard()
|
||||
.then((dashboard) => setPendingAuditCount(dashboard.pendingAuditCount ?? 0))
|
||||
.catch(() => setPendingAuditCount(0));
|
||||
.then((dashboard) => {
|
||||
setPendingAuditCount(dashboard.pendingAuditCount ?? 0);
|
||||
setDownstreamAlertCount(dashboard.downstreamDeliverySummary?.alertCount ?? 0);
|
||||
})
|
||||
.catch(() => {
|
||||
setPendingAuditCount(0);
|
||||
setDownstreamAlertCount(0);
|
||||
});
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
@@ -71,6 +79,7 @@ export function AdminLayout() {
|
||||
userRole="平台管理员"
|
||||
auditNotifications={[
|
||||
{ label: '待处理审核', count: pendingAuditCount, to: '/admin/sms-audit' },
|
||||
{ label: '下游投递告警', count: downstreamAlertCount, to: '/admin/downstream-deliveries' },
|
||||
]}
|
||||
navSections={[
|
||||
{
|
||||
@@ -134,6 +143,8 @@ export function AdminLayout() {
|
||||
{ label: '短信记录', to: '/admin/sms-records', icon: MessageSquare },
|
||||
{ label: '彩信记录', to: '/admin/mms-records', icon: ImageIcon, pending: true },
|
||||
{ label: '短信上行记录', to: '/admin/sms-uplink-records', icon: MessageSquare },
|
||||
{ label: '下游投递记录', to: '/admin/downstream-deliveries', icon: Send },
|
||||
{ label: '恢复状态管理', to: '/admin/downstream-recovery-statuses', icon: RefreshCw },
|
||||
{ label: '充值记录', to: '/admin/recharge-records', icon: ReceiptText },
|
||||
],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user