This commit is contained in:
Julien Fastré 2023-03-28 18:12:47 +02:00
parent 561d069a3e
commit 331443ae12
Signed by: julienfastre
GPG Key ID: BDE2190974723FCB
5 changed files with 13 additions and 8 deletions

View File

@ -91,10 +91,10 @@ class Generator implements GeneratorInterface
$contextGenerationDataNormalized = array_merge( $contextGenerationDataNormalized = array_merge(
$contextGenerationDataNormalized, $contextGenerationDataNormalized,
['creator' => $creator], ['creator' => $creator],
$context instanceof DocGeneratorContextWithPublicFormInterface ? $context instanceof DocGeneratorContextWithPublicFormInterface ?
$context->contextGenerationDataDenormalize($template, $entity, $contextGenerationDataNormalized) $context->contextGenerationDataDenormalize($template, $entity, $contextGenerationDataNormalized)
: [] : []
); );
$data = $context->getData($template, $entity, $contextGenerationDataNormalized); $data = $context->getData($template, $entity, $contextGenerationDataNormalized);

View File

@ -27,7 +27,7 @@ class RequestGenerationMessage
private array $contextGenerationData; private array $contextGenerationData;
private \DateTimeImmutable $createdAt; private \DateTimeImmutable $createdAt;
public function __construct( public function __construct(
User $creator, User $creator,

View File

@ -64,7 +64,6 @@ class SocialWorkTypeFilter implements FilterInterface
$orX = $qb->expr()->orX(); $orX = $qb->expr()->orX();
foreach ($data['goal'] as $goal) { foreach ($data['goal'] as $goal) {
/** @var Goal $goal */ /** @var Goal $goal */
$andX = $qb->expr()->andX(); $andX = $qb->expr()->andX();
$andX->add($qb->expr()->eq('acpw_goal.goal', $goalId = ':goal_'.uniqid())); $andX->add($qb->expr()->eq('acpw_goal.goal', $goalId = ':goal_'.uniqid()));
@ -73,7 +72,6 @@ class SocialWorkTypeFilter implements FilterInterface
if (count($data['result']) > 0) { if (count($data['result']) > 0) {
$orXResult = $qb->expr()->orX(); $orXResult = $qb->expr()->orX();
foreach ($data['result'] as $result) { foreach ($data['result'] as $result) {
/** @var Result $result */ /** @var Result $result */
$orXResult->add($qb->expr()->isMemberOf($resultId = ':result_'.uniqid(), 'acpw_goal.results')); $orXResult->add($qb->expr()->isMemberOf($resultId = ':result_'.uniqid(), 'acpw_goal.results'));
$qb->setParameter($resultId, $result); $qb->setParameter($resultId, $result);

View File

@ -80,7 +80,7 @@ class SimilarPersonMatcher
->where('SIMILARITY(p.fullnameCanonical, UNACCENT(LOWER(:fullName))) >= :precision') ->where('SIMILARITY(p.fullnameCanonical, UNACCENT(LOWER(:fullName))) >= :precision')
->andWhere($qb->expr()->in('center_history.center', ':centers')) ->andWhere($qb->expr()->in('center_history.center', ':centers'))
->andWhere($qb->expr()->andX( ->andWhere($qb->expr()->andX(
$qb->expr()->lte('center_history.startDate', 'CURRENT_DATE()'), $qb->expr()->lte('center_history.startDate', 'CURRENT_DATE()'),
$qb->expr()->orX( $qb->expr()->orX(
$qb->expr()->isNull('center_history.endDate'), $qb->expr()->isNull('center_history.endDate'),
$qb->expr()->gt('center_history.endDate', 'CURRENT_DATE()') $qb->expr()->gt('center_history.endDate', 'CURRENT_DATE()')

View File

@ -2,6 +2,13 @@
declare(strict_types=1); declare(strict_types=1);
/*
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\Migrations\Person; namespace Chill\Migrations\Person;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;