mirror of
https://gitlab.com/bramw/baserow.git
synced 2024-11-08 09:36:58 +00:00
39 lines
856 B
JavaScript
39 lines
856 B
JavaScript
import { mapGetters } from 'vuex'
|
|
import { notifyIf } from '@baserow/modules/core/utils/error'
|
|
|
|
export default {
|
|
props: {
|
|
storePrefix: {
|
|
type: String,
|
|
required: true,
|
|
},
|
|
},
|
|
methods: {
|
|
async updateKanban(values) {
|
|
const view = this.view
|
|
this.$store.dispatch('view/setItemLoading', { view, value: true })
|
|
|
|
try {
|
|
await this.$store.dispatch('view/update', {
|
|
view,
|
|
values,
|
|
})
|
|
} catch (error) {
|
|
notifyIf(error, 'view')
|
|
}
|
|
|
|
this.$store.dispatch('view/setItemLoading', { view, value: false })
|
|
},
|
|
},
|
|
beforeCreate() {
|
|
this.$options.computed = {
|
|
...(this.$options.computed || {}),
|
|
...mapGetters({
|
|
fieldOptions:
|
|
this.$options.propsData.storePrefix +
|
|
'view/kanban/getAllFieldOptions',
|
|
}),
|
|
}
|
|
},
|
|
}
|