aboutsummaryrefslogtreecommitdiff
path: root/resources/vue/components/tree/StudipTreeList.vue
diff options
context:
space:
mode:
authorThomas Hackl <hackl@data-quest.de>2025-07-25 13:51:05 +0200
committerThomas Hackl <hackl@data-quest.de>2025-07-25 13:51:44 +0200
commit282bd39bfa8d6799761e50fca59f9a1eeb021d85 (patch)
tree886d068865bcff61ab1d1d7ed9e5f3fa69cb655c /resources/vue/components/tree/StudipTreeList.vue
parent8b7abfdf388fdd0495dd23a3d413e9eebb77f7f2 (diff)
always cache course counts datatreecache
Diffstat (limited to 'resources/vue/components/tree/StudipTreeList.vue')
-rw-r--r--resources/vue/components/tree/StudipTreeList.vue23
1 files changed, 12 insertions, 11 deletions
diff --git a/resources/vue/components/tree/StudipTreeList.vue b/resources/vue/components/tree/StudipTreeList.vue
index dedc403..f0569dd 100644
--- a/resources/vue/components/tree/StudipTreeList.vue
+++ b/resources/vue/components/tree/StudipTreeList.vue
@@ -221,8 +221,6 @@ export default {
}
},
data() {
- const cachedCourseInfo = this.getCachedNodeCourseInfo(this.node.id, this.semester, this.semClass);
-
return {
currentNode: this.node,
isLoading: false,
@@ -230,8 +228,8 @@ export default {
children: [],
courses: [],
assistiveLive: '',
- subLevelsCourses: cachedCourseInfo.allCourses,
- thisLevelCourses: cachedCourseInfo.courses,
+ subLevelsCourses: null,
+ thisLevelCourses: null,
showingAllCourses: false
}
},
@@ -251,11 +249,14 @@ export default {
});
}
- this.getNodeCourseInfo(node, this.semester, this.semClass)
- .then(response => {
- this.thisLevelCourses = response?.data.courses;
- this.subLevelsCourses = response?.data.allCourses;
- });
+ if (node.attributes.ancestors.length > 1) {
+ this.getNodeCourseInfo(node, this.semester, this.semClass)
+ .then(response => {
+ console.log('Response', response);
+ this.thisLevelCourses = response?.data.courses;
+ this.subLevelsCourses = response?.data.allCourses;
+ });
+ }
if (this.withCourses) {
this.getNodeCourses(node, this.offset, this.semester, this.semClass, '', false)
@@ -341,8 +342,8 @@ export default {
this.getNodeCourseInfo(this.currentNode, this.semester, this.semClass)
.then(response => {
- this.thisLevelCourses = response?.data.courses;
- this.subLevelsCourses = response?.data.allCourses;
+ this.thisLevelCourses = response.data.courses;
+ this.subLevelsCourses = response.data.allcourses;
});
if (this.withCourses) {