From 5bf8f647cba3129ea7c5dbb6409e2a96dc655899 Mon Sep 17 00:00:00 2001 From: cgfhtw Date: Mon, 23 Jun 2025 14:21:06 +0200 Subject: [PATCH] Cms Results --- public/js/components/searchbar/searchbar.js | 24 +++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/public/js/components/searchbar/searchbar.js b/public/js/components/searchbar/searchbar.js index 5ef5f8451..3e77d2c9e 100644 --- a/public/js/components/searchbar/searchbar.js +++ b/public/js/components/searchbar/searchbar.js @@ -5,11 +5,20 @@ import organisationunit from "./result/organisationunit.js"; import student from "./result/student.js"; import prestudent from "./result/prestudent.js"; import dms from "./result/dms.js"; +import cms from "./result/cms.js"; import mergedStudent from "./result/mergedstudent.js"; import mergedPerson from "./result/mergedperson.js"; +import ApiLanguage from "../../api/factory/language.js" + export default { props: [ "searchoptions", "searchfunction" ], + provide() { + return { + languages: Vue.computed(() => this.languages), + query: Vue.computed(() => this.lastQuery) + }; + }, data: function() { return { searchtimer: null, @@ -25,6 +34,8 @@ export default { error: null, abortController: null, settingsDropdown:null, + languages: null, + lastQuery: '' }; }, components: { @@ -35,6 +46,7 @@ export default { student: student, prestudent: prestudent, dms, + cms, mergedStudent, mergedPerson }, @@ -70,6 +82,7 @@ export default { +
Unbekannter Ergebnistyp: '{{ res.type }}'.
@@ -110,6 +123,17 @@ export default { }, }, + created() { + this.$api + .call(ApiLanguage.getAll()) + .then(result => { + this.languages = result.data.reduce((a, c) => { + a[c.sprache] = c; + return a; + }, {}); + }) + .catch(this.$fhcAlert.handleSystemError); + }, beforeMount: function() { this.$watch('searchsettings.types', (newValue, oldValue) => { if (Array.isArray(newValue) && newValue.length === 0){