stash
This commit is contained in:
parent
b08f9a7127
commit
f8e9c285f6
1 changed files with 16 additions and 14 deletions
|
@ -1,18 +1,20 @@
|
||||||
<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>
|
||||||
<FormatedText :value="template.message" :format="formatText" class="template-message"
|
<div class="card-body">
|
||||||
@input="changeMessageTemplate(template.id, $event)"/>
|
<FormatedText :value="template.message" :format="formatText" class="template-message"
|
||||||
<br>
|
@input="changeMessageTemplate(template.id, $event)"/>
|
||||||
<button class="btn btn-primary" @click="resetMessageTemplate(template.id)"
|
<br>
|
||||||
:disabled="true">Reset
|
<button class="btn btn-primary" @click="resetMessageTemplate(template.id)"
|
||||||
</button>
|
:disabled="true">Reset
|
||||||
<button class="btn btn-success" @click="saveMessageTemplate(template.id)"
|
</button>
|
||||||
:disabled="true">Save
|
<button class="btn btn-success" @click="saveMessageTemplate(template.id)"
|
||||||
</button>
|
:disabled="true">Save
|
||||||
</li>
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 class="text-center">Message Template Variables</h3>
|
<h3 class="text-center">Message Template Variables</h3>
|
||||||
<p>
|
<p>
|
||||||
|
@ -23,7 +25,7 @@
|
||||||
<hr>
|
<hr>
|
||||||
{{ messageTemplates }}
|
{{ messageTemplates }}
|
||||||
<hr>
|
<hr>
|
||||||
{{messageTemplatesIntermediate}}
|
{{ messageTemplatesIntermediate }}
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
@ -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();
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue