mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
Merge branch 'feature-25999/C4_anwesenheiten_widget' into feature-25999/C4_cleanup
# Conflicts: # public/js/components/Cis/Cms/News.js # public/js/components/DashboardWidget/News.js # public/js/plugin/FhcApi.js
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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'
|
||||
],
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -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');
|
||||
@@ -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*/ `
|
||||
<!-- div that contains the content -->
|
||||
<component :is="computeContentType" v-if="content" :content="content" :content_id="content_id" />
|
||||
<p v-else>No content is available to display</p>
|
||||
|
||||
@@ -4,7 +4,6 @@ import StudiengangInformation from "./StudiengangInformation/StudiengangInformat
|
||||
export default {
|
||||
components: {
|
||||
Pagination,
|
||||
StudiengangInformation,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user