Skip to content

Commit

Permalink
Adding UI to map non-Standard Concepts to the Standard ones to stream…
Browse files Browse the repository at this point in the history
…line Concept Set creation (#2978)

In addition, use cache@v4 for git actions.

---------

Co-authored-by: oleg-odysseus <[email protected]>
Co-authored-by: Chris Knoll <[email protected]>
  • Loading branch information
3 people authored Feb 18, 2025
1 parent d762e9a commit ef1602d
Show file tree
Hide file tree
Showing 14 changed files with 1,158 additions and 113 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- uses: actions/checkout@v2

# Caches NPM dependencies, as long as the package-lock.json is not modified
- uses: actions/cache@v2
- uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand All @@ -50,7 +50,7 @@ jobs:
- uses: actions/checkout@v2

- name: Cache Docker layers
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
node-version: 12

- name: NPM cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand Down
7 changes: 6 additions & 1 deletion js/components/conceptAddBox/concept-add-box.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ define([
this.noPreview = params.noPreview || false;
this.conceptsToAdd = params.concepts;
this.canSelectSource = params.canSelectSource || false;
this.overrideHandleAddToConceptSet = params.overrideHandleAddToConceptSet;
this.isAdded = ko.observable(false);
this.defaultSelectionOptions = {
includeDescendants: ko.observable(false),
Expand Down Expand Up @@ -142,6 +143,10 @@ define([
}

handleSubmit() {
if (this.overrideHandleAddToConceptSet) {
const items = CommonUtils.buildConceptSetItems(this.conceptsToAdd(), this.selectionOptions());
this.overrideHandleAddToConceptSet(items);
} else {
clearTimeout(this.messageTimeout);
this.isSuccessMessageVisible(true);
this.messageTimeout = setTimeout(() => {
Expand Down Expand Up @@ -186,6 +191,7 @@ define([
CommonUtils.clearConceptsSelectionState(this.conceptsToAdd());
this.selectionOptions(this.defaultSelectionOptions);
}
}

toggleSelectionOption(option) {
const options = this.selectionOptions();
Expand All @@ -198,7 +204,6 @@ define([
setActiveConceptSet(conceptSet) {
this.activeConceptSet(conceptSet);
}

}

return CommonUtils.build('concept-add-box', ConceptAddBox, view);
Expand Down
Loading

0 comments on commit ef1602d

Please sign in to comment.