<!DOCTYPE html>

<html lang="de">

<head>


<meta charset="utf-8">

<title>
    Wartung
</title>

<link rel="stylesheet"
      href="{{ url_for('static', filename='style.css') }}">


</head>

<body>

<div class="header">


<div class="header-left">

    <img class="logo-ing"
         src="{{ url_for('static', filename='logo_ing.png') }}">

    <div>

        <div class="title">
            ING Finanzen
        </div>

        <div class="subtitle">
            Wartung und Verwaltung
        </div>

    </div>

</div>

<img class="logo-hintergasse"
     src="{{ url_for('static', filename='logo_hintergasse.png') }}">


</div>

<div class="navbar">

    <a href="/">Dashboard</a>
    <a href="/categories">Kategorien</a>
    <a href="/maintenance">Wartung</a>
    <a href="/log">Log</a>

</div>

{% if message %}

<div id="modal-overlay">

    <div id="modal">

        <h2 class="success-title">
            ✅ Erfolgreich
        </h2>

        <p class="modal-message">
    {{ message|replace('\n', '<br>')|safe }}
</p>

        <button onclick="closeModal()">
            OK
        </button>

    </div>

</div>

{% endif %}
<div class="container">


<div class="cards">

    <div class="card">

        <h2>
            Kontostand aktualisieren
        </h2>

        <p>
            balance.py ausführen
        </p>

        <form
            action="/run/balance"
            method="post">

            <button type="submit">
                Starten
            </button>

        </form>

    </div>

 <div class="card">

    <h2>
        Transaktionen laden
    </h2>

    <form
        action="/run/transactions"
        method="post">

        Jahr:

        <input
            type="text"
            name="year"
            value="{{ year }}">

        <br><br>

        KW:

        <input
            type="text"
            name="week"
            value="{{ week }}">

        <br><br>

        <button type="submit">
            Starten
        </button>

    </form>

</div>

    <div class="card">

    <h2>
        Kategorisierung
    </h2>

    <form
        action="/run/categorize"
        method="post">

        Jahr:

        <input
            type="text"
            name="year"
            value="{{ year }}">

        <br><br>

        KW:

        <input
            type="text"
            name="week"
            value="{{ week }}">

        <br><br>

        <button type="submit">
            Starten
        </button>

    </form>

</div>
<div class="card">

    <h2>
        Wochenupdate
    </h2>

    <form
        action="/run/weekly_update"
        method="post">

        <input
            type="hidden"
            name="year"
            value="{{ year }}">

        <input
            type="hidden"
            name="week"
            value="{{ week }}">

        <p>
            Lädt Transaktionen und
            kategorisiert automatisch.
        </p>

        <button type="submit">
            Starten
        </button>

    </form>

</div>
</div>


</div>

<div class="footer">


Hintergasse © 2026


</div>
<script>

function closeModal() {

    document
        .getElementById(
            "modal-overlay"
        )
        .style
        .display = "none";
}

</script>
</body>

</html>
