Loading src/Controller/InternalLetterfileController.php +12 −1 Original line number Diff line number Diff line Loading @@ -56,6 +56,7 @@ class InternalLetterfileController extends AbstractActionController $datas = $this->getRequest()->getPost()->toArray(); $comment = trim($datas['comment']); $this->getInternalLetterfileService()->getLoggerService()->info("COMMENT : $comment"); try { if ($datas['response'] == 'ok') { Loading @@ -81,9 +82,19 @@ class InternalLetterfileController extends AbstractActionController } } $processInfos = null; if( $signatureRecipient->getSignature()->getProcessStep() ){ foreach( $signatureRecipient->getSignature()->getProcessStep()->getProcess()->getSteps() as $step ){ $processInfos[] = $step->toArray(); } } return [ 'signatureRecipient' => $signatureRecipient, 'waitingVisa' => $waitingVisa 'waitingVisa' => $waitingVisa, 'processInfos' => $processInfos, ]; } catch (Exception $e) { $this->flash()->addErrorMessage($e->getMessage()); Loading src/Entity/Db/ProcessStep.php +1 −0 Original line number Diff line number Diff line Loading @@ -191,6 +191,7 @@ class ProcessStep 'status' => $this->getStatus(), 'status_text' => $this->getStatusText(), 'refused_text' => $this->getSignature()->getRefusedText(), 'information' => $this->getSignature()->getDescription(), 'allSignToComplete' => $this->getSignature()->getAllSignToComplete(), 'dateSignatureUpdate' => $this->getSignature()->getDateUpdate(), 'recipients' => $recipients, Loading src/Entity/Db/SignatureRecipient.php +1 −1 Original line number Diff line number Diff line Loading @@ -444,7 +444,7 @@ class SignatureRecipient 'email' => $this->getEmail(), 'status' => $this->getStatus(), 'status_text' => $this->getStatusText(), 'informations' => $this->getInformations(), 'informations' => "Infos: " . $this->getInformations(), 'dateFinished' => $this->getDateFinished() ? $this->getDateFinished()->format('Y-m-d H:i:s') : null, ]; } Loading view/unicaen-signature/internal-letterfile/visa.phtml +55 −0 Original line number Diff line number Diff line Loading @@ -2,7 +2,62 @@ <h1>VISA de DOCUMENT</h1> <div class="row"> <div class="col-md-8"> <script src="//mozilla.github.io/pdf.js/build/pdf.mjs" type="module"></script> <script type="module"> // If absolute URL from the remote server is provided, configure the CORS // header on that server. var url = 'https://raw.githubusercontent.com/mozilla/pdf.js/ba2edeae/examples/learning/helloworld.pdf'; // Loaded via <script> tag, create shortcut to access PDF.js exports. var { pdfjsLib } = globalThis; // The workerSrc property shall be specified. pdfjsLib.GlobalWorkerOptions.workerSrc = '//mozilla.github.io/pdf.js/build/pdf.worker.mjs'; // Asynchronous download of PDF var loadingTask = pdfjsLib.getDocument({ url }); loadingTask.promise.then(function(pdf) { console.log('PDF loaded'); // Fetch the first page var pageNumber = 1; pdf.getPage(pageNumber).then(function(page) { console.log('Page loaded'); var scale = 1.5; var viewport = page.getViewport({scale: scale}); // Prepare canvas using PDF page dimensions var canvas = document.getElementById('the-canvas'); var context = canvas.getContext('2d'); canvas.height = viewport.height; canvas.width = viewport.width; // Render PDF page into canvas context var renderContext = { canvasContext: context, viewport: viewport }; var renderTask = page.render(renderContext); renderTask.promise.then(function () { console.log('Page rendered'); }); }); }, function (reason) { // PDF loading error console.error(reason); }); </script> <h1>PDF.js 'Hello, world!' example</h1> <p>Please use <a href="https://mozilla.github.io/pdf.js/getting_started/#download"><i>official releases</i></a> in production environments.</p> <canvas id="the-canvas"></canvas> <!--- <iframe width="100%" height="800" src="<?= $this->url('unicaen-signature/internal/document', ['key' => $signatureRecipient->getKeyAccess()]) ?>"></iframe> --> </div> <div class="col-md-4"> <?php if($waitingVisa): ?> Loading Loading
src/Controller/InternalLetterfileController.php +12 −1 Original line number Diff line number Diff line Loading @@ -56,6 +56,7 @@ class InternalLetterfileController extends AbstractActionController $datas = $this->getRequest()->getPost()->toArray(); $comment = trim($datas['comment']); $this->getInternalLetterfileService()->getLoggerService()->info("COMMENT : $comment"); try { if ($datas['response'] == 'ok') { Loading @@ -81,9 +82,19 @@ class InternalLetterfileController extends AbstractActionController } } $processInfos = null; if( $signatureRecipient->getSignature()->getProcessStep() ){ foreach( $signatureRecipient->getSignature()->getProcessStep()->getProcess()->getSteps() as $step ){ $processInfos[] = $step->toArray(); } } return [ 'signatureRecipient' => $signatureRecipient, 'waitingVisa' => $waitingVisa 'waitingVisa' => $waitingVisa, 'processInfos' => $processInfos, ]; } catch (Exception $e) { $this->flash()->addErrorMessage($e->getMessage()); Loading
src/Entity/Db/ProcessStep.php +1 −0 Original line number Diff line number Diff line Loading @@ -191,6 +191,7 @@ class ProcessStep 'status' => $this->getStatus(), 'status_text' => $this->getStatusText(), 'refused_text' => $this->getSignature()->getRefusedText(), 'information' => $this->getSignature()->getDescription(), 'allSignToComplete' => $this->getSignature()->getAllSignToComplete(), 'dateSignatureUpdate' => $this->getSignature()->getDateUpdate(), 'recipients' => $recipients, Loading
src/Entity/Db/SignatureRecipient.php +1 −1 Original line number Diff line number Diff line Loading @@ -444,7 +444,7 @@ class SignatureRecipient 'email' => $this->getEmail(), 'status' => $this->getStatus(), 'status_text' => $this->getStatusText(), 'informations' => $this->getInformations(), 'informations' => "Infos: " . $this->getInformations(), 'dateFinished' => $this->getDateFinished() ? $this->getDateFinished()->format('Y-m-d H:i:s') : null, ]; } Loading
view/unicaen-signature/internal-letterfile/visa.phtml +55 −0 Original line number Diff line number Diff line Loading @@ -2,7 +2,62 @@ <h1>VISA de DOCUMENT</h1> <div class="row"> <div class="col-md-8"> <script src="//mozilla.github.io/pdf.js/build/pdf.mjs" type="module"></script> <script type="module"> // If absolute URL from the remote server is provided, configure the CORS // header on that server. var url = 'https://raw.githubusercontent.com/mozilla/pdf.js/ba2edeae/examples/learning/helloworld.pdf'; // Loaded via <script> tag, create shortcut to access PDF.js exports. var { pdfjsLib } = globalThis; // The workerSrc property shall be specified. pdfjsLib.GlobalWorkerOptions.workerSrc = '//mozilla.github.io/pdf.js/build/pdf.worker.mjs'; // Asynchronous download of PDF var loadingTask = pdfjsLib.getDocument({ url }); loadingTask.promise.then(function(pdf) { console.log('PDF loaded'); // Fetch the first page var pageNumber = 1; pdf.getPage(pageNumber).then(function(page) { console.log('Page loaded'); var scale = 1.5; var viewport = page.getViewport({scale: scale}); // Prepare canvas using PDF page dimensions var canvas = document.getElementById('the-canvas'); var context = canvas.getContext('2d'); canvas.height = viewport.height; canvas.width = viewport.width; // Render PDF page into canvas context var renderContext = { canvasContext: context, viewport: viewport }; var renderTask = page.render(renderContext); renderTask.promise.then(function () { console.log('Page rendered'); }); }); }, function (reason) { // PDF loading error console.error(reason); }); </script> <h1>PDF.js 'Hello, world!' example</h1> <p>Please use <a href="https://mozilla.github.io/pdf.js/getting_started/#download"><i>official releases</i></a> in production environments.</p> <canvas id="the-canvas"></canvas> <!--- <iframe width="100%" height="800" src="<?= $this->url('unicaen-signature/internal/document', ['key' => $signatureRecipient->getKeyAccess()]) ?>"></iframe> --> </div> <div class="col-md-4"> <?php if($waitingVisa): ?> Loading