feat(frontend): 全局企业筛选同步 — 各页面显示企业名标签
- 新增 useCompanyName hook 和 CompanyNameTag 组件 - 20+ investor 页面添加 CompanyNameTag 显示企业名 - 表格型页面(agents/agreements/board/weak-signals/talents/reports)新增企业列 - 卡片型页面(risks/synergies/sentinels/alpha/exit-signals/okrs/aars/events/tasks/pre-mortems/nudges/product-diagnostics/peer-circles)添加企业名标签 - customer-success 改用 CompanyNameTag 替代手动 company_name 显示 - PlanCard 组件添加企业名标签 - 编译验证通过
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
import { useState } from "react";
|
||||
import { useScopeEffect } from "@/lib/company-scope";
|
||||
import { CompanyNameTag } from "@/components/shared/CompanyNameTag";
|
||||
import { listAgentExecutions, reviewAgentExecution } from "@/lib/api-v2";
|
||||
import { PageContainer, Badge} from "@/components/shared/PageContainer";
|
||||
import { LoadingSpinner } from "@/components/shared/LoadingSpinner";
|
||||
@@ -11,6 +12,7 @@ import { toast } from "sonner";
|
||||
/** Agent 执行记录项。 */
|
||||
interface AgentExecution {
|
||||
id: string;
|
||||
company_id?: string;
|
||||
agent_name: string;
|
||||
autonomy_level: string;
|
||||
output_summary: string;
|
||||
@@ -52,6 +54,7 @@ export default function AgentsPage() {
|
||||
<table className="min-w-full divide-y divide-gray-200 text-sm">
|
||||
<thead className="bg-gray-50">
|
||||
<tr>
|
||||
<th className="px-4 py-2 text-left font-medium text-gray-500">企业</th>
|
||||
<th className="px-4 py-2 text-left font-medium text-gray-500">Agent</th>
|
||||
<th className="px-4 py-2 text-left font-medium text-gray-500">自治级别</th>
|
||||
<th className="px-4 py-2 text-left font-medium text-gray-500">输出摘要</th>
|
||||
@@ -63,6 +66,7 @@ export default function AgentsPage() {
|
||||
<tbody className="divide-y divide-gray-100 bg-white">
|
||||
{items.map((item, i) => (
|
||||
<tr key={i}>
|
||||
<td className="px-4 py-2"><CompanyNameTag companyId={item.company_id} /></td>
|
||||
<td className="px-4 py-2 text-gray-900">{item.agent_name}</td>
|
||||
<td className="px-4 py-2"><Badge color={item.autonomy_level === "L4" ? "red" : item.autonomy_level === "L3" ? "amber" : "blue"}>{item.autonomy_level}</Badge></td>
|
||||
<td className="px-4 py-2 text-gray-600 max-w-xs truncate">{item.output_summary}</td>
|
||||
|
||||
Reference in New Issue
Block a user