Skip to content

Commit

Permalink
call api endpoint from correct vuew component
Browse files Browse the repository at this point in the history
Signed-off-by: grnd-alt <salimbelakkaf@outlook.de>
  • Loading branch information
grnd-alt committed Mar 22, 2024
1 parent 82c5fc7 commit 132e5d7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
5 changes: 1 addition & 4 deletions src/modules/main/sections/Table.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div>
<ElementTitle :active-element="table" :view-setting.sync="localViewSetting" />
<TableDescription :active-element="table" @updatedesc="saveDescription" />
<TableDescription :active-element="table" />
<Dashboard v-if="hasViews"
:table="table"
@create-column="$emit('create-column')"
Expand Down Expand Up @@ -79,9 +79,6 @@ export default {
createView() {
emit('tables:view:create', { tableId: this.table.id, viewSetting: this.viewSetting.length > 0 ? this.viewSetting : this.localViewSetting })
},
async saveDescription(description) {
await this.$store.dispatch('updateTableProperty', { id: this.table.id, data: { description }, property: 'description' })
},
},
}
</script>
Expand Down
3 changes: 1 addition & 2 deletions src/modules/main/sections/TableDescription.vue
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,7 @@ export default {
async saveDescription() {
if (this.descriptionLastEdited !== 0 || this.description === this.activeElement.description) return
this.descriptionSaving = true
// await this.$store.dispatch('updateTableProperty', { id: this.activeElement.id, data: { description: this.description }, property: 'description' })
this.$emit('updatedesc', this.description)
await this.$store.dispatch('updateTableProperty', { id: this.table.id, data: { description }, property: 'description' })

Check failure on line 104 in src/modules/main/sections/TableDescription.vue

View workflow job for this annotation

GitHub Actions / NPM lint

'description' is not defined
this.descriptionLastEdit = 0
this.descriptionSaving = false
},
Expand Down

0 comments on commit 132e5d7

Please sign in to comment.