[Free trial] Implement Restricted Action screen#43855
Conversation
|
@hoangzinh 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] |
| }, | ||
| restrictedAction: { | ||
| restricted: 'Restringido', | ||
| actionsAreCurrentlyRestricted: ({ workspaceName }) => `Los gastos para ${workspaceName} están actualmente restringidos`, |
There was a problem hiding this comment.
@pac-guerreiro Please resolve this comment once you update the spanish translation with the correct text.
There was a problem hiding this comment.
Los gastos para el espacio de trabajo {workspace_name} están actualmente restringidos
😁
There was a problem hiding this comment.
Ah coming back here - the copy for this has an additional change that was made in the design doc reviews --
Instead of "Los gastos para el espacio de trabajo {workspace_name} están actualmente restringidos", we want to change the copy to "Las acciones en el espacio de trabajo {workspace_name} están actualmente restringidas"
@Gonals - are you able to confirm if that is the correct formatting to say, "Actions on the {workspace_name} workspace are currently restricted" ? I think we'd also need to change the English file for this as well? As initially the design doc had "Expenses to {workspace_name} are currently restricted."
There was a problem hiding this comment.
Ah coming back here - the copy for this has an additional change that was made in the design doc reviews --
Instead of "Los gastos para el espacio de trabajo {workspace_name} están actualmente restringidos", we want to change the copy to "Las acciones en el espacio de trabajo {workspace_name} están actualmente restringidas"
@Gonals - are you able to confirm if that is the correct formatting to say, "Actions on the {workspace_name} workspace are currently restricted" ? I think we'd also need to change the English file for this as well? As initially the design doc had "Expenses to {workspace_name} are currently restricted."
Yep! All good!
|
Can you make sure all of the green buttons are using our |
This comment has been minimized.
This comment has been minimized.
|
@pac-guerreiro We got merge conflicts |
# Conflicts: # src/libs/ReportUtils.ts
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-06-20.at.18.18.10.android.movAndroid: mWeb ChromeScreen.Recording.2024-06-20.at.18.14.15.android.chrome.moviOS: NativeScreen.Recording.2024-06-20.at.18.23.02.ios.moviOS: mWeb SafariScreen.Recording.2024-06-20.at.18.21.52.ios.safari.movMacOS: Chrome / SafariScreen.Recording.2024-06-20.at.17.55.47.web.movMacOS: DesktopScreen.Recording.2024-06-20.at.18.11.00.desktop.mov |
|
@shawnborton any suggestion on how to handle the situation reported above? |
|
^ Addressed that comment via Slack. |
|
@pac-guerreiro Your turn. We nearly done |
|
@hoangzinh sorry for the delay, it's is done! 😄 |
| (policy?.role ?? (currentUserLogin && policy?.employeeList?.[currentUserLogin]?.role)) === CONST.POLICY.ROLE.ADMIN; | ||
|
|
||
| /** | ||
| * Checks if the current user is an user of the policy. |
There was a problem hiding this comment.
I find this weird to read current user is an user. Maybe making it more verbose like so would be easier to read,
| * Checks if the current user is an user of the policy. | |
| * Checks if the current user is of the role "user" on the policy. |
There was a problem hiding this comment.
Thank you for the suggestion!
I applied it here - https://github.com/Expensify/App/pull/44371/files#diff-89601c1d4ab7d6fb789ea45b8f8e16ead0f925cf0db25d9b5c3561816d7a94c1R157
|
✋ 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/chiragsalian in version: 9.0.2-0 🚀
|
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 9.0.3-7 🚀
|
|
🚀 Deployed to production by https://github.com/Julesssss in version: 9.0.5-13 🚀
|


Details
Fixed Issues
$#43673
PROPOSAL: N/A
Tests
Since there are three variants of the restricted action screen, which are shown to the user depending on his workspace role, you'll need to test each of the following scenarios:
Scenario A - Workspace User
/restricted-action/workspace/<policyID>passing the policy ID you got from previous stepChat with your adminbutton, ensure you were navigated to the workspace chat.Scenario B - Workspace Admin
/restricted-action/workspace/<policyID>passing the policy ID you got from previous stepChat in #adminsbutton, ensure you were navigated to the workspace admins chat.Scenario C - Workspace Owner
/restricted-action/workspace/<policyID>passing the policy ID you got from previous stepAdd payment cardbutton, ensure you were navigated to theSubscriptionscreen.Offline tests
Same as above
QA Steps
Same as above
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodSTYLE.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 and/or tagged@Expensify/designso 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
Workspace User
Android.-.Native.-.User.mp4
Workspace Admin
Android.-.Native.-.Admin.mp4
Workspace Owner
Android.-.Native.-.Owner.mp4
Android: mWeb Chrome
Workspace User
Android.-.Chrome.-.User.mp4
Workspace Admin
Android.-.Chrome.-.Admin.mp4
Workspace Owner
Android.-.Chrome.-.Owner.mp4
iOS: Native
Workspace User
iOS.-.Native.-.User.mp4
Workspace Admin
iOS.-.Native.-.Admin.mp4
Workspace Owner
iOS.-.Native.-.Owner.mp4
iOS: mWeb Safari
Workspace User
iOS.-.Safari.-.User.mp4
Workspace Admin
iOS.-.Safari.-.Admin.mp4
Workspace Owner
iOS.-.Safari.-.Owner.mp4
MacOS: Chrome / Safari
Workspace User
MacOS.-.Chrome.-.User.mp4
Workspace Admin
MacOS.-.Chrome.-.Admin.mp4
Workspace Owner
MacOS.-.Chrome.-.Owner.mp4
MacOS: Desktop
Workspace User
MacOS.-.Native.-.User.mp4
Workspace Admin
MacOS.-.Native.-.Admin.mp4
Workspace Owner
MacOS.-.Native.-.Owner.mp4