From 9aa091880ccd5ab7a563b86661c35857b06d952e Mon Sep 17 00:00:00 2001 From: cretadn22 Date: Wed, 18 Sep 2024 20:52:51 +0700 Subject: [PATCH] add gbr to message --- src/components/ReportActionItem/TaskPreview.tsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/components/ReportActionItem/TaskPreview.tsx b/src/components/ReportActionItem/TaskPreview.tsx index 7a6e4942b178..455328c6042e 100644 --- a/src/components/ReportActionItem/TaskPreview.tsx +++ b/src/components/ReportActionItem/TaskPreview.tsx @@ -14,6 +14,7 @@ import withCurrentUserPersonalDetails from '@components/withCurrentUserPersonalD import type {WithCurrentUserPersonalDetailsProps} from '@components/withCurrentUserPersonalDetails'; import useLocalize from '@hooks/useLocalize'; import useStyleUtils from '@hooks/useStyleUtils'; +import useTheme from '@hooks/useTheme'; import useThemeStyles from '@hooks/useThemeStyles'; import ControlSelection from '@libs/ControlSelection'; import * as DeviceCapabilities from '@libs/DeviceCapabilities'; @@ -65,6 +66,7 @@ function TaskPreview({taskReport, taskReportID, action, contextMenuAnchor, chatR const styles = useThemeStyles(); const StyleUtils = useStyleUtils(); const {translate} = useLocalize(); + const theme = useTheme(); // The reportAction might not contain details regarding the taskReport // Only the direct parent reportAction will contain details about the taskReport @@ -77,7 +79,7 @@ function TaskPreview({taskReport, taskReportID, action, contextMenuAnchor, chatR const [avatar] = useOnyx(ONYXKEYS.PERSONAL_DETAILS_LIST, {selector: (personalDetails) => personalDetails?.[taskAssigneeAccountID]?.avatar}); const htmlForTaskPreview = `${taskTitle}`; const isDeletedParentAction = ReportUtils.isCanceledTaskReport(taskReport, action); - + const shouldShowGreenDotIndicator = ReportUtils.isOpenTaskReport(taskReport, action) && ReportUtils.isReportManager(taskReport); if (isDeletedParentAction) { return ${translate('parentReportAction.deletedTask')}`} />; } @@ -123,6 +125,14 @@ function TaskPreview({taskReport, taskReportID, action, contextMenuAnchor, chatR ${htmlForTaskPreview}` : htmlForTaskPreview} /> + {shouldShowGreenDotIndicator && ( + + + + )}