Skip to content

Commit 32319ed

Browse files
committed
remove beta gate.
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
1 parent 1c89c19 commit 32319ed

4 files changed

Lines changed: 35 additions & 42 deletions

File tree

src/CONST/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -948,7 +948,6 @@ const CONST = {
948948
BULK_DUPLICATE_REPORT: 'bulkDuplicateReport',
949949
BULK_EDIT: 'bulkEdit',
950950
NEW_MANUAL_EXPENSE_FLOW: 'newManualExpenseFlow',
951-
BULK_SUBMIT_APPROVE_PAY: 'bulkSubmitApprovePay',
952951
},
953952
BUTTON_STATES: {
954953
DEFAULT: 'default',

src/components/MoneyReportHeaderActions/MoneyReportHeaderSelectionDropdown.tsx

Lines changed: 34 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ function MoneyReportHeaderSelectionDropdown({reportID, primaryAction, isReportIn
8484
const {isOffline} = useNetwork();
8585
const {isBetaEnabled} = usePermissions();
8686
const isASAPSubmitBetaEnabled = isBetaEnabled(CONST.BETAS.ASAP_SUBMIT);
87-
const isBulkSubmitApprovePayBetaEnabled = isBetaEnabled(CONST.BETAS.BULK_SUBMIT_APPROVE_PAY);
8887
const activeAdminPolicies = useActiveAdminPolicies();
8988
const lastWorkspaceNumber = useLastWorkspaceNumber();
9089
const {convertToDisplayString} = useCurrencyListActions();
@@ -380,42 +379,40 @@ function MoneyReportHeaderSelectionDropdown({reportID, primaryAction, isReportIn
380379

381380
// Ref writes below are inside onSelected callbacks that only fire on user interaction, never during render.
382381

383-
const selectionModeReportLevelActions: Array<DropdownOption<string> & Pick<PopoverMenuItem, 'backButtonText' | 'rightIcon'>> = !isBulkSubmitApprovePayBetaEnabled
384-
? []
385-
: [
386-
...(hasSubmitAction && !shouldBlockSubmit
387-
? [
388-
{
389-
text: translate('common.submit'),
390-
icon: expensifyIcons.Send,
391-
value: CONST.REPORT.PRIMARY_ACTIONS.SUBMIT,
392-
onSelected: () => handleSubmitReport(true),
393-
},
394-
]
395-
: []),
396-
...(hasApproveAction && !isBlockSubmitDueToPreventSelfApproval
397-
? [
398-
{
399-
text: translate('iou.approve'),
400-
icon: expensifyIcons.ThumbsUp,
401-
value: CONST.REPORT.PRIMARY_ACTIONS.APPROVE,
402-
onSelected: () => confirmApproval(true),
403-
},
404-
]
405-
: []),
406-
...(hasPayAction && !(isOffline && !canAllowSettlement)
407-
? [
408-
{
409-
text: translate('iou.settlePayment', totalAmount),
410-
icon: expensifyIcons.Cash,
411-
value: CONST.REPORT.PRIMARY_ACTIONS.PAY as string,
412-
rightIcon: expensifyIcons.ArrowRight,
413-
backButtonText: translate('iou.settlePayment', totalAmount),
414-
subMenuItems: paymentSubMenuItems,
415-
},
416-
]
417-
: []),
418-
];
382+
const selectionModeReportLevelActions: Array<DropdownOption<string> & Pick<PopoverMenuItem, 'backButtonText' | 'rightIcon'>> = [
383+
...(hasSubmitAction && !shouldBlockSubmit
384+
? [
385+
{
386+
text: translate('common.submit'),
387+
icon: expensifyIcons.Send,
388+
value: CONST.REPORT.PRIMARY_ACTIONS.SUBMIT,
389+
onSelected: () => handleSubmitReport(true),
390+
},
391+
]
392+
: []),
393+
...(hasApproveAction && !isBlockSubmitDueToPreventSelfApproval
394+
? [
395+
{
396+
text: translate('iou.approve'),
397+
icon: expensifyIcons.ThumbsUp,
398+
value: CONST.REPORT.PRIMARY_ACTIONS.APPROVE,
399+
onSelected: () => confirmApproval(true),
400+
},
401+
]
402+
: []),
403+
...(hasPayAction && !(isOffline && !canAllowSettlement)
404+
? [
405+
{
406+
text: translate('iou.settlePayment', totalAmount),
407+
icon: expensifyIcons.Cash,
408+
value: CONST.REPORT.PRIMARY_ACTIONS.PAY as string,
409+
rightIcon: expensifyIcons.ArrowRight,
410+
backButtonText: translate('iou.settlePayment', totalAmount),
411+
subMenuItems: paymentSubMenuItems,
412+
},
413+
]
414+
: []),
415+
];
419416

420417
const mappedOptions = originalSelectedTransactionsOptions.map((option) => {
421418
if (option.value === CONST.REPORT.SECONDARY_ACTIONS.DELETE) {

src/hooks/useSelectionModeReportActions.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ function useSelectionModeReportActions({
129129
const expensifyIcons = useMemoizedLazyExpensifyIcons(['Send', 'ThumbsUp', 'Cash', 'ArrowRight', 'Building'] as const);
130130

131131
const isASAPSubmitBetaEnabled = isBetaEnabled(CONST.BETAS.ASAP_SUBMIT);
132-
const isBulkSubmitApprovePayBetaEnabled = isBetaEnabled(CONST.BETAS.BULK_SUBMIT_APPROVE_PAY);
133132

134133
const currentUserEmail = session?.email;
135134
const hasViolations = hasViolationsReportUtils(report?.reportID, allTransactionViolations, currentUserAccountID, currentUserEmail ?? '');
@@ -494,9 +493,6 @@ function useSelectionModeReportActions({
494493
})();
495494

496495
const selectionModeReportLevelActions = (() => {
497-
if (!isBulkSubmitApprovePayBetaEnabled) {
498-
return [];
499-
}
500496
const actions: Array<DropdownOption<string> & Pick<PopoverMenuItem, 'backButtonText' | 'rightIcon' | 'subMenuItems'>> = [];
501497
let idx = 0;
502498
if (hasSubmitAction && !shouldBlockSubmit) {

src/libs/Permissions.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import type BetaConfiguration from '@src/types/onyx/BetaConfiguration';
55

66
// eslint-disable-next-line rulesdir/no-beta-handler
77
function canUseAllBetas(betas: OnyxEntry<Beta[]>): boolean {
8+
return true;
89
return !!betas?.includes(CONST.BETAS.ALL);
910
}
1011

0 commit comments

Comments
 (0)