Card detail popup loads now comments if opened from board search

This commit is contained in:
Martin Filser 2021-10-28 22:38:50 +02:00
parent fdd23e2f54
commit f1b49e05eb

View file

@ -13,14 +13,14 @@ BlazeComponent.extendComponent({
this.autorun(() => {
let mode = this.data().mode;
const capitalizedMode = Utils.capitalize(mode);
let thisId, searchId;
let searchId;
if (mode === 'linkedcard' || mode === 'linkedboard') {
thisId = Utils.getCurrentCardId();
searchId = Cards.findOne({ _id: thisId }).linkedId;
searchId = Utils.getCurrentCard().linkedId;
mode = mode.replace('linked', '');
} else if (mode == "card" ) {
searchId = Utils.getCurrentCardId();
} else {
thisId = Session.get(`current${capitalizedMode}`);
searchId = thisId;
searchId = Session.get(`current${capitalizedMode}`);
}
const limit = this.page.get() * activitiesPerPage;
const user = Meteor.user();