fix(health): 修复 5 角色测试发现的 4 个共性问题
- 权限路由守卫:静默重定向改为显示 403 页面,使用 useLocation 替代 window.location.hash,补全缺失路由权限条目 - 随访状态筛选:usePaginatedData hook 添加 filters 变化监听自动刷新 - 告警操作:后端 acknowledge/dismiss/resolve 改返回 AlertResponse (含 patient_name),前端增加 active 状态兼容和错误反馈 - 咨询患者名:后端 create/get/close_session 增加 patient_name 和 doctor_name enrichment,前端 EntityName 空字符串处理
This commit is contained in:
@@ -17,6 +17,7 @@ const SEVERITY_CONFIG: Record<string, { color: string; label: string; icon: Reac
|
||||
|
||||
const STATUS_CONFIG: Record<string, { color: string; label: string }> = {
|
||||
pending: { color: 'orange', label: '待处理' },
|
||||
active: { color: 'orange', label: '待处理' },
|
||||
acknowledged: { color: 'blue', label: '已确认' },
|
||||
resolved: { color: 'green', label: '已恢复' },
|
||||
dismissed: { color: 'default', label: '已忽略' },
|
||||
@@ -42,7 +43,7 @@ export function AlertDetailPanel({
|
||||
}: AlertDetailPanelProps) {
|
||||
const severity = SEVERITY_CONFIG[alert.severity] ?? SEVERITY_CONFIG.info;
|
||||
const status = STATUS_CONFIG[alert.status] ?? STATUS_CONFIG.pending;
|
||||
const isPending = alert.status === 'pending';
|
||||
const isPending = alert.status === 'pending' || alert.status === 'active';
|
||||
const isAcknowledged = alert.status === 'acknowledged';
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user