_deleteProject() {
    let projectToDelete = this.projectOptionsSelected;
    fetch(this.projectServiceURL + "/projects/" + this.system + "/" + projectToDelete.name, {
      method: "DELETE",
      headers: Auth.getAuthHeaderWithSub(),
      body: JSON.stringify({
        "access_token": Auth.getAccessToken()
      })
    }).then(response => {
      if(response.ok) {
        this.shadowRoot.getElementById("toast-success-deletion").show();

        // since a project got deleted, reload projects from server
        this.showProjects(false);
        // switch to tab "My Projects"
        this.tabSelected = 0;
        this.shadowRoot.getElementById("my-and-all-projects").selected = 0;
      }
      else throw Error(response.status);
    }).catch(error => {
      
    });

  }
/**
   * Gets called if the user has verified that the project should be deleted.
   */
Gets called if the user has verified that the project should be deleted.
Gets called if the user has verified that the project should be deleted .
_deleteProject() {
    let projectToDelete = this.projectOptionsSelected;
    fetch(this.projectServiceURL + "/projects/" + this.system + "/" + projectToDelete.name, {
      method: "DELETE",
      headers: Auth.getAuthHeaderWithSub(),
      body: JSON.stringify({
        "access_token": Auth.getAccessToken()
      })
    }).then(response => {
      if(response.ok) {
        this.shadowRoot.getElementById("toast-success-deletion").show();
        this.showProjects(false);
        this.tabSelected = 0;
        this.shadowRoot.getElementById("my-and-all-projects").selected = 0;
      }
      else throw Error(response.status);
    }).catch(error => {
    });
  }
_deleteProject ( ) { let projectToDelete = this . projectOptionsSelected ; fetch ( this . projectServiceURL + "/projects/" + this . system + "/" + projectToDelete . name , { method : "DELETE" , headers : Auth . getAuthHeaderWithSub ( ) , body : JSON . stringify ( { "access_token" : Auth . getAccessToken ( ) } ) } ) . then ( response => { if ( response . ok ) { this . shadowRoot . getElementById ( "toast-success-deletion" ) . show ( ) ; this . showProjects ( false ) ; this . tabSelected = 0 ; this . shadowRoot . getElementById ( "my-and-all-projects" ) . selected = 0 ; } else throw Error ( response . status ) ; } ) . catch ( error => { } ) ; }
Gets called if the user has verified that the project should be deleted.
Gets called if the user has verified that the project should be deleted .
// since a project got deleted, reload projects from server // switch to tab "My Projects"