Skip to content

Commit

Permalink
Merge pull request Expensify#54103 from ChavdaSachin/pass-requestType…
Browse files Browse the repository at this point in the history
…-for-QAB

Pass requestType for QAB
  • Loading branch information
nkuoch authored Dec 16, 2024
2 parents ddc1eda + 7a75779 commit 31adaa8
Showing 1 changed file with 15 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -277,14 +277,22 @@ function FloatingActionButtonAndPopover({onHideCreateMenu, onShowCreateMenu}: Fl

switch (quickAction?.action) {
case CONST.QUICK_ACTIONS.REQUEST_MANUAL:
selectOption(() => IOU.startMoneyRequest(CONST.IOU.TYPE.SUBMIT, quickActionReportID, CONST.IOU.REQUEST_TYPE.MANUAL, true), true);
return;
case CONST.QUICK_ACTIONS.REQUEST_SCAN:
selectOption(() => IOU.startMoneyRequest(CONST.IOU.TYPE.SUBMIT, quickActionReportID, CONST.IOU.REQUEST_TYPE.SCAN, true), true);
return;
case CONST.QUICK_ACTIONS.REQUEST_DISTANCE:
selectOption(() => IOU.startMoneyRequest(CONST.IOU.TYPE.SUBMIT, quickActionReportID, undefined, true), true);
selectOption(() => IOU.startMoneyRequest(CONST.IOU.TYPE.SUBMIT, quickActionReportID, CONST.IOU.REQUEST_TYPE.DISTANCE, true), true);
return;
case CONST.QUICK_ACTIONS.SPLIT_MANUAL:
selectOption(() => IOU.startMoneyRequest(CONST.IOU.TYPE.SPLIT, quickActionReportID, CONST.IOU.REQUEST_TYPE.MANUAL, true), true);
return;
case CONST.QUICK_ACTIONS.SPLIT_SCAN:
selectOption(() => IOU.startMoneyRequest(CONST.IOU.TYPE.SPLIT, quickActionReportID, CONST.IOU.REQUEST_TYPE.SCAN, true), true);
return;
case CONST.QUICK_ACTIONS.SPLIT_DISTANCE:
selectOption(() => IOU.startMoneyRequest(CONST.IOU.TYPE.SPLIT, quickActionReportID, undefined, true), true);
selectOption(() => IOU.startMoneyRequest(CONST.IOU.TYPE.SPLIT, quickActionReportID, CONST.IOU.REQUEST_TYPE.DISTANCE, true), true);
return;
case CONST.QUICK_ACTIONS.SEND_MONEY:
selectOption(() => IOU.startMoneyRequest(CONST.IOU.TYPE.PAY, quickActionReportID, undefined, true), false);
Expand All @@ -293,9 +301,13 @@ function FloatingActionButtonAndPopover({onHideCreateMenu, onShowCreateMenu}: Fl
selectOption(() => Task.startOutCreateTaskQuickAction(isValidReport ? quickActionReportID : '', quickAction.targetAccountID ?? -1), false);
break;
case CONST.QUICK_ACTIONS.TRACK_MANUAL:
selectOption(() => IOU.startMoneyRequest(CONST.IOU.TYPE.TRACK, quickActionReportID, CONST.IOU.REQUEST_TYPE.MANUAL, true), false);
break;
case CONST.QUICK_ACTIONS.TRACK_SCAN:
selectOption(() => IOU.startMoneyRequest(CONST.IOU.TYPE.TRACK, quickActionReportID, CONST.IOU.REQUEST_TYPE.SCAN, true), false);
break;
case CONST.QUICK_ACTIONS.TRACK_DISTANCE:
selectOption(() => IOU.startMoneyRequest(CONST.IOU.TYPE.TRACK, quickActionReportID, undefined, true), false);
selectOption(() => IOU.startMoneyRequest(CONST.IOU.TYPE.TRACK, quickActionReportID, CONST.IOU.REQUEST_TYPE.DISTANCE, true), false);
break;
default:
}
Expand Down

0 comments on commit 31adaa8

Please sign in to comment.