Skip to content
Snippets Groups Projects
Commit f68f9aa3 authored by Yoann Schneider's avatar Yoann Schneider :tennis: Committed by Bastien Abadie
Browse files

add a success notification when the template has been created

parent d0560779
No related branches found
No related tags found
1 merge request!1144add a success notification when the template has been created
......@@ -50,6 +50,13 @@ describe('Process/TemplateCreation.vue', () => {
{
mutation: 'process/setProcess',
payload: templateSample
},
{
mutation: 'notifications/notify',
payload: {
type: 'success',
text: 'Template test_template has been created'
}
}
])
})
......
......@@ -72,6 +72,8 @@ export default {
try {
const payload = { name: this.templateName }
await this.$store.dispatch('process/createProcessTemplate', { processId: this.processId, payload })
// Notify when the template has been successfully created
this.notify({ type: 'success', text: `Template ${this.templateName} has been created` })
// Reset the template name and closes the modal on success
this.templateName = ''
this.showModal = false
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment