forked from ChaiHao/BPOS-MVP
三面拆分⑪:收口 —— 走查通过,删掉与蓝图重复的需处置页签,文档对账
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KeDBx2PHLavbURXB8LJJ7m
This commit is contained in:
@@ -18,7 +18,6 @@ import {
|
||||
Acts,
|
||||
Card,
|
||||
Chip,
|
||||
Clear,
|
||||
Entry,
|
||||
Field,
|
||||
Kpi,
|
||||
@@ -32,7 +31,6 @@ import {
|
||||
Sec,
|
||||
Seg,
|
||||
St,
|
||||
Todo,
|
||||
} from '@web-shared/gov/primitives.tsx';
|
||||
import type { Nav } from '@web-shared/gov/gov-route.ts';
|
||||
import { useGovActivities, useGovPackages, useGovPkgReports, useGovStaff, useGovTriggers } from '@web-shared/gov/gov-api.ts';
|
||||
@@ -133,40 +131,6 @@ function PackagesHome({ tab, nav }: HomeProps) {
|
||||
);
|
||||
}
|
||||
|
||||
if (tab === 'todo') {
|
||||
const drafts = packages.filter((p) => p.state !== 'published' && reportOf(p)?.publishable === false);
|
||||
return (
|
||||
<QueryGate query={q}>
|
||||
<div className="g-todo">
|
||||
{drafts.map((p) => {
|
||||
const ec = edgeCheckOf(p, reportOf(p));
|
||||
return (
|
||||
<Todo
|
||||
key={`${p.id}@${p.version}`}
|
||||
tone="warn"
|
||||
ico="git-merge"
|
||||
title={`${p.name} v${p.version} · 未闭合(边 ${ec.closed}/${ec.total})`}
|
||||
desc={ec.issue ?? '存在未通过闭合校验的声明'}
|
||||
acts={[
|
||||
{ label: '去编排', ico: 'route', onClick: () => nav.push({ k: 'pkg', id: `${p.id}@${p.version}` }) },
|
||||
{
|
||||
label: '看边映射',
|
||||
ico: 'git-merge',
|
||||
onClick: () => {
|
||||
nav.push({ k: 'pkg', id: `${p.id}@${p.version}` });
|
||||
nav.push({ k: 'edges', id: `${p.id}@${p.version}` });
|
||||
},
|
||||
},
|
||||
]}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
{drafts.length === 0 && <Clear>无待处置 —— 全部流程包闭合校验通过。</Clear>}
|
||||
</div>
|
||||
</QueryGate>
|
||||
);
|
||||
}
|
||||
|
||||
const published = packages.filter((p) => p.state === 'published').length;
|
||||
const totalEdges = packages.reduce((a, p) => a + p.edges.length, 0);
|
||||
const closedEdges = packages.reduce((a, p) => a + edgeCheckOf(p, reportOf(p)).closed, 0);
|
||||
|
||||
Reference in New Issue
Block a user