From dd92c815dac414c2224d611386a6aae2d1ee122d Mon Sep 17 00:00:00 2001 From: Harald Bamberger Date: Thu, 20 Nov 2025 18:59:44 +0100 Subject: [PATCH] fix back button behavior in studvw and lvverwaltung --- .../components/LVVerwaltung/LVVerwaltung.js | 7 +++- .../js/components/Stv/Studentenverwaltung.js | 14 ++++++- .../Stv/Studentenverwaltung/Verband.js | 42 +++++++++++-------- 3 files changed, 43 insertions(+), 20 deletions(-) diff --git a/public/js/components/LVVerwaltung/LVVerwaltung.js b/public/js/components/LVVerwaltung/LVVerwaltung.js index f9b153ead..7f394a01d 100644 --- a/public/js/components/LVVerwaltung/LVVerwaltung.js +++ b/public/js/components/LVVerwaltung/LVVerwaltung.js @@ -124,6 +124,10 @@ export default { ? `${this.stg}/${this.semester}` : this.stg; } + else + { + this.selectedStudiengang = ''; + } this.filter = filter; }, handleRowClicked(data) @@ -163,6 +167,7 @@ export default { const routeName = this.filter.emp ? 'byEmp' : 'byStg'; const params = { stg }; + params.semester = ''; if (semester !== null) params.semester = semester; if (studiensemester_kurzbz) @@ -281,7 +286,7 @@ export default { - +
diff --git a/public/js/components/Stv/Studentenverwaltung.js b/public/js/components/Stv/Studentenverwaltung.js index 2d8473825..74ae8b01f 100644 --- a/public/js/components/Stv/Studentenverwaltung.js +++ b/public/js/components/Stv/Studentenverwaltung.js @@ -356,6 +356,18 @@ export default { }); } } + else + { + this.studiengangKz = undefined; + this.studiengangKuerzel = ''; + if(['index', 'studiensemester'].includes(this.$route.name)) + { + if(this.$refs?.stvList?.$refs?.table?.tabulator) + { + this.$refs.stvList.$refs.table.tabulator.setData([]); + } + } + } }, onSearch(e) { const searchsettings = { ...this.$refs.searchbar.searchsettings }; @@ -585,7 +597,7 @@ export default {
- +
diff --git a/public/js/components/Stv/Studentenverwaltung/Verband.js b/public/js/components/Stv/Studentenverwaltung/Verband.js index d9c0e1b73..1ff9d2ed9 100644 --- a/public/js/components/Stv/Studentenverwaltung/Verband.js +++ b/public/js/components/Stv/Studentenverwaltung/Verband.js @@ -16,14 +16,17 @@ export default { inject: { $reloadList: { from: '$reloadList', - required: true + default: () => {} }, currentSemester: { from: 'currentSemester', required: true }, appConfig: { - from: 'appConfig' + from: 'appConfig', + default: { + number_displayed_past_studiensemester: 5 + } } }, emits: [ @@ -208,22 +211,25 @@ export default { if (!currentNode) return; - const currentSelectedKey = Object.keys(this.selectedKey).find(Boolean); - if (currentSelectedKey) { - if (currentSelectedKey == currentKey) - return; - /** - * Do not select a new entry if the current is a child of the new one. - * This happens if a child entry of a new stg is selected and the router - * tries to select the stg root entry (because subtrees do not have - * routes yet) - */ - const isChild = this.findNodeByKey( - currentSelectedKey, - currentNode.children - ); - if (isChild) - return; + if(this.selectedKey) + { + const currentSelectedKey = Object.keys(this.selectedKey).find(Boolean); + if (currentSelectedKey) { + if (currentSelectedKey == currentKey) + return; + /** + * Do not select a new entry if the current is a child of the new one. + * This happens if a child entry of a new stg is selected and the router + * tries to select the stg root entry (because subtrees do not have + * routes yet) + */ + const isChild = this.findNodeByKey( + currentSelectedKey, + currentNode.children || [] + ); + if (isChild) + return; + } } for (let i = 1; i < parts.length; i++)