Commit 3f509704 authored by Stephane Bouvry's avatar Stephane Bouvry
Browse files

Remonté des conflits dans la visualisation des déclarations "Retards importants"

Ajout d'un accès dans le menu admin
parent 6f4584b6
Loading
Loading
Loading
Loading
Loading
+9 −4
Changes for front/src/TimesheetHigDelay.vue: 9 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -26,12 +26,17 @@
          <i class="icon-user"></i>
          Validateur(s) impliqué(s) :
        </h3>
        <div class="alert alert-danger" v-if="entry.np1.length == 0"><i class="icon-attention-1"></i>
          Aucun <em>N+1</em> (validateur hors-lot) n'est assigné à ce déclarant, vous pouvez lui en assigner un (ou plusieurs) depuis la fiche personne.
        </div>

        <div v-if="entry.send == true && entry.validators.length == 0" class="alert alert-danger">
          <i class="icon-attention-1"></i>
          Aucun validateur n'est désigné pour valider ces déclarations, rendez-vous dans la fiche activité afin de vérifier que des validateurs sont bien désignés, ainsi que dans la fiche personne pour les créneaux Hors-lot
        </div>
        <ul v-else>
          <li v-for="v in entry.validators">{{ v }}</li>
          <li v-for="v in entry.validators"><i class="icon-cube"></i> {{ v }}</li>
          <li v-for="v in entry.np1"><i class="icon-tag"></i> {{ v }}</li>
        </ul>
      </div>
      <div class="periods">
@@ -39,11 +44,11 @@
          <i class="icon-calendar"></i>
          Période(s)</h3>
        <span v-for="(p, key) in entry.periods" class="cartouche xs" :class="{
          'error ': p.conflict,
          'success': p.valid == true,
          'danger': p.conflict == true,
          'danger': p.send == false,
          'danger': p.send == false && p.conflict != true,
          'secondary2': p.send == true && p.valid_prj == true && p.valid_sci == false,
          'warning': p.send == true && p.valid_prj == true && p.valid_sci == true,
          'warning': p.conflict != true && (p.send == true && p.valid_prj == true && p.valid_sci == true),
        }" @click.shift="debug = p">
          <span v-if="p.valid == true"><i class="icon-ok-circled"title="Validée"></i></span>
          <span v-else-if="p.conflict == true"><i class="icon-hammer"title="Conflit à régler (demandeur)"></i></span>
+11 −1
Changes for module/Oscar/src/Oscar/Service/PersonService.php: 11 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -1248,18 +1248,28 @@ class PersonService implements UseOscarConfigurationService, UseEntityManager, U

            /** @var Person $person */
            $person = $infos['person'];

            $personName = (string)$person;
            $personId = $person->getId();
            $personEmail = $person->getEmail();
            $personPeriods = $this->getTimesheetService()->getPeriodsPerson($person);
            $repport = $this->getHighDelayForPerson($personId);
            $validatorsPerson = [];
            $validatorsOthers = [];

            $validatorsOthersPerson = $this->getReferentsPerson($personId);

            /** @var Referent $v */
            foreach ($validatorsOthersPerson as $v){
                $validatorsOthers[$v->getReferent()->getId()] = $v->getReferent()->getFullname();
            }
            $periods = [];

            $output[$personId] = [
                'person_id' => $personId,
                'fullname' => $personName,
                'email' => $personEmail,
                'np1' => $validatorsOthers,
                'total_periods' => count($personPeriods),
                'total_declarations' => count($repport),
                'valid' => false,
@@ -1316,7 +1326,7 @@ class PersonService implements UseOscarConfigurationService, UseEntityManager, U
                    $periodInfos['valid_sci'] = $repport[$pp]['valid_sci'];
                    $periodInfos['valid_adm'] = $repport[$pp]['valid_adm'];
                    $periodInfos['send'] = $repport[$pp]['send'];
                    $periodInfos['conflict'] = $repport[$pp]['conflict'];
                    $periodInfos['conflict'] = $repport[$pp]['reject'];
                }

                if ($valid == false) {
+3 −1
Changes for module/Oscar/view/oscar/timesheet/high-delay.phtml: 3 added lines, 1 removed line.
Original line number Diff line number Diff line
<?php
?>
<div class="container">
    <h1>Retards critiques</h1>
    <h1>
        <i class="icon-clock"></i>
        Retards importants</h1>
    <div id="timesheethighdelay"></div>
</div>

+3 −5
Changes for module/Oscar/view/partials/menu-administration.phtml: 3 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@ if(
    $this->grant()->privilege(\Oscar\Provider\Privileges::ACTIVITY_TIMESHEET_USURPATION) ||
    $this->grant()->privilege(\Oscar\Provider\Privileges::MAINTENANCE_ACTIVITYTYPE_MANAGE) ||
    $this->grant()->privilege(\Oscar\Provider\Privileges::MAINTENANCE_ACTIVITYTYPE_MANAGE) ||
    $this->grant()->privilege(\Oscar\Provider\Privileges::MAINTENANCE_VALIDATION_MANAGE) ||
    $this->grant()->privilege(\Oscar\Provider\Privileges::MAINTENANCE_VALIDATION_MANAGE)
):
?>
@@ -34,14 +35,11 @@ if(
        <?php endif; ?>

        <?php if($this->grant()->privilege(\Oscar\Provider\Privileges::ACTIVITY_TIMESHEET_VIEW)): ?>
            <li role="presentation" class="dropdown-header"><i class="icon-group"></i> Déclarants</li>
            <li role="presentation" class="dropdown-header"><i class="icon-group"></i> Feuille de temps</li>
            <li><a href="<?= $this->url('person/declarers') ?>">Liste des déclarants</a></li>
            <li><a href="<?= $this->url('timesheet/highdelay') ?>">Retards importants</a></li>
        <?php endif; ?>





        <li role="presentation" class="dropdown-header"><i class="icon-stethoscope"></i> Maintenance des données</li>

        <?php if( $this->grant()->privilege(\Oscar\Provider\Privileges::MAINTENANCE_PCRU_LIST) ):?>
+7 −0
Changes for public/css/_common.scss: 7 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -1389,6 +1389,9 @@ $twRadius: 4px;
    background: lighten($colorGreen,25%);
  }
}
.cartouche.error {
  background-color: $brand-error;
}

////////////////////////////////////////////////////////////////////////////////
// X. Liens PROJET/ACTIVITÉ
@@ -4922,6 +4925,10 @@ $oscar-line: dotted thin $colorGreyLight;
  }
}

.cartouche.error {
  background-color: $brand-error;
}

pre.alert-danger, pre.alert-info {
  white-space: pre-wrap;
}
Loading