Skip to content

Commit

Permalink
Enhance
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan committed Feb 14, 2023
1 parent 1c0d7e0 commit a089f60
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions packages/web-app-admin-settings/src/components/Users/UsersList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -308,12 +308,18 @@ export default defineComponent({
return [...list].sort((user1, user2) => {
let a, b
if (prop === 'role') {
a = this.getRoleDisplayNameByUser(user1)
b = this.getRoleDisplayNameByUser(user2)
} else {
a = user1[prop] || ''
b = user2[prop] || ''
switch (prop){
case 'role':
a = this.getRoleDisplayNameByUser(user1)
b = this.getRoleDisplayNameByUser(user2)
break
case 'status':
a = user1.login.toString()
b = user2.login.toString()
break
default:
a = user1[prop] || ''
b = user2[prop] || ''
}
return desc ? b.localeCompare(a) : a.localeCompare(b)
Expand Down

0 comments on commit a089f60

Please sign in to comment.