StgOrgLvPlan: add DEFAULT_MODE_LV_PLAN to OverviewLvPlan

This commit is contained in:
ma0068
2026-02-19 16:31:28 +01:00
parent 0d73824727
commit b98e831300
2 changed files with 9 additions and 3 deletions
@@ -2,6 +2,7 @@ import FormForm from '../../Form/Form.js';
import FormInput from '../../Form/Input.js';
import ApiLvPlan from '../../../api/factory/lvPlan.js';
export const DEFAULT_MODE_LVPLAN = 'Week';
export default {
name: "OverviewLvPlan",
@@ -116,6 +117,11 @@ export default {
return luxon.DateTime.now().setZone(this.viewData.timezone).toISODate();
return this.propsViewData?.focus_date;
},
currentMode() {
if (!this.propsViewData?.mode || !['day', 'week', 'month'].includes(this.propsViewData?.mode.toLowerCase()))
return DEFAULT_MODE_LVPLAN;
return this.propsViewData?.mode;
},
},
created(){
this.$api
+3 -3
View File
@@ -232,12 +232,12 @@ export default {
this.formData.verband = this.propsViewData.verband ? this.propsViewData.verband: null;
this.formData.gruppe = this.propsViewData.gruppe ? this.propsViewData.gruppe: null;
//ensure loading dropdown arrays for version propsView (OverviewLvPlan.js)
if(!this.listVerband.length)
//ensure loading dropdown arrays for version propsView
if(!this.listVerband.length && this.formData.sem)
{
this.loadListVerband();
}
if(!this.listGroup.length)
if(!this.listGroup.length && this.formData.verband)
{
this.loadListGroup();
}