diff --git a/application/controllers/api/frontend/v1/LvMenu.php b/application/controllers/api/frontend/v1/LvMenu.php index 777d49b0c..328ef194d 100644 --- a/application/controllers/api/frontend/v1/LvMenu.php +++ b/application/controllers/api/frontend/v1/LvMenu.php @@ -284,24 +284,6 @@ class LvMenu extends FHCAPI_Controller } - - private function fhc_menu_digitale_anwesenheiten(&$menu, $angemeldet, $studiengang_kz, $semester, $lvid, $angezeigtes_stsem){ - - // DIGITALE ANWESENHEITEN - if (defined('CIS_LEHRVERANSTALTUNG_ANWESENHEIT_ANZEIGEN') && CIS_LEHRVERANSTALTUNG_ANWESENHEIT_ANZEIGEN && $angemeldet) { - - $menu[] = array - ( - 'id' => 'core_menu_digitale_anwesenheitslisten', - 'position' => '50', - 'name' => $this->p->t('lehre', 'digiAnw'), - 'c4_icon' => base_url('skin/images/button_kreuzerltool.png'), - 'c4_link' => base_url("index.ci.php/extensions/FHC-Core-Anwesenheiten/?stg_kz=$studiengang_kz&sem=$semester&lvid=$lvid&sem_kurzbz=$angezeigtes_stsem&nav=false"), - 'c4_linkList' => [] - ); - } - } - private function fhc_menu_lvinfo(&$menu, $lvid, $studiengang_kz, $lektor_der_lv, $is_lector, $lehrfach_oe_kurzbz_arr){ // LVINFO diff --git a/application/views/CisVue/Dashboard.php b/application/views/CisVue/Dashboard.php index 2f241af87..f97af8b07 100644 --- a/application/views/CisVue/Dashboard.php +++ b/application/views/CisVue/Dashboard.php @@ -3,7 +3,13 @@ $includesArray = array( 'title' => 'Dashboard', 'tabulator5'=>true, 'primevue3' => true, - 'customJSModules' => ['public/js/apps/Dashboard/Fhc.js'], + 'customJSModules' => [ + 'public/js/apps/Dashboard/Fhc.js' + ], + 'customJSs' => [ + 'vendor/npm-asset/primevue/accordion/accordion.js', + 'vendor/npm-asset/primevue/accordiontab/accordiontab.js' + ], 'customCSSs' => [ 'public/css/components/dashboard.css' ], diff --git a/public/js/apps/Cis.js b/public/js/apps/Cis.js index c9d322e07..78b82cc1f 100644 --- a/public/js/apps/Cis.js +++ b/public/js/apps/Cis.js @@ -107,5 +107,11 @@ const app = Vue.createApp({ } }); app.use(FhcApi); +app.use(primevue.config.default, { + zIndex: { + overlay: 9000, + tooltip: 8000 + } +}) app.use(Phrasen); app.mount('#cis-header'); diff --git a/public/js/apps/Dashboard/Fhc.js b/public/js/apps/Dashboard/Fhc.js index d096d4cde..24459759f 100644 --- a/public/js/apps/Dashboard/Fhc.js +++ b/public/js/apps/Dashboard/Fhc.js @@ -14,7 +14,12 @@ const app = Vue.createApp({ }); setScrollbarWidth(); - app.use(FhcApi); +app.use(primevue.config.default, { + zIndex: { + overlay: 9000, + tooltip: 8000 + } +}) app.use(Phrasen); app.mount('#content'); \ No newline at end of file diff --git a/public/js/components/Cis/Cms/Content.js b/public/js/components/Cis/Cms/Content.js index 2ba999007..efcd34e12 100644 --- a/public/js/components/Cis/Cms/Content.js +++ b/public/js/components/Cis/Cms/Content.js @@ -3,55 +3,56 @@ import general from './Content_types/General.js' export default { - props:{ - content_id:{ - type:Number, - required:true, - }, - version:{ - type:[String, Number], - default: null, - }, - sprache:{ - type:[String, Number], - default: null, - }, - sichtbar:{ - type:[String, Number], - default: null, - } + props: { + content_id: { + type: Number, + required: true, + }, + version: { + type: [String, Number], + default: null, + }, + sprache: { + type: [String, Number], + default: null, + }, + sichtbar: { + type: [String, Number], + default: null, + } - }, - components:{ - raum_contentmittitel, - general, - }, - data() { - return { - content: null, - }; - }, - computed:{ - computeContentType: function(){ - switch(this.content_type){ - case "raum_contentmittitel": - return "raum_contentmittitel"; - default: - return "general"; - }; - }, - }, - created() { - this.$fhcApi.factory.cms.content(this.content_id,this.version, this.sprache, this.sichtbar).then(res =>{ - this.content = res.data.content; - this.content_type=res.data.type; - }); - }, - mounted(){ - - }, - template: /*html*/ ` + }, + components: { + raum_contentmittitel, + general, + }, + data() { + return { + content: null, + }; + }, + computed: { + computeContentType: function () { + switch (this.content_type) { + case "raum_contentmittitel": + return "raum_contentmittitel"; + default: + return "general"; + } + ; + }, + }, + created() { + this.$fhcApi.factory.cms.content(this.content_id, this.version, this.sprache, this.sichtbar).then(res => { + this.content = res.data.content; + this.content_type = res.data.type; + }); + }, + mounted() { + + }, + template: /*html*/ `

No content is available to display

diff --git a/public/js/components/Cis/Cms/News.js b/public/js/components/Cis/Cms/News.js index f61cd3154..6633ef237 100644 --- a/public/js/components/Cis/Cms/News.js +++ b/public/js/components/Cis/Cms/News.js @@ -4,7 +4,6 @@ import StudiengangInformation from "./StudiengangInformation/StudiengangInformat export default { components: { Pagination, - StudiengangInformation, }, data() { return { diff --git a/public/js/plugin/FhcApi.js b/public/js/plugin/FhcApi.js index c25204d49..e2576691e 100644 --- a/public/js/plugin/FhcApi.js +++ b/public/js/plugin/FhcApi.js @@ -4,6 +4,12 @@ import FhcApiFactory from '../api/fhcapifactory.js'; export default { install: (app, options) => { + if (app.config.globalProperties.$fhcApi) { + if (options?.factory) { + app.config.globalProperties.$fhcApi.factory.addEndpoints(options.factory); + } + return; + } app.use(FhcAlert); function _get_config(form, uri, data, config) { @@ -136,7 +142,7 @@ export default { return Promise.reject(error); }); - app.config.globalProperties.$fhcApi = Vue.reactive({ + app.config.globalProperties.$fhcApi = { getUri(url) { return fhcApiAxios.getUri({url}); }, @@ -289,38 +295,43 @@ export default { $fhcAlert.alertDefault('error', error.message, message); } } - }); + }; class FhcApiFactoryWrapper { constructor(factorypart, root) { - if (root === undefined) + if (root === undefined) { this.$fhcApi = app.config.globalProperties.$fhcApi; - else + this.$fhcApi.factory = this; + } else { Object.defineProperty(this, '$fhcApi', { get() { return (root || this).$fhcApi; } }) + } - this.bindKeys(factorypart, root) + this.bindKeys(factorypart) } - bindKeys(factorypart, root) { + addEndpoints(factorypart) { Object.keys(factorypart).forEach(key => { Object.defineProperty(this, key, { get() { if (typeof factorypart[key] == 'function') return factorypart[key].bind(this); - return new FhcApiFactoryWrapper(factorypart[key], root || this); + return new FhcApiFactoryWrapper(factorypart[key], this.$fhcApi.factory); } }); }); } } - const mergedFhcApiFactory = options?.factory ? {...FhcApiFactory, ...options.factory} : FhcApiFactory; + const factory = new FhcApiFactoryWrapper(FhcApiFactory); + if (options?.factory) + factory.addEndpoints(options.factory); + + app.config.globalProperties.$fhcApi.factory = factory; - app.config.globalProperties.$fhcApi.factory = new FhcApiFactoryWrapper(mergedFhcApiFactory); app.provide('$fhcApi', app.config.globalProperties.$fhcApi); } }; \ No newline at end of file