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

order templates by name then by id

parent 7554dc8e
No related branches found
No related tags found
1 merge request!1145order templates by name then by id
......@@ -31,6 +31,7 @@
import { mapMutations, mapState, mapActions } from 'vuex'
import { ensureArray, errorParser } from '~/js/helpers'
import { orderBy } from 'lodash'
export default {
props: {
......@@ -51,7 +52,9 @@ export default {
...mapState('process', ['processes']),
availableTemplates () {
// Filters all processes to only list the templates
return ensureArray(Object.values(this.processes)).filter(process => process.mode === 'template')
const templateList = ensureArray(Object.values(this.processes)).filter(process => process.mode === 'template')
// Order by name then by id
return orderBy(templateList, ['name', 'id'])
},
process () {
return this.processes[this.processId]
......
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