Fix swimlanes

This commit is contained in:
Harry Adel 2026-01-23 22:28:36 +02:00
parent 47f067e38e
commit e0249493d0
4 changed files with 28 additions and 28 deletions

View file

@ -37,7 +37,7 @@ BlazeComponent.extendComponent({
await board.restore();
Utils.goBoardId(board._id);
},
'click .js-delete-board': Popup.afterConfirm('boardDelete', function() {
'click .js-delete-board': Popup.afterConfirm('boardDelete', async function() {
Popup.back();
const isSandstorm =
Meteor.settings &&
@ -45,9 +45,9 @@ BlazeComponent.extendComponent({
Meteor.settings.public.sandstorm;
if (isSandstorm && Utils.getCurrentBoardId()) {
const currentBoard = Utils.getCurrentBoard();
Boards.remove(currentBoard._id);
await Boards.removeAsync(currentBoard._id);
}
Boards.remove(this._id);
await Boards.removeAsync(this._id);
FlowRouter.go('home');
}),
},

View file

@ -95,15 +95,15 @@ BlazeComponent.extendComponent({
}
},
'click .js-delete-card': Popup.afterConfirm('cardDelete', function() {
'click .js-delete-card': Popup.afterConfirm('cardDelete', async function() {
const cardId = this._id;
Cards.remove(cardId);
await Cards.removeAsync(cardId);
Popup.back();
}),
'click .js-delete-all-cards': Popup.afterConfirm('cardDelete', () => {
this.archivedCards().forEach(card => {
Cards.remove(card._id);
});
'click .js-delete-all-cards': Popup.afterConfirm('cardDelete', async () => {
for (const card of this.archivedCards()) {
await Cards.removeAsync(card._id);
}
Popup.back();
}),
@ -117,14 +117,14 @@ BlazeComponent.extendComponent({
}
},
'click .js-delete-list': Popup.afterConfirm('listDelete', function() {
this.remove();
'click .js-delete-list': Popup.afterConfirm('listDelete', async function() {
await this.remove();
Popup.back();
}),
'click .js-delete-all-lists': Popup.afterConfirm('listDelete', () => {
this.archivedLists().forEach(list => {
list.remove();
});
'click .js-delete-all-lists': Popup.afterConfirm('listDelete', async () => {
for (const list of this.archivedLists()) {
await list.remove();
}
Popup.back();
}),
@ -140,17 +140,17 @@ BlazeComponent.extendComponent({
'click .js-delete-swimlane': Popup.afterConfirm(
'swimlaneDelete',
function() {
this.remove();
async function() {
await this.remove();
Popup.back();
},
),
'click .js-delete-all-swimlanes': Popup.afterConfirm(
'swimlaneDelete',
() => {
this.archivedSwimlanes().forEach(swimlane => {
swimlane.remove();
});
async () => {
for (const swimlane of this.archivedSwimlanes()) {
await swimlane.remove();
}
Popup.back();
},
),

View file

@ -339,8 +339,8 @@ Lists.helpers({
const card = ReactiveCache.getCard({ listId: this._id });
return card && card.originRelativeUrl();
},
remove() {
Lists.remove({ _id: this._id });
async remove() {
return await Lists.removeAsync({ _id: this._id });
},
async rename(title) {

View file

@ -183,13 +183,13 @@ Swimlanes.helpers({
if (toList) {
toListId = toList._id;
} else {
toListId = Lists.insert({
toListId = await Lists.insertAsync({
title: list.title,
boardId: toBoardId,
type: list.type,
archived: false,
wipLimit: list.wipLimit,
swimlaneId: toSwimlaneId, // Set the target swimlane for the copied list
swimlaneId: this._id,
});
}
@ -202,7 +202,7 @@ Swimlanes.helpers({
}
}
Swimlanes.update(this._id, {
await Swimlanes.updateAsync(this._id, {
$set: {
boardId: toBoardId,
},
@ -315,8 +315,8 @@ Swimlanes.helpers({
return (user.profile || {}).boardTemplatesSwimlaneId === this._id;
},
remove() {
Swimlanes.remove({ _id: this._id });
async remove() {
return await Swimlanes.removeAsync({ _id: this._id });
},
async rename(title) {