From e4ccf431a4ef2835095792e95d2ddfcb2c765701 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakob=20R=C3=B6hrl?= Date: Thu, 30 Jan 2020 12:28:27 +0100 Subject: [PATCH] create several cards if the new title contains a linebreak MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jakob Röhrl --- src/components/board/Stack.vue | 39 +++++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/components/board/Stack.vue b/src/components/board/Stack.vue index 14cbbe2af..44211d1c9 100644 --- a/src/components/board/Stack.vue +++ b/src/components/board/Stack.vue @@ -53,13 +53,14 @@
- + (line) => { + + let newCard = { + title: line, + stackId: this.stack.id, + boardId: this.stack.boardId, + } + + this.$store.dispatch('addCard', newCard) + this.newCardTitle = '' + this.showAddCard = false + }) + + } else { + + const newCard = { + title: this.newCardTitle, + stackId: this.stack.id, + boardId: this.stack.boardId, + } + + this.$store.dispatch('addCard', newCard) + this.newCardTitle = '' + this.showAddCard = false + } - this.$store.dispatch('addCard', newCard) - this.newCardTitle = '' - this.showAddCard = false }, }, }