From 9b8393c779ad7ade8c35cadbaa897db91781c4fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= Date: Mon, 27 May 2019 13:51:24 +0200 Subject: [PATCH] minor errata --- frontend/src/classes/Deck.js | 1 + frontend/src/components/Deck.vue | 113 ++++++++++--------- frontend/src/components/DeckList.vue | 1 + frontend/src/components/forms/FormDialog.vue | 8 +- 4 files changed, 66 insertions(+), 57 deletions(-) diff --git a/frontend/src/classes/Deck.js b/frontend/src/classes/Deck.js index 2f0a2f7..7172eab 100644 --- a/frontend/src/classes/Deck.js +++ b/frontend/src/classes/Deck.js @@ -205,6 +205,7 @@ export default class { count: elements[element] }) + retval = retval.filter(element => element.count > 0) retval.sort((element_l, element_r) => element_r.count - element_l.count) return retval diff --git a/frontend/src/components/Deck.vue b/frontend/src/components/Deck.vue index 702b741..8bd70fb 100644 --- a/frontend/src/components/Deck.vue +++ b/frontend/src/components/Deck.vue @@ -15,66 +15,71 @@ - - {{ deck.note }} - + diff --git a/frontend/src/components/DeckList.vue b/frontend/src/components/DeckList.vue index 4878047..f57aa10 100644 --- a/frontend/src/components/DeckList.vue +++ b/frontend/src/components/DeckList.vue @@ -67,6 +67,7 @@ export default { result.push(deck) } + result.sort((deck_l, deck_r) => deck_l.name.localeCompare(deck_r.name)) return result } }, diff --git a/frontend/src/components/forms/FormDialog.vue b/frontend/src/components/forms/FormDialog.vue index 6397d24..894d02e 100644 --- a/frontend/src/components/forms/FormDialog.vue +++ b/frontend/src/components/forms/FormDialog.vue @@ -1,8 +1,10 @@