Skip to content

Commit

Permalink
frontend: load all dayResponsibles in one request in Dashboard.vue
Browse files Browse the repository at this point in the history
By loading the days in one request which embed the dayResponsibles.
When loading the dayResponsibles directly, there was still
a request per day for the dayResponsibles.
This makes the loading of Dashboard.vue faster.
It also may reduce the e2e test failures of the firefox tests due to:
"Request aborted" errors after the test is finished.
(The test did not wait for the dayResponsibles to be loaded and then
aborted the load which lead to the requests being aborted.)
  • Loading branch information
BacLuc committed Nov 18, 2023
1 parent 8800bc8 commit f737f3b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions frontend/src/views/camp/Dashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,11 @@ export default {
const { categories, periods, collaborators, progressLabels } =
await loadAndProcessCollections(this.camp())
const periodHrefs = await this.camp()
.periods()
.items.map((period) => period._meta.self)
await this.api.get().days({ periods: periodHrefs })
const queryFilters = processRouteQuery(this.$route.query)
const { period, responsible, category, progressLabel } = {
...this.filter,
Expand Down

0 comments on commit f737f3b

Please sign in to comment.