fix(reviews): make not-applicable button clickable with filter toggle
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -634,6 +634,9 @@ export function ReviewPointsList({
|
|||||||
} else if (statusFilter === 'error') {
|
} else if (statusFilter === 'error') {
|
||||||
// 过滤"错误"状态
|
// 过滤"错误"状态
|
||||||
matchesStatus = point.result === false && point.status === 'error';
|
matchesStatus = point.result === false && point.status === 'error';
|
||||||
|
} else if (statusFilter === 'notApplicable') {
|
||||||
|
// 过滤"未涉及"状态
|
||||||
|
matchesStatus = point.status === 'notApplicable' || point.status === 'not_applicable';
|
||||||
}
|
}
|
||||||
// console.log('筛选point', point);
|
// console.log('筛选point', point);
|
||||||
|
|
||||||
@@ -749,10 +752,15 @@ export function ReviewPointsList({
|
|||||||
{/* 未涉及数量 */}
|
{/* 未涉及数量 */}
|
||||||
<div className="h-8 border-r border-gray-200"></div>
|
<div className="h-8 border-r border-gray-200"></div>
|
||||||
<div className="flex items-center">
|
<div className="flex items-center">
|
||||||
<div className="px-3 h-7 bg-blue-50 rounded-md flex items-center justify-center">
|
<button
|
||||||
|
className={`px-3 h-7 bg-blue-50 rounded-md flex items-center justify-center cursor-pointer ${statusFilter === 'notApplicable' ? 'ring-2 ring-blue-400' : ''}`}
|
||||||
|
onClick={() => setStatusFilter(statusFilter === 'notApplicable' ? null : 'notApplicable')}
|
||||||
|
aria-label={`过滤未涉及项 ${statusFilter === 'notApplicable' ? '(已选中)' : ''}`}
|
||||||
|
type="button"
|
||||||
|
>
|
||||||
<span className="text-sm font-semibold text-blue-500">{notApplicableToShow}</span>
|
<span className="text-sm font-semibold text-blue-500">{notApplicableToShow}</span>
|
||||||
<span className="text-xs text-gray-500 ml-2">未涉及</span>
|
<span className="text-xs text-gray-500 ml-2">未涉及</span>
|
||||||
</div>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user