Commit 8022e002 authored by Robert's avatar Robert 👽

UPD: Sort roles by relevance/position (desc) (closes #180)

parent 1d61d78a
Pipeline #130329 passed with stages
in 4 minutes and 22 seconds
......@@ -378,6 +378,11 @@ export default {
this.assignable_role_name_options_by_system = {}
Object.keys(this.assignable_roles_by_system).forEach(system => {
this.assignable_system_options.add({value: system, text: system.toUpperCase()})
this.assignable_roles_by_system[system].sort((a, b) => {
if (a.position < b.position) return -1
if (a.position > b.position) return 1
return 0
})
this.assignable_role_name_options_by_system[system] = []
this.assignable_roles_by_system[system].forEach(role => {
this.assignable_role_name_options_by_system[system].push({value: role.name, text: role.name})
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment