[CRITICAL] Implement <WorkspaceWorkflowsApprovalsExpensesFromPage /> for Member Selection#46484
Conversation
| }, | ||
| workflowsExpensesFromPage: { | ||
| title: 'Gastos de', | ||
| header: 'Cuando los siguientes miembros presenten gastos:', |
|
@thesahindia Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
@thesahindia I would appreciate a quick review on this one, as Approval Workflow project has a tight deadline (Aug 15) |
|
After selecting the admin and clicking "Next", when we come back the "Admin" badge goes away. Screen.Recording.2024-07-30.at.9.56.12.PM.movShouldn't we dismiss the modal after the user selects an approver instead of navigating back to "Expenses from" page? Screen.Recording.2024-07-30.at.9.54.25.PM.mov |
On it!
It will be covered in the next PR here, so I wouldn't block this PR because of it. (Add approval button is behind a beta so shouldn't be a problem). |
@thesahindia Fixed! |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-07-31.at.10.09.58.PM.movAndroid: mWeb ChromeScreen.Recording.2024-07-31.at.9.49.10.PM.moviOS: NativeScreen.Recording.2024-07-31.at.10.16.35.PM.moviOS: mWeb SafariScreen.Recording.2024-07-31.at.10.17.49.PM.movMacOS: Chrome / SafariScreen.Recording.2024-07-31.at.9.19.50.PM.movMacOS: DesktopScreen.Recording.2024-07-31.at.10.19.40.PM.mov |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/tgolen in version: 9.0.15-0 🚀
|
|
@tgolen @thesahindia How should we run this step?
|
|
I don't think this one is QA-able yet. Since it's under beta, the testing will come later. Sorry for the confusion! You can just mark this one off the deploy checklist. |
|
🚀 Deployed to production by https://github.com/roryabraham in version: 9.0.15-9 🚀
|
| const goBack = useCallback(() => { | ||
| if (!approvalWorkflow?.isBeingEdited) { | ||
| Workflow.clearApprovalWorkflow(); | ||
| } | ||
| Navigation.goBack(); | ||
| }, [approvalWorkflow?.isBeingEdited]); |
There was a problem hiding this comment.
Clearing the approval workflow on going back caused the not found view to appear briefly while hiding the modal (#50094). Also this goBack function is not called if we dismiss the modal on outside-click.
We went with a different approach that is to clear the workflow (from WorkspaceWorkflowsPage) before navigating to this page.
| const isAdmin = policy?.employeeList?.[member.email].role === CONST.REPORT.ROLE.ADMIN; | ||
|
|
||
| return { | ||
| text: member.displayName, |
There was a problem hiding this comment.
Coming from #63939 checklist: The display name may include the SMS domain, so we should remove it to ensure consistency with InviteMemberListItem.


Details
Link to the doc.
Approval member page is going to be a page with a header and (multi select variant) with a save button.

Clicking on the next button will set the members with
setApprovalWorkflowMembersaction (more info in the Onyx setup section). Users will be navigated to the Approver selection page (‘settings/workspaces/:policyID/workflows/approvals/approver’) when creating a new approval workflow or navigated to the ‘Edit approval’ page (‘settings/workspaces/:policyID/workflows/approvals/:firstApproverEmail/edit’) based onisBeingEditedproperty in Onyx.Fixed Issues
$ #45955
PROPOSAL: N/A
Tests
More featuressettings page)canUseWorkflowsAdvancedApprovalfunction to return true (or usecanUseWorkflowsAdvancedApprovalbeta)Offline tests
N/A
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel so the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
android.webm
Android: mWeb Chrome
android-web.webm
iOS: Native
ios.mp4
iOS: mWeb Safari
ios-web.mp4
MacOS: Chrome / Safari
web.mov
MacOS: Desktop
desktop.mov