Skip to content
Snippets Groups Projects

Draft: Resolve "[TCC planning] Frontend is incredibly slow with large amounts of entries"

3 files
+ 10
15
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -264,15 +264,7 @@ export default {
},
getCurrentCourseConfig(course) {
if (course.lrTimeboundCourseConfigs?.length) {
let currentCourseConfigs = course.lrTimeboundCourseConfigs.filter(
(timeboundConfig) =>
timeboundConfig.validityRange.id === this.internalValidityRange.id,
);
if (currentCourseConfigs.length) {
return currentCourseConfigs[0];
} else {
return null;
}
return course.lrTimeboundCourseConfigs[0];
} else {
return null;
}
@@ -296,9 +288,7 @@ export default {
}
} else {
if (
!course.lrTimeboundCourseConfigs?.filter(
(c) => c.validityRange.id === this.internalValidityRange?.id,
).length
!course.lrTimeboundCourseConfigs?.length
) {
let existingCreatedCourseConfig = this.createdCourseConfigs.find(
(c) =>
@@ -507,12 +497,13 @@ export default {
subjects: {
query: subjects,
skip() {
return !this.groupIDSet.size || !this.internalValidityRange;
return !this.groupIDSet.size || !this.internalValidityRange || !this.persons.length;
},
variables() {
return {
groups: Array.from(this.groupIDSet),
includeChildGroups: this.includeChildGroups,
validityRange: this.internalValidityRange.id,
};
},
result({ data }) {
Loading