Skip to content

Commit

Permalink
Merge pull request #26520 from Expensify/vit-removeScanReceiptsBeta
Browse files Browse the repository at this point in the history
Remove scan receipts beta
  • Loading branch information
luacmartins authored Sep 1, 2023
2 parents 7217a18 + 4965bec commit 57603a0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 19 deletions.
1 change: 0 additions & 1 deletion src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,6 @@ const CONST = {
PASSWORDLESS: 'passwordless',
TASKS: 'tasks',
THREADS: 'threads',
SCAN_RECEIPTS: 'scanReceipts',
CUSTOM_STATUS: 'customStatus',
DISTANCE_REQUESTS: 'distanceRequests',
},
Expand Down
9 changes: 0 additions & 9 deletions src/libs/Permissions.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,6 @@ function canUseTasks(betas) {
return _.contains(betas, CONST.BETAS.TASKS) || canUseAllBetas(betas);
}

/**
* @param {Array<String>} betas
* @returns {Boolean}
*/
function canUseScanReceipts(betas) {
return _.contains(betas, CONST.BETAS.SCAN_RECEIPTS) || canUseAllBetas(betas);
}

/**
* @param {Array<String>} betas
* @returns {Boolean}
Expand Down Expand Up @@ -119,7 +111,6 @@ export default {
canUseCommentLinking,
canUsePolicyRooms,
canUseTasks,
canUseScanReceipts,
canUseCustomStatus,
canUseDistanceRequests,
canUseLinkPreviews,
Expand Down
16 changes: 7 additions & 9 deletions src/pages/iou/MoneyRequestSelectorPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function MoneyRequestSelectorPage(props) {
const iouType = lodashGet(props.route, 'params.iouType', '');
const reportID = lodashGet(props.route, 'params.reportID', '');
const {translate} = useLocalize();
const {canUseScanReceipts, canUseDistanceRequests} = usePermissions();
const {canUseDistanceRequests} = usePermissions();

const title = {
[CONST.IOU.MONEY_REQUEST_TYPE.REQUEST]: translate('iou.requestMoney'),
Expand Down Expand Up @@ -81,7 +81,7 @@ function MoneyRequestSelectorPage(props) {
title={title[iouType]}
onBackButtonPress={Navigation.dismissModal}
/>
{(canUseScanReceipts || canUseDistanceRequests) && iouType === CONST.IOU.MONEY_REQUEST_TYPE.REQUEST ? (
{iouType === CONST.IOU.MONEY_REQUEST_TYPE.REQUEST ? (
<OnyxTabNavigator
id={CONST.TAB.RECEIPT_TAB_ID}
tabBar={({state, navigation, position}) => (
Expand All @@ -98,13 +98,11 @@ function MoneyRequestSelectorPage(props) {
component={NewRequestAmountPage}
initialParams={{reportID, iouType}}
/>
{canUseScanReceipts && (
<TopTab.Screen
name={CONST.TAB.SCAN}
component={ReceiptSelector}
initialParams={{reportID, iouType, pageIndex: 1}}
/>
)}
<TopTab.Screen
name={CONST.TAB.SCAN}
component={ReceiptSelector}
initialParams={{reportID, iouType, pageIndex: 1}}
/>
{shouldDisplayDistanceRequest && (
<TopTab.Screen
name={CONST.TAB.DISTANCE}
Expand Down

0 comments on commit 57603a0

Please sign in to comment.