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 {Sparkles } from "lucide-react";
|
||||
import { listPreMortems, runPreMortem, listRedTeams, runRedTeam } from "@/lib/api-v2";
|
||||
import { PageContainer, Card, Badge } from "@/components/shared/PageContainer";
|
||||
@@ -11,6 +12,7 @@ import { toast } from "sonner";
|
||||
|
||||
/** Pre-mortem 记录项。 */
|
||||
interface PreMortemItem {
|
||||
company_id?: string;
|
||||
decision_context: string;
|
||||
failure_paths?: FailurePath[];
|
||||
}
|
||||
@@ -22,6 +24,7 @@ interface FailurePath {
|
||||
|
||||
/** Red Team 记录项。 */
|
||||
interface RedTeamItem {
|
||||
company_id?: string;
|
||||
perspective: string;
|
||||
analysis: string;
|
||||
}
|
||||
@@ -118,6 +121,7 @@ export default function PreMortemsPage() {
|
||||
<div className="space-y-3">
|
||||
{preMortems.map((item, i) => (
|
||||
<Card key={i}>
|
||||
<CompanyNameTag companyId={item.company_id} />
|
||||
<h3 className="font-medium text-gray-900">{item.decision_context as string}</h3>
|
||||
{Array.isArray(item.failure_paths) && (
|
||||
<div className="mt-2 space-y-1">
|
||||
@@ -136,6 +140,7 @@ export default function PreMortemsPage() {
|
||||
{redTeams.map((item, i) => (
|
||||
<Card key={i}>
|
||||
<div className="flex items-center gap-2">
|
||||
<CompanyNameTag companyId={item.company_id} />
|
||||
<Badge color="red">{item.perspective as string}</Badge>
|
||||
</div>
|
||||
<p className="mt-2 text-sm text-gray-600">{item.analysis as string}</p>
|
||||
|
||||
Reference in New Issue
Block a user