306 lines
14 KiB
HTML
306 lines
14 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="de">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>goCarLog - Fahrzeugverwaltung</title>
|
|
<link rel="stylesheet" href="/static/css/style.css">
|
|
</head>
|
|
<body>
|
|
<div class="app-container">
|
|
<!-- Sidebar Navigation -->
|
|
<nav class="sidebar">
|
|
<div class="sidebar-header">
|
|
<h1>goCarLog</h1>
|
|
<p class="subtitle">Fahrzeugverwaltung</p>
|
|
</div>
|
|
<ul class="nav-menu">
|
|
<li><a href="#" class="nav-link active" data-view="dashboard">
|
|
<span class="nav-icon">📊</span> Übersicht
|
|
</a></li>
|
|
<li><a href="#" class="nav-link" data-view="vehicles">
|
|
<span class="nav-icon">🚗</span> Fahrzeuge
|
|
</a></li>
|
|
<li><a href="#" class="nav-link" data-view="logbook">
|
|
<span class="nav-icon">📝</span> Logbuch
|
|
</a></li>
|
|
</ul>
|
|
<div class="sidebar-footer">
|
|
<button class="btn btn-outline btn-sm" id="addVehicleBtn">+ Neues Fahrzeug</button>
|
|
</div>
|
|
</nav>
|
|
|
|
<!-- Main Content -->
|
|
<main class="main-content">
|
|
<!-- Dashboard View -->
|
|
<div id="dashboardView" class="view active">
|
|
<header class="view-header">
|
|
<h2>Übersicht</h2>
|
|
</header>
|
|
<div class="dashboard-grid">
|
|
<div class="stat-card">
|
|
<div class="stat-icon">🚗</div>
|
|
<div class="stat-info">
|
|
<span class="stat-value" id="totalVehicles">0</span>
|
|
<span class="stat-label">Fahrzeuge</span>
|
|
</div>
|
|
</div>
|
|
<div class="stat-card">
|
|
<div class="stat-icon">⛽</div>
|
|
<div class="stat-info">
|
|
<span class="stat-value" id="totalFuelCost">0 €</span>
|
|
<span class="stat-label">Tankkosten gesamt</span>
|
|
</div>
|
|
</div>
|
|
<div class="stat-card">
|
|
<div class="stat-icon">📝</div>
|
|
<div class="stat-info">
|
|
<span class="stat-value" id="totalEntries">0</span>
|
|
<span class="stat-label">Logbucheinträge</span>
|
|
</div>
|
|
</div>
|
|
<div class="stat-card">
|
|
<div class="stat-icon">🛣️</div>
|
|
<div class="stat-info">
|
|
<span class="stat-value" id="totalKm">0 km</span>
|
|
<span class="stat-label">Gesamtkilometer</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Vehicles View -->
|
|
<div id="vehiclesView" class="view">
|
|
<header class="view-header">
|
|
<h2>Fahrzeuge</h2>
|
|
<button class="btn btn-primary" id="addVehicleBtnTop">+ Neues Fahrzeug</button>
|
|
</header>
|
|
<div class="filters-bar">
|
|
<input type="text" id="vehicleFilterName" placeholder="Name suchen..." class="input">
|
|
<input type="text" id="vehicleFilterPlate" placeholder="Kennzeichen..." class="input">
|
|
<select id="vehicleFilterFuel" class="input">
|
|
<option value="">Alle Kraftstoffe</option>
|
|
</select>
|
|
<button class="btn btn-outline" id="clearFiltersBtn">Filter löschen</button>
|
|
</div>
|
|
<div class="table-container">
|
|
<table class="table" id="vehiclesTable">
|
|
<thead>
|
|
<tr>
|
|
<th data-sort="name" class="sortable">Name ↕</th>
|
|
<th data-sort="manufacturer" class="sortable">Hersteller ↕</th>
|
|
<th data-sort="model" class="sortable">Modell ↕</th>
|
|
<th data-sort="fuel_name" class="sortable">Kraftstoff ↕</th>
|
|
<th data-sort="power_kw" class="sortable">Leistung ↕</th>
|
|
<th data-sort="current_odometer" class="sortable">Kilometer ↕</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="vehiclesTableBody">
|
|
<tr><td colspan="6" class="empty-state">Keine Fahrzeuge vorhanden</td></tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Logbook View -->
|
|
<div id="logbookView" class="view">
|
|
<header class="view-header">
|
|
<h2>Logbuch</h2>
|
|
<button class="btn btn-primary" id="addLogBtn">+ Neuer Eintrag</button>
|
|
</header>
|
|
<div class="filters-bar">
|
|
<select id="logFilterVehicle" class="input">
|
|
<option value="">Alle Fahrzeuge</option>
|
|
</select>
|
|
<select id="logFilterType" class="input">
|
|
<option value="">Alle Typen</option>
|
|
<option value="tankung">Tankung</option>
|
|
<option value="wartung">Wartung</option>
|
|
<option value="reparatur">Reparatur</option>
|
|
<option value="notiz">Notiz</option>
|
|
</select>
|
|
<input type="date" id="logFilterDateFrom" class="input">
|
|
<input type="date" id="logFilterDateTo" class="input">
|
|
<button class="btn btn-outline" id="clearLogFiltersBtn">Filter löschen</button>
|
|
</div>
|
|
<div class="cost-summary" id="costSummary">
|
|
<div class="cost-item">
|
|
<span class="cost-label">Tankung:</span>
|
|
<span class="cost-value" id="costTankung">0,00 €</span>
|
|
</div>
|
|
<div class="cost-item">
|
|
<span class="cost-label">Wartung:</span>
|
|
<span class="cost-value" id="costWartung">0,00 €</span>
|
|
</div>
|
|
<div class="cost-item">
|
|
<span class="cost-label">Reparatur:</span>
|
|
<span class="cost-value" id="costReparatur">0,00 €</span>
|
|
</div>
|
|
<div class="cost-item">
|
|
<span class="cost-label">Notiz:</span>
|
|
<span class="cost-value" id="costNotiz">0,00 €</span>
|
|
</div>
|
|
</div>
|
|
<div class="table-container">
|
|
<table class="table" id="logbookTable">
|
|
<thead>
|
|
<tr>
|
|
<th data-sort="vehicle_name" class="sortable">Fahrzeug ↕</th>
|
|
<th data-sort="log_type" class="sortable">Typ ↕</th>
|
|
<th data-sort="datetime" class="sortable">Datum ↕</th>
|
|
<th data-sort="odometer" class="sortable">Kilometer ↕</th>
|
|
<th data-sort="cost" class="sortable">Kosten ↕</th>
|
|
<th class="sortable" data-sort="consumption">Verbrauch ↕</th>
|
|
<th data-sort="note" class="sortable">Notiz ↕</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="logbookTableBody">
|
|
<tr><td colspan="8" class="empty-state">Keine Einträge vorhanden</td></tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Vehicle Detail View -->
|
|
<div id="vehicleDetail" class="view">
|
|
<header class="view-header">
|
|
<button class="btn btn-outline" id="backToVehiclesBtn">← Zurück</button>
|
|
<h2 id="detailTitle">Fahrzeugdetails</h2>
|
|
</header>
|
|
<div class="detail-grid">
|
|
<div class="detail-card">
|
|
<h3>Fahrzeugdaten</h3>
|
|
<div id="vehicleDetailContent"></div>
|
|
</div>
|
|
<div class="detail-card">
|
|
<h3>Durchschnittsverbrauch</h3>
|
|
<div id="consumptionContent">
|
|
<p class="empty-state">Keine Daten verfügbar</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</main>
|
|
</div>
|
|
|
|
<!-- Modal: New Vehicle -->
|
|
<div id="vehicleModal" class="modal">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h3>Neues Fahrzeug</h3>
|
|
<button class="modal-close" id="closeVehicleModal">×</button>
|
|
</div>
|
|
<form id="vehicleForm">
|
|
<div class="form-group">
|
|
<label for="vehicleName">Name *</label>
|
|
<input type="text" id="vehicleName" required>
|
|
</div>
|
|
<div class="form-row">
|
|
<div class="form-group">
|
|
<label for="vehicleManufacturer">Hersteller</label>
|
|
<input type="text" id="vehicleManufacturer">
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="vehicleModel">Modell</label>
|
|
<input type="text" id="vehicleModel">
|
|
</div>
|
|
</div>
|
|
<div class="form-row">
|
|
<div class="form-group">
|
|
<label for="vehicleYear">Baujahr</label>
|
|
<input type="number" id="vehicleYear">
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="vehicleFuel">Kraftstoff *</label>
|
|
<select id="vehicleFuel" required></select>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="vehiclePlate">Kennzeichen</label>
|
|
<input type="text" id="vehiclePlate">
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="vehicleDescription">Beschreibung</label>
|
|
<textarea id="vehicleDescription" rows="3"></textarea>
|
|
</div>
|
|
<div class="form-row">
|
|
<div class="form-group">
|
|
<label for="vehicleWeight">Gewicht (kg)</label>
|
|
<input type="number" step="0.1" id="vehicleWeight">
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="vehiclePower">Leistung (kW)</label>
|
|
<input type="number" step="0.1" id="vehiclePower">
|
|
</div>
|
|
</div>
|
|
<div class="modal-actions">
|
|
<button type="button" class="btn btn-outline" id="cancelVehicleBtn">Abbrechen</button>
|
|
<button type="submit" class="btn btn-primary">Erstellen</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Modal: New Log Entry -->
|
|
<div id="logModal" class="modal">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h3>Neuer Logbucheintrag</h3>
|
|
<button class="modal-close" id="closeLogModal">×</button>
|
|
</div>
|
|
<form id="logForm">
|
|
<div class="form-row">
|
|
<div class="form-group">
|
|
<label for="logVehicle">Fahrzeug *</label>
|
|
<select id="logVehicle" required></select>
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="logType">Typ *</label>
|
|
<select id="logType" required>
|
|
<option value="">Wählen...</option>
|
|
<option value="tankung">Tankung</option>
|
|
<option value="wartung">Wartung</option>
|
|
<option value="reparatur">Reparatur</option>
|
|
<option value="notiz">Notiz</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="form-row">
|
|
<div class="form-group">
|
|
<label for="logDate">Datum</label>
|
|
<input type="datetime-local" id="logDate">
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="logOdometer">Kilometerstand *</label>
|
|
<input type="number" step="0.1" id="logOdometer" required>
|
|
</div>
|
|
</div>
|
|
<div class="form-row">
|
|
<div class="form-group">
|
|
<label for="logCost">Kosten (€)</label>
|
|
<input type="number" step="0.01" id="logCost">
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="logQuantity">Menge</label>
|
|
<input type="number" step="0.001" id="logQuantity">
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="logNote">Notiz</label>
|
|
<textarea id="logNote" rows="4"></textarea>
|
|
</div>
|
|
<div class="modal-actions">
|
|
<button type="button" class="btn btn-outline" id="cancelLogBtn">Abbrechen</button>
|
|
<button type="submit" class="btn btn-primary">Erstellen</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Toast Notification -->
|
|
<div id="toast" class="toast"></div>
|
|
|
|
<script src="/static/js/app.js"></script>
|
|
</body>
|
|
</html>
|