mirror of
https://github.com/wekan/wekan.git
synced 2025-12-18 00:10:13 +01:00
Fix count of Orgs Teams People at Admin Panel.
Thanks to xet7 !
This commit is contained in:
parent
1fa91474d0
commit
b77eed221f
1 changed files with 9 additions and 0 deletions
|
|
@ -203,26 +203,35 @@ BlazeComponent.extendComponent({
|
||||||
this.loading.set(w);
|
this.loading.set(w);
|
||||||
},
|
},
|
||||||
orgList() {
|
orgList() {
|
||||||
|
const limitOrgs = this.page.get() * orgsPerPage;
|
||||||
const orgs = ReactiveCache.getOrgs(this.findOrgsOptions.get(), {
|
const orgs = ReactiveCache.getOrgs(this.findOrgsOptions.get(), {
|
||||||
sort: { orgDisplayName: 1 },
|
sort: { orgDisplayName: 1 },
|
||||||
|
limit: limitOrgs,
|
||||||
fields: { _id: true },
|
fields: { _id: true },
|
||||||
});
|
});
|
||||||
|
// Count only the items currently loaded to browser, not total from database
|
||||||
this.numberOrgs.set(orgs.length);
|
this.numberOrgs.set(orgs.length);
|
||||||
return orgs;
|
return orgs;
|
||||||
},
|
},
|
||||||
teamList() {
|
teamList() {
|
||||||
|
const limitTeams = this.page.get() * teamsPerPage;
|
||||||
const teams = ReactiveCache.getTeams(this.findTeamsOptions.get(), {
|
const teams = ReactiveCache.getTeams(this.findTeamsOptions.get(), {
|
||||||
sort: { teamDisplayName: 1 },
|
sort: { teamDisplayName: 1 },
|
||||||
|
limit: limitTeams,
|
||||||
fields: { _id: true },
|
fields: { _id: true },
|
||||||
});
|
});
|
||||||
|
// Count only the items currently loaded to browser, not total from database
|
||||||
this.numberTeams.set(teams.length);
|
this.numberTeams.set(teams.length);
|
||||||
return teams;
|
return teams;
|
||||||
},
|
},
|
||||||
peopleList() {
|
peopleList() {
|
||||||
|
const limitUsers = this.page.get() * usersPerPage;
|
||||||
const users = ReactiveCache.getUsers(this.findUsersOptions.get(), {
|
const users = ReactiveCache.getUsers(this.findUsersOptions.get(), {
|
||||||
sort: { username: 1 },
|
sort: { username: 1 },
|
||||||
|
limit: limitUsers,
|
||||||
fields: { _id: true },
|
fields: { _id: true },
|
||||||
});
|
});
|
||||||
|
// Count only the items currently loaded to browser, not total from database
|
||||||
this.numberPeople.set(users.length);
|
this.numberPeople.set(users.length);
|
||||||
return users;
|
return users;
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue