diff --git a/src/boot/axios.ts b/src/boot/axios.ts index c9400348..90bef7fc 100644 --- a/src/boot/axios.ts +++ b/src/boot/axios.ts @@ -1,6 +1,6 @@ import { boot } from 'quasar/wrappers' import axios, { AxiosInstance, AxiosStatic } from 'axios' -import { DocumentApi, PhraseApi, ConceptclusterApi, DefaultApi, EntityApi, OrganisationApi, QueryApi, RepositoryApi, UserApi, CodeApi } from '@onto-med/top-api' +import { DocumentApi, PhraseApi, ConceptclusterApi, DefaultApi, EntityApi, OrganisationApi, QueryApi, RepositoryApi, UserApi, CodeApi, ConceptgraphsApi } from '@onto-med/top-api' import { InjectionKey } from 'vue' import { Keycloak } from '@dsb-norge/vue-keycloak-js/dist/types' import { env } from 'src/config' @@ -20,6 +20,7 @@ export const QueryApiKey: InjectionKey = Symbol('queryApi') export const DocumentApiKey: InjectionKey = Symbol('documentApi') export const PhraseApiKey: InjectionKey = Symbol('phraseApi') export const ConceptClusterApiKey: InjectionKey = Symbol('conceptClusterApi') +export const ConceptGraphApiKey: InjectionKey = Symbol('conceptGraphApi') export const UserApiKey: InjectionKey = Symbol('userApi') export const CodeApiKey: InjectionKey = Symbol('codeApi') @@ -47,6 +48,7 @@ export default boot(({ app }) => { app.provide(DocumentApiKey, new DocumentApi(undefined, '', axiosInstance)) app.provide(PhraseApiKey, new PhraseApi(undefined, '', axiosInstance)) app.provide(ConceptClusterApiKey, new ConceptclusterApi(undefined, '', axiosInstance)) + app.provide(ConceptGraphApiKey, new ConceptgraphsApi(undefined, '', axiosInstance)) app.provide(UserApiKey, new UserApi(undefined, '', axiosInstance)) app.provide(CodeApiKey, new CodeApi(undefined, '', axiosInstance)) }); diff --git a/src/components/Documents/SearchQueryForm.vue b/src/components/Documents/SearchQueryForm.vue index f30b313d..9ecba923 100644 --- a/src/components/Documents/SearchQueryForm.vue +++ b/src/components/Documents/SearchQueryForm.vue @@ -111,13 +111,13 @@ async function reload(filter: string|undefined = undefined, page = 1) { queryDisplayName.value = '' }) } else { + queryDisplayName.value = props.queryName? props.queryName: '' await documentApi.getDocumentsForQuery(props.organisationId, props.repositoryId, props.queryId, page) .then(r => documents.value = r.data) .catch((e: Error) => renderError(e)) .finally(() => { loading.value = false querySearch.value = true - queryDisplayName.value = props.queryName? props.queryName: '' }) } } diff --git a/src/components/Query/QueryResultsTable.vue b/src/components/Query/QueryResultsTable.vue index fcb9d63f..e98ffab0 100644 --- a/src/components/Query/QueryResultsTable.vue +++ b/src/components/Query/QueryResultsTable.vue @@ -140,10 +140,10 @@ export default defineComponent({ params: { organisationId: organisationId.value, repositoryId: repositoryId.value, - queryId: query.id + queryId: query.id, + queryName: query.name, }, query: { - queryName: query.name, searchType: SearchTypesEnum.SEARCH_QUERY } }) diff --git a/src/pages/DocumentSearch.vue b/src/pages/DocumentSearch.vue index f1888153..e2b02ff4 100644 --- a/src/pages/DocumentSearch.vue +++ b/src/pages/DocumentSearch.vue @@ -38,28 +38,38 @@ diff --git a/src/router/routes.ts b/src/router/routes.ts index 52574edd..3f8f3d3a 100644 --- a/src/router/routes.ts +++ b/src/router/routes.ts @@ -51,7 +51,7 @@ const routes: RouteRecordRaw[] = [ }, { name: 'documentSearchByQuery', - path: '/document/query/:organisationId/:repositoryId/:queryId', + path: '/document/query/:organisationId/:repositoryId/:queryId/:queryName', component: () => import('pages/DocumentSearch.vue'), meta: { disabled: !env.DOCUMENTS_ENABLED @@ -61,7 +61,7 @@ const routes: RouteRecordRaw[] = [ organisationId: params.organisationId, repositoryId: params.repositoryId, queryId: params.queryId, - queryName: query.queryName, + queryName: params.queryName, initialSearchType: query.searchType } }