mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
Merge remote-tracking branch 'origin/master' into 709-notification-eval-action
This commit is contained in:
@@ -76,8 +76,17 @@ class SimilarPersonMatcher
|
||||
|
||||
$qb->select('p')
|
||||
->from(Person::class, 'p')
|
||||
->join('p.centerHistory', 'center_history')
|
||||
->where('SIMILARITY(p.fullnameCanonical, UNACCENT(LOWER(:fullName))) >= :precision')
|
||||
->andWhere($qb->expr()->in('p.center', ':centers'));
|
||||
->andWhere($qb->expr()->in('center_history.center', ':centers'))
|
||||
->andWhere($qb->expr()->andX(
|
||||
$qb->expr()->lte('center_history.startDate', 'CURRENT_DATE()'),
|
||||
$qb->expr()->orX(
|
||||
$qb->expr()->isNull('center_history.endDate'),
|
||||
$qb->expr()->gt('center_history.endDate', 'CURRENT_DATE()')
|
||||
)
|
||||
))
|
||||
;
|
||||
|
||||
$qb
|
||||
->setParameter('fullName', $this->personRender->renderString($person, []))
|
||||
@@ -117,7 +126,6 @@ class SimilarPersonMatcher
|
||||
$qb->setParameter('fullName', $this->personRender->renderString($person, []));
|
||||
}
|
||||
|
||||
dump($qb->getQuery());
|
||||
return $qb->getQuery()->getResult();
|
||||
}
|
||||
}
|
||||
|
@@ -204,7 +204,7 @@ class AccompanyingPeriodContext implements
|
||||
$options = $template->getOptions();
|
||||
|
||||
$data = [];
|
||||
$data = array_merge($data, $this->baseContextData->getData());
|
||||
$data = array_merge($data, $this->baseContextData->getData($contextGenerationData['creator'] ?? null));
|
||||
$data['course'] = $this->normalizer->normalize($entity, 'docgen', ['docgen:expects' => AccompanyingPeriod::class, 'groups' => 'docgen:read']);
|
||||
|
||||
foreach (['mainPerson', 'person1', 'person2'] as $k) {
|
||||
|
@@ -165,7 +165,7 @@ final class PersonContext implements PersonContextInterface
|
||||
}
|
||||
|
||||
$data = [];
|
||||
$data = array_merge($data, $this->baseContextData->getData());
|
||||
$data = array_merge($data, $this->baseContextData->getData($contextGenerationData['creator'] ?? null));
|
||||
$data['person'] = $this->normalizer->normalize($entity, 'docgen', [
|
||||
'docgen:expects' => Person::class,
|
||||
'groups' => ['docgen:read'],
|
||||
|
@@ -54,7 +54,7 @@ class AccompanyingPeriodValidityValidator extends ConstraintValidator
|
||||
$activities = $this->activityRepository->findBy(['accompanyingPeriod' => $period]);
|
||||
|
||||
foreach ($activities as $activity) {
|
||||
$socialIssues = $activity->getSocialIssues()->toArray();
|
||||
$socialIssues = array_merge($socialIssues, $activity->getSocialIssues()->toArray());
|
||||
}
|
||||
|
||||
foreach ($period->getWorks() as $work) {
|
||||
@@ -64,7 +64,7 @@ class AccompanyingPeriodValidityValidator extends ConstraintValidator
|
||||
$socialIssuesByKey = [];
|
||||
|
||||
foreach ($socialIssues as $si) {
|
||||
$socialIssuesByKey[$si->getId()] = $si;
|
||||
$socialIssuesByKey[spl_object_hash($si)] = $si;
|
||||
}
|
||||
|
||||
$periodIssuesWithAncestors = [];
|
||||
@@ -75,7 +75,7 @@ class AccompanyingPeriodValidityValidator extends ConstraintValidator
|
||||
$periodIssuesWithAncestors,
|
||||
array_map(
|
||||
static function (SocialIssue $si) {
|
||||
return $si->getId();
|
||||
return spl_object_hash($si);
|
||||
},
|
||||
$si->getAncestors(true)
|
||||
)
|
||||
|
Reference in New Issue
Block a user