Skip to content
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
10 changes: 0 additions & 10 deletions src/libs/Permissions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,6 @@ function isBetaEnabled(beta: Beta, betas: OnyxEntry<Beta[]>, betaConfiguration?:
return isFeatureEnabled || hasAllBetasEnabled;
}

/**
* Track flows ("Share with my accountant", "Categorize it") are hardcoded off.
* TODO: Remove this gate and its call sites once the new track flows feature is complete.
* See: https://github.com/Expensify/Expensify/issues/504214
*/
function canUseTrackFlows(): boolean {
return false;
}

/**
* Private notes are temporarily disabled.
*/
Expand All @@ -47,7 +38,6 @@ function canUsePrivateNotes(): boolean {

export default {
canUseLinkPreviews,
canUseTrackFlows,
canUsePrivateNotes,
isBetaEnabled,
};
112 changes: 56 additions & 56 deletions src/pages/DynamicReportDetailsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -622,62 +622,62 @@ function DynamicReportDetailsPage({policy, report, route, reportMetadata, report
});
}
}
if (Permissions.canUseTrackFlows()) {
items.push({
key: CONST.REPORT_DETAILS_MENU_ITEM.TRACK.CATEGORIZE,
translationKey: 'actionableMentionTrackExpense.categorize',
icon: expensifyIcons.Folder,
isAnonymousAction: false,
shouldShowRightIcon: true,
action: () => {
createDraftTransactionAndNavigateToParticipantSelector({
reportID: actionReportID,
reportActions: actionReportActions,
actionName: CONST.IOU.ACTION.CATEGORIZE,
reportActionID: actionableWhisperReportActionID,
introSelected,
draftTransactionIDs,
activePolicy,
userBillingGracePeriodEnds,
amountOwed,
ownerBillingGracePeriodEnd,
transaction: iouTransaction,
currentUserAccountID: currentUserPersonalDetails.accountID,
currentUserEmail: currentUserPersonalDetails.email ?? '',
currentUserLocalCurrency,
filteredPoliciesCount: filteredPoliciesInfo?.filteredPoliciesCount ?? 0,
firstPolicyID: filteredPoliciesInfo?.firstPolicyID,
});
},
});
items.push({
key: CONST.REPORT_DETAILS_MENU_ITEM.TRACK.SHARE,
translationKey: 'actionableMentionTrackExpense.share',
icon: expensifyIcons.UserPlus,
isAnonymousAction: false,
shouldShowRightIcon: true,
action: () => {
createDraftTransactionAndNavigateToParticipantSelector({
reportID: actionReportID,
reportActions: actionReportActions,
actionName: CONST.IOU.ACTION.SHARE,
reportActionID: actionableWhisperReportActionID,
introSelected,
draftTransactionIDs,
activePolicy,
userBillingGracePeriodEnds,
amountOwed,
ownerBillingGracePeriodEnd,
transaction: iouTransaction,
currentUserAccountID: currentUserPersonalDetails.accountID,
currentUserEmail: currentUserPersonalDetails.email ?? '',
currentUserLocalCurrency,
filteredPoliciesCount: filteredPoliciesInfo?.filteredPoliciesCount ?? 0,
firstPolicyID: filteredPoliciesInfo?.firstPolicyID,
});
},
});
}

items.push({
key: CONST.REPORT_DETAILS_MENU_ITEM.TRACK.CATEGORIZE,
translationKey: 'actionableMentionTrackExpense.categorize',
icon: expensifyIcons.Folder,
isAnonymousAction: false,
shouldShowRightIcon: true,
action: () => {
createDraftTransactionAndNavigateToParticipantSelector({
reportID: actionReportID,
reportActions: actionReportActions,
actionName: CONST.IOU.ACTION.CATEGORIZE,
reportActionID: actionableWhisperReportActionID,
introSelected,
draftTransactionIDs,
activePolicy,
userBillingGracePeriodEnds,
amountOwed,
ownerBillingGracePeriodEnd,
transaction: iouTransaction,
currentUserAccountID: currentUserPersonalDetails.accountID,
currentUserEmail: currentUserPersonalDetails.email ?? '',
currentUserLocalCurrency,
filteredPoliciesCount: filteredPoliciesInfo?.filteredPoliciesCount ?? 0,
firstPolicyID: filteredPoliciesInfo?.firstPolicyID,
});
},
});

items.push({
key: CONST.REPORT_DETAILS_MENU_ITEM.TRACK.SHARE,
Comment thread
arosiclair marked this conversation as resolved.
Resolved
translationKey: 'actionableMentionTrackExpense.share',
icon: expensifyIcons.UserPlus,
isAnonymousAction: false,
shouldShowRightIcon: true,
action: () => {
createDraftTransactionAndNavigateToParticipantSelector({
reportID: actionReportID,
reportActions: actionReportActions,
actionName: CONST.IOU.ACTION.SHARE,
reportActionID: actionableWhisperReportActionID,
introSelected,
draftTransactionIDs,
activePolicy,
userBillingGracePeriodEnds,
amountOwed,
ownerBillingGracePeriodEnd,
transaction: iouTransaction,
currentUserAccountID: currentUserPersonalDetails.accountID,
currentUserEmail: currentUserPersonalDetails.email ?? '',
currentUserLocalCurrency,
filteredPoliciesCount: filteredPoliciesInfo?.filteredPoliciesCount ?? 0,
firstPolicyID: filteredPoliciesInfo?.firstPolicyID,
});
},
});
}

// Prevent displaying private notes option for threads and task reports, or when the feature is disabled
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import {generateDefaultWorkspaceName} from '@libs/actions/Policy/Policy';
import {resolveSuggestedFollowup} from '@libs/actions/Report/SuggestedFollowup';
import getNonEmptyStringOnyxID from '@libs/getNonEmptyStringOnyxID';
import Navigation from '@libs/Navigation/Navigation';
import Permissions from '@libs/Permissions';
import {containsActionableFollowUps, parseFollowupsFromHtml} from '@libs/ReportActionFollowupUtils';
import {
getOriginalMessage,
Expand Down Expand Up @@ -252,9 +251,8 @@ function ChatActionableButtons({action, originalReportID, reportID, hasPendingFo
];
const options = !isSplitExpense || hasWorkspaceToSubmitTo ? [...submitButtons] : [];

if (Permissions.canUseTrackFlows()) {
options.push(prepareTrackExpenseButton('categorize'), prepareTrackExpenseButton('share'));
}
options.push(prepareTrackExpenseButton('categorize', {isRestrictedToPreferredPolicy, preferredPolicyID}));
options.push(prepareTrackExpenseButton('share', {isRestrictedToPreferredPolicy, preferredPolicyID}));
options.push({
text: 'actionableMentionTrackExpense.nothing',
key: `${action.reportActionID}-actionableMentionTrackExpense-nothing`,
Expand Down
Loading