@@ -99,7 +99,6 @@ qx.Class.define("osparc.share.NewCollaboratorsManager", {
9999 const textField = this . getChildControl ( "text-filter" ) . getChildControl ( "textfield" ) ;
100100 const email = textField . getValue ( ) ;
101101 if ( osparc . auth . core . Utils . checkEmail ( email ) ) {
102- this . __selectedCollaborators [ email ] = email ;
103102 const invitedButton = this . __invitedButton ( email ) ;
104103 this . getChildControl ( "potential-collaborators-list" ) . addAt ( invitedButton , 0 ) ;
105104 invitedButton . setValue ( true ) ;
@@ -286,20 +285,20 @@ qx.Class.define("osparc.share.NewCollaboratorsManager", {
286285
287286 const collaboratorData = {
288287 label : email ,
288+ email : email ,
289289 description : null ,
290290 } ;
291291 const collaborator = qx . data . marshal . Json . createModel ( collaboratorData ) ;
292292 const collaboratorButton = new osparc . filter . CollaboratorToggleButton ( collaborator ) ;
293- collaboratorButton . email = email ;
294293 collaboratorButton . setIconSrc ( "@FontAwesome5Solid/envelope/14" ) ;
295294
296295 collaboratorButton . addListener ( "changeValue" , e => {
297296 const selected = e . getData ( ) ;
298297 if ( selected ) {
299- this . __selectedCollaborators [ collaborator . email ] = collaborator ;
298+ this . __selectedCollaborators [ collaborator . getEmail ( ) ] = collaborator ;
300299 collaboratorButton . unsubscribeToFilterGroup ( "collaboratorsManager" ) ;
301- } else if ( collaborator . email in this . __selectedCollaborators ) {
302- delete this . __selectedCollaborators [ collaborator . email ] ;
300+ } else if ( collaborator . getEmail ( ) in this . __selectedCollaborators ) {
301+ delete this . __selectedCollaborators [ collaborator . getEmail ( ) ] ;
303302 collaboratorButton . subscribeToFilterGroup ( "collaboratorsManager" ) ;
304303 }
305304 this . getChildControl ( "share-button" ) . setEnabled ( Boolean ( Object . keys ( this . __selectedCollaborators ) . length ) ) ;
0 commit comments