Skip to content

Commit 782638f

Browse files
marcochavezfOSBotify
authored andcommitted
Merge pull request #60325 from Expensify/jasper-disableResolvedCCOButtons
[CP Staging] Disable resolved concierge category options buttons instead of hiding the action (cherry picked from commit ac84318) (CP triggered by marcaaron)
1 parent 95884de commit 782638f

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

src/components/ReportActionItem/ActionableItemButtons.tsx

Lines changed: 2 additions & 0 deletions
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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -861,10 +861,6 @@ function shouldReportActionBeVisible(reportAction: OnyxEntry<ReportAction>, key:
861861
return false;
862862
}
863863

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

src/pages/home/report/PureReportActionItem.tsx

Lines changed: 3 additions & 0 deletions
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,
@@ -658,12 +659,14 @@ function PureReportActionItem({
658659
if (!options) {
659660
return [];
660661
}
662+
const isResolved = isResolvedConciergeCategoryOptions(action);
661663
return options.map((option, i) => ({
662664
text: `${i + 1} - ${option}`,
663665
key: `${action.reportActionID}-conciergeCategoryOptions-${option}`,
664666
onPress: () => {
665667
addComment(originalReportID, option);
666668
},
669+
isDisabled: isResolved,
667670
}));
668671
}
669672

0 commit comments

Comments
 (0)