From c49e32c4ac1db69046d41cfb49ca7747e8f86fe7 Mon Sep 17 00:00:00 2001 From: ma0068 Date: Mon, 16 Mar 2026 11:26:23 +0100 Subject: [PATCH] use skeletons for all data in studentHeader --- .../components/DetailHeader/DetailHeader.js | 68 +++++++++++++++---- .../Stv/Studentenverwaltung/Details.js | 4 ++ 2 files changed, 59 insertions(+), 13 deletions(-) diff --git a/public/js/components/DetailHeader/DetailHeader.js b/public/js/components/DetailHeader/DetailHeader.js index dfd15e0be..be335114b 100644 --- a/public/js/components/DetailHeader/DetailHeader.js +++ b/public/js/components/DetailHeader/DetailHeader.js @@ -44,6 +44,10 @@ export default { currentSemester: { type: String, default: '' + }, + isLoading: { + type: Boolean, + default: false } }, computed: { @@ -107,7 +111,10 @@ export default { leitungData: {}, isFetchingIssues: false, noCurrentStatus: false, - semesterStatiLoading: false + semesterStatiLoading: false, + leitungOrgLoading: false, + departmentDataLoading: false, + headerDataLoading: false }; }, methods: { @@ -123,29 +130,40 @@ export default { }); }, getHeader(person_id) { + this.headerDataLoading = true; return this.$api .call(ApiDetailHeader.getHeader(person_id)) .then(result => { this.headerDataMa = result.data; - }) - .catch(this.$fhcAlert.handleSystemError); + .catch(this.$fhcAlert.handleSystemError) + .finally(() => { + this.headerDataLoading = false; + }); }, loadDepartmentData(mitarbeiter_uid) { + this.departmentDataLoading = true; return this.$api .call(ApiDetailHeader.getPersonAbteilung(mitarbeiter_uid)) .then(result => { this.departmentData = result.data; }) - .catch(this.$fhcAlert.handleSystemError); + .catch(this.$fhcAlert.handleSystemError) + .finally(() => { + this.departmentDataLoading = false; + }); }, getLeitungOrg(oekurzbz){ + this.leitungOrgLoading = true; return this.$api .call(ApiDetailHeader.getLeitungOrg(oekurzbz)) .then(result => { this.leitungData = result.data; }) - .catch(this.$fhcAlert.handleSystemError); + .catch(this.$fhcAlert.handleSystemError) + .finally(() => { + this.leitungOrgLoading = false; + }); }, async goToLeitung() { this.loadHeaderData(this.leitungData.person_id, this.leitungData.uid); @@ -205,7 +223,7 @@ export default { }) .catch(this.$fhcAlert.handleSystemError) .finally(() => { - this.semesterStatiLoading = false + this.semesterStatiLoading = false; }); }, setNoCurrentStatus() { @@ -279,7 +297,7 @@ export default {
-
+

{{headerData[0].titelpre}} {{headerData[0].vorname}} @@ -289,10 +307,19 @@ export default {

unruly
+
+ +
unruly
+
{{$p.t('lehre', 'studiengang')}} + {{headerData[0].stg_bezeichnung}} ({{headerData[0].studiengang}}) + + + +
-
+
Email - + {{headerData[0].mail_intern}} + + + | Status {{$p.t('lehre', 'textNoStatusInSem', { sem: currentSemester}) }} @@ -332,19 +362,31 @@ export default {

-
+
+ + +

-
+
+ + +

-
+
+ + +

UID

-
+
+ + +
diff --git a/public/js/components/Stv/Studentenverwaltung/Details.js b/public/js/components/Stv/Studentenverwaltung/Details.js index eb996eda0..bd5d42f9f 100644 --- a/public/js/components/Stv/Studentenverwaltung/Details.js +++ b/public/js/components/Stv/Studentenverwaltung/Details.js @@ -47,6 +47,9 @@ export default { } return Object.fromEntries(Object.entries(this.configStudents).filter(([ , value ]) => !value.showOnlyWithUid && !value.showOnlyWithUid)); }, + isLoading() { + return this.students === null; //null-> loading, [] -> empty, [...] -> data, necessary for skeleton in tiles + }, tile_PersId(){ let tile = this.students[0].person_id != null ? this.students[0].person_id : '-'; return tile; @@ -133,6 +136,7 @@ export default { typeHeader="student" @reload="reloadList" fotoEditable + :isLoading="isLoading" >