mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-10 16:55:00 +00:00
Compare commits
4 Commits
v3.1.0
...
fix_filiat
Author | SHA1 | Date | |
---|---|---|---|
34801dcd5f | |||
cc2bee8188 | |||
fb0135a0af | |||
88961e3e7e |
@@ -16,6 +16,7 @@ and this project adheres to
|
|||||||
* [person-thirdparty]: fix quick-add of names that consist of multiple parts (eg. De Vlieger) within onthefly modal person/thirdparty
|
* [person-thirdparty]: fix quick-add of names that consist of multiple parts (eg. De Vlieger) within onthefly modal person/thirdparty
|
||||||
* [search]: Order of birthdate fields changed in advanced search to avoid confusion.
|
* [search]: Order of birthdate fields changed in advanced search to avoid confusion.
|
||||||
* [workflow]: Constraint added to workflow (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/675)
|
* [workflow]: Constraint added to workflow (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/675)
|
||||||
|
* [filiation]: Allow the deletion of a relationship in filiations (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/608)
|
||||||
* [household]: Reposition and cut button for enfant hors menage have been deleted (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/620)
|
* [household]: Reposition and cut button for enfant hors menage have been deleted (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/620)
|
||||||
|
|
||||||
## Test releases
|
## Test releases
|
||||||
|
@@ -39,6 +39,7 @@ class RelationshipNoDuplicateValidator extends ConstraintValidator
|
|||||||
|
|
||||||
$fromPerson = $value->getFromPerson();
|
$fromPerson = $value->getFromPerson();
|
||||||
$toPerson = $value->getToPerson();
|
$toPerson = $value->getToPerson();
|
||||||
|
$relationType = $value->getRelation();
|
||||||
|
|
||||||
$relationships = $this->relationshipRepository->findBy([
|
$relationships = $this->relationshipRepository->findBy([
|
||||||
'fromPerson' => [$fromPerson, $toPerson],
|
'fromPerson' => [$fromPerson, $toPerson],
|
||||||
@@ -46,11 +47,11 @@ class RelationshipNoDuplicateValidator extends ConstraintValidator
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
foreach ($relationships as $r) {
|
foreach ($relationships as $r) {
|
||||||
if (
|
if ($r->getRelation()->getId() !== $relationType->getId()
|
||||||
$r->getFromPerson() === $fromPerson
|
&& ($r->getFromPerson() === $fromPerson
|
||||||
|| $r->getFromPerson() === $toPerson
|
|| $r->getFromPerson() === $toPerson
|
||||||
|| $r->getToPerson() === $fromPerson
|
|| $r->getToPerson() === $fromPerson
|
||||||
|| $r->getToPerson() === $toPerson
|
|| $r->getToPerson() === $toPerson)
|
||||||
) {
|
) {
|
||||||
$this->context->buildViolation($constraint->message)
|
$this->context->buildViolation($constraint->message)
|
||||||
->addViolation();
|
->addViolation();
|
||||||
|
Reference in New Issue
Block a user