From 9af7ec3ff5ec81736a90969217f774fc3f607727 Mon Sep 17 00:00:00 2001 From: cgfhtw Date: Mon, 15 Jul 2024 10:58:10 +0200 Subject: [PATCH] Prefetch Tab config to prevent reloading tabcontent on student change --- .../Stv/Studentenverwaltung/Details.js | 26 ++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/public/js/components/Stv/Studentenverwaltung/Details.js b/public/js/components/Stv/Studentenverwaltung/Details.js index 9b888093f..4df148063 100644 --- a/public/js/components/Stv/Studentenverwaltung/Details.js +++ b/public/js/components/Stv/Studentenverwaltung/Details.js @@ -7,6 +7,12 @@ export default { components: { FhcTabs }, + data() { + return { + configStudent: null, + configStudents: null + }; + }, props: { students: Array }, @@ -21,20 +27,34 @@ export default { this.$refs.tabs.$refs.current.reload(); } }, + created() { + this.$fhcApi + .factory.stv.configStudent() + .then(result => { + this.configStudent = result.data; + }) + .catch(this.$fhcAlert.handleSystemError); + this.$fhcApi + .factory.stv.configStudents() + .then(result => { + this.configStudents = result.data; + }) + .catch(this.$fhcAlert.handleSystemError); + }, template: `
Bitte StudentIn auswählen!
-
+
profilbild

{{students[0].titlepre}} {{students[0].vorname}} {{students[0].nachname}} {{students[0].titlepost}}

- - + +
` }; \ No newline at end of file