From 0f358eac2e039f8a32340256049ebcc1f7d7cc9d Mon Sep 17 00:00:00 2001 From: Josemi Date: Mon, 22 Jul 2024 17:47:28 +0200 Subject: [PATCH 1/4] iva: Fix changing study when opencga session is not initialized #TASK-5889 --- src/sites/iva/iva-app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sites/iva/iva-app.js b/src/sites/iva/iva-app.js index bd6d64bac..16cc25b68 100644 --- a/src/sites/iva/iva-app.js +++ b/src/sites/iva/iva-app.js @@ -984,7 +984,7 @@ class IvaApp extends LitElement { } changeActiveStudy(studyFqn) { - if (this.opencgaSession.study.fqn === studyFqn) { + if (this.opencgaSession?.study?.fqn === studyFqn) { console.log("New selected study is already the current active study!"); return; } From a4d7992d6d75aae04bc1f4c5c02586683b9978ee Mon Sep 17 00:00:00 2001 From: Josemi Date: Mon, 22 Jul 2024 17:51:17 +0200 Subject: [PATCH 2/4] iva: Fix searching for project when opencga session has not been initialized #TASK-5889 --- src/sites/iva/iva-app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sites/iva/iva-app.js b/src/sites/iva/iva-app.js index 16cc25b68..890f40aff 100644 --- a/src/sites/iva/iva-app.js +++ b/src/sites/iva/iva-app.js @@ -991,7 +991,7 @@ class IvaApp extends LitElement { // Change active study let studyFound = false; - for (const project of this.opencgaSession.projects) { + for (const project of (this.opencgaSession.projects || [])) { const studyIndex = project.studies.findIndex(s => s.fqn === studyFqn); if (studyIndex >= 0) { this.opencgaSession.project = project; From 8a0b5e5615cd8aec1d98393b583f7abb7f409f8d Mon Sep 17 00:00:00 2001 From: Josemi Date: Mon, 22 Jul 2024 17:54:11 +0200 Subject: [PATCH 3/4] iva: Fix bug when rendering tools while iva is creating the opencga session object #TASK-5889 --- src/sites/iva/iva-app.js | 1410 +++++++++++++++++++------------------- 1 file changed, 705 insertions(+), 705 deletions(-) diff --git a/src/sites/iva/iva-app.js b/src/sites/iva/iva-app.js index 890f40aff..17eebd7f9 100644 --- a/src/sites/iva/iva-app.js +++ b/src/sites/iva/iva-app.js @@ -1293,8 +1293,7 @@ class IvaApp extends LitElement { @jobSelected="${e => this.onJobSelected(e)}" @route="${this.route}"> - + ${ this.isCreatingSession ? html` Date: Tue, 23 Jul 2024 11:22:36 +0200 Subject: [PATCH 4/4] iva: Remove useless check if is creating session in render method #TASK-5889 --- src/sites/iva/iva-app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sites/iva/iva-app.js b/src/sites/iva/iva-app.js index 17eebd7f9..6a179f331 100644 --- a/src/sites/iva/iva-app.js +++ b/src/sites/iva/iva-app.js @@ -1305,7 +1305,7 @@ class IvaApp extends LitElement {
${!this.isCreatingSession ? html` - ${this.config.enabledComponents.home && !this.isCreatingSession ? html` + ${this.config.enabledComponents.home ? html`