Skip to content

[CP Staging] Disable resolved concierge category options buttons instead of hiding the action #60325

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/components/ReportActionItem/ActionableItemButtons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ type ActionableItem = {
text: string;
isMediumSized?: boolean;
shouldUseLocalization?: boolean;
isDisabled?: boolean;
};

type ActionableItemButtonsProps = {
Expand All @@ -34,6 +35,7 @@ function ActionableItemButtons(props: ActionableItemButtonsProps) {
small={!item.isMediumSized}
medium={item.isMediumSized}
success={item.isPrimary}
isDisabled={item.isDisabled}
/>
))}
</View>
Expand Down
4 changes: 0 additions & 4 deletions src/libs/ReportActionsUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -862,10 +862,6 @@ function shouldReportActionBeVisible(reportAction: OnyxEntry<ReportAction>, key:
return false;
}

if (isConciergeCategoryOptions(reportAction) && isResolvedConciergeCategoryOptions(reportAction)) {
return false;
}

// All other actions are displayed except thread parents, deleted, or non-pending actions
const isDeleted = isDeletedAction(reportAction);
const isPending = !!reportAction.pendingAction;
Expand Down
3 changes: 3 additions & 0 deletions src/pages/home/report/PureReportActionItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ import {
isReimbursementDeQueuedOrCanceledAction,
isReimbursementQueuedAction,
isRenamedAction,
isResolvedConciergeCategoryOptions,
isSplitBillAction as isSplitBillActionReportActionsUtils,
isTagModificationAction,
isTaskAction,
Expand Down Expand Up @@ -651,12 +652,14 @@ function PureReportActionItem({
if (!options) {
return [];
}
const isResolved = isResolvedConciergeCategoryOptions(action);
return options.map((option, i) => ({
text: `${i + 1} - ${option}`,
key: `${action.reportActionID}-conciergeCategoryOptions-${option}`,
onPress: () => {
addComment(originalReportID, option);
},
isDisabled: isResolved,
}));
}

Expand Down
Loading