Allow requesting money when expensify account owns workspace#30019
Allow requesting money when expensify account owns workspace#30019
Conversation
Deploying with
|
| Latest commit: |
bd92d7e
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://346b95da.helpdot.pages.dev |
| Branch Preview URL: | https://puneet-expensify-owner.helpdot.pages.dev |
|
@narefyev91 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] |
|
@narefyev91 I'm having trouble with my android emulator, so I haven't been able to get screenshots for that platform yet, but maybe you could still review while I figure that out? |
|
Got Android working! |
Reviewer Checklist
Screenshots/Videos |
narefyev91
left a comment
There was a problem hiding this comment.
LGTM!
🎀 👀 🎀 C+ reviewed
|
🎯 @narefyev91, thanks for reviewing and testing this PR! 🎉 An E/App issue has been created to issue payment here: #30170. |
src/pages/home/report/ReportActionCompose/AttachmentPickerWithMenuItems.js
Outdated
Show resolved
Hide resolved
d6b13e2 to
481c5df
Compare
|
@grgia @narefyev91 mind giving it another review? |
|
@youssef-lr 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] |
src/libs/ReportUtils.js
Outdated
| * @param {Object} report | ||
| * @returns {Boolean} | ||
| */ | ||
| function doExpensifyAccountsOwnPolicy(report) { |
There was a problem hiding this comment.
NAB but I feel like this is slightly clearer (at least to me :D)
| function doExpensifyAccountsOwnPolicy(report) { | |
| function isPolicyOwnedByExpensifyAccounts(report) { |
Also, I think this might be better placed in actions/Policy.js (the file already contains similar helper functions) and can just take a policyID, we already have allPolicies in that file as well. What do you think?
There was a problem hiding this comment.
A cleanup idea for later is to remove those helper functions from actions/Policy.js and into PolicyUtils
There was a problem hiding this comment.
Good points. Though actually, I'm going to refactor the canCreateTaskInReport function below, which means we'll no longer need this function.
There was a problem hiding this comment.
You're using it here as well, or will you also refactor this bit?
There was a problem hiding this comment.
That's the only place it'll be used, so no need to be a separate function is my thinking. Do you agree? I updated the PR so you can see how I'm doing it now.
15bc73b to
f35acb9
Compare
|
✋ 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/grgia in version: 1.3.95-0 🚀
|
|
🚀 Deployed to production by https://github.com/puneetlath in version: 1.3.95-9 🚀
|
|
🚀 Deployed to staging by https://github.com/grgia in version: 1.3.96-0 🚀
|
| */ | ||
| function canCreateTaskInReport(report) { | ||
| const otherReportParticipants = _.without(lodashGet(report, 'participantAccountIDs', []), currentUserAccountID); | ||
| const areExpensifyAccountsOnlyOtherParticipants = _.every(otherReportParticipants, (accountID) => _.contains(CONST.EXPENSIFY_ACCOUNT_IDS, accountID)); |
There was a problem hiding this comment.
Just a heads up, i believe the logic here caused this deploy blocker because it does not account for creating a task within an existing task.
There was a problem hiding this comment.
Thanks for pointing that out! That's a good catch.
|
🚀 Deployed to production by https://github.com/puneetlath in version: 1.3.96-15 🚀
|

























Details
Right now, we don't allow you to request money in any chat in which an Expensify account is a participant. However, there are certain workspaces that are owned by these accounts and members of those workspaces should be able to request money. I also made it possible to assign tasks in workspace chats if owned by expensify accounts.
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/324780
Tests
Offline tests
Same tests as online
QA Steps
Let's have @heyjennahay QA this internally.
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)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)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: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop