Commit b1710a97 authored by David Surville's avatar David Surville
Browse files

[Fix] Erreur nom de fonction + ajustements

parent 135b15c7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -140,7 +140,7 @@ class RoleController extends AbstractActionController {
    {
        try {
            $role = $this->roleService->getRequestedRole($this);
//            $this->roleService->supprimer($role);
            $this->roleService->delete($role);
            $this->flashMessenger()->addSuccessMessage(sprintf("Rôle <strong>%s</strong> supprimé avec succès.", $role->getLibelle()));
        } catch (Exception $e) {
            $this->flashMessenger()->addErrorMessage(sprintf("Une erreur est survenu lors de la suppression du rôle <strong>%s</strong>.", $role->getLibelle()));
+1 −1
Original line number Diff line number Diff line
@@ -208,7 +208,7 @@ class UtilisateurController extends AbstractActionController
    {
        try {
            $utilisateur = $this->userService->getRequestedUser($this);
            $this->userService->supprimer($utilisateur);
            $this->userService->delete($utilisateur);
            $this->flashMessenger()->addSuccessMessage(sprintf("Utilisateur <strong>%s</strong> supprimé avec succès.", $utilisateur->getDisplayName()));
        } catch (Exception $e) {
            $this->flashMessenger()->addErrorMessage(sprintf("Une erreur est survenu lors de la suppression de l'utilisateur <strong>%s</strong>.", $utilisateur->getDisplayName()));
+1 −1
Original line number Diff line number Diff line
@@ -292,7 +292,7 @@ class UserService implements RechercheIndividuServiceInterface
    /**
     * @param UserInterface $utilisateur
     */
    public function supprimer(UserInterface $utilisateur)
    public function delete(UserInterface $utilisateur)
    {
        try {
            $this->getEntityManager()->remove($utilisateur);
+1 −1
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@ use UnicaenUtilisateur\Entity\Db\RoleInterface;
<script>
    $(function () {
        $("body").one("event-unicaen-role-supprimer", function (event, data) {
            window.location.href = '/role
            window.location.href = '/role';
        });
    });
</script>
+2 −4
Original line number Diff line number Diff line
@@ -21,15 +21,13 @@ use UnicaenUtilisateur\Entity\Db\UserInterface;
            <a <?php /** @see UtilisateurController::indexAction() */ ?>
                    href="<?php echo $this->url('unicaen-utilisateur', [], [], true); ?>"
                    class="btn btn-primary">
                <span class="fas fa-chevron-left"></span>
                Retour à l'administration
                <span class="fas fa-chevron-left"></span> Retour
            </a>

            <a <?php /** @see UtilisateurController::exporterAction() */ ?>
                    href="<?php echo $this->url('unicaen-utilisateur/exporter', [], [], true); ?>"
                    class="btn btn-success">
                <span class="fas fa-file-export"></span>
                Export CSV
                <span class="fas fa-file-export"></span> Export CSV
            </a>
        </div>
    </div>