@@ -94,10 +94,7 @@ qx.Class.define("osparc.po.UsersPending", {
9494 control = new qx . ui . form . Button ( this . tr ( "Reload" ) ) . set ( {
9595 allowGrowX : false ,
9696 } ) ;
97- control . addListener ( "execute" , ( ) => {
98- this . getChildControl ( "pending-users-layout" ) . removeAll ( ) ;
99- this . __populatePendingUsersLayout ( ) ;
100- } ) ;
97+ control . addListener ( "execute" , ( ) => this . __reload ( ) ) ;
10198 this . _add ( control ) ;
10299 break ;
103100 case "pending-users-container" :
@@ -245,6 +242,11 @@ qx.Class.define("osparc.po.UsersPending", {
245242 . catch ( err => osparc . FlashMessenger . logError ( err ) ) ;
246243 } ,
247244
245+ __reload : function ( ) {
246+ this . getChildControl ( "pending-users-layout" ) . removeAll ( ) ;
247+ this . __populatePendingUsersLayout ( ) ;
248+ } ,
249+
248250 __createApproveButton : function ( email ) {
249251 const button = new qx . ui . form . Button ( qx . locale . Manager . tr ( "Approve" ) ) ;
250252 button . addListener ( "execute" , ( ) => {
@@ -289,7 +291,10 @@ qx.Class.define("osparc.po.UsersPending", {
289291 if ( win . getConfirmed ( ) ) {
290292 button . setFetching ( true ) ;
291293 this . __rejectUser ( email )
292- . then ( ( ) => osparc . FlashMessenger . logAs ( qx . locale . Manager . tr ( "User denied" ) , "INFO" ) )
294+ . then ( ( ) => {
295+ osparc . FlashMessenger . logAs ( qx . locale . Manager . tr ( "User denied" ) , "INFO" ) ;
296+ this . __reload ( ) ;
297+ } )
293298 . catch ( err => osparc . FlashMessenger . logError ( err ) )
294299 . finally ( ( ) => button . setFetching ( false ) ) ;
295300 }
@@ -326,6 +331,7 @@ qx.Class.define("osparc.po.UsersPending", {
326331 this . __approveUser ( email , form )
327332 . then ( ( ) => {
328333 osparc . FlashMessenger . logAs ( "User approved" , "INFO" ) ;
334+ this . __reload ( ) ;
329335 } )
330336 . catch ( err => osparc . FlashMessenger . logError ( err ) )
331337 . finally ( ( ) => {
0 commit comments