Commit 0dad1b71 authored by Stephane Bouvry's avatar Stephane Bouvry
Browse files

- FIX : Affichages des notifications d'une personne

- FIX : Génération manuelle des noifications d'une personne
parent 4c5c4006
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -305,19 +305,21 @@ class PersonController extends AbstractOscarController implements UsePersonServi

    public function notificationPersonAction()
    {
        $this->getOscarUserContextService()->check(Privileges::ACTIVITY_NOTIFICATIONS_SHOW);
        $id = $this->params()->fromRoute('id');
        $person = $this->getPersonService()->getPerson($id);
        return [
            'person' => $person,
            'notifications' => $this->getNotificationService()->getAllNotificationsPerson($person->getId())
            'notifications' => $this->getPersonService()->getNotificationService()->getAllNotificationsPerson($person->getId())
        ];
    }

    public function notificationPersonGenerateAction()
    {
        $id = $this->params()->fromRoute('id');
        $this->getOscarUserContextService()->check(Privileges::ACTIVITY_NOTIFICATIONS_GENERATE);
        $person = $this->getPersonService()->getPerson($id);
        $this->getNotificationService()->generateNotificationsPerson($person);
        $this->getPersonService()->getNotificationService()->generateNotificationsPerson($person);
        $this->redirect()->toRoute('person/notification', ['id' => $person->getId()]);
    }