From f18e5a4326976b0f27bd68c6b2347ab96894dd8f Mon Sep 17 00:00:00 2001 From: gpveronica Date: Fri, 30 Aug 2024 13:00:15 +0200 Subject: [PATCH] wc - Address PR comments, #TASK-5866, #TASK-5809 Signed-off-by: gpveronica --- src/webcomponents/organization/admin/group-admin-grid.js | 1 - .../organization/admin/group-admin-permissions-update.js | 3 --- .../organization/admin/organization-admin-add.js | 0 .../organization/admin/organization-admin-detail.js | 2 -- .../organization/admin/organization-admin-owner-update.js | 0 src/webcomponents/organization/admin/user-admin-create.js | 1 - .../organization/admin/user-admin-password-reset.js | 6 ++++-- src/webcomponents/project/project-update.js | 2 -- 8 files changed, 4 insertions(+), 11 deletions(-) delete mode 100644 src/webcomponents/organization/admin/organization-admin-add.js delete mode 100644 src/webcomponents/organization/admin/organization-admin-owner-update.js diff --git a/src/webcomponents/organization/admin/group-admin-grid.js b/src/webcomponents/organization/admin/group-admin-grid.js index 2728e761e6..e63fdb0880 100644 --- a/src/webcomponents/organization/admin/group-admin-grid.js +++ b/src/webcomponents/organization/admin/group-admin-grid.js @@ -85,7 +85,6 @@ export default class GroupAdminGrid extends LitElement { if (this.groups?.length > 0) { this.renderLocalTable(); } - // this.requestUpdate(); } } diff --git a/src/webcomponents/organization/admin/group-admin-permissions-update.js b/src/webcomponents/organization/admin/group-admin-permissions-update.js index bb43d153d2..f985aef79c 100644 --- a/src/webcomponents/organization/admin/group-admin-permissions-update.js +++ b/src/webcomponents/organization/admin/group-admin-permissions-update.js @@ -128,7 +128,6 @@ export default class GroupAdminPermissionsUpdate extends LitElement { } #initPermissions() { - debugger // 1. Group contains params: (a) id: e.g. "@admins", (b) userIds: e.g. ["test"] // this.group = this._study.groups.find(group => group.id === this.groupId); // 2. In the update form, we need to manage as well the permissions of this group. @@ -157,7 +156,6 @@ export default class GroupAdminPermissionsUpdate extends LitElement { } update(changedProperties) { - debugger if ((changedProperties.has("groupId") || (changedProperties.has("studyId")) && this.active)) { this.groupIdObserver(); } @@ -171,7 +169,6 @@ export default class GroupAdminPermissionsUpdate extends LitElement { } groupIdObserver() { - debugger if (this.groupId && this.studyId && this.opencgaSession) { const params = { member: this.groupId, diff --git a/src/webcomponents/organization/admin/organization-admin-add.js b/src/webcomponents/organization/admin/organization-admin-add.js deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/src/webcomponents/organization/admin/organization-admin-detail.js b/src/webcomponents/organization/admin/organization-admin-detail.js index 7dd35b08f6..9e7a9fe9e9 100644 --- a/src/webcomponents/organization/admin/organization-admin-detail.js +++ b/src/webcomponents/organization/admin/organization-admin-detail.js @@ -19,8 +19,6 @@ import {LitElement, html, nothing} from "lit"; import UtilsNew from "../../../core/utils-new.js"; import OpencgaCatalogUtils from "../../../core/clients/opencga/opencga-catalog-utils.js"; import ModalUtils from "../../commons/modal/modal-utils.js"; -import "./organization-admin-add.js"; -import "./organization-admin-owner-update.js"; import "./organization-admin-update.js"; export default class OrganizationAdminDetail extends LitElement { diff --git a/src/webcomponents/organization/admin/organization-admin-owner-update.js b/src/webcomponents/organization/admin/organization-admin-owner-update.js deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/src/webcomponents/organization/admin/user-admin-create.js b/src/webcomponents/organization/admin/user-admin-create.js index 1ebbfa1705..eb7221d57c 100644 --- a/src/webcomponents/organization/admin/user-admin-create.js +++ b/src/webcomponents/organization/admin/user-admin-create.js @@ -60,7 +60,6 @@ export default class UserAdminCreate extends LitElement { #initOriginalObjects() { this._user = {}; this._config = this.getDefaultConfig(); - this.requestUpdate(); } #setLoading(value) { diff --git a/src/webcomponents/organization/admin/user-admin-password-reset.js b/src/webcomponents/organization/admin/user-admin-password-reset.js index 254185337c..6e99e8e280 100644 --- a/src/webcomponents/organization/admin/user-admin-password-reset.js +++ b/src/webcomponents/organization/admin/user-admin-password-reset.js @@ -104,7 +104,7 @@ export default class UserAdminPasswordReset extends LitElement { return html``; } - NotificationUtils.dispatch(this, NotificationUtils.NOTIFY_CONFIRMATION, { + return NotificationUtils.dispatch(this, NotificationUtils.NOTIFY_CONFIRMATION, { title: `Reset Password: User ${this._user.id} in organization ${this.opencgaSession.organization.id}`, message: ` Are you sure you want to reset ${this._user.id}'s password? @@ -123,7 +123,9 @@ export default class UserAdminPasswordReset extends LitElement { }); } - getDefaultConfig() {} + getDefaultConfig() { + return {}; + } } diff --git a/src/webcomponents/project/project-update.js b/src/webcomponents/project/project-update.js index 40acc37fa9..6356384293 100644 --- a/src/webcomponents/project/project-update.js +++ b/src/webcomponents/project/project-update.js @@ -51,7 +51,6 @@ export default class ProjectUpdate extends LitElement { } #init() { - debugger this.project = {}; this.updateParams = {}; this.isLoading = false; @@ -77,7 +76,6 @@ export default class ProjectUpdate extends LitElement { } update(changedProperties) { - debugger if (changedProperties.has("projectId")) { this.projectIdObserver(); }