From 0536deda1acfcd0f60cf0b57fee0d0073de0c2db Mon Sep 17 00:00:00 2001 From: cgfhtw Date: Mon, 29 Apr 2024 14:47:44 +0200 Subject: [PATCH] StV: static primevue --- application/views/Studentenverwaltung.php | 2 +- public/js/apps/Studentenverwaltung.js | 49 ++++++++++------------- 2 files changed, 23 insertions(+), 28 deletions(-) diff --git a/application/views/Studentenverwaltung.php b/application/views/Studentenverwaltung.php index 54354578e..8993053b3 100644 --- a/application/views/Studentenverwaltung.php +++ b/application/views/Studentenverwaltung.php @@ -5,7 +5,7 @@ 'bootstrap5' => true, 'fontawesome6' => true, 'vue3' => true, - #'primevue3' => true, + 'primevue3' => true, #'filtercomponent' => true, 'tabulator5' => true, 'tinymce5' => true, diff --git a/public/js/apps/Studentenverwaltung.js b/public/js/apps/Studentenverwaltung.js index 9b24008e3..0d9ea90f5 100644 --- a/public/js/apps/Studentenverwaltung.js +++ b/public/js/apps/Studentenverwaltung.js @@ -20,33 +20,28 @@ import fhcapifactory from "./api/fhcapifactory.js"; import Phrasen from "../plugin/Phrasen.js"; -//import PrimeVue form "../../../../index.ci.php/public/js/components/primevue/config/config.esm.min.js"); -//const PrimeVue = await import(FHC_JS_DATA_STORAGE_OBJECT.app_root + FHC_JS_DATA_STORAGE_OBJECT.ci_router + "/public/js/components/primevue/config/config.esm.min.js").default; -import(FHC_JS_DATA_STORAGE_OBJECT.app_root + FHC_JS_DATA_STORAGE_OBJECT.ci_router + "/public/js/components/primevue/config/config.esm.min.js").then(result => result.default).then(PrimeVue => { - Vue.$fhcapi = fhcapifactory; - const ciPath = FHC_JS_DATA_STORAGE_OBJECT.app_root.replace(/(https:|)(^|\/\/)(.*?\/)/g, '') + FHC_JS_DATA_STORAGE_OBJECT.ci_router; +const ciPath = FHC_JS_DATA_STORAGE_OBJECT.app_root.replace(/(https:|)(^|\/\/)(.*?\/)/g, '') + FHC_JS_DATA_STORAGE_OBJECT.ci_router; - const router = VueRouter.createRouter({ - history: VueRouter.createWebHistory(), - routes: [ - { path: `/${ciPath}/studentenverwaltung`, component: FhcStudentenverwaltung }, - { path: `/${ciPath}/studentenverwaltung/prestudent/:prestudent_id`, component: FhcStudentenverwaltung }, - { path: `/${ciPath}/studentenverwaltung/prestudent/:prestudent_id/:tab`, component: FhcStudentenverwaltung }, - { path: `/${ciPath}/studentenverwaltung/student/:id`, component: FhcStudentenverwaltung }, - { path: `/${ciPath}/studentenverwaltung/person/:person_id`, component: FhcStudentenverwaltung } - ] - }); - - const app = Vue.createApp(); - - app - .use(router) - .use(PrimeVue, { - zIndex: { - overlay: 1100 - } - }) - .use(Phrasen) - .mount('#main'); +const router = VueRouter.createRouter({ + history: VueRouter.createWebHistory(), + routes: [ + { path: `/${ciPath}/studentenverwaltung`, component: FhcStudentenverwaltung }, + { path: `/${ciPath}/studentenverwaltung/prestudent/:prestudent_id`, component: FhcStudentenverwaltung }, + { path: `/${ciPath}/studentenverwaltung/prestudent/:prestudent_id/:tab`, component: FhcStudentenverwaltung }, + { path: `/${ciPath}/studentenverwaltung/student/:id`, component: FhcStudentenverwaltung }, + { path: `/${ciPath}/studentenverwaltung/person/:person_id`, component: FhcStudentenverwaltung } + ] }); + +const app = Vue.createApp(); + +app + .use(router) + .use(primevue.config.default, { + zIndex: { + overlay: 1100 + } + }) + .use(Phrasen) + .mount('#main');