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

Structure pour la vue récap des données PCRU

parent 0dc298a9
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -116,7 +116,7 @@ return array(
                [   'controller' =>   'Activity',
                    'action' => ['show', 'show2', 'edit', 'new', 'duplicate','persons', 'organizations', 'makeProject',
                        'delete', 'visualization', 'documentsJson', 'activitiesOrganizations', 'changeProject', 'jsonApi',
                        'notifications', 'generateNotifications', 'generatedDocument', 'pcru', 'requestFor', 'adminDemande', 'api', 'gant', 'estimatedSpent','estimatedSpentExport', 'spentList', 'newInStructure', 'spentSynthesisActivity', 'pcruInfos', "pcru"],
                        'notifications', 'generateNotifications', 'generatedDocument', 'pcru', 'requestFor', 'adminDemande', 'api', 'gant', 'estimatedSpent','estimatedSpentExport', 'spentList', 'newInStructure', 'spentSynthesisActivity', 'pcru', 'pcruInfos', "pcruList"],

                    'roles' => ['user'],
                ],
+18 −9
Original line number Diff line number Diff line
@@ -843,19 +843,19 @@ contract:
                defaults:
                    action: debug

        api:
        advancedsearch:
            type: segment
            options:
                route: /api
                route: /advancedsearch
                defaults:
                    action: api
                    action: advancedSearch

        gant:
        api:
            type: segment
            options:
                route: /gant
                route: /api
                defaults:
                    action: gant
                    action: api

        apiui:
            type: segment
@@ -864,12 +864,21 @@ contract:
                defaults:
                    action: apiUi

        advancedsearch:
        pcru-list:
            type: segment
            options:
                route: /advancedsearch
                route: /transmission-pcru
                defaults:
                    action: advancedSearch
                    action: pcruList

        gant:
            type: segment
            options:
                route: /gant
                defaults:
                    action: gant


        orphans:
            type: segment
            options:
+17 −2
Original line number Diff line number Diff line
@@ -61,6 +61,8 @@ use Oscar\Traits\UseActivityLogService;
use Oscar\Traits\UseActivityLogServiceTrait;
use Oscar\Traits\UseNotificationService;
use Oscar\Traits\UseNotificationServiceTrait;
use Oscar\Traits\UsePCRUService;
use Oscar\Traits\UsePCRUServiceTrait;
use Oscar\Traits\UsePersonService;
use Oscar\Traits\UsePersonServiceTrait;
use Oscar\Traits\UseProjectService;
@@ -85,10 +87,10 @@ use Zend\View\Renderer\PhpRenderer;
 *
 * @package Oscar\Controller
 */
class ProjectGrantController extends AbstractOscarController implements UseNotificationService, UsePersonService, UseServiceContainer, UseProjectService, UseSpentService
class ProjectGrantController extends AbstractOscarController implements UseNotificationService, UsePersonService, UseServiceContainer, UseProjectService, UseSpentService, UsePCRUService
{

    use UseNotificationServiceTrait, UsePersonServiceTrait, UseServiceContainerTrait, UseProjectServiceTrait, UseSpentServiceTrait;
    use UseNotificationServiceTrait, UsePersonServiceTrait, UseServiceContainerTrait, UseProjectServiceTrait, UseSpentServiceTrait, UsePCRUServiceTrait;

    /** @var ActivityRequestService */
    private $activityRequestService;
@@ -2795,6 +2797,19 @@ class ProjectGrantController extends AbstractOscarController implements UseNotif
        die("NOT IMPLEMENTED");
    }

    /**
     * Affiche la liste des activités soumises à un processus PCRU.
     *
     * @return array
     */
    public function pcruListAction()
    {
        $pcruInfos = $this->getProjectGrantService()->getPCRUService()->getPcruInfos();
        return [
            'pcruInfos' => $pcruInfos
        ];
    }

    public function pcruInfosAction()
    {
        if( !$this->getOscarConfigurationService()->getPcruEnabled() ){
+1 −0
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@ use Oscar\Utils\DateTimeUtils;
 * Class ActivityPcruInfos
 * @package Oscar\Entity
 * @ORM\Entity
 * @ORM\Entity(repositoryClass="Oscar\Entity\ActivityRepository")
 */
class ActivityPcruInfos
{
+9 −0
Original line number Diff line number Diff line
<?php
namespace Oscar\Entity;

use Doctrine\ORM\EntityRepository;

class ActivityPcruInfosRepository extends EntityRepository
{

}
 No newline at end of file
Loading