stash
This commit is contained in:
parent
42e1e6e8c7
commit
ef958db94f
2 changed files with 3 additions and 4 deletions
|
@ -464,6 +464,7 @@ const store = createStore({
|
|||
},
|
||||
async createMessageTemplate({commit, state}, template_name) {
|
||||
const {data, success} = await http.post('/2/message_templates/', {name: template_name}, state.user.token);
|
||||
const {data: newTemplates, success: newSuccess} = await http.get('/2/message_templates/', state.user.token);
|
||||
if (data && success) {
|
||||
commit('setMessageTemplates', data);
|
||||
}
|
||||
|
|
|
@ -10,11 +10,9 @@
|
|||
<div v-for="template in messageTemplatesIntermediate" :key="template.id" class="card bg-dark"
|
||||
style="margin-bottom: 10px;">
|
||||
<div class="card-header">{{ template.name }}</div>
|
||||
<FormatedText :value="template.message" :format="formatText" class="card-body"
|
||||
@input="changeMessageTemplate(template.id, $event)"/>
|
||||
<div class="card-body">
|
||||
<FormatedText :value="template.message" :format="formatText"
|
||||
@input="changeMessageTemplate(template.id, $event)"/>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<button class="btn btn-primary" @click="resetMessageTemplate(template.id)"
|
||||
:disabled="messageTemplates.find(t => t.id === template.id).message === template.message">Reset
|
||||
</button>
|
||||
|
|
Loading…
Reference in a new issue