From bac2c13da355ec8cbce05e999b25e20831060a92 Mon Sep 17 00:00:00 2001 From: chfhtw Date: Mon, 23 Mar 2026 10:44:39 +0100 Subject: [PATCH] viewData is mandatory so we dont need to load it if its not set --- public/js/components/Dashboard/Dashboard.js | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/public/js/components/Dashboard/Dashboard.js b/public/js/components/Dashboard/Dashboard.js index 652a2778e..c27f0c405 100644 --- a/public/js/components/Dashboard/Dashboard.js +++ b/public/js/components/Dashboard/Dashboard.js @@ -2,8 +2,6 @@ import DashboardSection from "./Section.js"; import DashboardWidgetPicker from "./Widget/Picker.js"; import ObjectUtils from "../../helpers/ObjectUtils.js"; -import ApiDashboard from '../../api/factory/cis/dashboard.js'; - export default { name: 'Dashboard', components: { @@ -20,7 +18,7 @@ export default { type: Object, required: true, validator(value) { - return value && value.name && value.uid && value.timezone + return value && value.name && value.timezone } } }, @@ -29,7 +27,6 @@ export default { sections: [], widgets: null, editMode: false, - viewDataInternal: this.viewData } }, provide() { @@ -182,16 +179,10 @@ export default { }); }).catch(err => console.error('ERROR:', err)); }, - async beforeMount() { - if (!this.viewData.name || !this.viewData.uid) { - const res = await this.$api.call(ApiDashboard.getViewData()); - this.viewDataInternal = res.data - } - }, template: `
-

- {{ $p.t('global/personalGreeting', [ viewDataInternal?.name ]) }} +

+ {{ $p.t('global/personalGreeting', [ viewData?.name ]) }}