From 27ce7631657171c7f0ccceb75e0844cada1e8116 Mon Sep 17 00:00:00 2001 From: wjh Date: Tue, 23 Jul 2024 14:52:53 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=A7=BB=E5=8A=A8=E7=AB=AF=E6=88=91?= =?UTF-8?q?=E7=9A=84=E5=8F=91=E8=B5=B7=E5=92=8C=E6=8A=84=E9=80=81=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E6=95=B0=E6=8D=AE=20(#1368)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: bai.zixv Reviewed-on: https://git.daoyoucloud.com/daoyoucloud/tachybase/pulls/1368 Reviewed-by: sealday Co-authored-by: wjh Co-committed-by: wjh --- .../approval/initiations/component/ApprovalItem.tsx | 9 ++++----- .../client/approval/todos/component/TabApprovalItem.tsx | 8 ++++---- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/initiations/component/ApprovalItem.tsx b/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/initiations/component/ApprovalItem.tsx index 9ae57845a..d6c82d2d1 100644 --- a/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/initiations/component/ApprovalItem.tsx +++ b/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/initiations/component/ApprovalItem.tsx @@ -112,11 +112,11 @@ const changService = (api, setData, user, filter, t, setDefaultData, cm, compile ...item, title: `${user.data.data.nickname}的${categoryTitle}`, categoryTitle: categoryTitle, - statusTitle: t(statusType.label), - statusColor: statusType.color, + statusTitle: t(statusType?.label), + statusColor: statusType?.color || 'default', reason: summary || [], - priorityTitle: priorityType.label, - priorityColor: priorityType.color, + priorityTitle: priorityType?.label, + priorityColor: priorityType?.color, }; }); result.sort((a, b) => { @@ -125,7 +125,6 @@ const changService = (api, setData, user, filter, t, setDefaultData, cm, compile setData(result); setDefaultData(result); }) - .catch(() => { console.error; }); diff --git a/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/todos/component/TabApprovalItem.tsx b/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/todos/component/TabApprovalItem.tsx index 1382f059a..7600b2731 100644 --- a/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/todos/component/TabApprovalItem.tsx +++ b/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/todos/component/TabApprovalItem.tsx @@ -243,11 +243,11 @@ export const changeWorkflowNoticeService = (api, t, cm, compile, input, setData, ...item, title: `${nickName}的${categoryTitle}`, categoryTitle: categoryTitle, - statusTitle: t(statusType.label), - statusColor: statusType.color, + statusTitle: t(statusType?.label), + statusColor: statusType?.color || 'default', reason: summary, - priorityTitle: priorityType.label, - priorityColor: priorityType.color, + priorityTitle: priorityType?.label, + priorityColor: priorityType?.color, }; });