diff --git a/CHANGELOG.md b/CHANGELOG.md index df4dab422..542c99a37 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,8 @@ and this project adheres to * [activity][export] DX/Feature: use of an `ActivityTypeRepositoryInterface` instead of the old-style EntityRepository * [person][export] Fixed: some inconsistency with date filter on accompanying courses * [person][export] Fixed: use left join for related entities in accompanying course aggregators +* [workflow] Feature: allow user to copy and send manually the access link for the workflow +* [workflow] Feature: show the email addresses that received an access link for the workflow ## Test releases @@ -32,6 +34,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 * [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) +* [social_action]: only show active objectives (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/625) * [household]: Reposition and cut button for enfant hors menage have been deleted (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/620) * [admin]: Add crud for composition type in admin (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/611) diff --git a/phpstan-deprecations.neon b/phpstan-deprecations.neon index 1f6ca4401..9a6d862b5 100644 --- a/phpstan-deprecations.neon +++ b/phpstan-deprecations.neon @@ -175,13 +175,6 @@ parameters: count: 1 path: src/Bundle/ChillActivityBundle/Form/ActivityType.php - - - message: """ - #^Call to deprecated method getReachableScopes\\(\\) of class Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\: - Use getReachableCircles$# - """ - count: 1 - path: src/Bundle/ChillActivityBundle/Repository/ActivityACLAwareRepository.php - message: """ @@ -294,14 +287,6 @@ parameters: count: 1 path: src/Bundle/ChillEventBundle/Form/Type/PickEventType.php - - - message: """ - #^Call to deprecated method getReachableScopes\\(\\) of class Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\: - Use getReachableCircles$# - """ - count: 1 - path: src/Bundle/ChillEventBundle/Search/EventSearch.php - - message: """ #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: @@ -390,13 +375,6 @@ parameters: count: 1 path: src/Bundle/ChillMainBundle/Export/ExportInterface.php - - - message: """ - #^Call to deprecated method getReachableScopes\\(\\) of class Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\: - Use getReachableCircles$# - """ - count: 1 - path: src/Bundle/ChillMainBundle/Export/ExportManager.php - message: """ @@ -754,14 +732,6 @@ parameters: count: 1 path: src/Bundle/ChillPersonBundle/Widget/PersonListWidget.php - - - message: """ - #^Call to deprecated method getReachableScopes\\(\\) of class Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\: - Use getReachableCircles$# - """ - count: 1 - path: src/Bundle/ChillReportBundle/Controller/ReportController.php - - message: """ #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: @@ -794,14 +764,6 @@ parameters: count: 1 path: src/Bundle/ChillReportBundle/Export/Filter/ReportDateFilter.php - - - message: """ - #^Call to deprecated method getReachableScopes\\(\\) of class Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\: - Use getReachableCircles$# - """ - count: 1 - path: src/Bundle/ChillReportBundle/Form/ReportType.php - - message: """ #^Parameter \\$role of method Chill\\\\ReportBundle\\\\Form\\\\ReportType\\:\\:appendScopeChoices\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: @@ -810,14 +772,6 @@ parameters: count: 1 path: src/Bundle/ChillReportBundle/Form/ReportType.php - - - message: """ - #^Call to deprecated method getReachableScopes\\(\\) of class Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\: - Use getReachableCircles$# - """ - count: 1 - path: src/Bundle/ChillReportBundle/Search/ReportSearch.php - - message: """ #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: @@ -826,13 +780,6 @@ parameters: count: 1 path: src/Bundle/ChillReportBundle/Search/ReportSearch.php - - - message: """ - #^Call to deprecated method getReachableScopes\\(\\) of class Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\: - Use getReachableCircles$# - """ - count: 2 - path: src/Bundle/ChillReportBundle/Timeline/TimelineReportProvider.php - message: """ diff --git a/src/Bundle/ChillDocGeneratorBundle/Controller/AdminDocGeneratorTemplateController.php b/src/Bundle/ChillDocGeneratorBundle/Controller/AdminDocGeneratorTemplateController.php index bb65fb5b2..c365b5e06 100644 --- a/src/Bundle/ChillDocGeneratorBundle/Controller/AdminDocGeneratorTemplateController.php +++ b/src/Bundle/ChillDocGeneratorBundle/Controller/AdminDocGeneratorTemplateController.php @@ -14,6 +14,8 @@ namespace Chill\DocGeneratorBundle\Controller; use Chill\DocGeneratorBundle\Context\ContextManager; use Chill\DocGeneratorBundle\Entity\DocGeneratorTemplate; use Chill\MainBundle\CRUD\Controller\CRUDController; +use Chill\MainBundle\Pagination\PaginatorInterface; +use Doctrine\ORM\QueryBuilder; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Routing\Annotation\Route; @@ -84,4 +86,16 @@ class AdminDocGeneratorTemplateController extends CRUDController return $entity; } + + /** + * @param QueryBuilder $query + * + * @return QueryBuilder|mixed + */ + protected function orderQuery(string $action, $query, Request $request, PaginatorInterface $paginator) + { + return $query->addSelect('JSON_EXTRACT(e.name, :lang) AS HIDDEN name_lang') + ->setParameter('lang', $request->getLocale()) + ->addOrderBy('name_lang', 'ASC'); + } } diff --git a/src/Bundle/ChillDocGeneratorBundle/Repository/DocGeneratorTemplateRepository.php b/src/Bundle/ChillDocGeneratorBundle/Repository/DocGeneratorTemplateRepository.php index 4f800fd6a..6a80c34dc 100644 --- a/src/Bundle/ChillDocGeneratorBundle/Repository/DocGeneratorTemplateRepository.php +++ b/src/Bundle/ChillDocGeneratorBundle/Repository/DocGeneratorTemplateRepository.php @@ -15,14 +15,18 @@ use Chill\DocGeneratorBundle\Entity\DocGeneratorTemplate; use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityRepository; use Doctrine\Persistence\ObjectRepository; +use Symfony\Component\HttpFoundation\RequestStack; final class DocGeneratorTemplateRepository implements ObjectRepository { private EntityRepository $repository; - public function __construct(EntityManagerInterface $entityManager) + private RequestStack $requestStack; + + public function __construct(EntityManagerInterface $entityManager, RequestStack $requestStack) { $this->repository = $entityManager->getRepository(DocGeneratorTemplate::class); + $this->requestStack = $requestStack; } public function countByEntity(string $entity): int @@ -71,7 +75,10 @@ final class DocGeneratorTemplateRepository implements ObjectRepository $builder ->where('t.entity LIKE :entity') ->andWhere($builder->expr()->eq('t.active', "'TRUE'")) - ->setParameter('entity', addslashes($entity)); + ->setParameter('entity', addslashes($entity)) + ->addSelect('JSON_EXTRACT(t.name, :lang) AS HIDDEN name_lang') + ->setParameter('lang', $this->requestStack->getCurrentRequest()->getLocale()) + ->addOrderBy('name_lang', 'ASC'); return $builder ->getQuery() diff --git a/src/Bundle/ChillDocGeneratorBundle/Resources/views/Generator/basic_form.html.twig b/src/Bundle/ChillDocGeneratorBundle/Resources/views/Generator/basic_form.html.twig index 7b24eae0d..35fa6e319 100644 --- a/src/Bundle/ChillDocGeneratorBundle/Resources/views/Generator/basic_form.html.twig +++ b/src/Bundle/ChillDocGeneratorBundle/Resources/views/Generator/basic_form.html.twig @@ -2,6 +2,14 @@ {% block title 'docgen.Generate a document'|trans %} +{% block js %} + {{ encore_entry_script_tags('mod_pickentity_type') }} +{% endblock %} + +{% block css %} + {{ encore_entry_link_tags('mod_pickentity_type') }} +{% endblock %} + {% block content %}
{{ 'workflow.An access key was also sent to those addresses'|trans }} :
+{{ 'workflow.Those users are also granted to apply a transition by using an access key'|trans }} :
{{ 'workflow.This link grant any user to apply a transition'|trans }} :
+ + {% set link = absolute_url(path('chill_main_workflow_grant_access_by_key', {'id': entity_workflow.currentStep.id, 'accessKey': entity_workflow.currentStep.accessKey})) %} + + {% endif %} + + {% endif %}{{ 'workflow.An access key was also sent to those addresses'|trans }} :
+{{ 'workflow.Those users are also granted to apply a transition by using an access key'|trans }} :
+ {{ period.location|chill_entity_render_string }} +
+