From c1c82ea474932b0f10140f9621cb827697ee7585 Mon Sep 17 00:00:00 2001 From: ShridharGoel <35566748+ShridharGoel@users.noreply.github.com> Date: Thu, 28 Mar 2024 23:45:19 +0530 Subject: [PATCH] Change the order of items in global create menu --- .../FloatingActionButtonAndPopover.js | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/pages/home/sidebar/SidebarScreen/FloatingActionButtonAndPopover.js b/src/pages/home/sidebar/SidebarScreen/FloatingActionButtonAndPopover.js index 24603de5679c..422875c646a0 100644 --- a/src/pages/home/sidebar/SidebarScreen/FloatingActionButtonAndPopover.js +++ b/src/pages/home/sidebar/SidebarScreen/FloatingActionButtonAndPopover.js @@ -268,6 +268,23 @@ function FloatingActionButtonAndPopover(props) { text: translate('sidebarScreen.fabNewChat'), onSelected: () => interceptAnonymousUser(() => Navigation.navigate(ROUTES.NEW)), }, + ...(canUseTrackExpense + ? [ + { + icon: Expensicons.DocumentPlus, + text: translate('iou.trackExpense'), + onSelected: () => + interceptAnonymousUser(() => + IOU.startMoneyRequest( + CONST.IOU.TYPE.TRACK_EXPENSE, + // When starting to create a track expense from the global FAB, we need to retrieve selfDM reportID. + // If it doesn't exist, we generate a random optimistic reportID and use it for all of the routes in the creation flow. + ReportUtils.findSelfDMReportID() || ReportUtils.generateReportID(), + ), + ), + }, + ] + : []), { icon: Expensicons.MoneyCircle, text: translate('iou.requestMoney'), @@ -294,23 +311,6 @@ function FloatingActionButtonAndPopover(props) { ), ), }, - ...(canUseTrackExpense - ? [ - { - icon: Expensicons.DocumentPlus, - text: translate('iou.trackExpense'), - onSelected: () => - interceptAnonymousUser(() => - IOU.startMoneyRequest( - CONST.IOU.TYPE.TRACK_EXPENSE, - // When starting to create a track expense from the global FAB, we need to retrieve selfDM reportID. - // If it doesn't exist, we generate a random optimistic reportID and use it for all of the routes in the creation flow. - ReportUtils.findSelfDMReportID() || ReportUtils.generateReportID(), - ), - ), - }, - ] - : []), { icon: Expensicons.Task, text: translate('newTaskPage.assignTask'),