Skip to content

Commit

Permalink
Merge branch 'hotfix/1.0.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
polosson committed Jan 27, 2025
2 parents 5c6a7c8 + 3954f75 commit 35f1401
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ Tous les changements notables sur le projet sont documentés dans ce fichier.

Ce projet adhère au principe du [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 1.0.4 (2025-01-27)

- Corrige l'ordre des bénéficiaires associés à un événement, pour que le bénéficiaire principal reste
en première position si plusieurs bénéficiaires sont présents.

## 1.0.3 (2024-12-18)

- Rétablit le champ `e-mail` dans le formulaire de création / modification de bénéficiaire.
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.3
1.0.4
4 changes: 1 addition & 3 deletions server/src/App/Models/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -627,9 +627,7 @@ public function getMaterialsCountAttribute(): int
/** @return Collection<array-key, Beneficiary> */
public function getBeneficiariesAttribute(): Collection
{
return $this->getRelationValue('beneficiaries')
->sortBy('last_name')
->values();
return $this->getRelationValue('beneficiaries');
}

/** @return Collection<array-key, EventTechnician> */
Expand Down
4 changes: 2 additions & 2 deletions server/tests/models/EventTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -743,8 +743,8 @@ public function testSyncBeneficiaries(): void
$event = Event::findOrFail(4);
$event->syncBeneficiaries($beneficiaries);
$this->assertEquals(2, count($event->beneficiaries));
$this->assertEquals('Client Benef', $event->beneficiaries[0]['full_name']);
$this->assertEquals('Roger Rabbit', $event->beneficiaries[1]['full_name']);
$this->assertEquals('Roger Rabbit', $event->beneficiaries[0]['full_name']);
$this->assertEquals('Client Benef', $event->beneficiaries[1]['full_name']);
}

public function testSyncTechnicians(): void
Expand Down

0 comments on commit 35f1401

Please sign in to comment.