This commit is contained in:
j3d1 2024-06-08 20:41:10 +02:00
parent b08f9a7127
commit f8e9c285f6

View file

@ -1,8 +1,9 @@
<template> <template>
<h3 class="text-center">Message Templates</h3> <h3 class="text-center">Message Templates</h3>
<ul> <ul>
<li v-for="template in messageTemplatesIntermediate" :key="template.id"> <div v-for="template in messageTemplatesIntermediate" :key="template.id" class="card bg-dark">
<b>{{ template.name }}</b><br> <div class="card-header">{{ template.name }}</div>
<div class="card-body">
<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)"/>
<br> <br>
@ -12,7 +13,8 @@
<button class="btn btn-success" @click="saveMessageTemplate(template.id)" <button class="btn btn-success" @click="saveMessageTemplate(template.id)"
:disabled="true">Save :disabled="true">Save
</button> </button>
</li> </div>
</div>
</ul> </ul>
<h3 class="text-center">Message Template Variables</h3> <h3 class="text-center">Message Template Variables</h3>
<p> <p>
@ -64,7 +66,7 @@ export default {
}, },
mounted() { mounted() {
this.fetchMessageTemplates().then(() => { this.fetchMessageTemplates().then(() => {
this.messageTemplatesIntermediate = [...this.messageTemplates]; this.messageTemplatesIntermediate = JSON.parse(JSON.stringify(this.messageTemplates));
}); });
this.fetchMessageTemplateVariables(); this.fetchMessageTemplateVariables();
}, },