diff --git a/public/js/components/Calendar/Base.js b/public/js/components/Calendar/Base.js index 94ad3ef05..9d344ca09 100644 --- a/public/js/components/Calendar/Base.js +++ b/public/js/components/Calendar/Base.js @@ -164,7 +164,7 @@ export default { }, set(value) { this.internalDate = value; - this.$emit('update:date', value); + this.$emit('update:date', value, this.cMode); } }, sMode() { @@ -182,7 +182,7 @@ export default { }, set(value) { this.internalView = value; - this.$emit('update:mode', value); + this.$emit('update:mode', value, this.cDate); } } }, diff --git a/public/js/components/Cis/LvPlan/LvPlan.js b/public/js/components/Cis/LvPlan/LvPlan.js index cf190d1c5..4555f18aa 100644 --- a/public/js/components/Cis/LvPlan/LvPlan.js +++ b/public/js/components/Cis/LvPlan/LvPlan.js @@ -105,24 +105,12 @@ export default { return undefined; return '--event-bg:#' + event.farbe; }, - handleChangeDate(day) { - const focus_date = day.toISODate(); - const mode = this.currentMode; - - this.$router.push({ - name: "LvPlan", - params: { - mode, - focus_date, - lv_id: this.propsViewData?.lv_id || null - } - }) + handleChangeDate(day, newMode) { + return this.handleChangeMode(newMode, day); }, - handleChangeMode(newMode) { + handleChangeMode(newMode, day) { const mode = newMode[0].toUpperCase() + newMode.slice(1) - const focus_date = (this.currentDay instanceof luxon.DateTime) - ? this.currentDay.toISODate() - : this.currentDay; + const focus_date = day.toISODate(); this.$router.push({ name: "LvPlan", diff --git a/public/js/components/Cis/Mylv/RoomInformation.js b/public/js/components/Cis/Mylv/RoomInformation.js index d8d2ff074..72d489023 100644 --- a/public/js/components/Cis/Mylv/RoomInformation.js +++ b/public/js/components/Cis/Mylv/RoomInformation.js @@ -73,24 +73,12 @@ export default { return undefined; return '--event-bg:#' + event.farbe; }, - handleChangeDate(day) { - const focus_date = day.toISODate(); - const mode = this.currentMode; - - this.$router.push({ - name: "RoomInformation", - params: { - mode, - focus_date, - ort_kurzbz: this.propsViewData.ort_kurzbz - } - }) + handleChangeDate(day, newMode) { + return this.handleChangeMode(newMode, day); }, - handleChangeMode(newMode) { + handleChangeMode(newMode, day) { const mode = newMode[0].toUpperCase() + newMode.slice(1) - const focus_date = (this.currentDay instanceof luxon.DateTime) - ? this.currentDay.toISODate() - : this.currentDay; + const focus_date = day.toISODate(); this.$router.push({ name: "RoomInformation", @@ -99,7 +87,7 @@ export default { focus_date, ort_kurzbz: this.propsViewData.ort_kurzbz } - }) + }); }, updateRange(rangeInterval) { this.rangeInterval = rangeInterval;