Commit 18f741bb authored by Stephane Bouvry's avatar Stephane Bouvry
Browse files

Vue de gestion des déclarations en cours

parent 883d79b4
Loading
Loading
Loading
Loading
+1 −0
Changes for module/Oscar/src/Oscar/Controller/TimesheetController.php: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -2065,6 +2065,7 @@ class TimesheetController extends AbstractOscarController
    public function declarationsAction()
    {
        $this->getOscarUserContext()->check(Privileges::MAINTENANCE_VALIDATION_MANAGE);

        if( $this->isAjax() ){
            $method = $this->getHttpXMethod();
            switch ($method) {
+15 −1
Changes for module/Oscar/src/Oscar/Service/TimesheetService.php: 15 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -153,6 +153,9 @@ class TimesheetService implements ServiceLocatorAwareInterface, EntityManagerAwa
                    'person' => (string)$declaration->getDeclarer(),
                    'person_id' => $declaration->getDeclarer()->getId(),
                    'settings' => $declaration->getSchedule(),

                    // Problèmes possibles dans une des lignes de la déclaration
                    'warnings' => [],
                    'declarations' => [],
                ];
            }
@@ -165,10 +168,21 @@ class TimesheetService implements ServiceLocatorAwareInterface, EntityManagerAwa
                $label = (string)$activity->getFullLabel();

            } else {

                $label = $this->getOthersWPByCode($object)['label'];
            }

            if( $declaration->getObjectGroup() == ValidationPeriod::GROUP_WORKPACKAGE ){
                if( count($declaration->getValidatorsPrj()) == 0 ){
                    $output[$dataKey]['warnings'][] = _('Aucun validateur projet pour cette déclaration ')  . $label;
                }
                if( count($declaration->getValidatorsSci()) == 0 ){
                    $output[$dataKey]['warnings'][] = _('Aucun validateur scientifique pour la déclaration ') . $label ;
                }
            }
            if( count($declaration->getValidatorsAdm()) == 0 ){
                $output[$dataKey]['warnings'][] = _('Aucun validateur administratif pour cette déclaration ')  . $label;
            }

            $declarationDatas = $declaration->toJson();
            $declarationDatas['label'] = $label;
            $declarationDatas['person'] = (string)$declaration->getDeclarer();
+6 −6
Changes for module/Oscar/view/oscar/project-grant/show.phtml: 6 added lines, 6 removed lines.
Original line number Diff line number Diff line
@@ -527,12 +527,12 @@
            <div id="referents"></div>
            <script>
                require(['vue', 'vue-resource', 'ReferentUI'], function(Vue, VueResource, ReferentUI){
                    //new Vue({
                    //    el: '#referents',
                    //    render(h){ return h(ReferentUI.default, { props: {
                    //            persons: <?//= json_encode($declarers) ?>
                    //        }}) }
                    //})
                    new Vue({
                        el: '#referents',
                        render(h){ return h(ReferentUI.default, { props: {
                                persons: <?= json_encode($declarers) ?>
                            }}) }
                    })
                });
            </script>
        <?php endif; ?>
+15 −0
Changes for public/css/_common.scss: 15 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -246,6 +246,20 @@
  >.col-2 {
    flex-grow: 2;
  }

  >.col-4 {
    flex-grow: 4;
  }
}
.declarations-ui {
  background: #e2e2e2;
  height: 80vh;
}

.declarations-list {
  max-height: 100%;
  overflow-y: auto;
  padding-right: .5em;
}


@@ -4937,3 +4951,4 @@ pre.alert-danger, pre.alert-info {
    background: $colorRed;
  }
}
+11 −0
Changes for public/css/adaj.css: 11 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -5534,6 +5534,17 @@ button.close {
    flex-grow: 1; }
  .cols > .col-2 {
    flex-grow: 2; }
  .cols > .col-4 {
    flex-grow: 4; }

.declarations-ui {
  background: #e2e2e2;
  height: 80vh; }

.declarations-list {
  max-height: 100%;
  overflow-y: auto;
  padding-right: .5em; }

.data-list {
  color: #999; }
Loading