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