primevue imports cis/dashboard; Anw widget implementation; WIP showing single anw entries on click on a quota progress bar in widget;

This commit is contained in:
Johann Hoffmann
2024-12-05 15:03:46 +01:00
parent f0e97c915b
commit 7f6884b67d
5 changed files with 100 additions and 82 deletions
+7 -1
View File
@@ -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'
],
+6
View File
@@ -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');
+6 -1
View File
@@ -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');
+48 -47
View File
@@ -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>
+33 -33
View File
@@ -1,40 +1,40 @@
import Pagination from "../../Pagination/Pagination.js";
export default {
components: {
Pagination,
},
data() {
return {
content: null,
maxPageCount: 0,
page_size: 10,
};
},
methods: {
loadNewPageContent: function (data) {
this.$fhcApi.factory.cms.getNews(data.page, data.rows)
.then(res => res.data)
.then(result => {
this.content = result;
});
},
},
created() {
this.$fhcApi.factory.cms.getNews(1, this.page_size)
.then(res => res.data)
.then(result => {
this.content = result;
});
components: {
Pagination,
},
data() {
return {
content: null,
maxPageCount: 0,
page_size: 10,
};
},
methods: {
loadNewPageContent: function (data) {
this.$fhcApi.factory.cms.getNews(data.page, data.rows)
.then(res => res.data)
.then(result => {
this.content = result;
});
this.$fhcApi.factory.cms.getNewsRowCount()
.then(res => res.data)
.then(result => {
this.maxPageCount = result;
});
},
template: /*html*/ `
},
},
created() {
this.$fhcApi.factory.cms.getNews(1, this.page_size)
.then(res => res.data)
.then(result => {
this.content = result;
});
this.$fhcApi.factory.cms.getNewsRowCount()
.then(res => res.data)
.then(result => {
this.maxPageCount = result;
});
},
template: /*html*/ `
<h2 >News</h2>
<hr/>
<pagination :page_size="page_size" @page="loadNewPageContent" :maxPageCount="maxPageCount">