Add dummy delete

Signed-off-by: Michael Weimann <mail@michael-weimann.eu>
This commit is contained in:
Michael Weimann
2018-12-29 18:00:09 +01:00
parent 03a3d29f1a
commit 45be999245

View File

@@ -22,7 +22,7 @@
import store from './../store/main' import store from './../store/main'
function boardActions(board) { function boardActions(item, board) {
const actions = [{ const actions = [{
action: () => { action: () => {
}, },
@@ -42,6 +42,9 @@ function boardActions(board) {
actions.push({ actions.push({
action: () => { action: () => {
item.loading = true
item.utils.actions = []
item.menuOpened = false
}, },
icon: 'icon-delete', icon: 'icon-delete',
text: t('deck', 'Delete board') text: t('deck', 'Delete board')
@@ -63,8 +66,10 @@ function boardActions(board) {
* @returns {{id: *, classes: Array, bullet: string, text: *, router: {name: string, params: {id: *}}, utils: {actions: *[]}}} * @returns {{id: *, classes: Array, bullet: string, text: *, router: {name: string, params: {id: *}}, utils: {actions: *[]}}}
*/ */
export const boardToMenuItem = board => { export const boardToMenuItem = board => {
return {
const item = {
id: board.id, id: board.id,
key: board.id,
classes: [], classes: [],
bullet: `#${board.color}`, bullet: `#${board.color}`,
text: board.title, text: board.title,
@@ -73,9 +78,11 @@ export const boardToMenuItem = board => {
name: 'board', name: 'board',
params: { id: board.id } params: { id: board.id }
}, },
utils: { utils: {},
actions: boardActions(board)
},
board: board board: board
} }
item.utils.actions = boardActions(item, board)
return item
} }