From 021a96e85fd040a4bd47521f42a492f5f7ed4e77 Mon Sep 17 00:00:00 2001 From: "bai.zixv" Date: Fri, 26 Jul 2024 14:19:33 +0800 Subject: [PATCH] fix(approval): fixed sort by createAt (#1396) Reviewed-on: https://git.daoyoucloud.com/daoyoucloud/tachybase/pulls/1396 Reviewed-by: sealday Co-authored-by: bai.zixv Co-committed-by: bai.zixv --- .../approval/initiations/component/InitiationsItem.tsx | 6 +++++- .../launch/VC.ApprovalBlockLaunchApplication.tsx | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/initiations/component/InitiationsItem.tsx b/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/initiations/component/InitiationsItem.tsx index c3492979b..a699f34dd 100644 --- a/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/initiations/component/InitiationsItem.tsx +++ b/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/initiations/component/InitiationsItem.tsx @@ -22,7 +22,11 @@ export const InitiationsItem = observer((props) => { api .request({ url: 'workflows:list', - params: { pageSize: 9999, filter: { ...params?.[tabKey] } }, + params: { + pageSize: 9999, + filter: { ...params?.[tabKey] }, + sort: 'createdAt', + }, }) .then((res) => { const option = res?.data?.data.map((value) => { diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/features/approval/usage/approval-block/launch/VC.ApprovalBlockLaunchApplication.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/features/approval/usage/approval-block/launch/VC.ApprovalBlockLaunchApplication.tsx index 2bad72527..96ed2c5d1 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/features/approval/usage/approval-block/launch/VC.ApprovalBlockLaunchApplication.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/features/approval/usage/approval-block/launch/VC.ApprovalBlockLaunchApplication.tsx @@ -33,7 +33,11 @@ export const ApprovalBlockLaunchApplication = (props) => { { resource: decorator?.collection, action: decorator?.action, - params: { pageSize: 99999, filter: { ...decorator?.params?.filter } }, + params: { + pageSize: 99999, + filter: { ...decorator?.params?.filter }, + sort: 'createdAt', + }, }, { manual: true,