Commit fac49ada authored by Stéphane Bouvry's avatar Stéphane Bouvry
Browse files

Préparation des fichiers pour la liste des personnels

parent 4f48d8c6
Loading
Loading
Loading
Loading
+1 −1
Changes for config/autoload/global.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -137,7 +137,7 @@ return array(
                'max' => 10.0,
                'min' => 5.0,
                'days' => [
                    '1' => 7.5,
                    '1' => 7,
                    '2' => 7.5,
                    '3' => 7.5,
                    '4' => 7.5,
+5 −1
Changes for module/Oscar/config/module.config.php: 5 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -219,7 +219,11 @@ return array(

                ////////////////////////////////////////////////////////////////
                // PERSON
                ////////////////////////////////////////////////////////////////
                ///////////////////////////////////////////////////////////////
                [ 'controller' =>   'Person',
                    'action' => ['personnel'],
                    'roles' => ['user']
                ],
                [ 'controller' =>   'Person',
                    'action' => ['search', 'synchronize'],
                    'privileges' => \Oscar\Provider\Privileges::PERSON_INDEX
+6 −0
Changes for module/Oscar/config/routes.yml: 6 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -428,6 +428,12 @@ person:
            action: index
    may_terminate: true
    child_routes:
        personnel:
            type: segment
            options:
                route: '/personnel'
                defaults:
                    action: personnel
        synchronize:
            type: segment
            options:
+8 −0
Changes for module/Oscar/src/Oscar/Controller/PersonController.php: 8 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -50,6 +50,14 @@ class PersonController extends AbstractOscarController
        $this->getResponseDeprecated();
    }

    public function personnelAction(){
        $datas = [];



        return $datas;
    }

    public function grantAction()
    {
        $this->getOscarUserContext()->check(Privileges::DROIT_PRIVILEGE_VISUALISATION);
+5 −5
Changes for module/Oscar/src/Oscar/Service/TimesheetService.php: 5 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -1587,11 +1587,11 @@ class TimesheetService implements ServiceLocatorAwareInterface, EntityManagerAwa
                $errors[] = "- Les heures déclarées le jour " . $dayData['i'] . " dépassent la durée autorisée !";
            }

            if ($duration < $min) {
                $this->getLogger()->debug("Durée de la journée " . $day . " : " . $duration . '(' . $min . ', ' . $max . ')');
                $this->getLogger()->debug(print_r($dayData, true));
                $errors[] = "- Les heures déclarées (" . $duration . ") le jour " . $dayData['i'] . " sont en deça la durée minimum (" . $min . ") !";
            }
//            if ($duration < $min) {
//                $this->getLogger()->debug("Durée de la journée " . $day . " : " . $duration . '(' . $min . ', ' . $max . ')');
//                $this->getLogger()->debug(print_r($dayData, true));
//                $errors[] = "- Les heures déclarées (" . $duration . ") le jour " . $dayData['i'] . " sont en deça la durée minimum (" . $min . ") !";
//            }


            if (!array_key_exists($week, $weeksMaxCount))
Loading