Skip to content

Commit

Permalink
wc: Remove unused code and imports in study-admin #TASK-7216 #TASK-7100
Browse files Browse the repository at this point in the history
  • Loading branch information
jmjuanes committed Dec 10, 2024
1 parent d6f8b98 commit 081e8c8
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions src/webcomponents/study/admin/study-admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*/

import {LitElement, html} from "lit";
import LitUtils from "../../commons/utils/lit-utils";
import OpencgaCatalogUtils from "../../../core/clients/opencga/opencga-catalog-utils.js";
import "./study-admin-users.js";
import "./study-admin-permissions.js";
Expand All @@ -24,7 +23,6 @@ import "./study-admin-audit.js";
import "./study-admin-configuration.js";
import "../../variant/operation/clinical-analysis-configuration-update.js";
import "../../variant/operation/variant-secondary-sample-index-configure-operation.js";
// import "../../commons/layouts/custom-vertical-navbar.js";
import "../../commons/vertical-navbar.js";
import "../../commons/pages/restricted-access-page.js";

Expand Down Expand Up @@ -52,37 +50,9 @@ export default class StudyAdmin extends LitElement {
}

#init() {
this._study = {};
this._config = this.getDefaultConfig();
}

update(changedProperties) {
// if (changedProperties.has("studyId") || changedProperties.has("opencgaSession")) {
// this.studyIdObserver();
// }

super.update(changedProperties);
}

// studyIdObserver() {
// this._study = {};
// if (this.studyId && this.opencgaSession) {
// this.opencgaSession.opencgaClient.studies()
// .info(this.studyId)
// .then(response => {
// this._study = response.responses[0].results[0];
// })
// .catch(reason => {
// error = reason;
// console.error(reason);
// })
// .finally(() => {
// // LitUtils.dispatchCustomEvent(this, "studySearch", this.study, {}, error);
// this.requestUpdate();
// });
// }
// }

render() {
const isOrganizationAdmin = OpencgaCatalogUtils.isOrganizationAdmin(this.opencgaSession?.organization, this.opencgaSession?.user?.id);
const isAdmin = OpencgaCatalogUtils.isAdmin(this.opencgaSession?.study, this.opencgaSession?.user?.id);
Expand Down

0 comments on commit 081e8c8

Please sign in to comment.