fix(web): 大纲生成只替换目标卷+重排确认+窗口徽标用lucide + 伏笔看板中文化/单一登记入口/Field表单
This commit is contained in:
@@ -62,15 +62,17 @@ export function ForeshadowBoard({
|
||||
title="伏笔看板"
|
||||
description="跟踪每条伏笔从埋设、推进到回收的状态,逾期项会单独提醒。"
|
||||
actions={
|
||||
<Button
|
||||
onClick={() => setRegisterOpen(true)}
|
||||
disabled={registerOpen}
|
||||
variant="primary"
|
||||
size="sm"
|
||||
>
|
||||
<Plus className="h-4 w-4" aria-hidden="true" />
|
||||
登记伏笔
|
||||
</Button>
|
||||
// registerOpen 时隐藏头部入口,避免与展开的表单重复(全局只一个 RegisterForm)。
|
||||
registerOpen ? undefined : (
|
||||
<Button
|
||||
onClick={() => setRegisterOpen(true)}
|
||||
variant="primary"
|
||||
size="sm"
|
||||
>
|
||||
<Plus className="h-4 w-4" aria-hidden="true" />
|
||||
登记伏笔
|
||||
</Button>
|
||||
)
|
||||
}
|
||||
/>
|
||||
{registerOpen ? (
|
||||
@@ -90,11 +92,16 @@ export function ForeshadowBoard({
|
||||
title="还没有伏笔"
|
||||
description="登记第一条伏笔后,这里会按待推进、推进中、已回收、已逾期四种状态自动分栏。"
|
||||
action={
|
||||
<RegisterForm
|
||||
projectId={project.id}
|
||||
busy={busy}
|
||||
onRegister={register}
|
||||
/>
|
||||
registerOpen ? undefined : (
|
||||
<Button
|
||||
onClick={() => setRegisterOpen(true)}
|
||||
variant="primary"
|
||||
size="sm"
|
||||
>
|
||||
<Plus className="h-4 w-4" aria-hidden="true" />
|
||||
登记伏笔
|
||||
</Button>
|
||||
)
|
||||
}
|
||||
className="mt-6"
|
||||
/>
|
||||
@@ -138,16 +145,15 @@ function ForeshadowBoardSummary({
|
||||
className="mb-3 grid grid-cols-2 gap-2 sm:grid-cols-4"
|
||||
>
|
||||
{LANES.map((status) => (
|
||||
<Card key={status} className="px-3 py-2">
|
||||
<Card key={status} data-status={status} className="px-3 py-2">
|
||||
<div className="flex items-center justify-between gap-2">
|
||||
<Badge variant={SUMMARY_VARIANTS[status]}>
|
||||
{LANE_LABELS[status]}
|
||||
</Badge>
|
||||
<span className="font-mono text-sm text-ink">{counts[status]}</span>
|
||||
</div>
|
||||
<p className="mt-1 text-[11px] text-ink-soft">
|
||||
<span className="font-mono">{status}</span>
|
||||
{" · "}
|
||||
<p className="mt-1 text-2xs text-ink-soft">
|
||||
占比{" "}
|
||||
{total > 0 ? `${Math.round((counts[status] / total) * 100)}%` : "0%"}
|
||||
</p>
|
||||
</Card>
|
||||
|
||||
Reference in New Issue
Block a user