stash
This commit is contained in:
parent
8906c752ee
commit
e812366651
1 changed files with 7 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<h3 class="text-center">Message Templates</h3>
|
||||
<ul>
|
||||
<li v-for="template in messageTemplates" :key="template.id">
|
||||
<li v-for="template in messageTemplatesIntermediate" :key="template.id">
|
||||
<b>{{ template.name }}</b><br>
|
||||
<FormatedText :value="template.message" :format="formatText" class="template-message"
|
||||
@input="changeMessageTemplate(template.id, $event)"/>
|
||||
|
@ -20,6 +20,9 @@
|
|||
{{ variable }}
|
||||
</span>
|
||||
</p>
|
||||
<hr>
|
||||
{{ messageTemplates }}
|
||||
<hr>
|
||||
{{messageTemplatesIntermediate}}
|
||||
</template>
|
||||
|
||||
|
@ -46,7 +49,7 @@ export default {
|
|||
},
|
||||
changeMessageTemplate(id, message) {
|
||||
console.log(id, message);
|
||||
this.messageTemplates.forEach(template => {
|
||||
this.messageTemplatesIntermediate.forEach(template => {
|
||||
if (template.id === id) {
|
||||
template.message = message;
|
||||
}
|
||||
|
@ -61,7 +64,7 @@ export default {
|
|||
},
|
||||
mounted() {
|
||||
this.fetchMessageTemplates().then(() => {
|
||||
this.messageTemplatesIntermediate = this.messageTemplates;
|
||||
this.messageTemplatesIntermediate = [...this.messageTemplates];
|
||||
});
|
||||
this.fetchMessageTemplateVariables();
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue