mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
Merge branch 'rector/rules-up-to-php82' into rector/rules-symfony
This commit is contained in:
@@ -132,7 +132,7 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface, \Strin
|
||||
private ?string $canonicalized = '';
|
||||
|
||||
/**
|
||||
* @var ThirdPartyCategory
|
||||
* @var Collection<ThirdPartyCategory>
|
||||
* @ORM\ManyToMany(targetEntity="Chill\ThirdPartyBundle\Entity\ThirdPartyCategory")
|
||||
* @ORM\JoinTable(name="chill_3party.thirdparty_category",
|
||||
* joinColumns={@ORM\JoinColumn(name="thirdparty_id", referencedColumnName="id")},
|
||||
@@ -143,6 +143,7 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface, \Strin
|
||||
private Collection $categories;
|
||||
|
||||
/**
|
||||
* @var Collection<Center>
|
||||
* @ORM\ManyToMany(targetEntity="\Chill\MainBundle\Entity\Center")
|
||||
* @ORM\JoinTable(name="chill_3party.party_center")
|
||||
*/
|
||||
@@ -154,7 +155,7 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface, \Strin
|
||||
* @ORM\OneToMany(targetEntity="Chill\ThirdPartyBundle\Entity\ThirdParty", mappedBy="parent",
|
||||
* cascade={"persist"}, orphanRemoval=true)
|
||||
*
|
||||
* @var Collection<(int|string), ThirdParty>
|
||||
* @var Collection<ThirdParty>
|
||||
* @Assert\Valid(traverse=true)
|
||||
*/
|
||||
private Collection $children;
|
||||
|
@@ -21,7 +21,7 @@ use DomainException;
|
||||
|
||||
use function array_key_exists;
|
||||
|
||||
final class ThirdPartyRepository implements ObjectRepository
|
||||
class ThirdPartyRepository implements ObjectRepository
|
||||
{
|
||||
private readonly EntityRepository $repository;
|
||||
|
||||
|
@@ -68,12 +68,9 @@ class ThirdPartyApiSearch implements SearchApiInterface
|
||||
->setSelectKey('tparty')
|
||||
->setSelectJsonbMetadata("jsonb_build_object('id', tparty.id)")
|
||||
->setFromClause('chill_3party.third_party AS tparty
|
||||
LEFT JOIN chill_main_address cma ON cma.id = tparty.address_id
|
||||
LEFT JOIN chill_main_postal_code cmpc ON cma.postcode_id = cmpc.id
|
||||
LEFT JOIN chill_3party.third_party AS parent ON tparty.parent_id = parent.id
|
||||
LEFT JOIN chill_main_address cma_p ON parent.address_id = cma_p.id
|
||||
LEFT JOIN chill_main_postal_code cmpc_p ON cma_p.postcode_id = cmpc.id')
|
||||
->andWhereClause('tparty.active IS TRUE');
|
||||
LEFT JOIN chill_main_address cma ON cma.id = COALESCE(parent.address_id, tparty.address_id)
|
||||
LEFT JOIN chill_main_postal_code cmpc ON cma.postcode_id = cmpc.id');
|
||||
|
||||
$strs = explode(' ', $pattern);
|
||||
$wheres = [];
|
||||
@@ -99,9 +96,8 @@ class ThirdPartyApiSearch implements SearchApiInterface
|
||||
(parent.canonicalized LIKE '%s' || LOWER(UNACCENT(?)) || '%')::int
|
||||
) + " .
|
||||
// take postcode label into account, but lower than the canonicalized field
|
||||
"COALESCE((LOWER(UNACCENT(cmpc.label)) LIKE '%' || LOWER(UNACCENT(?)) || '%')::int * 0.3, 0) + " .
|
||||
"COALESCE((LOWER(UNACCENT(cmpc_p.label)) LIKE '%' || LOWER(UNACCENT(?)) || '%')::int * 0.3, 0)";
|
||||
$pertinenceArgs[] = [$str, $str, $str, $str, $str, $str];
|
||||
"COALESCE((LOWER(UNACCENT(cmpc.label)) LIKE '%' || LOWER(UNACCENT(?)) || '%')::int * 0.3, 0)";
|
||||
$pertinenceArgs[] = [$str, $str, $str, $str, $str];
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -75,6 +75,7 @@ No email given: Aucune adresse courriel renseignée
|
||||
The party is visible in those centers: Le tiers est visible dans ces centres
|
||||
The party is not visible in any center: Le tiers n'est associé à aucun centre
|
||||
No third parties: Aucun tiers
|
||||
Any third party selected: Aucun tiers sélectionné
|
||||
|
||||
Thirdparty handling: Tiers traitant
|
||||
Thirdparty workers: Tiers intervenants
|
||||
@@ -112,6 +113,8 @@ crud:
|
||||
docgen:
|
||||
A context for person with a third party (for sending mail): Un contexte d'une personne avec un tiers (pour envoyer un courrier à ce tiers, par exemple)
|
||||
Person with third party: Personne avec choix d'un tiers
|
||||
Ask for thirdParty: Demander à l'utilisateur de préciser un tiers
|
||||
thirdParty label: Libellé du tiers
|
||||
|
||||
# exports
|
||||
export:
|
||||
|
Reference in New Issue
Block a user