_onGroupChanged() {
      
      const projectName = this.shadowRoot.getElementById("connected-group-project-name").innerText;
      const newLinkedGroupName = this.shadowRoot.getElementById("input-edit-group-name").value;
      if(newLinkedGroupName == undefined){
        return;
      }

      var newLinkedGroupId = "";
      for(let key of Object.keys(this.groups)) {
        if(this.groups[key].name == newLinkedGroupName){
            newLinkedGroupId = this.groups[key].id;
            break;
        }
      }
      fetch(this.projectServiceURL + "/projects/" + this.system + "/changeGroup/", {
        method: "POST",
        headers: Auth.getAuthHeaderWithSub(),
        body: JSON.stringify({
          "name": projectName,
          "access_token": Auth.getAccessToken(),
          "projectName": projectName,
          "newGroupName": newLinkedGroupName,
          "newGroupId": newLinkedGroupId
        })
      }).then( response => {
          if(!response.ok) throw Error(response.status);
            return response.json();
      }).then(data => {
          this._onGroupChangeDone(data);
      }).catch(error => {
        if(error.message == "401") {
          // user is not authorized
          // maybe the access token has expired
          Auth.removeAuthDataFromLocalStorage();
       //   location.reload();
        } else {
          console.log(error);
        }
      });
    }
/**
   * Gets called when the "Group" icon of one of the displayed projects gets clicked and opens a dialog with
   * information on the group which is currently connected to the project.
   * @param project
   */
Gets called when the "Group" icon of one of the displayed projects gets clicked and opens a dialog with
information on the group which is currently connected to the project.
@param project
Gets called when the " Group " icon of one of the displayed projects gets clicked and opens a dialog with information on the group which is currently connected to the project . @param project
_onGroupChanged() {
      const projectName = this.shadowRoot.getElementById("connected-group-project-name").innerText;
      const newLinkedGroupName = this.shadowRoot.getElementById("input-edit-group-name").value;
      if(newLinkedGroupName == undefined){
        return;
      }
      var newLinkedGroupId = "";
      for(let key of Object.keys(this.groups)) {
        if(this.groups[key].name == newLinkedGroupName){
            newLinkedGroupId = this.groups[key].id;
            break;
        }
      }
      fetch(this.projectServiceURL + "/projects/" + this.system + "/changeGroup/", {
        method: "POST",
        headers: Auth.getAuthHeaderWithSub(),
        body: JSON.stringify({
          "name": projectName,
          "access_token": Auth.getAccessToken(),
          "projectName": projectName,
          "newGroupName": newLinkedGroupName,
          "newGroupId": newLinkedGroupId
        })
      }).then( response => {
          if(!response.ok) throw Error(response.status);
            return response.json();
      }).then(data => {
          this._onGroupChangeDone(data);
      }).catch(error => {
        if(error.message == "401") {
          Auth.removeAuthDataFromLocalStorage();
        } else {
          console.log(error);
        }
      });
    }
_onGroupChanged ( ) { const projectName = this . shadowRoot . getElementById ( "connected-group-project-name" ) . innerText ; const newLinkedGroupName = this . shadowRoot . getElementById ( "input-edit-group-name" ) . value ; if ( newLinkedGroupName == undefined ) { return ; } var newLinkedGroupId = "" ; for ( let key of Object . keys ( this . groups ) ) { if ( this . groups [ key ] . name == newLinkedGroupName ) { newLinkedGroupId = this . groups [ key ] . id ; break ; } } fetch ( this . projectServiceURL + "/projects/" + this . system + "/changeGroup/" , { method : "POST" , headers : Auth . getAuthHeaderWithSub ( ) , body : JSON . stringify ( { "name" : projectName , "access_token" : Auth . getAccessToken ( ) , "projectName" : projectName , "newGroupName" : newLinkedGroupName , "newGroupId" : newLinkedGroupId } ) } ) . then ( response => { if ( ! response . ok ) throw Error ( response . status ) ; return response . json ( ) ; } ) . then ( data => { this . _onGroupChangeDone ( data ) ; } ) . catch ( error => { if ( error . message == "401" ) { Auth . removeAuthDataFromLocalStorage ( ) ; } else { console . log ( error ) ; } } ) ; }
Gets called when the "Group" icon of one of the displayed projects gets clicked and opens a dialog with
 information on the group which is currently connected to the project.
Gets called when the " Group " icon of one of the displayed projects gets clicked and opens a dialog with information on the group which is currently connected to the project .
// user is not authorized // maybe the access token has expired //   location.reload();