feat: 任务树/流转卡展示驳回原因与返工备注(网页SlimCard,移动端FlowCard/SwipeCards)

This commit is contained in:
2026-09-09 17:29:40 +08:00
parent 7b7dbbb0d8
commit b088d25df9
3 changed files with 19 additions and 0 deletions

View File

@ -146,6 +146,13 @@ const SlimCard = memo(function SlimCard({
{fmtTime(task.created_at)}
{task.completed_at ? `${fmtTime(task.completed_at)}` : " → 至今"}
</p>
{/* 驳回/返工原因:原 REJECTED 取 reject_reason返工节点取含“驳回/返工”的备注 */}
{(() => {
const rj = task.reject_reason;
const rm = task.remark;
const txt = rj ? `❌ 驳回: ${rj}` : (rm && /驳回|返工/.test(rm) ? rm : null);
return txt ? <p className={`${sz.sub} text-red-500 whitespace-pre-wrap`}>{txt}</p> : null;
})()}
{legacy && <p className={`${sz.sub} text-orange-500`}>: {assigneeName || (findParent(task)?.assignee_id) || "历史任务"}</p>}
{isNestedSpawn && <p className={`${sz.sub} text-purple-500`}>: {findParent(task)?.assignee_id || "—"}</p>}
{/* 操作按钮 */}