From ef896f999fc6b21488486b208d71bb1d955269a1 Mon Sep 17 00:00:00 2001 From: Julien Wajsberg Date: Tue, 30 Oct 2018 14:51:38 +0100 Subject: [PATCH] Fix the "delete" button in the table view In c7fa6c8b5b250c4ca6777af045444c5ffd764863 the code using `updateFlatStatus` moved to the new file `flatstableline.vue` but the actual method wasn't moved in the process, yielding an error when one wanted to use the button. This patch moves the method to the new file. --- flatisfy/web/js_src/components/flatstable.vue | 3 --- flatisfy/web/js_src/components/flatstableline.vue | 6 ++++++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/flatisfy/web/js_src/components/flatstable.vue b/flatisfy/web/js_src/components/flatstable.vue index fe3284f..6d4d632 100644 --- a/flatisfy/web/js_src/components/flatstable.vue +++ b/flatisfy/web/js_src/components/flatstable.vue @@ -118,9 +118,6 @@ export default { }, methods: { - updateFlatStatus (id, status) { - this.$store.dispatch('updateFlatStatus', { flatId: id, newStatus: status }) - }, updateSortBy (field) { if (this.sortBy === field) { if (this.sortOrder === 'up') { diff --git a/flatisfy/web/js_src/components/flatstableline.vue b/flatisfy/web/js_src/components/flatstableline.vue index 330108b..86bcf1b 100644 --- a/flatisfy/web/js_src/components/flatstableline.vue +++ b/flatisfy/web/js_src/components/flatstableline.vue @@ -86,6 +86,12 @@ export default { return range(this.flat.notation); }, }, + + methods: { + updateFlatStatus (id, status) { + this.$store.dispatch('updateFlatStatus', { flatId: id, newStatus: status }) + }, + }, };