Merge pull request #4413 from Ben0it-T/fix-duplicate-board-create-board

Fix Duplicate board and create board from template doesn't open board
This commit is contained in:
Lauri Ojansivu 2022-03-16 22:42:46 +02:00 committed by GitHub
commit 2f4e201d55
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 1 deletions

View file

@ -228,6 +228,7 @@ BlazeComponent.extendComponent({
evt.preventDefault();
},
'click .js-clone-board'(evt) {
let title = getSlug(Boards.findOne(this.currentData()._id).title) || 'cloned-board';
Meteor.call(
'copyBoard',
this.currentData()._id,
@ -242,7 +243,11 @@ BlazeComponent.extendComponent({
} else {
Session.set('fromBoard', null);
subManager.subscribe('board', res, false);
Utils.goBoardId(res);
FlowRouter.go('board', {
id: res,
slug: title,
});
//Utils.goBoardId(res);
}
},
);

View file

@ -719,6 +719,10 @@ BlazeComponent.extendComponent({
(err, data) => {
_id = data;
subManager.subscribe('board', _id, false);
FlowRouter.go('board', {
id: _id,
slug: getSlug(element.title),
});
},
);
}