From b02222eea000a2b92be055bbc82c8b490293fd8e Mon Sep 17 00:00:00 2001 From: Hironsan Date: Tue, 1 Feb 2022 11:14:24 +0900 Subject: [PATCH] Fix label creation --- frontend/pages/projects/_id/labels/index.vue | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/frontend/pages/projects/_id/labels/index.vue b/frontend/pages/projects/_id/labels/index.vue index c3ae57a3..c039c34d 100644 --- a/frontend/pages/projects/_id/labels/index.vue +++ b/frontend/pages/projects/_id/labels/index.vue @@ -112,15 +112,6 @@ export default Vue.extend({ } }, - // async fetch() { - // this.items = [] - // this.isLoading = true - // console.log('start fetch') - // this.items = await this.service.list(this.projectId) - // console.log('end fetch') - // this.isLoading = false - // }, - computed: { canDelete(): boolean { return this.selected.length > 0 @@ -171,23 +162,22 @@ export default Vue.extend({ async created() { this.project = await this.$services.project.findById(this.projectId) - this.list() + await this.list() }, methods: { async list() { - this.items = [] this.isLoading = true this.items = await this.service.list(this.projectId) this.isLoading = false }, - async create() { - await this.service.create(this.projectId, this.editedItem) + create(): any { + return this.service.create(this.projectId, this.editedItem) }, - async update() { - await this.service.update(this.projectId, this.editedItem) + update(): any { + return this.service.update(this.projectId, this.editedItem) }, async save() {