mirror of
https://github.com/wekan/wekan.git
synced 2026-01-24 10:16:09 +01:00
Fix swimlanes
This commit is contained in:
parent
47f067e38e
commit
e0249493d0
4 changed files with 28 additions and 28 deletions
|
|
@ -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');
|
||||
}),
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
},
|
||||
),
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue