Skip to content

Commit

Permalink
add gbr to message
Browse files Browse the repository at this point in the history
  • Loading branch information
cretadn22 committed Sep 18, 2024
1 parent e817885 commit 9aa0918
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/components/ReportActionItem/TaskPreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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
Expand All @@ -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 = `<comment>${taskTitle}</comment>`;
const isDeletedParentAction = ReportUtils.isCanceledTaskReport(taskReport, action);

const shouldShowGreenDotIndicator = ReportUtils.isOpenTaskReport(taskReport, action) && ReportUtils.isReportManager(taskReport);
if (isDeletedParentAction) {
return <RenderHTML html={`<comment>${translate('parentReportAction.deletedTask')}</comment>`} />;
}
Expand Down Expand Up @@ -123,6 +125,14 @@ function TaskPreview({taskReport, taskReportID, action, contextMenuAnchor, chatR
<RenderHTML html={isTaskCompleted ? `<completed-task>${htmlForTaskPreview}</completed-task>` : htmlForTaskPreview} />
</View>
</View>
{shouldShowGreenDotIndicator && (
<View style={styles.ml2}>
<Icon
src={Expensicons.DotIndicator}
fill={theme.success}
/>
</View>
)}
<Icon
src={Expensicons.ArrowRight}
fill={StyleUtils.getIconFillColor(getButtonState(isHovered))}
Expand Down

0 comments on commit 9aa0918

Please sign in to comment.