Skip to content
Snippets Groups Projects
Commit df9d608b authored by mic29226's avatar mic29226
Browse files

fix(Vocabularies): Fixed the displaying of the dataset-status vocabulary for specific datasets

parent 82d55055
No related branches found
No related tags found
No related merge requests found
......@@ -28,11 +28,11 @@ export const autocompleteKey = Symbol(
) as InjectionKey<AutocompleteInstance>;
export function defaultAutocompleteAdapter(options: {
envs: ResolvedConfig
dpiContext: ComputedDpiContext
envs: ResolvedConfig;
dpiContext: ComputedDpiContext;
}): AutocompleteOptions {
const { envs, dpiContext } = options
const { envs, dpiContext } = options;
return {
name: "default",
adapter: {
......@@ -50,6 +50,8 @@ export function defaultAutocompleteAdapter(options: {
() => toValue(dpiContext)?.specification
);
// console.log('Options:', voc, uri);
// // Catching invalid URIs
if (voc === undefined) return;
if (voc === "application") return;
......@@ -57,9 +59,10 @@ export function defaultAutocompleteAdapter(options: {
let req = "";
// vocabularies for spdx checksum and inana-media-types are structured differently in the backend then other vocabularies
if (voc === "iana-media-types" || voc === "spdx-checksum-algorithm") {
if (voc === "iana-media-types" || voc === "spdx-checksum-algorithm" || voc ==='dataset-status') {
req = `${envs.api.baseUrl}vocabularies/${voc}`;
} else {
}
else {
const value = uri.replace(
(specification.value.vocabPrefixes as any)[voc],
""
......@@ -72,7 +75,12 @@ export function defaultAutocompleteAdapter(options: {
envs.api.baseUrl
}vocabularies/${voc}/vocable?resource=${encodeURIComponent(uri)}`;
}
return axios.get(req);
let result = axios.get(req);
// console.log("#### Req:", req);
return result;
},
},
};
......
......@@ -157,7 +157,7 @@ export default {
});
},
interpretTranslateKey(key, prefix) {
console.log(key);
// console.log(key);
if (key === '') return '';
if (key.startsWith('/')) return `${this.i18n.global.t(key.substring(1))}:`;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment