mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 00:12:15 +00:00
StgOrgLvPlan: add DEFAULT_MODE_LV_PLAN to OverviewLvPlan
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user