Skip to content

Commit

Permalink
Web: People/Common: added sorting of groups in the tree
Browse files Browse the repository at this point in the history
  • Loading branch information
Artem Tarasov committed Nov 16, 2021
1 parent 7db57b3 commit f33d99c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/asc-web-common/api/groups/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ export function getGroupList(fake = false, searchValue) {
: request({
method: "get",
url: `/group${params}`,
}).then((groups) => {
return groups.sort((a, b) => a.name.localeCompare(b.name));
});
}

Expand Down
1 change: 1 addition & 0 deletions products/ASC.People/Client/src/store/GroupsStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class GroupsStore {
const res = await api.groups.createGroup(groupName, groupManager, members);
this.peopleStore.selectedGroupStore.resetGroup();
this.groups.push(res);
this.groups.sort((a, b) => a.name.localeCompare(b.name));
return Promise.resolve(res);
};

Expand Down

0 comments on commit f33d99c

Please sign in to comment.