Commit 6e785644 authored by Antony Le Courtes's avatar Antony Le Courtes
Browse files

catch message d'erreur suppression circuit signature et hide bouton supprimer...

catch message d'erreur suppression circuit signature et hide bouton supprimer circuit signature si ce circuit contient encore des étapes
parent 20e6d13a
Loading
Loading
Loading
Loading
Loading
+5
Changes for module/Signature/src/Controller/SignatureFlowController.php: 5 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -78,7 +78,12 @@ class SignatureFlowController extends AbstractController
    {
        $signatureFlow = $this->getEvent()->getParam('signatureFlow');
        if ($signatureFlow instanceof SignatureFlow) {
            try{
                $this->getServiceSignatureFlow()->delete($signatureFlow);
            }catch (\Exception $e){
                $this->flashMessenger()->addErrorMessage($e->getMessage());

            }
        }

        return true;
+4 −1
Changes for module/Signature/view/signature/signature-flow/index.phtml: 4 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@
/**
 * @var Array $letterFileLevelsInfos
 */

echo $this->messenger()->addCurrentMessagesFromFlashMessengerWithNamespace('error');
?>


@@ -14,6 +14,7 @@
            <section class="row">
                <article class="signature-flow">
                    <h3 class="card-title">
                        <?php if (empty($flow['steps'])): ?>
                            <a class="btn btn-danger pop-ajax"
                               href="<?= $this->url("signature-flow/supprimer-circuit", ['signatureFlow' => $flow['id']]) ?>"
                               title="Supprimer un circuit"
@@ -24,6 +25,8 @@
                               data-submit-reload="true">
                                <i class="fas fa-trash"></i>
                            </a>
                        <?php endif; ?>

                        <a class="btn btn-primary mod-ajax" data-event="type-edition" data-submit-reload="true"
                           href="<?= $this->url("signature-flow/saisir-circuit", ['signatureFlow' => $flow['id']]) ?>"
                           title="Modifier le circuit de signature">