Commit b3bade79 authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Bug Slash sur codes TI + bug aff colonnes à 0

parent df041885
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -261,11 +261,11 @@ class Ligne extends AbstractViewHelper
        $display = $this->getListe()->getTypeInterventionVisibility($liste->getTypeIntervention()) ? '' : ';display:none';

        $attribs = [
            'class'                       => 'heures type-intervention ' . $liste->getTypeIntervention()->getCode(),
            'class'                     => 'heures type-intervention ti' . $liste->getTypeIntervention()->getId(),
            'style'                     => 'text-align:right' . $display,
            'id'                        => 'service-' . $liste->getService()->getId() . '-ti-' . $liste->getTypeIntervention()->getId(),
            'data-value'                => $heures,
            'data-type-intervention-code' => $liste->getTypeIntervention()->getCode(),
            'data-type-intervention-id' => $liste->getTypeIntervention()->getId(),
        ];
        $out     = '<td ' . $this->htmlAttribs($attribs) . '>';
        if ($hasForbiddenPeriodes) $out .= '<abbr class="bg-danger" title="Des heures sont renseignées sur une période non conforme à la période de l\'enseignement">';
+2 −2
Original line number Diff line number Diff line
@@ -204,7 +204,7 @@ class Liste extends AbstractViewHelper
        foreach ($typesIntervention as $ti) {
            $display = $this->getTypeInterventionVisibility($ti) ? '' : ';display:none';
            $colspan++;
            $out .= "<th class=\"heures type-intervention " . $ti->getCode() . "\" style=\"width:8%$display\"><abbr title=\"" . $ti->getLibelle() . "\">" . $ti->getCode() . "</abbr></th>\n";
            $out .= "<th class=\"heures type-intervention ti" . $ti->getId() . "\" style=\"width:8%$display\"><abbr title=\"" . $ti->getLibelle() . "\">" . $ti->getCode() . "</abbr></th>\n";
        }
        $out .= "<th>&nbsp;</th>\n";
        $out .= "</tr>\n";
@@ -431,7 +431,7 @@ class Liste extends AbstractViewHelper
            } else {
                $display = ';display:none';
            }
            $out .= "<td id=\"" . $ti->getCode() . "\" class=\"type-intervention " . $ti->getCode() . "\" style=\"text-align:right$display\">" . \UnicaenApp\Util::formattedNumber($data[$ti->getCode()]) . "</td>\n";
            $out .= "<td id=\"" . $ti->getCode() . "\" class=\"type-intervention ti" . $ti->getId() . "\" style=\"text-align:right$display\">" . \UnicaenApp\Util::formattedNumber($data[$ti->getCode()]) . "</td>\n";
        }
        $out .= "<td>&nbsp;</td>\n";
        $out .= "</tr>\n";
+9 −9
Original line number Diff line number Diff line
@@ -11,13 +11,13 @@ $.widget("ose.serviceListe", {
        for (var i in this.totaux) {
            if (this.totaux[i] != 0) {
                count++;
                this.element.find("table.service tr th." + i).show(); // entête
                this.element.find("table.service tr.service-ligne td.type-intervention." + i).show();
                this.element.find("table.service tfoot tr td." + i).show(); // total
                this.element.find("table.service tr th.ti" + i).show(); // entête
                this.element.find("table.service tr.service-ligne td.type-intervention.ti" + i).show();
                this.element.find("table.service tfoot tr td.ti" + i).show(); // total
            } else {
                this.element.find("table.service tr th." + i).hide(); // entête
                this.element.find("table.service tr.service-ligne td.type-intervention." + i).hide();
                this.element.find("table.service tfoot tr td." + i).hide(); // total
                this.element.find("table.service tr th.ti" + i).hide(); // entête
                this.element.find("table.service tr.service-ligne td.type-intervention.ti" + i).hide();
                this.element.find("table.service tfoot tr td.ti" + i).hide(); // total
            }
        }
        this.element.find("table.service #total-general").attr('colspan', count);
@@ -35,12 +35,12 @@ $.widget("ose.serviceListe", {
        this.total = 0;

        this.element.find("table.service tr.service-ligne td.type-intervention").each(function () {
            var typeInterventionCode = $(this).data('type-intervention-code');
            var typeInterventionId = $(this).data('type-intervention-id');
            var value = $(this).data('value');

            if (that.totaux[typeInterventionCode] == undefined) that.totaux[typeInterventionCode] = 0;
            if (that.totaux[typeInterventionId] == undefined) that.totaux[typeInterventionId] = 0;

            that.totaux[typeInterventionCode] += value;
            that.totaux[typeInterventionId] += value;
            that.total += value;
        });