stash
This commit is contained in:
parent
33a7423fef
commit
b08f9a7127
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,7 +20,10 @@
|
|||
{{ variable }}
|
||||
</span>
|
||||
</p>
|
||||
{{ messageTemplatesIntermediate }}
|
||||
<hr>
|
||||
{{ messageTemplates }}
|
||||
<hr>
|
||||
{{messageTemplatesIntermediate}}
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@ -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