diff --git a/.changes/v3.11.0.md b/.changes/v3.11.0.md new file mode 100644 index 000000000..07f4d4a5f --- /dev/null +++ b/.changes/v3.11.0.md @@ -0,0 +1,19 @@ +## v3.11.0 - 2025-04-17 +### Feature +* ([#365](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/365)) Add counters of actions and activities, with 2 boxes to (1) show the number of active actions on total actions and (2) show the number of activities in a accompanying period, and pills in menus for showing the number of active actions and the number of activities. +* ([#364](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/364)) Added a second phone number "telephone2" to the thirdParty entity. Adapted twig templates and vuejs apps to handle this phone number + + **Schema Change**: Add columns or tables +* Signature: add a button to go directly to the signature zone, even if there is only one +### Fixed +* Fixed wrong translations in the on-the-fly for creation of thirdParty +* Fixed update of phone number in on-the-fly edition of thirdParty +* Fixed closing of modal when editing thirdParty in accompanying course works +* Shorten the delay between two execution of AccompanyingPeriodStepChangeCronjob, to ensure at least one execution in a day +* ([#102](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/102)) Fix display of title in document list +* When cleaning the old stored object versions, do not throw an error if the stored object is not found on disk +* Add consistent log prefix and key to logs when stale workflows are automatically canceled +* ([#380](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/380)) Remove the "not null" validation constraint on recently added properties on HouseholdComposition + +### DX +* Add new chill-col style for displaying title and aside in a flex table diff --git a/config/packages/workflow_chill.yaml b/config/packages/workflow_chill.yaml index 434625410..2e1506da5 100644 --- a/config/packages/workflow_chill.yaml +++ b/config/packages/workflow_chill.yaml @@ -220,6 +220,7 @@ framework: - attenteModification - attenteMiseEnForme - attenteValidationMiseEnForme + - attenteSignature - attenteVisa - postSignature - attenteTraitement diff --git a/src/Bundle/ChillActivityBundle/Menu/AccompanyingCourseMenuBuilder.php b/src/Bundle/ChillActivityBundle/Menu/AccompanyingCourseMenuBuilder.php index b4990c0e3..5ed606637 100644 --- a/src/Bundle/ChillActivityBundle/Menu/AccompanyingCourseMenuBuilder.php +++ b/src/Bundle/ChillActivityBundle/Menu/AccompanyingCourseMenuBuilder.php @@ -11,6 +11,7 @@ declare(strict_types=1); namespace Chill\ActivityBundle\Menu; +use Chill\ActivityBundle\Entity\Activity; use Chill\ActivityBundle\Security\Authorization\ActivityVoter; use Chill\MainBundle\Routing\LocalMenuBuilderInterface; use Chill\PersonBundle\Entity\AccompanyingPeriod; @@ -23,22 +24,30 @@ use Symfony\Contracts\Translation\TranslatorInterface; */ class AccompanyingCourseMenuBuilder implements LocalMenuBuilderInterface { - public function __construct(protected Security $security, protected TranslatorInterface $translator) {} + public function __construct( + protected Security $security, + protected TranslatorInterface $translator, + private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry, + ) {} public function buildMenu($menuId, MenuItem $menu, array $parameters) { $period = $parameters['accompanyingCourse']; + $activities = $this->managerRegistry->getManager()->getRepository(Activity::class)->findBy( + ['accompanyingPeriod' => $period] + ); + if ( AccompanyingPeriod::STEP_DRAFT !== $period->getStep() && $this->security->isGranted(ActivityVoter::SEE, $period) ) { - $menu->addChild($this->translator->trans('Activity'), [ + $menu->addChild($this->translator->trans('Activities'), [ 'route' => 'chill_activity_activity_list', 'routeParameters' => [ 'accompanying_period_id' => $period->getId(), ], ]) - ->setExtras(['order' => 40]); + ->setExtras(['order' => 40, 'counter' => count($activities) > 0 ? count($activities) : null]); } } diff --git a/src/Bundle/ChillActivityBundle/Menu/PersonMenuBuilder.php b/src/Bundle/ChillActivityBundle/Menu/PersonMenuBuilder.php index 797d64eb6..5a13c5d65 100644 --- a/src/Bundle/ChillActivityBundle/Menu/PersonMenuBuilder.php +++ b/src/Bundle/ChillActivityBundle/Menu/PersonMenuBuilder.php @@ -11,6 +11,7 @@ declare(strict_types=1); namespace Chill\ActivityBundle\Menu; +use Chill\ActivityBundle\Repository\ActivityACLAwareRepositoryInterface; use Chill\ActivityBundle\Security\Authorization\ActivityVoter; use Chill\MainBundle\Routing\LocalMenuBuilderInterface; use Chill\PersonBundle\Entity\Person; @@ -23,13 +24,20 @@ use Symfony\Contracts\Translation\TranslatorInterface; */ final readonly class PersonMenuBuilder implements LocalMenuBuilderInterface { - public function __construct(private AuthorizationCheckerInterface $authorizationChecker, private TranslatorInterface $translator) {} + public function __construct( + private readonly ActivityACLAwareRepositoryInterface $activityACLAwareRepository, + private AuthorizationCheckerInterface $authorizationChecker, + private TranslatorInterface $translator, + ) {} public function buildMenu($menuId, MenuItem $menu, array $parameters) { /** @var Person $person */ $person = $parameters['person']; + + $count = $this->activityACLAwareRepository->countByPerson($person, ActivityVoter::SEE); + if ($this->authorizationChecker->isGranted(ActivityVoter::SEE, $person)) { $menu->addChild( $this->translator->trans('Activities'), @@ -38,7 +46,7 @@ final readonly class PersonMenuBuilder implements LocalMenuBuilderInterface 'routeParameters' => ['person_id' => $person->getId()], ] ) - ->setExtra('order', 201); + ->setExtras(['order' => 201, 'counter' => $count > 0 ? $count : null]); } } diff --git a/src/Bundle/ChillActivityBundle/Resources/public/chill/chillactivity.scss b/src/Bundle/ChillActivityBundle/Resources/public/chill/chillactivity.scss index 13de8dfc0..6658656f9 100644 --- a/src/Bundle/ChillActivityBundle/Resources/public/chill/chillactivity.scss +++ b/src/Bundle/ChillActivityBundle/Resources/public/chill/chillactivity.scss @@ -120,3 +120,34 @@ li.document-list-item { vertical-align: baseline; } } + +.badge-activity-type-simple { + @extend .badge; + display: inline-block; + margin: 0.2rem 0; + padding-left: 0; + padding-right: 0.5rem; + + border-left: 20px groove #9acd32; + border-radius: $badge-border-radius; + + color: black; + font-weight: normal; + font-size: unset; + max-width: 100%; + background-color: $gray-100; + + overflow: hidden; + text-overflow: ellipsis; + text-indent: 5px hanging; + text-align: left; + + &::before { + margin-right: 3px; + position: relative; + left: -0.5px; + font-family: ForkAwesome; + content: '\f04b'; + color: #9acd32; + } +} diff --git a/src/Bundle/ChillActivityBundle/Resources/views/GenericDoc/activity_document_row.html.twig b/src/Bundle/ChillActivityBundle/Resources/views/GenericDoc/activity_document_row.html.twig index 6ca871de1..93bb01f1e 100644 --- a/src/Bundle/ChillActivityBundle/Resources/views/GenericDoc/activity_document_row.html.twig +++ b/src/Bundle/ChillActivityBundle/Resources/views/GenericDoc/activity_document_row.html.twig @@ -13,44 +13,44 @@ {% endif %}
{{ document.template.name|localize_translatable_string }}
+{{ document.template.name|localize_translatable_string }}
+{{ document.storedObject.template.name|localize_translatable_string }}
-{{ document.storedObject.template.name|localize_translatable_string }}
+{{ $t("electronic_signature_in_progress") }}
++ {{ trans(SIGNATURES_ELECTRONIC_SIGNATURE_IN_PROGRESS) }} +
{{ $t("you_are_going_to_sign") }}
-{{ $t("are_you_sure") }}
+{{ trans(SIGNATURES_YOU_ARE_GOING_TO_SIGN) }}
+{{ trans(SIGNATURES_ARE_YOU_SURE) }}