Commit 2771ef86 authored by joriot221's avatar joriot221
Browse files

test temp

parent b8906fa9
Loading
Loading
Loading
Loading
+4 −4
Changes for module/Application/src/Controller/PieceJointeController.php: 4 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -551,11 +551,11 @@ class PieceJointeController extends AbstractController
                $this->getServiceNote()->createNoteFromEmail($pj->getIntervenant(), $subject, $content);
                $this->flashMessenger()->addSuccessMessage('Email envoyé à l\'intervenant');

                foreach ($pj->getFichier() as $fichier) {
                    $this->getServicePieceJointe()->supprimerFichier($fichier, $pj);
                }
//                foreach ($pj->getFichier() as $fichier) {
//                    $this->getServicePieceJointe()->supprimerFichier($fichier, $pj);
//                }

                $this->updateTableauxBord($pj->getIntervenant());
//                $this->updateTableauxBord($pj->getIntervenant());
            } catch (\Exception $e) {
                $this->flashMessenger()->addErrorMessage($this->translate($e));
            }
+1 −9
Changes for module/Application/view/application/piece-jointe/validation.phtml: 1 added line, 9 removed lines.
Original line number Diff line number Diff line
@@ -27,11 +27,11 @@ $params = [
<?php endif ?>

<?php if ($pj->getFichier()->count() > 0 && !$pj->getValidation() && $this->isAllowed(Privileges::getResourceId(Privileges::PIECE_JUSTIFICATIVE_REFUS_PIECE))): ?>
    <!--    data-loading-text="Patientez..."-->

    <a class="refuser-pj btn btn-danger ajax-modal"
       href="<?= $this->url('piece-jointe/intervenant/refuser', $params, [], true) ?>"
       title="Refuser la pièce justificative '<?= $pj->getType() ?>'"
       data-loading-text="Patientez..."
       data-event="pj-refus-event"
    >
        <i class="fas fa-trash-can"></i> Refuser
@@ -48,11 +48,3 @@ $params = [
        <i class="fas fa-thumbs-down"></i> Dévalider
    </a>
<?php endif ?>
 No newline at end of file
<script type="text/javascript">

    $(function () {
        $("body").on("pj-refus-event", function (event, data) {
            window.location.reload();
        });
    });
</script>
 No newline at end of file
+9 −5
Changes for public/js/piece-jointe.js: 9 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -12,10 +12,14 @@ $.widget("ose.pieceJointe", {
            event.preventDefault();
        });

        // that.element.on('click', '.refuser-pj', function (event) {
        //     that.refuser($(this));
        //     event.preventDefault();
        // });
        that.element.on('click', '.refuser-pj', function (event) {
            that.refuser($(this));
            event.preventDefault();
        });

        that.element.on('body', "pj-refus-event", function (event, data) {
            location.reload(true);
        });

        that.element.on('click', '.archiver-pj', function (event) {
            that.archiver($(this));
@@ -107,7 +111,7 @@ $.widget("ose.pieceJointe", {
                console.log(jqXHR);
            },
            complete: function (jqXHR) {
                that.onFileChange(tpj);
                // that.onFileChange(tpj);
            }
        });
    },