Skip to content
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

Update success, loading, and error message for add team member #3296

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/controllers/api/teams.php
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@
try {
$membership = Authorization::skip(fn() => $dbForProject->createDocument('memberships', $membership));
} catch (Duplicate $th) {
throw new Exception('User has already been invited or is already a member of this team', 409, Exception::TEAM_INVITE_ALREADY_EXISTS);
throw new Exception('User is already a member of this team', 409, Exception::TEAM_INVITE_ALREADY_EXISTS);
}
$team->setAttribute('total', $team->getAttribute('total', 0) + 1);
$team = Authorization::skip(fn() => $dbForProject->updateDocument('teams', $team->getId(), $team));
Expand Down
6 changes: 3 additions & 3 deletions app/views/console/users/team.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,12 @@
data-analytics-label="Create Team Membership"
data-service="teams.createMembership"
data-event="submit"
data-loading="Sending invitation, please wait..."
data-loading="Adding user, please wait..."
data-success="alert,trigger,reset"
data-success-param-alert-text="Invitation sent successfully"
data-success-param-alert-text="User added successfully"
data-success-param-trigger-events="teams.createMembership"
data-failure="alert"
data-failure-param-alert-text="Failed to send invite"
data-failure-param-alert-text="Failed to add user"
data-failure-param-alert-classname="error">

<input name="teamId" id="team-teamId" type="hidden" data-ls-bind="{{team.$id}}">
Expand Down