dashboard & widgets: template cleanup; property definiton cleanup; delete unwrapInjectedRef -> resolved since vue3.3;

This commit is contained in:
Johann Hoffmann
2024-11-21 15:43:35 +01:00
parent a349a179d0
commit 61728f3044
11 changed files with 11 additions and 18 deletions
-1
View File
@@ -15,6 +15,5 @@ const app = Vue.createApp({
setScrollbarWidth();
app.config.unwrapInjectedRef = true;
app.use(Phrasen);
app.mount('#content');
-1
View File
@@ -143,6 +143,5 @@ const app = Vue.createApp({
</fhc-calendar>
`
});
app.config.unwrapInjectedRef = true;
app.use(Phrasen, {reload: true});
app.mount('#content');
-1
View File
@@ -13,7 +13,6 @@ const app = Vue.createApp({
DashboardAdmin
}
});
app.config.unwrapInjectedRef = true;
app.use(FhcApi);
app.use(Phrasen);
app.mount('#main');
-1
View File
@@ -15,7 +15,6 @@ const app = Vue.createApp({
setScrollbarWidth();
app.config.unwrapInjectedRef = true;
app.use(FhcApi);
app.use(Phrasen);
app.mount('#content');
@@ -17,7 +17,6 @@ export default {
},
methods: {
maximize() {
// NOTE(chris): set "app.config.unwrapInjectedRef = true" for this to work
this.minimized = false;
}
},
+3 -5
View File
@@ -13,12 +13,10 @@ export default {
},
props:{
contentID:{
type: Number,
required: true,
type: Number
},
ort_kurzbz:{
type: String,
required: true,
type: String
}
},
data(){
@@ -51,7 +49,7 @@ export default {
},
template:/*html*/`
<bs-modal @hideBsModal="modalHidden" dialogClass="modal-xl" @showBsModal="modalShown" ref="modalContainer" dialogClass="modal-lg">
<bs-modal @hideBsModal="modalHidden" dialogClass="modal-xl" @showBsModal="modalShown" ref="modalContainer">
<template #title>
<span v-if="ort_kurzbz">{{ort_kurzbz}}</span>
<span v-else>Raum Informationen</span>
+1 -1
View File
@@ -6,7 +6,7 @@ export default {
type: Number,
default: 1
},
activeContent: String,
activeContent: [String, Number],
highestMatchingUrlCount: Number,
},
data: () => {
+1 -1
View File
@@ -195,7 +195,7 @@ export default {
template: `
<div class="dashboard-section" ref="container" :style="getSectionStyle">
<drop-grid v-model:cols="gridWidth" :items="items" :placeholders="items_placeholders" :active="editModeIsActive" :resize-limit="checkResizeLimit" :margin-for-extra-row=".01" @rearrange-items="updatePositions" @gridHeight="gridHeight=$event" >
<template #default="item" #default>
<template #default="item">
<dashboard-item v-if="!item.placeholder"
:id="item.widget"
@@ -188,8 +188,8 @@ export default {
template: /*html*/`
<div class="dashboard-widget-stundenplan d-flex flex-column h-100">
<lv-modal v-if="selectedEvent" ref="lvmodal" :event="selectedEvent" />
<content-modal :contentID="roomInfoContentID" :ort_kurzbz="" dialogClass="modal-lg" ref="contentModal"/>
<fhc-calendar @change:range="updateRange" :initial-date="currentDay" class="border-0" class-header="p-0" @select:day="selectDay" widget="true" v-model:minimized="minimized" :events="events" no-week-view :show-weeks="false" >
<content-modal :contentID="roomInfoContentID" dialogClass="modal-lg" ref="contentModal"/>
<fhc-calendar @change:range="updateRange" :initial-date="currentDay" class="border-0" class-header="p-0" @select:day="selectDay" :widget="true" v-model:minimized="minimized" :events="events" no-week-view :show-weeks="false" >
<template #minimizedPage >
<div class="flex-grow-1" style="overflow-y: auto; overflow-x: hidden">
<div v-if="events === null" class="d-flex h-100 justify-content-center align-items-center">
@@ -218,6 +218,6 @@ export default {
</div>
</template>
</fhc-calendar>
</div>
</div>`
</div>
`
}
+1 -1
View File
@@ -376,7 +376,7 @@ export default {
paddingRight: 'var(--fhc-dg-item-padding-horizontal)'
}">
<template v-slot="item">
<slot v-bind="item.data" v-bind="item" :x="item.x" :y="item.y" ></slot>
<slot v-bind="item.data" :x="item.x" :y="item.y" ></slot>
</template>
</grid-item>
+1 -1
View File
@@ -83,6 +83,6 @@ export default {
setLanguage: phrasen.setLanguage,
t_ref: phrasen.t_ref
};
app.provide('$p', app.config.globalProperties.$p);
app.provide('$p', app.config.globalProperties.$p);
}
}