mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-28 13:06:13 +00:00
Fixed: Accompanyingperiod / comment: order by newest to oldest
This commit is contained in:
parent
45724100d4
commit
146103e87c
6
.changes/unreleased/Fixed-20230621-132851.yaml
Normal file
6
.changes/unreleased/Fixed-20230621-132851.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
kind: Fixed
|
||||
body: '[Accompanying period comments]: order comments from the most recent to the
|
||||
oldest, in the list'
|
||||
time: 2023-06-21T13:28:51.282714011+02:00
|
||||
custom:
|
||||
Issue: ""
|
@ -185,7 +185,9 @@ class AccompanyingPeriod implements
|
||||
* cascade={"persist", "remove"},
|
||||
* orphanRemoval=true
|
||||
* )
|
||||
* @ORM\OrderBy({"createdAt": "DESC", "id": "DESC"})
|
||||
* @Assert\NotBlank(groups={AccompanyingPeriod::STEP_DRAFT})
|
||||
* @var Collection<Comment>
|
||||
*/
|
||||
private Collection $comments;
|
||||
|
||||
@ -705,10 +707,11 @@ class AccompanyingPeriod implements
|
||||
->comments
|
||||
->filter(
|
||||
static fn (Comment $c): bool => $c !== $pinnedComment
|
||||
);
|
||||
)
|
||||
;
|
||||
}
|
||||
|
||||
public function getCreatedAt(): ?DateTime
|
||||
public function getCreatedAt(): DateTimeInterface
|
||||
{
|
||||
return $this->createdAt;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user