mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
merge master into branch
This commit is contained in:
commit
e153fa34e9
@ -34,6 +34,10 @@ and this project adheres to
|
|||||||
* [person] email added to twig personRenderbox (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/490)
|
* [person] email added to twig personRenderbox (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/490)
|
||||||
* [person] Add link to current household in person banner (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/484)
|
* [person] Add link to current household in person banner (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/484)
|
||||||
* [address] person badge in address history changed to open OnTheFly with all person info (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/489)
|
* [address] person badge in address history changed to open OnTheFly with all person info (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/489)
|
||||||
|
* [person] Change 'personne' with 'usager' and '&' with 'ET' (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/499)
|
||||||
|
* [thirdparty] Add parameter condition to display centers or not (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/500)
|
||||||
|
* [phonenumber] Remove placeholder in phonenumber field (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/496)
|
||||||
|
* [contact] add contact button color changed plus the pipe at the side removed (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/506)
|
||||||
|
|
||||||
## Test releases
|
## Test releases
|
||||||
|
|
||||||
|
@ -350,11 +350,6 @@ parameters:
|
|||||||
count: 6
|
count: 6
|
||||||
path: src/Bundle/ChillPersonBundle/Command/ImportPeopleFromCSVCommand.php
|
path: src/Bundle/ChillPersonBundle/Command/ImportPeopleFromCSVCommand.php
|
||||||
|
|
||||||
-
|
|
||||||
message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#"
|
|
||||||
count: 2
|
|
||||||
path: src/Bundle/ChillPersonBundle/Entity/PersonPhone.php
|
|
||||||
|
|
||||||
-
|
-
|
||||||
message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#"
|
message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#"
|
||||||
count: 1
|
count: 1
|
||||||
|
@ -192,7 +192,7 @@ class EntityWorkflowStep
|
|||||||
* You should **not** rely on this method to get all users which are able to
|
* You should **not** rely on this method to get all users which are able to
|
||||||
* apply a transition on this step. Use @see{EntityWorkflowStep::getAllDestUser} instead.
|
* apply a transition on this step. Use @see{EntityWorkflowStep::getAllDestUser} instead.
|
||||||
*/
|
*/
|
||||||
public function getDestUser(): collection
|
public function getDestUser(): Collection
|
||||||
{
|
{
|
||||||
return $this->destUser;
|
return $this->destUser;
|
||||||
}
|
}
|
||||||
|
@ -16,9 +16,7 @@ use libphonenumber\PhoneNumberUtil;
|
|||||||
use Misd\PhoneNumberBundle\Form\Type\PhoneNumberType;
|
use Misd\PhoneNumberBundle\Form\Type\PhoneNumberType;
|
||||||
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
|
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
|
||||||
use Symfony\Component\Form\AbstractType;
|
use Symfony\Component\Form\AbstractType;
|
||||||
use Symfony\Component\OptionsResolver\Options;
|
|
||||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||||
use function array_key_exists;
|
|
||||||
|
|
||||||
class ChillPhoneNumberType extends AbstractType
|
class ChillPhoneNumberType extends AbstractType
|
||||||
{
|
{
|
||||||
@ -37,21 +35,7 @@ class ChillPhoneNumberType extends AbstractType
|
|||||||
$resolver
|
$resolver
|
||||||
->setDefault('default_region', $this->defaultCarrierCode)
|
->setDefault('default_region', $this->defaultCarrierCode)
|
||||||
->setDefault('format', PhoneNumberFormat::NATIONAL)
|
->setDefault('format', PhoneNumberFormat::NATIONAL)
|
||||||
->setDefault('type', \libphonenumber\PhoneNumberType::FIXED_LINE_OR_MOBILE)
|
->setDefault('type', \libphonenumber\PhoneNumberType::FIXED_LINE_OR_MOBILE);
|
||||||
->setNormalizer('attr', function (Options $options, $value) {
|
|
||||||
if (array_key_exists('placeholder', $value)) {
|
|
||||||
return $value;
|
|
||||||
}
|
|
||||||
|
|
||||||
$examplePhoneNumber = $this->phoneNumberUtil->getExampleNumberForType($this->defaultCarrierCode, $options['type']);
|
|
||||||
|
|
||||||
return array_merge(
|
|
||||||
$value,
|
|
||||||
[
|
|
||||||
'placeholder' => PhoneNumberUtil::getInstance()->format($examplePhoneNumber, $options['format']),
|
|
||||||
]
|
|
||||||
);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getParent()
|
public function getParent()
|
||||||
|
@ -25,7 +25,7 @@ $chill-theme-buttons: (
|
|||||||
"notify": $chill-blue,
|
"notify": $chill-blue,
|
||||||
"search": $gray-300,
|
"search": $gray-300,
|
||||||
"unlink": $chill-red,
|
"unlink": $chill-red,
|
||||||
"tpchild": $chill-pink,
|
"tpchild": $chill-green,
|
||||||
);
|
);
|
||||||
|
|
||||||
@each $button, $color in $chill-theme-buttons {
|
@each $button, $color in $chill-theme-buttons {
|
||||||
|
@ -9,6 +9,12 @@
|
|||||||
<span class="item-key">{{ 'Le'|trans ~ ' : ' }}</span>
|
<span class="item-key">{{ 'Le'|trans ~ ' : ' }}</span>
|
||||||
<b>{{ step.previous.transitionAt|format_datetime('short', 'short') }}</b>
|
<b>{{ step.previous.transitionAt|format_datetime('short', 'short') }}</b>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<span class="item-key">{{ 'workflow.For'|trans ~ ' : ' }}</span>
|
||||||
|
<b>
|
||||||
|
{% for d in step.destUser %}{{ d|chill_entity_render_string }}{% if not loop.last %}, {% endif %}{% endfor %}
|
||||||
|
</b>
|
||||||
|
</li>
|
||||||
{% else %}
|
{% else %}
|
||||||
<li>
|
<li>
|
||||||
<span class="item-key">{{ 'workflow.Created by'|trans ~ ' : ' }}</span>
|
<span class="item-key">{{ 'workflow.Created by'|trans ~ ' : ' }}</span>
|
||||||
|
@ -113,6 +113,7 @@ class AddressNormalizer implements ContextAwareNormalizerInterface, NormalizerAw
|
|||||||
[
|
[
|
||||||
'postcode' => $helper->normalize(self::NULL_POSTCODE_COUNTRY, $format, $context),
|
'postcode' => $helper->normalize(self::NULL_POSTCODE_COUNTRY, $format, $context),
|
||||||
'country' => $helper->normalize(self::NULL_POSTCODE_COUNTRY, $format, $context),
|
'country' => $helper->normalize(self::NULL_POSTCODE_COUNTRY, $format, $context),
|
||||||
|
'lines' => [],
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -413,6 +413,7 @@ workflow:
|
|||||||
Previous workflow without reaction help: Liste des workflows où vous avez été cité comme pouvant réagir à une étape, mais où un autre utilisateur a exécuté une action avant vous.
|
Previous workflow without reaction help: Liste des workflows où vous avez été cité comme pouvant réagir à une étape, mais où un autre utilisateur a exécuté une action avant vous.
|
||||||
Previous transitionned: Anciens workflows
|
Previous transitionned: Anciens workflows
|
||||||
Previous workflow transitionned help: Workflows où vous avez exécuté une action.
|
Previous workflow transitionned help: Workflows où vous avez exécuté une action.
|
||||||
|
For: Pour
|
||||||
|
|
||||||
|
|
||||||
Subscribe final: Recevoir une notification à l'étape finale
|
Subscribe final: Recevoir une notification à l'étape finale
|
||||||
|
@ -117,12 +117,15 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="item-row separator">
|
<div class="item-row separator">
|
||||||
<div class="item-col item-meta">
|
{% set notif_counter = chill_count_notifications('Chill\\PersonBundle\\Entity\\AccompanyingPeriod', period.id) %}
|
||||||
{% set notif_counter = chill_count_notifications('Chill\\PersonBundle\\Entity\\AccompanyingPeriod', period.id) %}
|
{% if notif_counter.total > 0 %}
|
||||||
{% if notif_counter.total > 0 %}
|
<div class="item-col item-meta">
|
||||||
{{ chill_counter_notifications('Chill\\PersonBundle\\Entity\\AccompanyingPeriod', period.id) }}
|
{{ chill_counter_notifications('Chill\\PersonBundle\\Entity\\AccompanyingPeriod', period.id) }}
|
||||||
{% endif %}
|
</div>
|
||||||
</div>
|
{% endif %}
|
||||||
|
{% if itemMeta is defined %}
|
||||||
|
{{ itemMeta }}
|
||||||
|
{% endif %}
|
||||||
<div class="item-col">
|
<div class="item-col">
|
||||||
{% if recordAction is defined %}
|
{% if recordAction is defined %}
|
||||||
<ul class="record_actions">
|
<ul class="record_actions">
|
||||||
|
@ -167,7 +167,7 @@
|
|||||||
<span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>
|
<span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if person.email is not null %}
|
{% if person.email is not empty %}
|
||||||
<li>
|
<li>
|
||||||
<i class="fa fa-li fa-envelope-o"></i><a href="{{ 'mailto:' ~ person.email }}">
|
<i class="fa fa-li fa-envelope-o"></i><a href="{{ 'mailto:' ~ person.email }}">
|
||||||
{{ person.email }}
|
{{ person.email }}
|
||||||
|
@ -179,7 +179,8 @@ class AccompanyingPeriodWorkEvaluationContext implements
|
|||||||
$doc = new AccompanyingPeriodWorkEvaluationDocument();
|
$doc = new AccompanyingPeriodWorkEvaluationDocument();
|
||||||
$doc->setStoredObject($storedObject)
|
$doc->setStoredObject($storedObject)
|
||||||
->setAccompanyingPeriodWorkEvaluation($entity)
|
->setAccompanyingPeriodWorkEvaluation($entity)
|
||||||
->setTemplate($template);
|
->setTemplate($template)
|
||||||
|
->setTitle($this->translatableStringHelper->localize($template->getName()));
|
||||||
$this->em->persist($doc);
|
$this->em->persist($doc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -72,6 +72,7 @@ class AccompanyingPeriodWorkEvaluationWorkflowHandler implements EntityWorkflowH
|
|||||||
*/
|
*/
|
||||||
public function getRelatedObjects(object $object): array
|
public function getRelatedObjects(object $object): array
|
||||||
{
|
{
|
||||||
|
$relateds = [];
|
||||||
$relateds[] = ['entityClass' => AccompanyingPeriodWorkEvaluation::class, 'entityId' => $object->getId()];
|
$relateds[] = ['entityClass' => AccompanyingPeriodWorkEvaluation::class, 'entityId' => $object->getId()];
|
||||||
|
|
||||||
foreach ($object->getDocuments() as $doc) {
|
foreach ($object->getDocuments() as $doc) {
|
||||||
|
@ -71,6 +71,7 @@ class AccompanyingPeriodWorkWorkflowHandler implements EntityWorkflowHandlerInte
|
|||||||
*/
|
*/
|
||||||
public function getRelatedObjects(object $object): array
|
public function getRelatedObjects(object $object): array
|
||||||
{
|
{
|
||||||
|
$relateds = [];
|
||||||
$relateds[] = ['entityClass' => AccompanyingPeriodWork::class, 'entityId' => $object->getId()];
|
$relateds[] = ['entityClass' => AccompanyingPeriodWork::class, 'entityId' => $object->getId()];
|
||||||
|
|
||||||
foreach ($object->getAccompanyingPeriodWorkEvaluations() as $evaluation) {
|
foreach ($object->getAccompanyingPeriodWorkEvaluations() as $evaluation) {
|
||||||
|
@ -124,8 +124,8 @@ address_country_code: Code pays
|
|||||||
|
|
||||||
'Alreay existing person': 'Dossiers déjà encodés'
|
'Alreay existing person': 'Dossiers déjà encodés'
|
||||||
'Add the person': 'Ajouter la personne'
|
'Add the person': 'Ajouter la personne'
|
||||||
'Add the person and create an accompanying period': "Créer la personne & créer une période d'accompagnement"
|
'Add the person and create an accompanying period': "Créer l'usager ET créer une période d'accompagnement"
|
||||||
'Add the person and create a household': "Créer la personne & créer un ménage"
|
'Add the person and create a household': "Créer l'usager' ET créer un ménage"
|
||||||
Show person: Voir le dossier de la personne
|
Show person: Voir le dossier de la personne
|
||||||
'Confirm the creation': 'Confirmer la création'
|
'Confirm the creation': 'Confirmer la création'
|
||||||
'You will create this person': 'Vous allez créer le dossier suivant'
|
'You will create this person': 'Vous allez créer le dossier suivant'
|
||||||
|
@ -20,6 +20,7 @@ use Chill\ThirdPartyBundle\Entity\ThirdParty;
|
|||||||
use Chill\ThirdPartyBundle\Repository\ThirdPartyACLAwareRepositoryInterface;
|
use Chill\ThirdPartyBundle\Repository\ThirdPartyACLAwareRepositoryInterface;
|
||||||
use Chill\ThirdPartyBundle\Security\Voter\ThirdPartyVoter;
|
use Chill\ThirdPartyBundle\Security\Voter\ThirdPartyVoter;
|
||||||
use LogicException;
|
use LogicException;
|
||||||
|
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
|
||||||
use Symfony\Component\Form\FormInterface;
|
use Symfony\Component\Form\FormInterface;
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
use Symfony\Component\HttpFoundation\RequestStack;
|
use Symfony\Component\HttpFoundation\RequestStack;
|
||||||
@ -31,37 +32,39 @@ use function array_merge;
|
|||||||
|
|
||||||
final class ThirdPartyController extends CRUDController
|
final class ThirdPartyController extends CRUDController
|
||||||
{
|
{
|
||||||
/**
|
protected AuthorizationHelper $authorizationHelper;
|
||||||
* @var AuthorizationHelper
|
|
||||||
*/
|
|
||||||
protected $authorizationHelper;
|
|
||||||
|
|
||||||
/**
|
protected PaginatorFactory $paginatorFactory;
|
||||||
* @var PaginatorFactory
|
|
||||||
*/
|
|
||||||
protected $paginatorFactory;
|
|
||||||
|
|
||||||
protected RequestStack $requestStack;
|
protected RequestStack $requestStack;
|
||||||
|
|
||||||
protected ThirdPartyACLAwareRepositoryInterface $thirdPartyACLAwareRepository;
|
protected ThirdPartyACLAwareRepositoryInterface $thirdPartyACLAwareRepository;
|
||||||
|
|
||||||
/**
|
protected TranslatorInterface $translator;
|
||||||
* @var TranslatorInterface
|
|
||||||
*/
|
private bool $askCenter;
|
||||||
protected $translator;
|
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
AuthorizationHelper $authorizationHelper,
|
AuthorizationHelper $authorizationHelper,
|
||||||
TranslatorInterface $translator,
|
TranslatorInterface $translator,
|
||||||
PaginatorFactory $paginatorFactory,
|
PaginatorFactory $paginatorFactory,
|
||||||
RequestStack $requestStack,
|
RequestStack $requestStack,
|
||||||
ThirdPartyACLAwareRepositoryInterface $thirdPartyACLAwareRepository
|
ThirdPartyACLAwareRepositoryInterface $thirdPartyACLAwareRepository,
|
||||||
|
ParameterBagInterface $parameterBag
|
||||||
) {
|
) {
|
||||||
$this->authorizationHelper = $authorizationHelper;
|
$this->authorizationHelper = $authorizationHelper;
|
||||||
$this->translator = $translator;
|
$this->translator = $translator;
|
||||||
$this->paginatorFactory = $paginatorFactory;
|
$this->paginatorFactory = $paginatorFactory;
|
||||||
$this->requestStack = $requestStack;
|
$this->requestStack = $requestStack;
|
||||||
$this->thirdPartyACLAwareRepository = $thirdPartyACLAwareRepository;
|
$this->thirdPartyACLAwareRepository = $thirdPartyACLAwareRepository;
|
||||||
|
$this->askCenter = $parameterBag->get('chill_main')['acl']['form_show_centers'];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function generateTemplateParameter(string $action, $entity, Request $request, array $defaultTemplateParameters = [])
|
||||||
|
{
|
||||||
|
$defaultTemplateParameters['askCenter'] = $this->askCenter;
|
||||||
|
|
||||||
|
return $defaultTemplateParameters;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function buildFilterOrderHelper(string $action, Request $request): ?FilterOrderHelper
|
protected function buildFilterOrderHelper(string $action, Request $request): ?FilterOrderHelper
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
<ul class="list-content fa-ul">
|
<ul class="list-content fa-ul">
|
||||||
<li v-if="getProfession.length > 0">
|
<li v-if="getProfession.length > 0">
|
||||||
<i class="fa fa-li fa-id-card"></i>
|
<i class="fa fa-li fa-id-card"></i>
|
||||||
<p><span v-for="p in getProfession" :key="p" class="list-item">{{ p[0].toUpperCase() + p.slice(1).toLowerCase() }}</span></p>
|
<p><span v-for="p in getProfession" :key="p" class="list-item list-professions">{{ p[0].toUpperCase() + p.slice(1).toLowerCase() }}</span></p>
|
||||||
</li>
|
</li>
|
||||||
<li v-if="hasParent">
|
<li v-if="hasParent">
|
||||||
<i class="fa fa-li fa-hand-o-right"></i>
|
<i class="fa fa-li fa-hand-o-right"></i>
|
||||||
@ -165,7 +165,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-item {
|
.list-professions {
|
||||||
&::after {
|
&::after {
|
||||||
content: " | ";
|
content: " | ";
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
<h1>
|
<h1>
|
||||||
{{ title_ }}
|
{{ title_ }}
|
||||||
<span class="badge bg-{{ thirdParty.active ? 'success' : 'danger' }} float-end"
|
<span class="badge bg-{{ thirdParty.active ? 'success' : 'danger' }} float-end"
|
||||||
title="{{ (thirdParty.active ? 'shown to users' : 'not shown to users')|trans }}">
|
title="{{ (thirdParty.active ? 'shown to users' : 'not shown to users')|trans }}">
|
||||||
{{ (thirdParty.active ? 'Active' : 'Inactive')|trans }}
|
{{ (thirdParty.active ? 'Active' : 'Inactive')|trans }}
|
||||||
</span>
|
</span>
|
||||||
</h1>
|
</h1>
|
||||||
@ -123,19 +123,20 @@
|
|||||||
</dd>
|
</dd>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<dt>{{ 'Centers'|trans }}</dt>
|
{% if askCenter %}
|
||||||
<dd>
|
<dt>{{ 'Centers'|trans }}</dt>
|
||||||
{% set centers = thirdParty|chill_resolve_center %}
|
<dd>
|
||||||
{% if centers is iterable %}
|
{% set centers = thirdParty|chill_resolve_center %}
|
||||||
{{ 'The party is visible in those centers'|trans }} :
|
{% if centers is iterable %}
|
||||||
{{ centers|join(', ') }}
|
{{ 'The party is visible in those centers'|trans }} :
|
||||||
{% elseif centers is null %}
|
{{ centers|join(', ') }}
|
||||||
{{ 'The party is not visible in any center'|trans }}
|
{% elseif centers is null %}
|
||||||
{% else %}
|
{{ 'The party is not visible in any center'|trans }}
|
||||||
{{ 'The party is visible in those centers'|trans }} : {{ centers }}
|
{% else %}
|
||||||
{% endif %}
|
{{ 'The party is visible in those centers'|trans }} : {{ centers }}
|
||||||
</dd>
|
{% endif %}
|
||||||
|
</dd>
|
||||||
|
{% endif %}
|
||||||
</dl>
|
</dl>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block content_form_actions_delete %}{% endblock %}
|
{% block content_form_actions_delete %}{% endblock %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user