1
0
Fork 0
mirror of synced 2024-06-27 02:31:04 +12:00

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

Remove text indicating invitations since no emails are sent when adding
a user via the Admin console.
This commit is contained in:
Steven 2022-05-27 05:33:13 +00:00 committed by Steven Nguyen
parent 540738101f
commit 4a87e73a45
2 changed files with 4 additions and 4 deletions

View file

@ -380,7 +380,7 @@ App::post('/v1/teams/:teamId/memberships')
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));

View file

@ -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}}">