Skip to content

Commit ef1602d

Browse files
alex-odysseusoleg-odysseuschrisknoll
authored
Adding UI to map non-Standard Concepts to the Standard ones to streamline 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]>
1 parent d762e9a commit ef1602d

14 files changed

+1158
-113
lines changed

.github/workflows/ci.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- uses: actions/checkout@v2
2424

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

5252
- name: Cache Docker layers
53-
uses: actions/cache@v2
53+
uses: actions/cache@v4
5454
with:
5555
path: /tmp/.buildx-cache
5656
key: ${{ runner.os }}-buildx-${{ github.sha }}

.github/workflows/release.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
node-version: 12
2424

2525
- name: NPM cache
26-
uses: actions/cache@v2
26+
uses: actions/cache@v4
2727
with:
2828
path: ~/.npm
2929
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}

js/components/conceptAddBox/concept-add-box.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ define([
4444
this.noPreview = params.noPreview || false;
4545
this.conceptsToAdd = params.concepts;
4646
this.canSelectSource = params.canSelectSource || false;
47+
this.overrideHandleAddToConceptSet = params.overrideHandleAddToConceptSet;
4748
this.isAdded = ko.observable(false);
4849
this.defaultSelectionOptions = {
4950
includeDescendants: ko.observable(false),
@@ -142,6 +143,10 @@ define([
142143
}
143144

144145
handleSubmit() {
146+
if (this.overrideHandleAddToConceptSet) {
147+
const items = CommonUtils.buildConceptSetItems(this.conceptsToAdd(), this.selectionOptions());
148+
this.overrideHandleAddToConceptSet(items);
149+
} else {
145150
clearTimeout(this.messageTimeout);
146151
this.isSuccessMessageVisible(true);
147152
this.messageTimeout = setTimeout(() => {
@@ -186,6 +191,7 @@ define([
186191
CommonUtils.clearConceptsSelectionState(this.conceptsToAdd());
187192
this.selectionOptions(this.defaultSelectionOptions);
188193
}
194+
}
189195

190196
toggleSelectionOption(option) {
191197
const options = this.selectionOptions();
@@ -198,7 +204,6 @@ define([
198204
setActiveConceptSet(conceptSet) {
199205
this.activeConceptSet(conceptSet);
200206
}
201-
202207
}
203208

204209
return CommonUtils.build('concept-add-box', ConceptAddBox, view);

0 commit comments

Comments
 (0)