Compare commits

..

2 Commits

11 changed files with 244 additions and 283 deletions

View File

@@ -1,6 +0,0 @@
kind: Feature
body: Add a counter for invitations awaiting reply
time: 2025-11-25T16:58:11.780678466+01:00
custom:
Issue: "459"
SchemaChange: No schema change

View File

@@ -1,7 +0,0 @@
kind: Fixed
body: |
Associate activity's creator as a participant by default, and retro-actively append the creator to each activity
time: 2025-11-18T14:05:59.904993123+01:00
custom:
Issue: "466"
SchemaChange: Add columns or tables

View File

@@ -1,6 +0,0 @@
kind: UX
body: Alphabetically order userJobs and mainLocations within user creation form
time: 2025-11-19T15:37:06.393470745+01:00
custom:
Issue: "470"
SchemaChange: No schema change

View File

@@ -1,6 +0,0 @@
kind: UX
body: Change position and color of confirm parcours button
time: 2025-11-24T15:11:15.960279853+01:00
custom:
Issue: "437"
SchemaChange: No schema change

10
.changes/v4.8.2.md Normal file
View File

@@ -0,0 +1,10 @@
## v4.8.2 - 2025-11-26
### Fixed
* ([#466](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/466)) Associate activity's creator as a participant by default, and retro-actively append the creator to each activity
**Schema Change**: Add columns or tables
* Fix template parameter for update_multiple route on event participations
### UX
* ([#470](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/470)) Alphabetically order userJobs and mainLocations within user creation form
* ([#437](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/437)) Change position and color of confirm parcours button

View File

@@ -6,6 +6,15 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
and is generated by [Changie](https://github.com/miniscruff/changie).
## v4.8.2 - 2025-11-26
### Fixed
* ([#466](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/466)) Associate activity's creator as a participant by default, and retro-actively append the creator to each activity
**Schema Change**: Add columns or tables
* Fix template parameter for update_multiple route on event participations
### UX
* ([#470](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/470)) Alphabetically order userJobs and mainLocations within user creation form
* ([#437](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/437)) Change position and color of confirm parcours button
## v4.8.1 - 2025-11-20
### Fixed
* Insert name of file as the document title when uploading

View File

@@ -11,7 +11,6 @@ declare(strict_types=1);
namespace Chill\CalendarBundle\Menu;
use Chill\CalendarBundle\Repository\InviteRepository;
use Chill\MainBundle\Routing\LocalMenuBuilderInterface;
use Knp\Menu\MenuItem;
use Symfony\Component\Security\Core\Security;
@@ -19,12 +18,10 @@ use Symfony\Contracts\Translation\TranslatorInterface;
class UserMenuBuilder implements LocalMenuBuilderInterface
{
public function __construct(private readonly Security $security, public TranslatorInterface $translator, private readonly InviteRepository $inviteRepository) {}
public function __construct(private readonly Security $security, public TranslatorInterface $translator) {}
public function buildMenu($menuId, MenuItem $menu, array $parameters)
{
$invitationsPending = $this->inviteRepository->countPendingInvitesByUser($this->security->getUser());
if ($this->security->isGranted('ROLE_USER')) {
$menu->addChild('My calendar list', [
'route' => 'chill_calendar_calendar_list_my',
@@ -33,14 +30,12 @@ class UserMenuBuilder implements LocalMenuBuilderInterface
'order' => 8,
'icon' => 'tasks',
]);
$menu->addChild(
$this->translator->trans('invite.menu with counter', ['nb' => $invitationsPending]),
['route' => 'chill_calendar_invitations_list_my']
)
$menu->addChild('invite.list.title', [
'route' => 'chill_calendar_invitations_list_my',
])
->setExtras([
'order' => 9,
'icon' => 'tasks',
'counter' => 0 < $invitationsPending ? $invitationsPending : null,
]);
}
}

View File

@@ -75,25 +75,6 @@ class InviteRepository implements ObjectRepository
->getSingleScalarResult();
}
public function countPendingInvitesByUser(User $user): int
{
$qb = $this->entityRepository->createQueryBuilder('i');
$qb->select('COUNT(i)')
->where(
$qb->expr()->andX(
$qb->expr()->eq('i.user', ':user'),
$qb->expr()->eq('i.status', ':status')
)
)
->setParameters([
'user' => $user,
'status' => Invite::PENDING,
]);
return $qb->getQuery()->getSingleScalarResult();
}
public function buildAcceptedInviteByUserAndDateRangeQuery(User $user, \DateTimeImmutable $from, \DateTimeImmutable $to)
{
$qb = $this->entityRepository->createQueryBuilder('i');

View File

@@ -6,11 +6,3 @@ chill_calendar:
few {# rendez-vous sont ignorés par le filtre de date. Modifiez le filtre de date pour les voir apparaitre.}
other {# rendez-vous sont ignorés par le filtre de date. Modifiez le filtre de date pour les voir apparaitre.}
}
invite:
menu with counter: >-
{nb, plural,
=0 {Mes invitations}
one {# invitation}
few {# invitations}
other {# invitations}
}

View File

@@ -96,7 +96,6 @@ invite:
list:
none: Il n'y aucun invitation
title: Mes invitations
number of invitations waiting: Invitations en attente
# exports
Exports of calendar: Exports des rendez-vous

View File

@@ -486,7 +486,7 @@ final class ParticipationController extends AbstractController
return $this->redirectToRoute(
'chill_event__event_show',
['event_id' => $event->getId()]
['id' => $event->getId()]
);
}