From 2ce65e33faea0b058d894bc8b8282d97c64f8fd4 Mon Sep 17 00:00:00 2001 From: Alberto Date: Thu, 6 Jul 2023 11:05:11 +0200 Subject: [PATCH] Add Scan receipts Beta --- src/CONST.js | 1 + src/libs/Permissions.js | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/src/CONST.js b/src/CONST.js index 7dbcb9dad56d..f13d2009e2bc 100755 --- a/src/CONST.js +++ b/src/CONST.js @@ -269,6 +269,7 @@ const CONST = { PASSWORDLESS: 'passwordless', TASKS: 'tasks', THREADS: 'threads', + SCAN_RECEIPTS: 'scanReceipts', }, BUTTON_STATES: { DEFAULT: 'default', diff --git a/src/libs/Permissions.js b/src/libs/Permissions.js index acd21b3da1a2..3617900109f2 100644 --- a/src/libs/Permissions.js +++ b/src/libs/Permissions.js @@ -102,6 +102,14 @@ function canUseTasks(betas) { return _.contains(betas, CONST.BETAS.TASKS) || canUseAllBetas(betas); } +/** + * @param {Array} betas + * @returns {Boolean} + */ +function canUseScanReceipts(betas) { + return _.contains(betas, CONST.BETAS.SCAN_RECEIPTS) || canUseAllBetas(betas); +} + export default { canUseChronos, canUseIOU, @@ -114,4 +122,5 @@ export default { canUsePolicyExpenseChat, canUsePasswordlessLogins, canUseTasks, + canUseScanReceipts, };