From f1f5a59e1c2d1fcf9e8dcc7c404adedce242cd1b Mon Sep 17 00:00:00 2001 From: Someshwar Tripathi Date: Mon, 6 Nov 2023 21:10:50 +0530 Subject: [PATCH 1/3] Remove ability for user to invite individuals in distance request flow. We achieve this by setting canInviteUser to false when user is making a Distance Request. --- .../MoneyRequestParticipantsSelector.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSelector.js b/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSelector.js index af6163729944..9df738cb96a8 100755 --- a/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSelector.js +++ b/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSelector.js @@ -244,7 +244,8 @@ function MoneyRequestParticipantsSelector({ false, {}, [], - true, + // We don't want the user to be able to invite individuals when they are in the "Distance request" flow for now. This functionality is being built in #23291. + !isDistanceRequest, true, ); setNewChatOptions({ From def4bcebe46baf1995b65edeb8f964d21cf9b2b4 Mon Sep 17 00:00:00 2001 From: Someshwar Tripathi Date: Tue, 7 Nov 2023 23:18:05 +0530 Subject: [PATCH 2/3] Modify comment This adds corresponding issue link in the explaining comment --- .../MoneyRequestParticipantsSelector.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSelector.js b/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSelector.js index 9df738cb96a8..038adfc46c40 100755 --- a/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSelector.js +++ b/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSelector.js @@ -244,7 +244,8 @@ function MoneyRequestParticipantsSelector({ false, {}, [], - // We don't want the user to be able to invite individuals when they are in the "Distance request" flow for now. This functionality is being built in #23291. + // We don't want the user to be able to invite individuals when they are in the "Distance request" flow for now. + // This functionality is being built here: https://github.com/Expensify/App/issues/23291 !isDistanceRequest, true, ); From d10e9590e518a8b2d8a296c23cc2a2a2dce9afa7 Mon Sep 17 00:00:00 2001 From: Someshwar Tripathi Date: Tue, 7 Nov 2023 23:37:52 +0530 Subject: [PATCH 3/3] Prettier changes --- .../MoneyRequestParticipantsSelector.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSelector.js b/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSelector.js index 038adfc46c40..553ba6ae5170 100755 --- a/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSelector.js +++ b/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSelector.js @@ -244,8 +244,8 @@ function MoneyRequestParticipantsSelector({ false, {}, [], - // We don't want the user to be able to invite individuals when they are in the "Distance request" flow for now. - // This functionality is being built here: https://github.com/Expensify/App/issues/23291 + // We don't want the user to be able to invite individuals when they are in the "Distance request" flow for now. + // This functionality is being built here: https://github.com/Expensify/App/issues/23291 !isDistanceRequest, true, );