Follow up 949a47a7be6cf10dc7fd38c3c5b06def6efad26d - Fixes #4040 - users customer name is displayed as id.

This commit is contained in:
Rolf Schmidt 2022-06-13 08:23:35 +02:00
parent e50ba0aca5
commit 439b17800f

View file

@ -50,6 +50,9 @@ class User extends App.ControllerSubContent
@delay(@search, 220, 'search')
)
# App.User.subscribe will clear model data so we use controllerBind (#4040)
@controllerBind('User:create User:update User:touch User:destroy', => @delay(@search, 220, 'search'))
# show last 20 users
@search()
@ -182,9 +185,6 @@ class User extends App.ControllerSubContent
'click': edit
)
if !@subscribeId
@subscribeId = App.User.subscribe(=> @delay(@search, 220, 'search'))
search: =>
role_ids = []
@$('.tab.active').each( (i,d) ->
@ -242,8 +242,4 @@ class User extends App.ControllerSubContent
container: @el.closest('.content')
)
release: =>
if @subscribeId
App.User.unsubscribe(@subscribeId)
App.Config.set( 'User', { prio: 1000, name: __('Users'), parent: '#manage', target: '#manage/users', controller: User, permission: ['admin.user'] }, 'NavBarAdmin' )