summaryrefslogtreecommitdiffstats
path: root/webapp
diff options
context:
space:
mode:
authorChristian Hofmaier2019-04-14 18:20:31 +0200
committerChristian Hofmaier2019-04-14 18:20:31 +0200
commit3f2d126dba95ace251cf49f952ffa0ada6729f65 (patch)
tree1423e40cc661735973951a3545f24e3f04f2cbfb /webapp
parent[webapp] remove unused npm dependencies (diff)
downloadbas-3f2d126dba95ace251cf49f952ffa0ada6729f65.tar.gz
bas-3f2d126dba95ace251cf49f952ffa0ada6729f65.tar.xz
bas-3f2d126dba95ace251cf49f952ffa0ada6729f65.zip
[eventmanager] show config name instead of config id in event table
- change models/migrations for config association
Diffstat (limited to 'webapp')
-rw-r--r--webapp/src/components/EventModuleEdit.vue9
-rw-r--r--webapp/src/components/EventModuleEventList.vue2
-rw-r--r--webapp/src/store/events.js3
3 files changed, 5 insertions, 9 deletions
diff --git a/webapp/src/components/EventModuleEdit.vue b/webapp/src/components/EventModuleEdit.vue
index 196a94e..5421fba 100644
--- a/webapp/src/components/EventModuleEdit.vue
+++ b/webapp/src/components/EventModuleEdit.vue
@@ -458,14 +458,7 @@ export default {
this.description = value.info.description || ''
this.important = value.info.important || false
- this.config = []
- if (value.info.config) {
- for (let i = 0; i < this.configList.length; i++) {
- if (this.configList[i].id === value.info.config) {
- this.config.push(this.configList[i])
- }
- }
- }
+ this.config = [value.info.config] || []
this.times = value.info.times ? JSON.parse(value.info.times) : {}
this.repetitiveEvent = this.times.repetitive || false
diff --git a/webapp/src/components/EventModuleEventList.vue b/webapp/src/components/EventModuleEventList.vue
index fe2ac1a..1cbe233 100644
--- a/webapp/src/components/EventModuleEventList.vue
+++ b/webapp/src/components/EventModuleEventList.vue
@@ -58,7 +58,7 @@ export default {
return [
{ text: this.$t('name'), key: 'name' },
{ text: this.$t('description'), key: 'description' },
- { text: this.$t('config'), key: 'config' },
+ { text: this.$t('config'), key: 'configName' },
{ sortable: false, key: 'action', width: '60px' }
]
},
diff --git a/webapp/src/store/events.js b/webapp/src/store/events.js
index 9f9e29b..7a5551f 100644
--- a/webapp/src/store/events.js
+++ b/webapp/src/store/events.js
@@ -19,6 +19,9 @@ export default {
actions: {
loadEvents (context) {
axios.get('/api/events').then(response => {
+ for (let i = 0; i < response.data.length; i++) {
+ response.data[i].configName = response.data[i].config.name
+ }
context.commit('setEvents', response.data)
})
},