Skip to content

Commit ac84318

Browse files
authored
Merge pull request #60325 from Expensify/jasper-disableResolvedCCOButtons
[CP Staging] Disable resolved concierge category options buttons instead of hiding the action
2 parents aa9a74d + 06e1818 commit ac84318

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

src/components/ReportActionItem/ActionableItemButtons.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ type ActionableItem = {
1212
text: string;
1313
isMediumSized?: boolean;
1414
shouldUseLocalization?: boolean;
15+
isDisabled?: boolean;
1516
};
1617

1718
type ActionableItemButtonsProps = {
@@ -34,6 +35,7 @@ function ActionableItemButtons(props: ActionableItemButtonsProps) {
3435
small={!item.isMediumSized}
3536
medium={item.isMediumSized}
3637
success={item.isPrimary}
38+
isDisabled={item.isDisabled}
3739
/>
3840
))}
3941
</View>

src/libs/ReportActionsUtils.ts

-4
Original file line numberDiff line numberDiff line change
@@ -862,10 +862,6 @@ function shouldReportActionBeVisible(reportAction: OnyxEntry<ReportAction>, key:
862862
return false;
863863
}
864864

865-
if (isConciergeCategoryOptions(reportAction) && isResolvedConciergeCategoryOptions(reportAction)) {
866-
return false;
867-
}
868-
869865
// All other actions are displayed except thread parents, deleted, or non-pending actions
870866
const isDeleted = isDeletedAction(reportAction);
871867
const isPending = !!reportAction.pendingAction;

src/pages/home/report/PureReportActionItem.tsx

+3
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ import {
101101
isReimbursementDeQueuedOrCanceledAction,
102102
isReimbursementQueuedAction,
103103
isRenamedAction,
104+
isResolvedConciergeCategoryOptions,
104105
isSplitBillAction as isSplitBillActionReportActionsUtils,
105106
isTagModificationAction,
106107
isTaskAction,
@@ -647,12 +648,14 @@ function PureReportActionItem({
647648
if (!options) {
648649
return [];
649650
}
651+
const isResolved = isResolvedConciergeCategoryOptions(action);
650652
return options.map((option, i) => ({
651653
text: `${i + 1} - ${option}`,
652654
key: `${action.reportActionID}-conciergeCategoryOptions-${option}`,
653655
onPress: () => {
654656
addComment(originalReportID, option);
655657
},
658+
isDisabled: isResolved,
656659
}));
657660
}
658661

0 commit comments

Comments
 (0)