diff --git a/api/src/Entity/Day.php b/api/src/Entity/Day.php index 6a238dcb41..7b490cf5ef 100644 --- a/api/src/Entity/Day.php +++ b/api/src/Entity/Day.php @@ -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'])] diff --git a/api/tests/Api/SnapshotTests/__snapshots__/ResponseSnapshotTest__testOpenApiSpecMatchesSnapshot__1.yml b/api/tests/Api/SnapshotTests/__snapshots__/ResponseSnapshotTest__testOpenApiSpecMatchesSnapshot__1.yml index 911c360d65..8126d24229 100644 --- a/api/tests/Api/SnapshotTests/__snapshots__/ResponseSnapshotTest__testOpenApiSpecMatchesSnapshot__1.yml +++ b/api/tests/Api/SnapshotTests/__snapshots__/ResponseSnapshotTest__testOpenApiSpecMatchesSnapshot__1.yml @@ -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 diff --git a/api/tests/Api/SnapshotTests/__snapshots__/ResponseSnapshotTest__testRootEndpointMatchesSnapshot__1.json b/api/tests/Api/SnapshotTests/__snapshots__/ResponseSnapshotTest__testRootEndpointMatchesSnapshot__1.json index 6014aa8d84..dff63932d5 100644 --- a/api/tests/Api/SnapshotTests/__snapshots__/ResponseSnapshotTest__testRootEndpointMatchesSnapshot__1.json +++ b/api/tests/Api/SnapshotTests/__snapshots__/ResponseSnapshotTest__testRootEndpointMatchesSnapshot__1.json @@ -41,7 +41,7 @@ "templated": true }, "days": { - "href": "\/days{\/id}{?period,period[]}", + "href": "\/days{\/id}{?period,period[],period.camp,period.camp[]}", "templated": true }, "invitations": { diff --git a/frontend/src/views/camp/Dashboard.vue b/frontend/src/views/camp/Dashboard.vue index db7920d293..4e391e4287 100644 --- a/frontend/src/views/camp/Dashboard.vue +++ b/frontend/src/views/camp/Dashboard.vue @@ -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,