Neue Verwaltung der Gruppenzuordnung 1:n
This commit is contained in:
1 parent
fa02a7ade0
commit
02c017d53d
34 files changed
+1306
-251
No files matched your search
@@ -4,7 +4,7 @@
|
||||
<h3>App installieren</h3>
|
||||
</header>
|
||||
<div class="dialog-body">
|
||||
<p>Installiere CMBNet als App auf dem Home-Bildschirm:</p>
|
||||
<p>Installiere {{ APP_TITLE }} als App auf dem Home-Bildschirm:</p>
|
||||
<p class="mobile-dialog-hint" id="mobileInstallGenericHint">
|
||||
Öffne das Browsermenü und wähle „App installieren“ bzw.
|
||||
„Zum Home-Bildschirm hinzufügen“.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Accountverwaltung - CMBNet{% endblock %}
|
||||
{% block title %}Accountverwaltung - {{ APP_TITLE }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<p><a href="{{ url_for('admin.dashboard', tenant=session.tenant_code) }}">← Zurück zum Dashboard</a></p>
|
||||
@@ -90,5 +90,6 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
<script>window.CMBNET_ADMIN_RELOAD_WATCH = true;</script>
|
||||
<script src="{{ url_for('static', filename='js/views/admin_accounts.js') }}"></script>
|
||||
{% endblock %}
|
||||
@@ -1,6 +1,6 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Admin Dashboard - CMBNet{% endblock %}
|
||||
{% block title %}Admin Dashboard - {{ APP_TITLE }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Administrator Dashboard</h1>
|
||||
@@ -35,5 +35,6 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
<script>window.CMBNET_ADMIN_RELOAD_WATCH = true;</script>
|
||||
<script src="{{ url_for('static', filename='js/views/admin_dashboard.js') }}"></script>
|
||||
{% endblock %}
|
||||
@@ -1,6 +1,6 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Gruppenverwaltung - CMBNet{% endblock %}
|
||||
{% block title %}Gruppenverwaltung - {{ APP_TITLE }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<p><a href="{{ url_for('admin.dashboard', tenant=session.tenant_code) }}">← Zurück zum Dashboard</a></p>
|
||||
@@ -12,7 +12,6 @@
|
||||
<th>ID</th>
|
||||
<th>Aliasname</th>
|
||||
<th>State</th>
|
||||
<th>Account</th>
|
||||
<th>Position</th>
|
||||
<th>Aktionen</th>
|
||||
</tr>
|
||||
@@ -31,14 +30,6 @@
|
||||
<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>
|
||||
@@ -63,14 +54,6 @@
|
||||
<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>
|
||||
@@ -106,5 +89,6 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
<script>window.CMBNET_ADMIN_RELOAD_WATCH = true;</script>
|
||||
<script src="{{ url_for('static', filename='js/views/admin_gruppen.js') }}"></script>
|
||||
{% endblock %}
|
||||
@@ -1,6 +1,6 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Straßenverwaltung - CMBNet{% endblock %}
|
||||
{% block title %}Straßenverwaltung - {{ APP_TITLE }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<p><a href="{{ url_for('admin.dashboard', tenant=session.tenant_code) }}">← Zurück zum Dashboard</a></p>
|
||||
@@ -154,5 +154,6 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
<script>window.CMBNET_ADMIN_RELOAD_WATCH = true;</script>
|
||||
<script src="{{ url_for('static', filename='js/views/admin_strassen.js') }}"></script>
|
||||
{% endblock %}
|
||||
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{% block title %}CMBNet{% endblock %}</title>
|
||||
<title>{% block title %}{{ APP_TITLE }}{% endblock %}</title>
|
||||
<link rel="icon" href="{{ url_for('static', filename='favicon.ico') }}" type="image/x-icon">
|
||||
<script>
|
||||
(() => {
|
||||
@@ -22,6 +22,7 @@
|
||||
// mit X-Forwarded-Prefix enthält SCRIPT_NAME z. B. "/cmbnet".
|
||||
window.CMBNET_BASE_URL = {{ request.script_root|tojson }};
|
||||
window.CMBNET_TENANT = {{ (session.get('tenant_code') or '')|tojson }};
|
||||
window.CMBNET_APP_TITLE = {{ APP_TITLE|tojson }};
|
||||
window.CMBNET_APP_URL = function (path) {
|
||||
const base = (window.CMBNET_BASE_URL || '').replace(/\/+$/, '');
|
||||
const clean = String(path == null ? '' : path).replace(/^\/+/, '');
|
||||
@@ -51,6 +52,7 @@
|
||||
{% block content %}{% endblock %}
|
||||
</main>
|
||||
<script src="{{ url_for('static', filename='js/leaflet.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/reload_notice.js') }}"></script>
|
||||
{% block scripts %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,6 +1,6 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Beobachter - {{ session.tenant_code }} - CMBNet{% endblock %}
|
||||
{% block title %}Beobachter - {{ session.tenant_code }} - {{ APP_TITLE }}{% endblock %}
|
||||
|
||||
{% block body_class %}dispatcher-page beobachter-page{% endblock %}
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
</div>
|
||||
<img class="dispatcher-logo"
|
||||
src="{{ url_for('static', filename='img/logo.png') }}"
|
||||
alt="CMBNet">
|
||||
alt="{{ APP_TITLE }}">
|
||||
</div>
|
||||
|
||||
<div class="street-search" role="search">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Dispatcher - {{ session.tenant_code }} - CMBNet{% endblock %}
|
||||
{% block title %}Dispatcher - {{ session.tenant_code }} - {{ APP_TITLE }}{% endblock %}
|
||||
|
||||
{% block body_class %}dispatcher-page{% endblock %}
|
||||
|
||||
@@ -26,11 +26,9 @@
|
||||
</div>
|
||||
<div class="clock-time" id="clockTime">--:--:--</div>
|
||||
</div>
|
||||
<button type="button" id="speakerButton" class="icon-button"
|
||||
title="Nachricht an alle senden" aria-label="Nachricht an alle senden">📢</button>
|
||||
<img class="dispatcher-logo"
|
||||
src="{{ url_for('static', filename='img/logo.png') }}"
|
||||
alt="CMBNet">
|
||||
alt="{{ APP_TITLE }}">
|
||||
</div>
|
||||
|
||||
<div class="street-search" role="search">
|
||||
@@ -47,7 +45,31 @@
|
||||
</div>
|
||||
<div class="street-search-status" id="streetSearchStatus"
|
||||
role="status" aria-live="polite"></div>
|
||||
<div class="connection-status" id="connectionStatus">Verbinde …</div>
|
||||
<div class="header-status-row">
|
||||
<div class="connection-status" id="connectionStatus">Verbinde …</div>
|
||||
<div class="header-action-buttons">
|
||||
<button type="button" id="speakerButton" class="icon-button"
|
||||
title="Nachricht an alle senden" aria-label="Nachricht an alle senden">📢</button>
|
||||
<button type="button" id="groupAssignmentButton"
|
||||
class="icon-button group-assignment-button"
|
||||
title="Gruppen-Accounts zuordnen"
|
||||
aria-label="Gruppen-Accounts zuordnen">
|
||||
<svg viewBox="0 0 32 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1.4" stroke-linecap="round"
|
||||
stroke-linejoin="round" aria-hidden="true" focusable="false">
|
||||
<path d="M2.5 5.5 4 7.2 5.6 4.6 7.2 7.2 8.7 5.5 8.2 8.2H3z"/>
|
||||
<circle cx="5.8" cy="10.4" r="1.8"/>
|
||||
<path d="M2.7 18.8c.3-3 1.5-4.6 3.1-4.6s2.8 1.6 3.1 4.6"/>
|
||||
<path d="M12.9 3.5 14.4 5.2 16 2.6 17.6 5.2 19.1 3.5 18.6 6.2H13.4z"/>
|
||||
<circle cx="16" cy="8.4" r="1.8"/>
|
||||
<path d="M13 17c.3-3 1.5-4.6 3-4.6s2.7 1.6 3 4.6"/>
|
||||
<path d="M23.3 5.5 24.8 7.2 26.4 4.6 28 7.2 29.5 5.5 29 8.2h-5.2z"/>
|
||||
<circle cx="26.4" cy="10.4" r="1.8"/>
|
||||
<path d="M23.3 18.8c.3-3 1.5-4.6 3.1-4.6s2.8 1.6 3.1 4.6"/>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="group-accordion" id="groupAccordion"></div>
|
||||
@@ -168,6 +190,37 @@
|
||||
</article>
|
||||
</dialog>
|
||||
|
||||
<!-- Gruppen-Accounts den Gruppen zuordnen -->
|
||||
<dialog id="groupAssignmentModal" class="group-assignment-dialog"
|
||||
aria-labelledby="groupAssignmentTitle">
|
||||
<article>
|
||||
<header>
|
||||
<h3 id="groupAssignmentTitle">Gruppen-Accounts zuordnen</h3>
|
||||
</header>
|
||||
<div class="dialog-body group-assignment-body">
|
||||
<p class="group-assignment-hint">
|
||||
Für jeden Account kann höchstens eine Gruppe gewählt werden.
|
||||
„Nicht dabei“ hebt eine bestehende Zuordnung auf.
|
||||
</p>
|
||||
<div class="group-assignment-scroll">
|
||||
<table class="group-assignment-table" id="groupAssignmentTable">
|
||||
<thead id="groupAssignmentHead"></thead>
|
||||
<tbody id="groupAssignmentBody"></tbody>
|
||||
</table>
|
||||
</div>
|
||||
<p id="groupAssignmentEmpty" class="group-assignment-empty" hidden>
|
||||
Es gibt keine Accounts mit der Rolle „Gruppe“.
|
||||
</p>
|
||||
</div>
|
||||
<footer>
|
||||
<button type="button" class="secondary"
|
||||
onclick="closeGroupAssignmentModal()">Abbrechen</button>
|
||||
<button type="button" id="groupAssignmentSaveButton"
|
||||
onclick="saveGroupAssignments()">Speichern</button>
|
||||
</footer>
|
||||
</article>
|
||||
</dialog>
|
||||
|
||||
<!-- Chatverlauf einer Gruppe -->
|
||||
<dialog id="chatModal">
|
||||
<article class="chat-dialog">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Dispatcher Mobil - {{ session.tenant_code }} - CMBNet{% endblock %}
|
||||
{% block title %}Dispatcher Mobil - {{ session.tenant_code }} - {{ APP_TITLE }}{% endblock %}
|
||||
|
||||
{% block body_class %}mobile-page{% endblock %}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<meta name="mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="default">
|
||||
<meta name="apple-mobile-web-app-title" content="CMBNet">
|
||||
<meta name="apple-mobile-web-app-title" content="{{ APP_TITLE }}">
|
||||
<link rel="apple-touch-icon" href="{{ url_for('static', filename='img/apple-touch-icon.png') }}">
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/pico.min.css') }}">
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/leaflet.css') }}">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Gruppen View - {{ session.tenant_code }} - CMBNet{% endblock %}
|
||||
{% block title %}Gruppen View - {{ session.tenant_code }} - {{ APP_TITLE }}{% endblock %}
|
||||
|
||||
{% block body_class %}mobile-page{% endblock %}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<meta name="mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="default">
|
||||
<meta name="apple-mobile-web-app-title" content="CMBNet">
|
||||
<meta name="apple-mobile-web-app-title" content="{{ APP_TITLE }}">
|
||||
<link rel="apple-touch-icon" href="{{ url_for('static', filename='img/apple-touch-icon.png') }}">
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/pico.min.css') }}">
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/leaflet.css') }}">
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Login - CMBNet ({{ tenant_code }}){% endblock %}
|
||||
{% block title %}Login - {{ APP_TITLE }} ({{ tenant_code }}){% endblock %}
|
||||
{% block body_class %}login-page{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<article>
|
||||
<header>
|
||||
<h1>CMBNet Login</h1>
|
||||
<h1>{{ APP_TITLE }} Login</h1>
|
||||
<p>Mandant: <strong>{{ tenant_code }}</strong></p>
|
||||
</header>
|
||||
<form method="post">
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Mandantenauswahl - CMBNet{% endblock %}
|
||||
{% block title %}Mandantenauswahl - {{ APP_TITLE }}{% endblock %}
|
||||
{% block body_class %}login-page{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<article>
|
||||
<header>
|
||||
<h1>CMBNet - Mandantenauswahl</h1>
|
||||
<h1>{{ APP_TITLE }} - Mandantenauswahl</h1>
|
||||
</header>
|
||||
<p>Bitte wählen Sie Ihren Mandanten aus:</p>
|
||||
<div class="grid">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Öffentlicher View - CMBNet{% endblock %}
|
||||
{% block title %}Öffentlicher View - {{ APP_TITLE }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Öffentlicher View</h1>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Präsentations View - CMBNet{% endblock %}
|
||||
{% block title %}Präsentations View - {{ APP_TITLE }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Präsentations View</h1>
|
||||
|
||||
Reference in new issue
Block a user