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">
|
<li v-for="[template, index] in localChanges" :key="template.id">
|
||||||
<b>{{ template.name }}</b><br>
|
<b>{{ template.name }}</b><br>
|
||||||
<FormatedText :value="template.message" :format="formatText" class="template-message"
|
<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"
|
<button class="btn btn-primary"
|
||||||
:disabled="template.message !== messageTemplates[index].message">Reset
|
:disabled="template.message !== messageTemplates[index].message">Reset
|
||||||
</button>
|
</button>
|
||||||
|
@ -52,11 +53,12 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.fetchMessageTemplates();
|
this.fetchMessageTemplates().then(() => {
|
||||||
this.fetchMessageTemplateVariables();
|
this.localChanges = this.messageTemplates.map(template => {
|
||||||
this.localChanges = this.messageTemplates.map(template => {
|
return {id: template.id, message: template.message, name: template.name};
|
||||||
return {id: template.id, message: template.message, name: template.name};
|
});
|
||||||
});
|
});
|
||||||
|
this.fetchMessageTemplateVariables();
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in a new issue