Skip to content

Commit

Permalink
Merge pull request #36048 from neonbhai/task-assignee-offline-fix
Browse files Browse the repository at this point in the history
[Task] Fix Assignee MenuItem when Offline
  • Loading branch information
tylerkaraszewski authored Feb 9, 2024
2 parents 004d8e9 + 99d56db commit 1d528b8
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions src/components/ReportActionItem/TaskView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ function TaskView({report, shouldShowHorizontalRule, ...props}: TaskViewProps) {
interactive={!isDisableInteractive}
/>
</OfflineWithFeedback>
{report.managerID ? (
<OfflineWithFeedback pendingAction={report.pendingFields?.managerID}>
<OfflineWithFeedback pendingAction={report.pendingFields?.managerID}>
{report.managerID ? (
<MenuItem
label={translate('task.assignee')}
title={ReportUtils.getDisplayNameForParticipant(report.managerID)}
Expand All @@ -169,18 +169,18 @@ function TaskView({report, shouldShowHorizontalRule, ...props}: TaskViewProps) {
interactive={!isDisableInteractive}
titleWithTooltips={assigneeTooltipDetails}
/>
</OfflineWithFeedback>
) : (
<MenuItemWithTopDescription
description={translate('task.assignee')}
onPress={() => Navigation.navigate(ROUTES.TASK_ASSIGNEE.getRoute(report.reportID))}
shouldShowRightIcon={isOpen}
disabled={disableState}
wrapperStyle={[styles.pv2]}
shouldGreyOutWhenDisabled={false}
interactive={!isDisableInteractive}
/>
)}
) : (
<MenuItemWithTopDescription
description={translate('task.assignee')}
onPress={() => Navigation.navigate(ROUTES.TASK_ASSIGNEE.getRoute(report.reportID))}
shouldShowRightIcon={isOpen}
disabled={disableState}
wrapperStyle={[styles.pv2]}
shouldGreyOutWhenDisabled={false}
interactive={!isDisableInteractive}
/>
)}
</OfflineWithFeedback>
</OfflineWithFeedback>
<SpacerView
shouldShow={shouldShowHorizontalRule}
Expand Down

0 comments on commit 1d528b8

Please sign in to comment.