Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
batchUpdatesAndNotify(() => {
taskTracker.update(task.id, {
deleted: true,
deletedDate: new Date().toISOString()
}, { suppressUpdate: true });
taskTracker.reorderList(task.listId, true);
refreshTasks();
}, () => {
if (nextTask) {
activateTask(nextTask.id);
console.log(nextTask);
}
});
Toast.create({
mod: 'warning',
timeout: 4000,
items: (
<div>
</div>
)
}).open();
}
children:
"Error occurred while loading dashboard: " + error.toString(),
timeout: 10000,
mod: "error"
}).open();
console.log(error);
History.pushState({}, null, "~/");
} else {
this.store.set("$page.dashboard", {
width: 80,
height: 40,
...w
});
if (!isNonEmptyArray(w.widgets)) {
if (this.store.set('$page.add', true)) {
Toast.create({
children: 'Drag & drop widgets from the right sidebar on the board.',
timeout: 5000,
mod: "primary"
}).open();
}
}
}
});
.catch(error => {
let errorCode = error.code;
let errorMessage = error.message;
let toast = Toast.create({
message: `Login failed with error code ${errorCode}. ${errorMessage}`,
timeout: 15000,
mod: "error"
});
toast.open(this.store);
});
}
onDeleteBoard(e, { store }) {
let board = store.get("$board");
boardTracker.update(board.id, {
deleted: true,
deletedDate: new Date().toISOString(),
edit: false
}, { suppressUpdate: true });
boardTracker.reorder(true);
boardTracker.forceUpdate();
let boards = boardTracker.getActiveBoards();
History.pushState({}, null, boards.length > 0 ? "~/b/" + boards[0].id : "~/")
Toast.create({
mod: 'warning',
timeout: 3000,
items: (
<div>
</div>
)
}).open();
},