-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pages Editor: check if workflow is part of project (#7156)
* DataManager: WIP add checks to ensure WF is part of project * Implement checkIsWorkflowPartOfProject() * checkIsWorkflowPartOfProject: correct checking logic. We're looking at WF ID, not Subject Sets.
- Loading branch information
1 parent
bf8ffe0
commit d296600
Showing
2 changed files
with
26 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
app/pages/lab-pages-editor/helpers/checkIsWorkflowPartOfProject.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/* | ||
Checks if a workflow belongs to a project. | ||
*/ | ||
|
||
export default function checkIsWorkflowPartOfProject(workflow, project) { | ||
if (!workflow || !project) return false; | ||
return !!project.links?.workflows?.includes(workflow.id); | ||
} |