Skip to content

Commit

Permalink
Merge pull request #39204 from ShridharGoel/update_menu
Browse files Browse the repository at this point in the history
Change the order of items in global create menu
  • Loading branch information
thienlnam authored Apr 2, 2024
2 parents 2bcdd75 + c1c82ea commit c550afd
Showing 1 changed file with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,23 @@ function FloatingActionButtonAndPopover(props) {
text: translate('sidebarScreen.fabNewChat'),
onSelected: () => interceptAnonymousUser(Report.startNewChat),
},
...(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'),
Expand All @@ -306,23 +323,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'),
Expand Down

0 comments on commit c550afd

Please sign in to comment.