You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In <MoneyRequestHeader, add a new Hold entry to threeDotsMenuItems with a clock icon.
When selected it should called the locally defined method holdMoneyRequest()
Lastly, this Hold menu item will only be conditionally rendered based on ReportUtils.isOnHold(moneyRequestReport) If so, render the 'Hold' text for the popover menu option, or 'Unhold' otherwise.
Holding a request (member & admin)
When holdMoneyRequest() is called after the user taps Hold in the Overflow Menu.
In the function, we'll check if ReportUtils.isOnHold(moneyRequestReport) evaluates to true where we will Navigation.navigate(ROUTES.getMoneyRequestHoldRoute( … )) to an interstitial for the user to provide a reason for the hold request.
Reason Interstitial
Under src/pages/iou, create a new HoldReasonPage where we'll capture the user-provided reasoning for the hold.
The structure of the page should should resemble the following:
When the Unhold menu item is tapped, holdMoneyRequest() is called.
In the function, we'll check if ReportUtils.isOnHold(moneyRequestReport) evaluates to false. Unlike holding a request, no reason is required, so we can immediately fire off an API call like the following:
API.write( 'UnholdRequest',
{
transactionID, // the money request being held
...
}
robertjchen
changed the title
[WIP] Hold Requests: Add Hold/UnHold Button and API call
[WIP] Hold Requests: Add Hold/UnHold MenuItem and API call
Sep 25, 2023
This issue has not been updated in over 15 days. @robertjchen eroding to Monthly issue.
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!
This task is reserved for agency.
Overflow Menu
In
<MoneyRequestHeader
, add a newHold
entry tothreeDotsMenuItems
with a clock icon.When selected it should called the locally defined method
holdMoneyRequest()
Lastly, this Hold menu item will only be conditionally rendered based on
ReportUtils.isOnHold(moneyRequestReport)
If so, render the 'Hold' text for the popover menu option, or 'Unhold' otherwise.Holding a request (member & admin)
When
holdMoneyRequest()
is called after the user taps Hold in the Overflow Menu.In the function, we'll check if
ReportUtils.isOnHold(moneyRequestReport)
evaluates to true where we willNavigation.navigate(ROUTES.getMoneyRequestHoldRoute( … ))
to an interstitial for the user to provide a reason for the hold request.Reason Interstitial
Under
src/pages/iou
, create a newHoldReasonPage
where we'll capture the user-provided reasoning for the hold.The structure of the page should should resemble the following:
When the user confirms the reason, we Navigate back to the MoneyRequestPage, passing the user-provided reason.
Back on MoneyRequestPage, fire off an API call with the following parameters:
Onyx Data Response
Optimistic
Success
API Onyx data response
Failure
Unholding a request (member & admin)
When the Unhold menu item is tapped,
holdMoneyRequest()
is called.In the function, we'll check if
ReportUtils.isOnHold(moneyRequestReport)
evaluates to false. Unlike holding a request, no reason is required, so we can immediately fire off an API call like the following:Onyx Data Response
Optimistic
Success
Failure
The text was updated successfully, but these errors were encountered: