stash
This commit is contained in:
parent
3ebe51645a
commit
2a0fd8649d
1 changed files with 7 additions and 5 deletions
|
@ -4,7 +4,8 @@
|
|||
<li v-for="[template, index] in localChanges" :key="template.id">
|
||||
<b>{{ template.name }}</b><br>
|
||||
<FormatedText :value="template.message" :format="formatText" class="template-message"
|
||||
@input="changeMessageTemplate(template.id, $event)"/><br>
|
||||
@input="changeMessageTemplate(template.id, $event)"/>
|
||||
<br>
|
||||
<button class="btn btn-primary"
|
||||
:disabled="template.message !== messageTemplates[index].message">Reset
|
||||
</button>
|
||||
|
@ -52,11 +53,12 @@ export default {
|
|||
}
|
||||
},
|
||||
mounted() {
|
||||
this.fetchMessageTemplates();
|
||||
this.fetchMessageTemplateVariables();
|
||||
this.localChanges = this.messageTemplates.map(template => {
|
||||
return {id: template.id, message: template.message, name: template.name};
|
||||
this.fetchMessageTemplates().then(() => {
|
||||
this.localChanges = this.messageTemplates.map(template => {
|
||||
return {id: template.id, message: template.message, name: template.name};
|
||||
});
|
||||
});
|
||||
this.fetchMessageTemplateVariables();
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
Loading…
Reference in a new issue