Skip to content

Commit

Permalink
Merge pull request #28296 from Expensify/yuwen-removeCatBeta
Browse files Browse the repository at this point in the history
Remove the categories beta
  • Loading branch information
pecanoro authored Oct 26, 2023
2 parents a67253b + f3d70cc commit 8c76d2a
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 10 deletions.
1 change: 0 additions & 1 deletion src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,6 @@ const CONST = {
TASKS: 'tasks',
THREADS: 'threads',
CUSTOM_STATUS: 'customStatus',
NEW_DOT_CATEGORIES: 'newDotCategories',
NEW_DOT_TAGS: 'newDotTags',
NEW_DOT_SAML: 'newDotSAML',
},
Expand Down
3 changes: 1 addition & 2 deletions src/components/MoneyRequestConfirmationList.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,7 @@ function MoneyRequestConfirmationList(props) {
const shouldCalculateDistanceAmount = props.isDistanceRequest && props.iouAmount === 0;

// A flag for showing the categories field
const shouldShowCategories =
props.isPolicyExpenseChat && Permissions.canUseCategories(props.betas) && (props.iouCategory || OptionsListUtils.hasEnabledOptions(_.values(props.policyCategories)));
const shouldShowCategories = props.isPolicyExpenseChat && (props.iouCategory || OptionsListUtils.hasEnabledOptions(_.values(props.policyCategories)));

// A flag and a toggler for showing the rest of the form fields
const [shouldExpandFields, toggleShouldExpandFields] = useReducer((state) => !state, false);
Expand Down
2 changes: 1 addition & 1 deletion src/components/ReportActionItem/MoneyRequestView.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ function MoneyRequestView({report, betas, parentReport, policyCategories, should
const policyTagsList = lodashGet(policyTag, 'tags', {});

// Flags for showing categories and tags
const shouldShowCategory = isPolicyExpenseChat && Permissions.canUseCategories(betas) && (transactionCategory || OptionsListUtils.hasEnabledOptions(lodashValues(policyCategories)));
const shouldShowCategory = isPolicyExpenseChat && (transactionCategory || OptionsListUtils.hasEnabledOptions(lodashValues(policyCategories)));
const shouldShowTag = isPolicyExpenseChat && Permissions.canUseTags(betas) && (transactionTag || OptionsListUtils.hasEnabledOptions(lodashValues(policyTagsList)));
const shouldShowBillable = isPolicyExpenseChat && Permissions.canUseTags(betas) && (transactionBillable || !lodashGet(policy, 'disabledFields.defaultBillable', true));

Expand Down
5 changes: 0 additions & 5 deletions src/libs/Permissions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ function canUseCustomStatus(betas: Beta[]): boolean {
return betas?.includes(CONST.BETAS.CUSTOM_STATUS) || canUseAllBetas(betas);
}

function canUseCategories(betas: Beta[]): boolean {
return betas?.includes(CONST.BETAS.NEW_DOT_CATEGORIES) || canUseAllBetas(betas);
}

function canUseTags(betas: Beta[]): boolean {
return betas?.includes(CONST.BETAS.NEW_DOT_TAGS) || canUseAllBetas(betas);
}
Expand All @@ -66,7 +62,6 @@ export default {
canUsePolicyRooms,
canUseTasks,
canUseCustomStatus,
canUseCategories,
canUseTags,
canUseLinkPreviews,
};
2 changes: 1 addition & 1 deletion src/pages/EditRequestPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ function EditRequestPage({betas, report, route, parentReport, policyCategories,
const isPolicyExpenseChat = useMemo(() => ReportUtils.isPolicyExpenseChat(ReportUtils.getRootParentReport(report)), [report]);

// A flag for showing the categories page
const shouldShowCategories = isPolicyExpenseChat && Permissions.canUseCategories(betas) && (transactionCategory || OptionsListUtils.hasEnabledOptions(lodashValues(policyCategories)));
const shouldShowCategories = isPolicyExpenseChat && (transactionCategory || OptionsListUtils.hasEnabledOptions(lodashValues(policyCategories)));

// A flag for showing the tags page
const shouldShowTags = isPolicyExpenseChat && Permissions.canUseTags(betas) && (transactionTag || OptionsListUtils.hasEnabledOptions(lodashValues(policyTagList)));
Expand Down

0 comments on commit 8c76d2a

Please sign in to comment.