From a203bb22758b7366624e98c5c5e10fcb4e1ba14e Mon Sep 17 00:00:00 2001 From: Alberto Date: Tue, 29 Oct 2024 12:56:18 +0100 Subject: [PATCH] Add Per Diem Beta --- src/CONST.ts | 1 + src/libs/Permissions.ts | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/src/CONST.ts b/src/CONST.ts index 8e240ac43ca1..02df30286580 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -509,6 +509,7 @@ const CONST = { WORKSPACE_RULES: 'workspaceRules', COMBINED_TRACK_SUBMIT: 'combinedTrackSubmit', CATEGORY_AND_TAG_APPROVERS: 'categoryAndTagApprovers', + PER_DIEM: 'newDotPerDiem', }, BUTTON_STATES: { DEFAULT: 'default', diff --git a/src/libs/Permissions.ts b/src/libs/Permissions.ts index 45203c1db5b6..05a801e6f4ef 100644 --- a/src/libs/Permissions.ts +++ b/src/libs/Permissions.ts @@ -53,6 +53,10 @@ function canUseCombinedTrackSubmit(betas: OnyxEntry): boolean { return !!betas?.includes(CONST.BETAS.COMBINED_TRACK_SUBMIT); } +function canUsePerDiem(betas: OnyxEntry): boolean { + return !!betas?.includes(CONST.BETAS.PER_DIEM) || canUseAllBetas(betas); +} + /** * Link previews are temporarily disabled. */ @@ -73,4 +77,5 @@ export default { canUseWorkspaceRules, canUseCombinedTrackSubmit, canUseCategoryAndTagApprovers, + canUsePerDiem, };