opencode ergebnis V0.1
This commit is contained in:
1 parent
61d86a3d83
commit
7e498ebc3f
71 files changed
+28982
-46
No files matched your search
@@ -0,0 +1,100 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Accountverwaltung - CMBNet{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Accountverwaltung</h1>
|
||||
<p><a href="{{ url_for('views.dispatcher', tenant=session.tenant_code) }}">← Zurück</a> | <a href="{{ url_for('auth.logout', tenant=session.tenant_code) }}">Abmelden</a></p>
|
||||
|
||||
<table id="accountsTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Name</th>
|
||||
<th>Rolle</th>
|
||||
<th>Aktionen</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for account in accounts %}
|
||||
<tr data-id="{{ account.id }}">
|
||||
<td>{{ account.id }}</td>
|
||||
<td>{{ account.name }}</td>
|
||||
<td>
|
||||
<select onchange="changeRole({{ account.id }}, this.value)">
|
||||
<option value="Gast" {% if account.role == 'Gast' %}selected{% endif %}>Gast</option>
|
||||
<option value="Beobachter" {% if account.role == 'Beobachter' %}selected{% endif %}>Beobachter</option>
|
||||
<option value="Gruppe" {% if account.role == 'Gruppe' %}selected{% endif %}>Gruppe</option>
|
||||
<option value="Dispatcher" {% if account.role == 'Dispatcher' %}selected{% endif %}>Dispatcher</option>
|
||||
<option value="Administrator" {% if account.role == 'Administrator' %}selected{% endif %}>Administrator</option>
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<button onclick="openPasswordModal({{ account.id }})">Passwort zurücksetzen</button>
|
||||
<button class="secondary" onclick="deleteAccount({{ account.id }})">Löschen</button>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<button onclick="openCreateAccountModal()">Neuer Account</button>
|
||||
|
||||
<nav>
|
||||
<ul>
|
||||
<li><a href="{{ url_for('admin_gruppen.gruppen', tenant=session.tenant_code) }}">Gruppenverwaltung</a></li>
|
||||
<li><a href="{{ url_for('admin_strassen.strassen', tenant=session.tenant_code) }}">Straßenverwaltung</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
<!-- Passwort Modal -->
|
||||
<dialog id="passwordModal">
|
||||
<article>
|
||||
<header>
|
||||
<a href="#close" aria-label="Close" class="close" onclick="closePasswordModal()"></a>
|
||||
<h3>Passwort zurücksetzen</h3>
|
||||
</header>
|
||||
<input type="hidden" id="pwdAccountId">
|
||||
<label>Neues Passwort
|
||||
<input type="password" id="newPassword">
|
||||
</label>
|
||||
<footer>
|
||||
<button onclick="closePasswordModal()">Abbrechen</button>
|
||||
<button onclick="resetPassword()">Zurücksetzen</button>
|
||||
</footer>
|
||||
</article>
|
||||
</dialog>
|
||||
|
||||
<!-- Create Account Modal -->
|
||||
<dialog id="createAccountModal">
|
||||
<article>
|
||||
<header>
|
||||
<a href="#close" aria-label="Close" class="close" onclick="closeCreateAccountModal()"></a>
|
||||
<h3>Neuer Account</h3>
|
||||
</header>
|
||||
<label>Name
|
||||
<input type="text" id="newAccountName">
|
||||
</label>
|
||||
<label>Passwort
|
||||
<input type="password" id="newAccountPassword">
|
||||
</label>
|
||||
<label>Rolle
|
||||
<select id="newAccountRole">
|
||||
<option value="Gast">Gast</option>
|
||||
<option value="Beobachter">Beobachter</option>
|
||||
<option value="Gruppe">Gruppe</option>
|
||||
<option value="Dispatcher">Dispatcher</option>
|
||||
<option value="Administrator">Administrator</option>
|
||||
</select>
|
||||
</label>
|
||||
<footer>
|
||||
<button onclick="closeCreateAccountModal()">Abbrechen</button>
|
||||
<button onclick="createAccount()">Anlegen</button>
|
||||
</footer>
|
||||
</article>
|
||||
</dialog>
|
||||
{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
<script src="{{ url_for('static', filename='js/views/admin_accounts.js') }}"></script>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,109 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Gruppenverwaltung - CMBNet{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Gruppenverwaltung</h1>
|
||||
<p><a href="{{ url_for('admin.accounts', tenant=session.tenant_code) }}">← Zurück zur Accountverwaltung</a></p>
|
||||
|
||||
<table id="gruppenTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Aliasname</th>
|
||||
<th>State</th>
|
||||
<th>Account</th>
|
||||
<th>Position</th>
|
||||
<th>Aktionen</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for gruppe in gruppen %}
|
||||
<tr data-id="{{ gruppe.id }}">
|
||||
<td>{{ gruppe.id }}</td>
|
||||
<td><input type="text" value="{{ gruppe.aliasname or '' }}" onchange="updateGruppe({{ gruppe.id }}, {aliasname: this.value})"></td>
|
||||
<td>
|
||||
<select onchange="updateGruppe({{ gruppe.id }}, {state: this.value})">
|
||||
<option value="offen" {% if gruppe.state == 'offen' %}selected{% endif %}>offen</option>
|
||||
<option value="unterwegs" {% if gruppe.state == 'unterwegs' %}selected{% endif %}>unterwegs</option>
|
||||
<option value="online" {% if gruppe.state == 'online' %}selected{% endif %}>online</option>
|
||||
<option value="pausierend" {% if gruppe.state == 'pausierend' %}selected{% endif %}>pausierend</option>
|
||||
<option value="fertig" {% if gruppe.state == 'fertig' %}selected{% endif %}>fertig</option>
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<select onchange="updateGruppe({{ gruppe.id }}, {account_id: this.value})">
|
||||
<option value="">-</option>
|
||||
{% for acc in accounts %}
|
||||
<option value="{{ acc.id }}" {% if gruppe.account_id == acc.id %}selected{% endif %}>{{ acc.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</td>
|
||||
<td class="group-position">{% if gruppe.last_lat is not none and gruppe.last_lon is not none %}{{ gruppe.last_lat }}, {{ gruppe.last_lon }}{% else %}unbekannt{% endif %}</td>
|
||||
<td>
|
||||
<button onclick="showHistory({{ gruppe.id }})">Historie</button>
|
||||
<button class="secondary delete-position" onclick="deleteGroupPosition({{ gruppe.id }})" {% if gruppe.last_lat is none or gruppe.last_lon is none %}disabled{% endif %}>Position löschen</button>
|
||||
<button class="secondary" onclick="deleteGruppe({{ gruppe.id }})">Löschen</button>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<button onclick="openCreateGruppeModal()">Neue Gruppe</button>
|
||||
|
||||
<!-- Create Gruppe Modal -->
|
||||
<dialog id="createGruppeModal">
|
||||
<article>
|
||||
<header>
|
||||
<a href="#close" aria-label="Close" class="close" onclick="closeCreateGruppeModal()"></a>
|
||||
<h3>Neue Gruppe</h3>
|
||||
</header>
|
||||
<label>Aliasname
|
||||
<input type="text" id="gruppeAlias">
|
||||
</label>
|
||||
<label>Account (Rolle Gruppe)
|
||||
<select id="gruppeAccount">
|
||||
<option value="">-</option>
|
||||
{% for acc in accounts %}
|
||||
<option value="{{ acc.id }}">{{ acc.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</label>
|
||||
<footer>
|
||||
<button onclick="closeCreateGruppeModal()">Abbrechen</button>
|
||||
<button onclick="createGruppe()">Anlegen</button>
|
||||
</footer>
|
||||
</article>
|
||||
</dialog>
|
||||
|
||||
<!-- History Modal -->
|
||||
<dialog id="historyModal">
|
||||
<article style="max-width: 800px;">
|
||||
<header>
|
||||
<a href="#close" aria-label="Close" class="close" onclick="closeHistoryModal()"></a>
|
||||
<h3>Gruppen-Historie</h3>
|
||||
</header>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Datum</th>
|
||||
<th>Von</th>
|
||||
<th>Nach</th>
|
||||
<th>Position</th>
|
||||
<th>Aktion</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="historyBody">
|
||||
</tbody>
|
||||
</table>
|
||||
<footer>
|
||||
<button onclick="closeHistoryModal()">Schließen</button>
|
||||
</footer>
|
||||
</article>
|
||||
</dialog>
|
||||
{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
<script src="{{ url_for('static', filename='js/views/admin_gruppen.js') }}"></script>
|
||||
{% endblock %}
|
||||
@@ -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 %}
|
||||
Reference in new issue
Block a user