From f53242c08114d2812685520f37c8f79bcff14df3 Mon Sep 17 00:00:00 2001 From: zxhlyh Date: Mon, 21 Aug 2023 18:07:51 +0800 Subject: [PATCH] Feat/add document status tooltip (#937) --- .../datasets/documents/detail/index.tsx | 2 +- web/app/components/datasets/documents/list.tsx | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/web/app/components/datasets/documents/detail/index.tsx b/web/app/components/datasets/documents/detail/index.tsx index a18bae9930..ebeb2b301b 100644 --- a/web/app/components/datasets/documents/detail/index.tsx +++ b/web/app/components/datasets/documents/detail/index.tsx @@ -127,7 +127,7 @@ const DocumentDetail: FC = ({ datasetId, documentId }) => { - + {documentDetail && !documentDetail.archived && ( = ({ className }) => { return @@ -73,7 +74,8 @@ export const StatusItem: FC<{ reverse?: boolean scene?: 'list' | 'detail' textCls?: string -}> = ({ status, reverse = false, scene = 'list', textCls = '' }) => { + errorMessage?: string +}> = ({ status, reverse = false, scene = 'list', textCls = '', errorMessage }) => { const DOC_INDEX_STATUS_MAP = useIndexStatus() const localStatus = status.toLowerCase() as keyof typeof DOC_INDEX_STATUS_MAP return
{DOC_INDEX_STATUS_MAP[localStatus]?.text} + { + errorMessage && ( + + + + ) + }
}