Consistently open the next future period in the picasso #7427
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Based on #7431 so the e2e tests can pass, only review the second commit here.
When fetching periods via the
/periodsendpoint, they were ordered bycreateTime DESC. This is different from fetching the periods of a specific camp, where they were ordered bystart ASC. As a result, the firstFuturePeriod, i.e. the period displayed by default when navigating to the picasso, may be different depending on whether the last reload was on the camp list or the dashboard.Simply adding the
order:entry to the ApiResource annotation was not enough: It made the SQL order bycreateTime DESC, start ASC, which is unhelpful.So I had to remove the default ordering. Not sure if this is a bug or a feature of API Platform.
As a side effect, now the content types are correctly ordered by name too.