Skip to content

Commit

Permalink
MappingSearch: Add first implementation for filter by annotation (#605)
Browse files Browse the repository at this point in the history
  • Loading branch information
stefandesu committed Jun 23, 2022
1 parent 9e48d1e commit 6b1a255
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
10 changes: 10 additions & 0 deletions config/locale.json
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,11 @@
"searchCardinality": "Cardinality",
"searchCardinality11": "1-to-1",
"searchCardinality1n": "1-to-n",
"searchAnnotated": "Assessment",
"searchAnnotatedAssessingAny": "assessed (-1/+1)",
"searchAnnotatedAssessingPlus": "assessed (+1)",
"searchAnnotatedAssessingMinus": "assessed (-1)",
"searchAnnotatedConfirmed": "confirmed",
"searchConcordancesAny": "any concordance",
"searchConcordancesNone": "no concordance",
"searchClear": "Clear",
Expand Down Expand Up @@ -609,6 +614,11 @@
"searchCardinality": "Kardinalität",
"searchCardinality11": "1-zu-1",
"searchCardinality1n": "1-zu-n",
"searchAnnotated": "Bewertung",
"searchAnnotatedAssessingAny": "bewertet (-1/+1)",
"searchAnnotatedAssessingPlus": "bewertet (+1)",
"searchAnnotatedAssessingMinus": "bewertet (-1)",
"searchAnnotatedConfirmed": "bestätigt",
"searchConcordancesAny": "beliebige Konkordanz",
"searchConcordancesNone": "keine Konkordanz",
"searchClear": "Leeren",
Expand Down
22 changes: 22 additions & 0 deletions src/components/MappingBrowser.vue
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,16 @@
size="sm"
:options="cardinalityOptions"
@keyup.enter.native="searchClicked" />
<div style="text-align: right; flex: none; margin: auto 5px;">
{{ $t("mappingBrowser.searchAnnotated") }}:
</div>
<b-form-select
v-model="searchFilterInput.annotated"
style="flex: 1; margin: 3px;"
size="sm"
:options="annotatedOptions"
@keyup.enter.native="searchClicked" />
<div style="flex-basis: 100%; height: 0;" />
<div style="text-align: right; flex: none; margin: auto 5px;">
{{ $t("mappingBrowser.concordance") }}:
</div>
Expand Down Expand Up @@ -701,6 +711,15 @@ export default {
},
]
},
annotatedOptions() {
return [
{ value: null, text: "-" },
{ value: { annotatedFor: "assessing" }, text: this.$t("mappingBrowser.searchAnnotatedAssessingAny") },
{ value: { annotatedFor: "assessing", annotatedWith: "+1" }, text: this.$t("mappingBrowser.searchAnnotatedAssessingPlus") },
{ value: { annotatedFor: "assessing", annotatedWith: "-1" }, text: this.$t("mappingBrowser.searchAnnotatedAssessingMinus") },
{ value: { annotatedFor: "moderating" }, text: this.$t("mappingBrowser.searchAnnotatedConfirmed") },
]
},
concordanceOptions() {
let options = [
{ value: null, text: "-" },
Expand Down Expand Up @@ -1132,6 +1151,7 @@ export default {
direction: "",
type: null,
cardinality: "1-to-n",
annotated: null,
partOf: null,
}
if (ignoredLock || !this.lockScheme[true]) {
Expand Down Expand Up @@ -1213,6 +1233,8 @@ export default {
type: this.searchFilter.type,
direction: this.searchFilter.direction,
cardinality: this.searchFilter.cardinality,
annotatedFor: this.searchFilter.annotated && this.searchFilter.annotated.annotatedFor,
annotatedWith: this.searchFilter.annotated && this.searchFilter.annotated.annotatedWith,
partOf: this.searchFilter.partOf,
registry: registry.uri,
sort: "created",
Expand Down

0 comments on commit 6b1a255

Please sign in to comment.