From 9debc08d8dabe630682a6be614d2d670f591f3c5 Mon Sep 17 00:00:00 2001 From: Ruslan Forostianov Date: Wed, 2 Oct 2024 17:18:58 +0200 Subject: [PATCH 1/3] Implement RFC85 Dynamic Virtual Study Added option to select a dynamic type of virtual study while creating it Static type (the legacy one) is the default one --- src/globalStyles/global.scss | 8 ++ .../studyView/virtualStudy/VirtualStudy.tsx | 85 +++++++++++++++++++ 2 files changed, 93 insertions(+) diff --git a/src/globalStyles/global.scss b/src/globalStyles/global.scss index 81f33b14a2d..7b1839b6d60 100755 --- a/src/globalStyles/global.scss +++ b/src/globalStyles/global.scss @@ -47,6 +47,14 @@ div:active { } } +.form-group-inline { + @extend .form-group; + + label { + margin-right: 6px; + } +} + .posRelative { position: relative; } diff --git a/src/pages/studyView/virtualStudy/VirtualStudy.tsx b/src/pages/studyView/virtualStudy/VirtualStudy.tsx index 4a492d847c4..b933c17cf98 100644 --- a/src/pages/studyView/virtualStudy/VirtualStudy.tsx +++ b/src/pages/studyView/virtualStudy/VirtualStudy.tsx @@ -98,6 +98,7 @@ export default class VirtualStudy extends React.Component< > { @observable.ref private name: string; @observable.ref private description: string; + @observable.ref private isDynamic: boolean = false; @observable private saving = false; @observable private sharing = false; @@ -167,6 +168,7 @@ export default class VirtualStudy extends React.Component< study => study.studyId ), studies: studies, + isDynamic: this.isDynamic, }; return await sessionServiceClient.saveVirtualStudy( parameters, @@ -298,6 +300,89 @@ export default class VirtualStudy extends React.Component< /> +
+ + + + +

+ + Type of Virtual + Study: + +

+

+ A Virtual Study is a + set of sample IDs + derived from + selected studies. + This set can be + defined as either + static or dynamic: +

+
    +
  • + + Static + {' '} + – Sample IDs are + captured at the + time of creation + and do not + update, even + when the data in + the parent + studies changes. +
  • +
  • + + Dynamic + {' '} + – Sample IDs are + automatically + refreshed to + reflect any + changes in the + parent studies, + ensuring the + virtual study + stays + up-to-date. +
  • +
+
+ } + > + + + +
{this.showSaveButton && (