<h2>DIN {{ worksheet.dinNumber }} | {{ worksheet.dinAssetName }}</h2>

<h3>Risikoanalyse</h3>
<table class="mini-table">
    <tr>
        <td><span>Wie hoch ist die Ausfallwahrscheinlichkeit?</span></td>
        <td>{% if worksheet.failureProbability is not null %}{{ worksheet.failureProbability }}{% else %}-{% endif %}</td>
    </tr>
    <tr>
        <td><span>Wie hoch ist der Schaden bei Ausfall?</span></td>
        <td>{% if worksheet.failureDamage is not null %}{{ worksheet.failureDamage }}{% else %}-{% endif %}</td>
    </tr>
</table>

<h3>Optimierungscheck</h3>
<table class="mini-table">
    <tr>
        <td><span>Wird durch die Wartung der Abnutzungsvorrat positiv beeinflusst?</span></td>
        <td>{% if worksheet.maintenanceAdvantage == 1 %}Ja{% else %}nein{% endif %}</td>
    </tr>
    <tr>
        <td><span>Kann durch eine Inspektion der Zustand der Anlage erkannt werden?</span></td>
        <td>{% if worksheet.inspectionAdvantage == 1 %}Ja{% else %}nein{% endif %}</td>
    </tr>
</table>

<h3>Zyklus und Größencluster</h3>
<table class="mini-table">
    <tr>
        <td><span>Aktueller Zyklus (in Monaten)</span></td>
        <td>{% if worksheet.userCycleMonths is not null %}{{ worksheet.userCycleMonths }}{% else %}-{% endif %}</td>
    </tr>
    <tr>
        <td><span>Größencluster</span></td>
        <td>{% if worksheet.bandwidth is not null %}{{ worksheet.bandwidth }}{% else %}-{% endif %}</td>
    </tr>
</table>

<h3>Ergebnis</h3>
<table class="mini-table">
    <tr>
        <td><span>Empfehlung Wartung (in Monaten)</span></td>
        <td>{% if worksheet.recMaintenanceCycleMonths is not null %}{{ worksheet.recMaintenanceCycleMonths }}{% else %}-{% endif %}</td>
    </tr>
    <tr>
        <td><span>Empfehlung Inspektion (in Monaten)</span></td>
        <td>{% if worksheet.recInspectionCycleMonths is not null %}{{ worksheet.recInspectionCycleMonths }}{% else %}-{% endif %}</td>
    </tr>
    <tr>
        <td><span>Einsparpotential p.a. (%)</span></td>
        <td>{% if worksheet.deviationPercentage is not null %}{{ worksheet.deviationPercentage * 100 }}%{% else %}-{% endif %}</td>
    </tr>
    <tr>
        <td><span>Einsparpotential p.a. (€)</span></td>
        <td>{% if worksheet.deviationCosts is not null %}{{ worksheet.deviationCosts | replace({'.': ','}) }}€{% else %}-{% endif %}</td>
    </tr>
</table>

<h3 style="page-break-before: always;">Tätigkeiten</h3>
{% if isPdf == false %}
    <div class="worksheet-table">
        <table>
            <thead>
            <tr>
                <th style="width: 30px;"></th>
                <th><span>Baugruppe</span></th>
                <th><span>Aufgabe</span></th>
                <th class="ins-2"><span>Inspektion</span></th>
                <th class="ins-2"><span>Wartung</span></th>
                <th class="ins-2"><span>Instandsetzung</span></th>
                <th><span>Sachverständiger</span></th>
                <th><span>Sachkundige</span></th>
                <th><span>Fachkraft</span></th>
                <th><span>Normative Grundlage</span></th>
            </tr>
            </thead>
            <tbody>
            {% for index, task in sortedWorksheetTasks %}
                <tr>
                    <td>{{ index + 1 }}. </td>
                    <td>{% if task.delimitation is not null %}{{ task.delimitation }}{% else %}-{% endif %}</td>
                    <td>{{ task.task }}</td>
                    <td>
                        {% if task.inspection == 1 %}
                            <img style="width: 22px;height: auto;" src="{{ app.request.getSchemeAndHttpHost() }}/assets/images/elements/512px-Eo_circle_green_white_checkmark.svg.png" alt="" />
                        {% else %}
                            <img style="width: 22px;height: auto;" src="{{ app.request.getSchemeAndHttpHost() }}/assets/images/elements/512px-Cross_red_circle.svg.png" alt="" />
                        {% endif %}
                    </td>
                    <td>
                        {% if task.maintenance == 1 %}
                            <img style="width: 22px;height: auto;" src="{{ app.request.getSchemeAndHttpHost() }}/assets/images/elements/512px-Eo_circle_green_white_checkmark.svg.png" alt="" />
                        {% else %}
                            <img style="width: 22px;height: auto;" src="{{ app.request.getSchemeAndHttpHost() }}/assets/images/elements/512px-Cross_red_circle.svg.png" alt="" />
                        {% endif %}
                    </td>
                    <td class="ins">
                        {% if task.service == 1 %}
                            <img style="width: 22px;height: auto;" src="{{ app.request.getSchemeAndHttpHost() }}/assets/images/elements/512px-Eo_circle_green_white_checkmark.svg.png" alt="" />
                        {% else %}
                            <img style="width: 22px;height: auto;" src="{{ app.request.getSchemeAndHttpHost() }}/assets/images/elements/512px-Cross_red_circle.svg.png" alt="" />
                        {% endif %}
                    </td>
                    <td>
                        {% if task.expert == 1 %}
                            <img style="width: 22px;height: auto;" src="{{ app.request.getSchemeAndHttpHost() }}/assets/images/elements/512px-Eo_circle_green_white_checkmark.svg.png" alt="" />
                        {% else %}
                            <img style="width: 22px;height: auto;" src="{{ app.request.getSchemeAndHttpHost() }}/assets/images/elements/512px-Cross_red_circle.svg.png" alt="" />
                        {% endif %}
                    </td>
                    <td>
                        {% if task.specialist == 1 %}
                            <img style="width: 22px;height: auto;" src="{{ app.request.getSchemeAndHttpHost() }}/assets/images/elements/512px-Eo_circle_green_white_checkmark.svg.png" alt="" />
                        {% else %}
                            <img style="width: 22px;height: auto;" src="{{ app.request.getSchemeAndHttpHost() }}/assets/images/elements/512px-Cross_red_circle.svg.png" alt="" />
                        {% endif %}
                    </td>
                    <td>
                        {% if task.skilledPersonnel == 1 %}
                            <img style="width: 22px;height: auto;" src="{{ app.request.getSchemeAndHttpHost() }}/assets/images/elements/512px-Eo_circle_green_white_checkmark.svg.png" alt="" />
                        {% else %}
                            <img style="width: 22px;height: auto;" src="{{ app.request.getSchemeAndHttpHost() }}/assets/images/elements/512px-Cross_red_circle.svg.png" alt="" />
                        {% endif %}
                    </td>
                    <td>{{ task.norm }}</td>
                </tr>
            {% endfor %}
            </tbody>
        </table>
    </div>
{% else %}
    {% for index, task in sortedWorksheetTasks %}
        <h4>{{ index + 1 }}. {{ task.task }}</h4>
        <table class="mini-table fifty-fifty">
            <tr>
                <td>Baugruppen</td>
                <td>{% if task.delimitation is not null %}{{ task.delimitation }}{% else %}-{% endif %}</td>
            </tr>
            {% if task.inspection == 1 %}
                <tr>
                    <td>Inspektion (Zyklus: {{ worksheet.recInspectionCycleMonths }} Monate)</td>
                    <td>
                        <img style="width: 18px;height: auto;" src="{{ app.request.getSchemeAndHttpHost() }}/assets/images/elements/512px-Eo_circle_green_white_checkmark.svg.png" alt="" />
                    </td>
                </tr>
            {% endif %}
            {% if task.maintenance == 1 %}
                <tr>
                    <td>Wartung (Zyklus: {{ worksheet.recMaintenanceCycleMonths }} Monate)</td>
                    <td>
                        <img style="width: 18px;height: auto;" src="{{ app.request.getSchemeAndHttpHost() }}/assets/images/elements/512px-Eo_circle_green_white_checkmark.svg.png" alt="" />
                    </td>
                </tr>
            {% endif %}
            {% if task.service == 1 %}
                <tr>
                    <td>Instandsetzung</td>
                    <td>
                        <img style="width: 18px;height: auto;" src="{{ app.request.getSchemeAndHttpHost() }}/assets/images/elements/512px-Eo_circle_green_white_checkmark.svg.png" alt="" />
                    </td>
                </tr>
            {% endif %}
            {% if task.expert == 1 %}
                <tr>
                    <td>Sachverständiger</td>
                    <td>
                        <img style="width: 18px;height: auto;" src="{{ app.request.getSchemeAndHttpHost() }}/assets/images/elements/512px-Eo_circle_green_white_checkmark.svg.png" alt="" />
                    </td>
                </tr>
            {% endif %}
            {% if task.specialist == 1 %}
                <tr>
                    <td>Sachkundige</td>
                    <td>
                        <img style="width: 18px;height: auto;" src="{{ app.request.getSchemeAndHttpHost() }}/assets/images/elements/512px-Eo_circle_green_white_checkmark.svg.png" alt="" />
                    </td>
                </tr>
            {% endif %}
            {% if task.skilledPersonnel == 1 %}
                <tr>
                    <td>Fachkraft</td>
                    <td>
                        <img style="width: 18px;height: auto;" src="{{ app.request.getSchemeAndHttpHost() }}/assets/images/elements/512px-Eo_circle_green_white_checkmark.svg.png" alt="" />
                    </td>
                </tr>
            {% endif %}
            <tr>
                <td>Normative Grundlage</td>
                <td>{{ task.norm }}</td>
            </tr>
        </table>
    {% endfor %}
{% endif %}