mirror of
https://github.com/wekan/wekan.git
synced 2026-02-28 19:00:17 +01:00
Admin Panel - sort Organizations and Teams by Display Name, sort People by username
This commit is contained in:
parent
9b22e6da7a
commit
3a83d48bef
3 changed files with 5 additions and 2 deletions
|
|
@ -144,6 +144,7 @@ BlazeComponent.extendComponent({
|
||||||
},
|
},
|
||||||
orgList() {
|
orgList() {
|
||||||
const orgs = Org.find(this.findOrgsOptions.get(), {
|
const orgs = Org.find(this.findOrgsOptions.get(), {
|
||||||
|
sort: { orgDisplayName: 1 },
|
||||||
fields: { _id: true },
|
fields: { _id: true },
|
||||||
});
|
});
|
||||||
this.numberOrgs.set(orgs.count(false));
|
this.numberOrgs.set(orgs.count(false));
|
||||||
|
|
@ -151,6 +152,7 @@ BlazeComponent.extendComponent({
|
||||||
},
|
},
|
||||||
teamList() {
|
teamList() {
|
||||||
const teams = Team.find(this.findTeamsOptions.get(), {
|
const teams = Team.find(this.findTeamsOptions.get(), {
|
||||||
|
sort: { teamDisplayName: 1 },
|
||||||
fields: { _id: true },
|
fields: { _id: true },
|
||||||
});
|
});
|
||||||
this.numberTeams.set(teams.count(false));
|
this.numberTeams.set(teams.count(false));
|
||||||
|
|
@ -158,6 +160,7 @@ BlazeComponent.extendComponent({
|
||||||
},
|
},
|
||||||
peopleList() {
|
peopleList() {
|
||||||
const users = Users.find(this.findUsersOptions.get(), {
|
const users = Users.find(this.findUsersOptions.get(), {
|
||||||
|
sort: { username: 1 },
|
||||||
fields: { _id: true },
|
fields: { _id: true },
|
||||||
});
|
});
|
||||||
this.numberPeople.set(users.count(false));
|
this.numberPeople.set(users.count(false));
|
||||||
|
|
|
||||||
|
|
@ -217,7 +217,7 @@ if (Meteor.isServer) {
|
||||||
// Index for Organization name.
|
// Index for Organization name.
|
||||||
Meteor.startup(() => {
|
Meteor.startup(() => {
|
||||||
// Org._collection._ensureIndex({ name: -1 });
|
// Org._collection._ensureIndex({ name: -1 });
|
||||||
Org._collection._ensureIndex({ orgDisplayName: -1 });
|
Org._collection._ensureIndex({ orgDisplayName: 1 });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -214,7 +214,7 @@ if (Meteor.isServer) {
|
||||||
if (Meteor.isServer) {
|
if (Meteor.isServer) {
|
||||||
// Index for Team name.
|
// Index for Team name.
|
||||||
Meteor.startup(() => {
|
Meteor.startup(() => {
|
||||||
Team._collection._ensureIndex({ teamDisplayName: -1 });
|
Team._collection._ensureIndex({ teamDisplayName: 1 });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue