Commit 2f5aa2ad authored by Stéphane Bouvry's avatar Stéphane Bouvry
Browse files

Les validateurs disposent maintenant d'indicateurs visuels configurables pour...

Les validateurs disposent maintenant d'indicateurs visuels configurables pour détécter les variations de durée des déclarations quand elles ne correspondent pas exactement à la durée prévue
parent fac49ada
Loading
Loading
Loading
Loading
+9 −0
Changes for config/autoload/global.php: 9 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -80,8 +80,17 @@ return array(
        'declarationsDayDuration' => 7.4,
        'declarationsDayDurationMaxlength' => 9.0,

        // Indication visuelle de dépassement problématique
        // Journée de 8.0 heures => déclaré 8.0*.5 = 4.0
        'declarationAmplitudeMin' => .75,

        // Journée de 8.0 heures => 8.0*1.125 = 9.0
        'declarationAmplitudeMax' => 1.25,

        // Durée standards d'une semaine
        'declarationsWeekDuration' => 7.4*5,


        'declarationsWeekDurationMaxlength' => 39.0,

        'declarationsMonthDuration' => 144.0,
+19 −3
Changes for module/Oscar/src/Oscar/Service/TimesheetService.php: 19 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -668,10 +668,17 @@ class TimesheetService implements ServiceLocatorAwareInterface, EntityManagerAwa
            $periodBounds = DateTimeUtils::periodBounds($period->getPeriod());

            if( !array_key_exists($key, $group) ){
                $daysDetails = $this->getDaysPeriodInfosPerson($period->getDeclarer(), $period->getYear(), $period->getMonth());
                $periodLength = 0.0;

                foreach ($daysDetails as $d) {
                    $periodLength += $d['dayLength'];
                }
                $group[$key] = [
                    'period' => $period->getPeriod(),
                    'validators' => $validators,
                    'totalDays' => $periodBounds['totalDays'],
                    'periodLength' => $periodLength,
                    'periodFirstDay' => $periodBounds['firstDay'],
                    'periodLastDay' => $periodBounds['lastDay'],
                    'validableStep' => false,
@@ -684,7 +691,7 @@ class TimesheetService implements ServiceLocatorAwareInterface, EntityManagerAwa
                        'total' => 0.0,
                        'validators' => []
                    ],
                    'details' => $this->getDaysPeriodInfosPerson($period->getDeclarer(), $period->getYear(), $period->getMonth()),
                    'details' => $daysDetails,
                ];
            }

@@ -1479,6 +1486,10 @@ class TimesheetService implements ServiceLocatorAwareInterface, EntityManagerAwa
        $daysLabels = [];

        $weekendAllowed = $this->getOscarConfig()->getConfiguration('declarationsWeekend') == false;

        $amplitudeMax = $this->getOscarConfig()->getConfiguration('declarationAmplitudeMax');
        $amplitudeMin = $this->getOscarConfig()->getConfiguration('declarationAmplitudeMin');

        $daysDetails = $this->getDayLengthPerson($person);

        $declarations = $this->getEntityManager()->getRepository(ValidationPeriod::class)
@@ -1490,8 +1501,8 @@ class TimesheetService implements ServiceLocatorAwareInterface, EntityManagerAwa
                'month' => $month,
                'person' => $person,
            ])
            ->getResult()
        ;
            ->getResult();

        if( count($declarations) ){
            $daysDetails = json_decode($declarations[0]->getSchedule(), JSON_OBJECT_AS_ARRAY);
        }
@@ -1505,6 +1516,9 @@ class TimesheetService implements ServiceLocatorAwareInterface, EntityManagerAwa
            $maxlength = $daysDetails['max'];
            $minlength = $daysDetails['min'];

            $amplitudemax = $duration * $amplitudeMax;
            $amplidudemin = $duration * $amplitudeMin;


            $close = false;
            $infos = "";
@@ -1547,6 +1561,8 @@ class TimesheetService implements ServiceLocatorAwareInterface, EntityManagerAwa
                'dayLength' => $duration,
                'maxLength' => $maxlength,
                'minLength' => $minlength,
                'amplitudemin' => $amplidudemin,
                'amplitudemax' => $amplitudemax,
                'label' => $daysFull[$dayIndex],
                'close' => $close,
                'locked' => $locked,
+1 −0
Changes for public/css/_common.scss: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -914,6 +914,7 @@ body::-webkit-scrollbar-thumb {
.contracts {
  // display: none;
  table, thead, tbody, tfoot {
    font-size: $font-size-small;
    font-size: $font-size-small;
    width: 100%;
  }
+1 −1
Changes for public/js/oscar/dist/ValidationPeriod.css: 1 added line, 1 removed line.
Original line number Diff line number Diff line
.validation{background:transparent;font-size:14px}.validation table.table td,.validation table.table th{padding:2px;font-size:.9em}.validation table.table .datas>th{padding-left:1em}.validation table.table .heading-activity>th{padding-top:1em;border-top:1px solid #ddd;font-weight:100}.validation .has-validation{cursor:pointer;border-left:4px solid #0b93d5}.validation .heading{font-size:1.2em}.validation th small{display:block}.validation tbody tr.datas:hover{background:rgba(92,156,204,.25)}.validation .heading-days th{text-align:center}.validation .heading-days th.locked{background:#ccc}.validation td,.validation th{border-right:thin solid #ddd}.validation th small{font-weight:100;font-size:.8em}.validation td:nth-child(odd){background:hsla(0,0%,80%,.3)}.validation .datas th{padding-left:1em}.validation .datas td,.validation .total-row td{text-align:right}.validation .total{text-align:right;font-size:1.2em}
.validation{background:transparent;font-size:14px}.validation .day{white-space:nowrap}.validation .day .icon-exact,.validation .day .icon-less,.validation .day .icon-many{display:none}.validation .day.exact,.validation .day.less{color:#006400}.validation .day.less .icon-less{display:inline-block;color:green}.validation .day.less.warnmin{background:red}.validation .day.less.warnmin .icon-less,.validation .day.less.warnmin strong{color:#fff}.validation .day.many{color:#006400}.validation .day.many .icon-many{display:inline-block;color:green}.validation .day.many.warnmax{background:red}.validation .day.many.warnmax .icon-many,.validation .day.many.warnmax strong{color:#fff}.validation table.table td,.validation table.table th{padding:2px;font-size:.9em}.validation table.table .datas>th{padding-left:1em}.validation table.table .heading-activity>th{padding-top:1em;border-top:1px solid #ddd;font-weight:100}.validation .has-validation{cursor:pointer;border-left:4px solid #0b93d5}.validation .heading{font-size:1.2em}.validation th small{display:block}.validation tbody tr.datas:hover{background:rgba(92,156,204,.25)}.validation .heading-days th{text-align:center}.validation .heading-days th.locked{background:#ccc}.validation td,.validation th{border-right:thin solid #ddd}.validation th small{font-weight:100;font-size:.8em}.validation td:nth-child(odd){background:hsla(0,0%,80%,.3)}.validation .datas th{padding-left:1em}.validation .datas td,.validation .total-row td{text-align:right}.validation .total{text-align:right;font-size:1.2em}
/*# sourceMappingURL=ValidationPeriod.css.map*/
 No newline at end of file
+1 −1
Changes for public/js/oscar/dist/ValidationPeriod.css.map: 1 added line, 1 removed line.
Original line number Diff line number Diff line
{"version":3,"sources":["webpack:///./public/js/oscar/src/ValidationPeriod.vue"],"names":[],"mappings":"AACA,YACE,uBACA,cAAgB,CAElB,sDACI,YACA,cAAgB,CAEpB,kCACI,gBAAkB,CAEtB,6CACI,gBACA,0BACA,eAAiB,CAErB,4BACI,eACA,6BAA+B,CAEnC,qBACI,eAAiB,CAErB,qBACI,aAAe,CAEnB,iCACI,+BAAqC,CAEzC,6BACI,iBAAmB,CAEvB,oCACM,eAAiB,CAEvB,8BACI,4BAA8B,CAElC,qBACI,gBACA,cAAgB,CAEpB,8BACI,4BAAqC,CAEzC,sBACI,gBAAkB,CAEtB,gDACI,gBAAkB,CAEtB,mBACI,iBACA,eAAiB","file":"ValidationPeriod.css","sourcesContent":["\n.validation {\n  background: transparent;\n  font-size: 14px;\n}\n.validation table.table td, .validation table.table th {\n    padding: 2px;\n    font-size: .9em;\n}\n.validation table.table .datas > th {\n    padding-left: 1em;\n}\n.validation table.table .heading-activity > th {\n    padding-top: 1em;\n    border-top: solid 1px #ddd;\n    font-weight: 100;\n}\n.validation .has-validation {\n    cursor: pointer;\n    border-left: 4px #0b93d5 solid;\n}\n.validation .heading {\n    font-size: 1.2em;\n}\n.validation th small {\n    display: block;\n}\n.validation tbody tr.datas:hover {\n    background: rgba(92, 156, 204, 0.25);\n}\n.validation .heading-days th {\n    text-align: center;\n}\n.validation .heading-days th.locked {\n      background: #CCC;\n}\n.validation td, .validation th {\n    border-right: thin #ddd solid;\n}\n.validation th small {\n    font-weight: 100;\n    font-size: .8em;\n}\n.validation td:nth-child(odd) {\n    background: rgba(204, 204, 204, 0.3);\n}\n.validation .datas th {\n    padding-left: 1em;\n}\n.validation .datas td, .validation .total-row td {\n    text-align: right;\n}\n.validation .total {\n    text-align: right;\n    font-size: 1.2em;\n}\n\n\n\n// WEBPACK FOOTER //\n// ./public/js/oscar/src/ValidationPeriod.vue"],"sourceRoot":""}
 No newline at end of file
{"version":3,"sources":["webpack:///./public/js/oscar/src/ValidationPeriod.vue"],"names":[],"mappings":"AACA,YACE,uBACA,cAAgB,CAElB,iBACI,kBAAoB,CAExB,qFACM,YAAc,CAKpB,6CACM,aAAiB,CAEvB,iCACQ,qBACA,WAAa,CAErB,8BACQ,cAAgB,CAKxB,8EACU,UAAa,CAEvB,sBACM,aAAiB,CAEvB,iCACQ,qBACA,WAAa,CAErB,8BACQ,cAAgB,CAKxB,8EACU,UAAa,CAEvB,sDACI,YACA,cAAgB,CAEpB,kCACI,gBAAkB,CAEtB,6CACI,gBACA,0BACA,eAAiB,CAErB,4BACI,eACA,6BAA+B,CAEnC,qBACI,eAAiB,CAErB,qBACI,aAAe,CAEnB,iCACI,+BAAqC,CAEzC,6BACI,iBAAmB,CAEvB,oCACM,eAAiB,CAEvB,8BACI,4BAA8B,CAElC,qBACI,gBACA,cAAgB,CAEpB,8BACI,4BAAqC,CAEzC,sBACI,gBAAkB,CAEtB,gDACI,gBAAkB,CAEtB,mBACI,iBACA,eAAiB","file":"ValidationPeriod.css","sourcesContent":["\n.validation {\n  background: transparent;\n  font-size: 14px;\n}\n.validation .day {\n    white-space: nowrap;\n}\n.validation .day .icon-less, .validation .day .icon-exact, .validation .day .icon-many {\n      display: none;\n}\n.validation .day.exact {\n      color: darkgreen;\n}\n.validation .day.less {\n      color: darkgreen;\n}\n.validation .day.less .icon-less {\n        display: inline-block;\n        color: green;\n}\n.validation .day.less.warnmin {\n        background: red;\n}\n.validation .day.less.warnmin strong {\n          color: white;\n}\n.validation .day.less.warnmin .icon-less {\n          color: white;\n}\n.validation .day.many {\n      color: darkgreen;\n}\n.validation .day.many .icon-many {\n        display: inline-block;\n        color: green;\n}\n.validation .day.many.warnmax {\n        background: red;\n}\n.validation .day.many.warnmax strong {\n          color: white;\n}\n.validation .day.many.warnmax .icon-many {\n          color: white;\n}\n.validation table.table td, .validation table.table th {\n    padding: 2px;\n    font-size: .9em;\n}\n.validation table.table .datas > th {\n    padding-left: 1em;\n}\n.validation table.table .heading-activity > th {\n    padding-top: 1em;\n    border-top: solid 1px #ddd;\n    font-weight: 100;\n}\n.validation .has-validation {\n    cursor: pointer;\n    border-left: 4px #0b93d5 solid;\n}\n.validation .heading {\n    font-size: 1.2em;\n}\n.validation th small {\n    display: block;\n}\n.validation tbody tr.datas:hover {\n    background: rgba(92, 156, 204, 0.25);\n}\n.validation .heading-days th {\n    text-align: center;\n}\n.validation .heading-days th.locked {\n      background: #CCC;\n}\n.validation td, .validation th {\n    border-right: thin #ddd solid;\n}\n.validation th small {\n    font-weight: 100;\n    font-size: .8em;\n}\n.validation td:nth-child(odd) {\n    background: rgba(204, 204, 204, 0.3);\n}\n.validation .datas th {\n    padding-left: 1em;\n}\n.validation .datas td, .validation .total-row td {\n    text-align: right;\n}\n.validation .total {\n    text-align: right;\n    font-size: 1.2em;\n}\n\n\n\n// WEBPACK FOOTER //\n// ./public/js/oscar/src/ValidationPeriod.vue"],"sourceRoot":""}
 No newline at end of file
Loading