This commit is contained in:
j3d1 2024-06-07 23:05:22 +02:00
parent 2a0fd8649d
commit 602205e096

View file

@ -1,7 +1,7 @@
<template> <template>
<h3 class="text-center">Message Templates</h3> <h3 class="text-center">Message Templates</h3>
<ul> <ul>
<li v-for="[template, index] in localChanges" :key="template.id"> <li v-for="[template, index] in messageTemplates" :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)"/> @input="changeMessageTemplate(template.id, $event)"/>
@ -53,11 +53,7 @@ export default {
} }
}, },
mounted() { mounted() {
this.fetchMessageTemplates().then(() => { this.fetchMessageTemplates();
this.localChanges = this.messageTemplates.map(template => {
return {id: template.id, message: template.message, name: template.name};
});
});
this.fetchMessageTemplateVariables(); this.fetchMessageTemplateVariables();
}, },
}; };