stash
This commit is contained in:
parent
0239b68c11
commit
33a7423fef
1 changed files with 22 additions and 8 deletions
|
@ -6,20 +6,21 @@
|
|||
<FormatedText :value="template.message" :format="formatText" class="template-message"
|
||||
@input="changeMessageTemplate(template.id, $event)"/>
|
||||
<br>
|
||||
<button class="btn btn-primary"
|
||||
<button class="btn btn-primary" @click="resetMessageTemplate(template.id)"
|
||||
:disabled="true">Reset
|
||||
</button>
|
||||
<button class="btn btn-success"
|
||||
<button class="btn btn-success" @click="saveMessageTemplate(template.id)"
|
||||
:disabled="true">Save
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
<h3 class="text-center">Message Template Variables</h3>
|
||||
<ul>
|
||||
<li v-for="(variable, key) in messageTemplateVariables" :key="key">
|
||||
<p>
|
||||
<span v-for="(variable, key) in messageTemplateVariables" :key="key" class="badge badge-primary">
|
||||
{{ variable }}
|
||||
</li>
|
||||
</ul>
|
||||
</span>
|
||||
</p>
|
||||
{{ messageTemplatesIntermediate }}
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@ -30,6 +31,11 @@ import FormatedText from "@/components/inputs/FormatedText.vue";
|
|||
export default {
|
||||
name: 'Settings',
|
||||
components: {FormatedText, Table},
|
||||
data() {
|
||||
return {
|
||||
messageTemplatesIntermediate: [],
|
||||
};
|
||||
},
|
||||
computed: mapState(['messageTemplates', 'messageTemplateVariables']),
|
||||
methods: {
|
||||
...mapActions(['fetchMessageTemplates', 'fetchMessageTemplateVariables']),
|
||||
|
@ -45,10 +51,18 @@ export default {
|
|||
template.message = message;
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
saveMessageTemplate(id) {
|
||||
console.log(id);
|
||||
},
|
||||
resetMessageTemplate(id) {
|
||||
console.log(id);
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.fetchMessageTemplates();
|
||||
this.fetchMessageTemplates().then(() => {
|
||||
this.messageTemplatesIntermediate = this.messageTemplates;
|
||||
});
|
||||
this.fetchMessageTemplateVariables();
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue