mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-06 09:20:43 +01:00
sort user groups
This commit is contained in:
parent
3544c96a64
commit
69e059ba01
@ -15,6 +15,8 @@ import { I18nService } from 'jslib/abstractions/i18n.service';
|
|||||||
import { OrganizationUserUpdateGroupsRequest } from 'jslib/models/request/organizationUserUpdateGroupsRequest';
|
import { OrganizationUserUpdateGroupsRequest } from 'jslib/models/request/organizationUserUpdateGroupsRequest';
|
||||||
import { GroupResponse } from 'jslib/models/response/groupResponse';
|
import { GroupResponse } from 'jslib/models/response/groupResponse';
|
||||||
|
|
||||||
|
import { Utils } from 'jslib/misc/utils';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-user-groups',
|
selector: 'app-user-groups',
|
||||||
templateUrl: 'user-groups.component.html',
|
templateUrl: 'user-groups.component.html',
|
||||||
@ -34,7 +36,9 @@ export class UserGroupsComponent implements OnInit {
|
|||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
const groupsResponse = await this.apiService.getGroups(this.organizationId);
|
const groupsResponse = await this.apiService.getGroups(this.organizationId);
|
||||||
this.groups = groupsResponse.data.map((r) => r);
|
const groups = groupsResponse.data.map((r) => r);
|
||||||
|
groups.sort(Utils.getSortFunction(this.i18nService, 'name'));
|
||||||
|
this.groups = groups;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const userGroups = await this.apiService.getOrganizationUserGroups(
|
const userGroups = await this.apiService.getOrganizationUserGroups(
|
||||||
|
Loading…
Reference in New Issue
Block a user