Loading module/Oscar/src/Oscar/Controller/EnrollController.php +12 −2 Original line number Diff line number Diff line Loading @@ -89,6 +89,15 @@ class EnrollController extends AbstractOscarController throw new OscarException("Erreur, données manquantes, veuillez reessayer"); } switch ($class) { case OrganizationPerson::class : $route = 'organization/show'; $routeOpt = ['id' => $enroll->getOrganization()->getId()]; break; default: return $this->getResponseInternalError("Objet $class non pris en charge"); } try { $datet = new \DateTime($date); } catch (\Exception $e ){ Loading @@ -98,13 +107,14 @@ class EnrollController extends AbstractOscarController try { $enroll->setDateEnd($datet); $this->getEntityManager()->flush($enroll); $this->redirect()->toRoute($route, $routeOpt); } catch (\Exception $e ){ $msg = sprinf("Impossible de mettre le rôle de la person à jour : %s", $e->getMessage()); $this->getActivityLogService()->addUserInfo($msg, "organizationperson", $enroll->getId()); throw new OscarException($msg); } var_dump($datet); die(" / " . $date); } /** Loading Loading
module/Oscar/src/Oscar/Controller/EnrollController.php +12 −2 Original line number Diff line number Diff line Loading @@ -89,6 +89,15 @@ class EnrollController extends AbstractOscarController throw new OscarException("Erreur, données manquantes, veuillez reessayer"); } switch ($class) { case OrganizationPerson::class : $route = 'organization/show'; $routeOpt = ['id' => $enroll->getOrganization()->getId()]; break; default: return $this->getResponseInternalError("Objet $class non pris en charge"); } try { $datet = new \DateTime($date); } catch (\Exception $e ){ Loading @@ -98,13 +107,14 @@ class EnrollController extends AbstractOscarController try { $enroll->setDateEnd($datet); $this->getEntityManager()->flush($enroll); $this->redirect()->toRoute($route, $routeOpt); } catch (\Exception $e ){ $msg = sprinf("Impossible de mettre le rôle de la person à jour : %s", $e->getMessage()); $this->getActivityLogService()->addUserInfo($msg, "organizationperson", $enroll->getId()); throw new OscarException($msg); } var_dump($datet); die(" / " . $date); } /** Loading