Fix and update easysearch

This commit is contained in:
Daniel Kaiser 2022-08-05 13:06:02 +02:00
parent 3ddb97c8c9
commit 339e044a30
11 changed files with 40 additions and 45 deletions

View file

@ -1333,7 +1333,7 @@ BlazeComponent.extendComponent({
},
isBoardMember() {
const userId = this.currentData()._id;
const userId = this.currentData().__originalId;
const user = Users.findOne(userId);
return user && user.isBoardMember();
},
@ -1373,7 +1373,7 @@ BlazeComponent.extendComponent({
this.setError('');
},
'click .js-select-member'() {
const userId = this.currentData()._id;
const userId = this.currentData().__originalId;
const currentBoard = Boards.findOne(Session.get('currentBoard'));
if (!currentBoard.hasMember(userId)) {
this.inviteUser(userId);
@ -1390,6 +1390,10 @@ BlazeComponent.extendComponent({
},
}).register('addMemberPopup');
Template.addMemberPopup.helpers({
searchIndex: () => Users.search_index,
})
BlazeComponent.extendComponent({
onCreated() {
this.error = new ReactiveVar('');