mirror of
https://github.com/wekan/wekan.git
synced 2026-03-01 11:20:15 +01:00
Move every Org.find(idOrFirstObjectSelector, options) to the ReactiveCache (directory client/)
This commit is contained in:
parent
b2f19ed714
commit
8c72531e6d
2 changed files with 10 additions and 8 deletions
|
|
@ -145,11 +145,11 @@ BlazeComponent.extendComponent({
|
|||
this.loading.set(w);
|
||||
},
|
||||
orgList() {
|
||||
const orgs = Org.find(this.findOrgsOptions.get(), {
|
||||
const orgs = ReactiveCache.getOrgs(this.findOrgsOptions.get(), {
|
||||
sort: { orgDisplayName: 1 },
|
||||
fields: { _id: true },
|
||||
});
|
||||
this.numberOrgs.set(orgs.count(false));
|
||||
this.numberOrgs.set(orgs.length);
|
||||
return orgs;
|
||||
},
|
||||
teamList() {
|
||||
|
|
@ -253,7 +253,8 @@ Template.editUserPopup.helpers({
|
|||
return Template.instance().authenticationMethods.get();
|
||||
},
|
||||
orgsDatas() {
|
||||
return Org.find({}, {sort: { orgDisplayName: 1 }});
|
||||
const ret = ReactiveCache.getOrgs({}, {sort: { orgDisplayName: 1 }});
|
||||
return ret;
|
||||
},
|
||||
teamsDatas() {
|
||||
return Team.find({}, {sort: { teamDisplayName: 1 }});
|
||||
|
|
@ -326,7 +327,8 @@ Template.newUserPopup.helpers({
|
|||
return Template.instance().authenticationMethods.get();
|
||||
},
|
||||
orgsDatas() {
|
||||
return Org.find({}, {sort: { orgDisplayName: 1 }});
|
||||
const ret = ReactiveCache.getOrgs({}, {sort: { orgDisplayName: 1 }});
|
||||
return ret;
|
||||
},
|
||||
teamsDatas() {
|
||||
return Team.find({}, {sort: { teamDisplayName: 1 }});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue