-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PAY 8/20] You can invite someone who's already a member of the workspace #4307
Comments
Triggered auto assignment to @strepanier03 ( |
ProposalApp/src/pages/workspace/WorkspaceInvitePage.js Lines 74 to 85 in 9f15c14
const policyEmployeeList = lodashGet(this.props, 'policy.employeeList', []);
const AreLoginsDuplicate = _.every(logins, login => _.contains(policyEmployeeList, login));
if (AreLoginsDuplicate) {
Growl.error(this.props.translate('workspace.invite.someGenericMessage'), 5000);
return;
}
|
Unique — Looks to be unique to me, Passing to Eng. |
Triggered auto assignment to @francoisl ( |
Hi @aman-atg, your proposal would work for the very specific issue where someone can invite themselves, but the issue can be generalized and rephrased as: you can invite someone who's already a member of the workspace (e.g. invite the same account twice in a row). With that in mind, can you please update your proposal? For the error message, I suggest something like |
@francoisl Thanks for the input. I will update the Proposal with better logic that will cover the above mentioned scenario. I have one question, though. Since we're supporting multiple logins.. what should be the error message when 2 or more logins are duplicates. App/src/pages/workspace/WorkspaceInvitePage.js Lines 74 to 85 in 9f15c14
One more thing to note is that currently we're So, what should happen when some of the |
I agree that following the same convention and returning early would make sense. In this case, we could use Although thinking about it more, I'm now thinking that in terms of providing a better UX, maybe we could just silently ignore and filter out the logins that are already in the workspace (and if all the logins are already in the workspace, we don't call |
// `Please ensure that the user is not already a member of the workspace` or
// `Please ensure that the user is not already invited.` |
I'm not passionate about either solution, I'm going to relabel this to get another opinion. |
Triggered auto assignment to @laurenreidexpensify ( |
@francoisl I feel the input itself is not user-friendly. There is no way to know that you can invite more than one person by comma separating values. My approach would be to change the input to a tagged input such as above. I can see Workspace is in beta so there's a lot we can do to improve the UX here. This will handle the cases for multiple inputs as well as filtering/showing problematic tags such as already existing participants. btw the current flow should also check if the phone number entered is of the currently logged-in user. |
@mananjadhav this is being dealt with on a separate issue #4029 |
Triggered auto assignment to @deetergp ( |
Apologies, I've a bit bogged down, looking at it now… |
The code portion of @aman-atg's proposal is solid. As far as the message goes, how about something like |
Sounds good to me! |
@laurenreidexpensify Yes, let's do it! |
Waiting on a PR. Do you think this should stay a Daily, @laurenreidexpensify, or is setting to Weekly more appropriate? |
Added a PR. Not yet hired on upwork though. |
Setting this back to |
Created job and invited you @aman-atg, please confirm in a comment here once accepted. https://www.upwork.com/jobs/~012d85aaf070515c46 |
Accepted. (Proposal) |
The job has been offered & accepted and the PR has been merged. I think we're good here 👍 |
Officially hired on Upwork. Will pay on 8/20 if no regressions. Bumped to Weekly |
Paid in Upwork with bonus for reporting issues. Deployed to production 3 days ago, closing |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Action Performed:
Expected Result:
An error message
![image](https://user-images.githubusercontent.com/28243942/127530258-b9bf3b11-0c8d-4d04-a102-82a5e02f4f2a.png)
Actual Result:
Workaround:
Refreshing the browser make the 2nd entry disappear after a few seconds.
Platform:
Where is this issue occurring?
Version Number:
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Expensify/Expensify Issue URL:
View all open jobs on Upwork
The text was updated successfully, but these errors were encountered: