Fixed team member count
This commit is contained in:
parent
591ff738ee
commit
157b91b63b
|
@ -11,6 +11,7 @@
|
|||
## Bug Fixes
|
||||
|
||||
- Fixed output of /v1/health/queue/certificates returning wrong data
|
||||
- Fixed bug where team members count was wrong in some cases
|
||||
|
||||
## Security
|
||||
|
||||
|
|
|
@ -584,9 +584,11 @@ $utopia->delete('/v1/teams/:teamId/memberships/:inviteId')
|
|||
throw new Exception('Failed to remove membership from DB', 500);
|
||||
}
|
||||
|
||||
$team = $projectDB->updateDocument(array_merge($team->getArrayCopy(), [
|
||||
'sum' => $team->getAttribute('sum', 0) - 1,
|
||||
]));
|
||||
if ($membership->getAttribute('confirm')) { // Count only confirmed members
|
||||
$team = $projectDB->updateDocument(array_merge($team->getArrayCopy(), [
|
||||
'sum' => $team->getAttribute('sum', 0) - 1,
|
||||
]));
|
||||
}
|
||||
|
||||
if (false === $team) {
|
||||
throw new Exception('Failed saving team to DB', 500);
|
||||
|
|
|
@ -82,7 +82,7 @@
|
|||
</div>
|
||||
|
||||
<div data-ls-if="0 != {{project-members.sum}}">
|
||||
<div class="margin-bottom-small margin-end-small text-align-end text-size-small margin-top-negative"><span data-ls-bind="{{project-members.sum}}"></span> members found</div>
|
||||
<div class="margin-bottom-small margin-end-small text-align-end text-size-small margin-top-negative"><span data-ls-bind="{{project-members.sum}}"></span> memberships found</div>
|
||||
|
||||
<div class="box margin-bottom">
|
||||
<ul data-ls-loop="project-members.memberships" data-ls-as="member" class="list">
|
||||
|
@ -153,7 +153,7 @@
|
|||
<hr />
|
||||
|
||||
<div class="clear">
|
||||
<button>Send Invite</button>
|
||||
<button>Add Member</button>
|
||||
<button data-ui-modal-close="" type="button" class="reverse">Cancel</button>
|
||||
</div>
|
||||
</form>
|
||||
|
|
Loading…
Reference in a new issue