Skip to content

Commit

Permalink
Merge pull request ecamp#4135 from BacLuc/dashboard-load-dayresponsib…
Browse files Browse the repository at this point in the history
…les-in-one-request

frontend: load all dayResponsibles in one request in Dashboard.vue
  • Loading branch information
BacLuc authored Nov 25, 2023
2 parents 5b71710 + c6e9dc8 commit e0a5390
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 2 deletions.
2 changes: 1 addition & 1 deletion api/src/Entity/Day.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
normalizationContext: ['groups' => ['read']],
order: ['period.start', 'dayOffset']
)]
#[ApiFilter(filterClass: SearchFilter::class, properties: ['period'])]
#[ApiFilter(filterClass: SearchFilter::class, properties: ['period', 'period.camp'])]
#[UniqueEntity(fields: ['period', 'dayOffset'])]
#[ORM\Entity(repositoryClass: DayRepository::class)]
#[ORM\UniqueConstraint(name: 'offset_period_idx', columns: ['periodId', 'dayOffset'])]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21462,6 +21462,32 @@ paths:
schema:
type: string
style: form
-
allowEmptyValue: true
allowReserved: false
deprecated: false
description: ''
explode: false
in: query
name: period.camp
required: false
schema:
type: string
style: form
-
allowEmptyValue: true
allowReserved: false
deprecated: false
description: ''
explode: true
in: query
name: 'period.camp[]'
required: false
schema:
items:
type: string
type: array
style: form
-
allowEmptyValue: true
allowReserved: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"templated": true
},
"days": {
"href": "\/days{\/id}{?period,period[]}",
"href": "\/days{\/id}{?period,period[],period.camp,period.camp[]}",
"templated": true
},
"invitations": {
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/views/camp/Dashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,8 @@ export default {
const { categories, periods, collaborators, progressLabels } =
await loadAndProcessCollections(this.camp())
await this.api.get().days({ 'period.camp': this.camp()._meta.self })
const queryFilters = processRouteQuery(this.$route.query)
const { period, responsible, category, progressLabel } = {
...this.filter,
Expand Down

0 comments on commit e0a5390

Please sign in to comment.