Loading src/Command/SignatureProcessCommand.php +1 −1 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ class SignatureProcessCommand extends SignatureCommandAbstract $io->title("Liste des processus"); $headers = ['ID', 'Label', 'étape(s)', 'status']; $rows = []; foreach ($this->getSignatureService()->getProcess() as $process) { foreach ($this->getProcessService()->getProcesses() as $process) { $rows[] = [ $process->getId(), $process->getLabel(), Loading src/Command/SignatureUpdateAllCommand.php +1 −1 Original line number Diff line number Diff line Loading @@ -38,8 +38,8 @@ class SignatureUpdateAllCommand extends SignatureCommandAbstract } catch (\Exception $e) { $msg = 'Error : ' . $e->getMessage(); } $row[] = $msg; } $row[] = $msg; $rows[] = $row; } $io->table($headers, $rows); Loading src/Entity/Db/ProcessStep.php +1 −1 Original line number Diff line number Diff line Loading @@ -156,7 +156,7 @@ class ProcessStep 'order' => $this->getOrder(), 'status' => $this->getStatus(), 'status_text' => $this->getStatusText(), 'recipients' => $recipients, 'recipients' => $recipients ]; } Loading src/Entity/Db/SignatureRecipient.php +1 −0 Original line number Diff line number Diff line Loading @@ -351,6 +351,7 @@ class SignatureRecipient 'email' => $this->getEmail(), 'status' => $this->getStatus(), 'status_text' => $this->getStatusText(), 'dateFinished' => $this->getDateFinished() ? $this->getDateFinished()->format('Y-m-d H:i:s') : null, ]; } } No newline at end of file src/Service/SignatureService.php +19 −8 Original line number Diff line number Diff line Loading @@ -592,7 +592,8 @@ class SignatureService $this->getDocumentSignedSignature($signature) )) { $this->getLoggerService()->errorLogAndThrow( new SignatureException("Impossible de récupérer le document signé") new SignatureException("Impossible de récupérer le document signé"), "Impossible d'écrire le document" ); } } Loading Loading @@ -800,14 +801,14 @@ class SignatureService { if ($signature->isNotifiable()) { $notificationsCaller = $this->getSignatureConfigurationService()->getNotificationsCaller(); if (count($notificationsCaller) == 0) { $msg = "Aucune procédure de notification configurée"; $this->getLoggerService()->error($msg); throw new SignatureException($msg); } // if (count($notificationsCaller) == 0) { // $msg = "Aucune procédure de notification configurée"; // $this->getLoggerService()->error($msg); // throw new SignatureException($msg); // } // Pour générer les URLs dans les messages $url = $this->getServiceContainer() $urlBuilder = $this->getServiceContainer() ->get('ViewHelperManager') ->get('url'); Loading @@ -829,7 +830,8 @@ class SignatureService foreach ($signature->getRecipients() as $recipient) { if ($action == 'viser') { $link = $baseUrl . $url( // TODO Pose problème !!! $link = $baseUrl . $urlBuilder( 'unicaen-signature/internal/visa', ['key' => $recipient->getKeyAccess()] ); Loading @@ -845,7 +847,16 @@ class SignatureService $body = str_ireplace($find, $replace, $messageBody); $subject = str_ireplace($find, $replace, $messageSubject); if( is_callable($caller) ){ $this->getLoggerService()->error("Un procédé de notification n'est pas 'callable'"); } else { try { $caller($this->getServiceContainer(), $recipient, $subject, $body); } catch (\Exception $e) { $this->getLoggerService()->error("Un problème est survenu lors de l'envois des notifications"); } } } } } Loading Loading
src/Command/SignatureProcessCommand.php +1 −1 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ class SignatureProcessCommand extends SignatureCommandAbstract $io->title("Liste des processus"); $headers = ['ID', 'Label', 'étape(s)', 'status']; $rows = []; foreach ($this->getSignatureService()->getProcess() as $process) { foreach ($this->getProcessService()->getProcesses() as $process) { $rows[] = [ $process->getId(), $process->getLabel(), Loading
src/Command/SignatureUpdateAllCommand.php +1 −1 Original line number Diff line number Diff line Loading @@ -38,8 +38,8 @@ class SignatureUpdateAllCommand extends SignatureCommandAbstract } catch (\Exception $e) { $msg = 'Error : ' . $e->getMessage(); } $row[] = $msg; } $row[] = $msg; $rows[] = $row; } $io->table($headers, $rows); Loading
src/Entity/Db/ProcessStep.php +1 −1 Original line number Diff line number Diff line Loading @@ -156,7 +156,7 @@ class ProcessStep 'order' => $this->getOrder(), 'status' => $this->getStatus(), 'status_text' => $this->getStatusText(), 'recipients' => $recipients, 'recipients' => $recipients ]; } Loading
src/Entity/Db/SignatureRecipient.php +1 −0 Original line number Diff line number Diff line Loading @@ -351,6 +351,7 @@ class SignatureRecipient 'email' => $this->getEmail(), 'status' => $this->getStatus(), 'status_text' => $this->getStatusText(), 'dateFinished' => $this->getDateFinished() ? $this->getDateFinished()->format('Y-m-d H:i:s') : null, ]; } } No newline at end of file
src/Service/SignatureService.php +19 −8 Original line number Diff line number Diff line Loading @@ -592,7 +592,8 @@ class SignatureService $this->getDocumentSignedSignature($signature) )) { $this->getLoggerService()->errorLogAndThrow( new SignatureException("Impossible de récupérer le document signé") new SignatureException("Impossible de récupérer le document signé"), "Impossible d'écrire le document" ); } } Loading Loading @@ -800,14 +801,14 @@ class SignatureService { if ($signature->isNotifiable()) { $notificationsCaller = $this->getSignatureConfigurationService()->getNotificationsCaller(); if (count($notificationsCaller) == 0) { $msg = "Aucune procédure de notification configurée"; $this->getLoggerService()->error($msg); throw new SignatureException($msg); } // if (count($notificationsCaller) == 0) { // $msg = "Aucune procédure de notification configurée"; // $this->getLoggerService()->error($msg); // throw new SignatureException($msg); // } // Pour générer les URLs dans les messages $url = $this->getServiceContainer() $urlBuilder = $this->getServiceContainer() ->get('ViewHelperManager') ->get('url'); Loading @@ -829,7 +830,8 @@ class SignatureService foreach ($signature->getRecipients() as $recipient) { if ($action == 'viser') { $link = $baseUrl . $url( // TODO Pose problème !!! $link = $baseUrl . $urlBuilder( 'unicaen-signature/internal/visa', ['key' => $recipient->getKeyAccess()] ); Loading @@ -845,7 +847,16 @@ class SignatureService $body = str_ireplace($find, $replace, $messageBody); $subject = str_ireplace($find, $replace, $messageSubject); if( is_callable($caller) ){ $this->getLoggerService()->error("Un procédé de notification n'est pas 'callable'"); } else { try { $caller($this->getServiceContainer(), $recipient, $subject, $body); } catch (\Exception $e) { $this->getLoggerService()->error("Un problème est survenu lors de l'envois des notifications"); } } } } } Loading