Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement RFC85 Dynamic Virtual Study #5016

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/globalStyles/global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@ div:active {
}
}

.form-group-inline {
@extend .form-group;

label {
margin-right: 6px;
}
}

.posRelative {
position: relative;
}
Expand Down
85 changes: 85 additions & 0 deletions src/pages/studyView/virtualStudy/VirtualStudy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ export default class VirtualStudy extends React.Component<
> {
@observable.ref private name: string;
@observable.ref private description: string;
@observable.ref private dynamic: boolean = false;

@observable private saving = false;
@observable private sharing = false;
Expand Down Expand Up @@ -167,6 +168,7 @@ export default class VirtualStudy extends React.Component<
study => study.studyId
),
studies: studies,
dynamic: this.dynamic,
};
return await sessionServiceClient.saveVirtualStudy(
parameters,
Expand Down Expand Up @@ -298,6 +300,89 @@ export default class VirtualStudy extends React.Component<
/>
</div>

<div className="form-group-inline">
<label>Type:</label>
<label>
<input
type="radio"
name="option"
value="static"
checked={!this.dynamic}
onChange={_ =>
(this.dynamic = false)
}
/>{' '}
Static
</label>
<label>
<input
type="radio"
name="option"
value="dynamic"
checked={this.dynamic}
onChange={_ =>
(this.dynamic = true)
}
/>{' '}
Dynamic
</label>
<DefaultTooltip
mouseEnterDelay={0}
placement="right"
overlay={
<div>
<p>
<strong>
Type of Virtual
Study:
</strong>
</p>
<p>
A Virtual Study is a
set of sample IDs
derived from
selected studies.
This set can be
defined as either
static or dynamic:
</p>
forus marked this conversation as resolved.
Show resolved Hide resolved
<ul>
<li>
<strong>
Static
</strong>{' '}
– Sample IDs are
captured at the
time of creation
and do not
update, even
when the data in
the parent
studies changes.
forus marked this conversation as resolved.
Show resolved Hide resolved
</li>
<li>
<strong>
Dynamic
</strong>{' '}
– Sample IDs are
automatically
refreshed to
reflect any
changes in the
parent studies,
ensuring the
virtual study
stays
up-to-date.
</li>
forus marked this conversation as resolved.
Show resolved Hide resolved
</ul>
</div>
}
>
<FontAwesome name="question-circle" />
</DefaultTooltip>
</div>

<div>
{this.showSaveButton && (
<button
Expand Down
Loading