Skip to content
Snippets Groups Projects
Commit 31f1f747 authored by Martin Weise's avatar Martin Weise
Browse files

Merge branch '396-fix-the-unit-independent-search' of...

Merge branch '396-fix-the-unit-independent-search' of gitlab.phaidra.org:fair-data-austria-db-repository/fda-services into 396-fix-the-unit-independent-search
parents e6b0a91c 6696f699
No related branches found
No related tags found
4 merge requests!231CI: Remove build for log-service,!228Better error message handling in the frontend,!223Release of version 1.4.0,!215Resolve "Fix the unit independent search"
...@@ -68,6 +68,13 @@ ...@@ -68,6 +68,13 @@
type="number" type="number"
:label="generateFriendlyName(field)" :label="generateFriendlyName(field)"
clearable /> clearable />
<v-autocomplete
v-if="field.attribute_name === 'licenses'"
v-model="advancedSearchData[generateDynamicVModelKey(field)]"
:items="fetchLicenses()"
:label="generateFriendlyName(field)"
clearable
multiple />
</v-col> </v-col>
</v-row> </v-row>
<p v-if="isEligibleConceptOrUnitSearch" class="mt-4"> <p v-if="isEligibleConceptOrUnitSearch" class="mt-4">
...@@ -291,6 +298,13 @@ export default { ...@@ -291,6 +298,13 @@ export default {
// Checks if item's attribute_name matches any wanted field // Checks if item's attribute_name matches any wanted field
// The expected response is of a flattened format, so this method must be modified accordingly if the response is changed // The expected response is of a flattened format, so this method must be modified accordingly if the response is changed
return this.dynamicFieldsMap()[this.advancedSearchData.type].includes(item.attribute_name) return this.dynamicFieldsMap()[this.advancedSearchData.type].includes(item.attribute_name)
},
fetchLicenses () {
// Licenses is a nested object in the backend, but without any values.
// Instead, we define our custom license generator with a controlled vocabulary.
return [
'Apache-2.0', 'BSD-3-Clause', 'BSD-4-Clause', 'CC-BY-4.0', 'CC0-1.0', 'GPL-3.0-only', 'MIT'
]
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment