opencode ergebnis V0.1

This commit is contained in:
concierge committed 2026-10-23 00:05:06 +02:00
1 parent 61d86a3d83
commit 7e498ebc3f
71 files changed
+28982 -46

No files matched your search

+130
View File
@@ -0,0 +1,130 @@
{% extends "base.html" %}
{% block title %}Straßenverwaltung - CMBNet{% endblock %}
{% block content %}
<h1>Straßenverwaltung</h1>
<p><a href="{{ url_for('admin.accounts', tenant=session.tenant_code) }}">← Zurück zur Accountverwaltung</a></p>
<table id="strassenTable">
<thead>
<tr>
<th>ID</th>
<th>Name</th>
<th>State</th>
<th>Gruppe</th>
<th>HN Min</th>
<th>HN Max</th>
<th>BBox</th>
<th>Aktionen</th>
</tr>
</thead>
<tbody>
{% for strasse in strassen %}
<tr data-id="{{ strasse.id }}">
<td>{{ strasse.id }}</td>
<td>{{ strasse.name }}</td>
<td>
<select onchange="updateStrasse({{ strasse.id }}, {state: this.value})">
<option value="unbearbeitet" {% if strasse.state == 'unbearbeitet' %}selected{% endif %}>unbearbeitet</option>
<option value="zugewiesen" {% if strasse.state == 'zugewiesen' %}selected{% endif %}>zugewiesen</option>
<option value="erledigt" {% if strasse.state == 'erledigt' %}selected{% endif %}>erledigt</option>
</select>
</td>
<td>
<select onchange="updateStrasse({{ strasse.id }}, {group_id: this.value})">
<option value="">-</option>
{% for gruppe in gruppen %}
<option value="{{ gruppe.id }}" {% if strasse.group_id == gruppe.id %}selected{% endif %}>{{ gruppe.aliasname or gruppe.id }}</option>
{% endfor %}
</select>
</td>
<td>{{ strasse.hn_min or '-' }}</td>
<td>{{ strasse.hn_max or '-' }}</td>
<td>{{ strasse.bbox[:20] if strasse.bbox else '-' }}</td>
<td>
<button onclick="editStrasse({{ strasse.id }})">✎</button>
<button onclick="showStreetHistory({{ strasse.id }})">Historie</button>
<button class="secondary" onclick="deleteStrasse({{ strasse.id }})">🗑</button>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<button onclick="openCreateStrasseModal()">Neue Straße</button>
<button onclick="document.getElementById('csvFile').click()">Import CSV</button>
<input type="file" id="csvFile" accept=".csv" style="display:none" onchange="importCSV(this)">
<!-- Create/Edit Strasse Modal -->
<dialog id="strasseModal">
<article>
<header>
<a href="#close" aria-label="Close" class="close" onclick="closeStrasseModal()"></a>
<h3 id="strasseModalTitle">Straße</h3>
</header>
<input type="hidden" id="strasseId">
<label>Name
<input type="text" id="strasseName">
</label>
<label>Hausnummer minimal
<input type="number" id="strasseHnMin">
</label>
<label>Hausnummer maximal
<input type="number" id="strasseHnMax">
</label>
<label>Bounding Box (JSON Array)
<textarea id="strasseBbox"></textarea>
</label>
<label>State
<select id="strasseState">
<option value="unbearbeitet">unbearbeitet</option>
<option value="zugewiesen">zugewiesen</option>
<option value="erledigt">erledigt</option>
</select>
</label>
<label>Gruppe
<select id="strasseGroup">
<option value="">-</option>
{% for gruppe in gruppen %}
<option value="{{ gruppe.id }}">{{ gruppe.aliasname or gruppe.id }}</option>
{% endfor %}
</select>
</label>
<footer>
<button onclick="closeStrasseModal()">Abbrechen</button>
<button onclick="saveStrasse()">Speichern</button>
</footer>
</article>
</dialog>
<!-- History Modal -->
<dialog id="streetHistoryModal">
<article style="max-width: 800px;">
<header>
<a href="#close" aria-label="Close" class="close" onclick="closeStreetHistoryModal()"></a>
<h3>Straßen-Historie</h3>
</header>
<table>
<thead>
<tr>
<th>Datum</th>
<th>Von</th>
<th>Nach</th>
<th>Gruppe</th>
<th>Aktion</th>
</tr>
</thead>
<tbody id="streetHistoryBody">
</tbody>
</table>
<footer>
<button onclick="closeStreetHistoryModal()">Schließen</button>
</footer>
</article>
</dialog>
{% endblock %}
{% block scripts %}
<script src="{{ url_for('static', filename='js/views/admin_strassen.js') }}"></script>
{% endblock %}