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:
selfrelease
2026-07-20 08:22:24 +08:00
parent c3232f73c8
commit 006fd7de7e
23 changed files with 112 additions and 6 deletions
@@ -2,6 +2,7 @@
import { useState } from "react";
import { useScopeEffect } from "@/lib/company-scope";
import { CompanyNameTag } from "@/components/shared/CompanyNameTag";
import {Plus } from "lucide-react";
import { listAgreements } from "@/lib/api-v2";
import { PageContainer, Badge, TableEmpty } from "@/components/shared/PageContainer";
@@ -10,6 +11,7 @@ import { EmptyState } from "@/components/shared/EmptyState";
/** 投资协议项。 */
interface Agreement {
company_id?: string;
title: string;
signed_at: string;
status: string;
@@ -46,6 +48,7 @@ export default function AgreementsPage() {
<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"></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>
@@ -54,10 +57,11 @@ export default function AgreementsPage() {
</thead>
<tbody className="divide-y divide-gray-100 bg-white">
{items.length === 0 ? (
<TableEmpty colSpan={4} />
<TableEmpty colSpan={5} />
) : (
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.title}</td>
<td className="px-4 py-2 text-gray-600">{item.signed_at}</td>
<td className="px-4 py-2">