2025-10-03 13:40:08 +02:00
|
|
|
<div class="layout">
|
|
|
|
|
<div class="aside">
|
|
|
|
|
<div class="toolbar">
|
2025-10-04 23:36:37 +02:00
|
|
|
|
2025-10-04 16:14:42 +02:00
|
|
|
@if (isLoading) {
|
|
|
|
|
<span class="loading">⏳ Chargement...</span>
|
|
|
|
|
}
|
2025-10-03 13:40:08 +02:00
|
|
|
</div>
|
2025-10-04 16:14:42 +02:00
|
|
|
|
2025-10-04 23:36:37 +02:00
|
|
|
|
2025-10-04 16:14:42 +02:00
|
|
|
|
2025-10-03 13:40:08 +02:00
|
|
|
<div class="filters">
|
2025-10-04 23:36:37 +02:00
|
|
|
|
|
|
|
|
<label (click)="showFilters = !showFilters">
|
|
|
|
|
Filtre rapide
|
|
|
|
|
@if (showFilters) {
|
|
|
|
|
<span>▼</span>
|
|
|
|
|
} @else {
|
|
|
|
|
<span>▶</span>
|
|
|
|
|
}
|
|
|
|
|
</label>
|
|
|
|
|
|
|
|
|
|
<div class="filters-group">
|
|
|
|
|
@if (showFilters) {
|
|
|
|
|
<span class="muted">{{filteredFeatures.length}} évènements chargés</span>
|
|
|
|
|
<hr>
|
|
|
|
|
<div class="controls">
|
|
|
|
|
<div class="control-group">
|
|
|
|
|
<label>Jours à venir</label>
|
|
|
|
|
<input
|
|
|
|
|
type="number"
|
|
|
|
|
class="input"
|
|
|
|
|
[(ngModel)]="daysAhead"
|
|
|
|
|
(ngModelChange)="onDaysAheadChange()"
|
|
|
|
|
min="1"
|
|
|
|
|
max="30"
|
|
|
|
|
placeholder="7">
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="control-group">
|
|
|
|
|
<label>
|
|
|
|
|
<input
|
|
|
|
|
type="checkbox"
|
|
|
|
|
[(ngModel)]="autoReloadEnabled"
|
|
|
|
|
(change)="toggleAutoReload()">
|
|
|
|
|
Rechargement auto (1min)
|
|
|
|
|
</label>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
2025-10-04 19:18:10 +02:00
|
|
|
<input class="input" type="text" placeholder="Rechercher..." [(ngModel)]="searchText" (ngModelChange)="onSearchChange()">
|
|
|
|
|
|
|
|
|
|
<div class="control-group">
|
|
|
|
|
<label>Filtrer par type d'événement</label>
|
|
|
|
|
<select class="input" [(ngModel)]="selectedWhatFilter" (ngModelChange)="onWhatFilterChange()">
|
2025-10-04 23:36:37 +02:00
|
|
|
<option value="">Tous les types</option>
|
|
|
|
|
@for (whatType of availableWhatTypes; track whatType) {
|
|
|
|
|
<option [value]="whatType">{{whatType}}</option>
|
2025-10-04 19:18:10 +02:00
|
|
|
}
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
2025-10-04 23:36:37 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
<app-osm></app-osm>
|
|
|
|
|
|
|
|
|
|
<app-menu></app-menu>
|
|
|
|
|
<hr>
|
|
|
|
|
}
|
2025-10-03 13:40:08 +02:00
|
|
|
</div>
|
2025-10-04 23:36:37 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- <app-unlocated-events [events]="filteredFeatures"></app-unlocated-events> -->
|
|
|
|
|
|
2025-10-03 13:40:08 +02:00
|
|
|
<hr>
|
2025-10-04 23:36:37 +02:00
|
|
|
|
2025-10-03 13:40:08 +02:00
|
|
|
<app-edit-form [selected]="selected" (saved)="onSaved($event)" (created)="onCreated($event)" (deleted)="onDeleted($event)"></app-edit-form>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="main">
|
2025-10-03 14:00:35 +02:00
|
|
|
@if (!showTable) {
|
|
|
|
|
<div class="map">
|
2025-10-04 19:18:10 +02:00
|
|
|
<app-all-events [features]="filteredFeatures" [selected]="selected" (select)="onSelect($event)" (pickCoords)="onPickCoords($event)"></app-all-events>
|
2025-10-03 14:00:35 +02:00
|
|
|
</div>
|
|
|
|
|
} @else {
|
|
|
|
|
<div class="table-wrapper" style="overflow:auto;height:100%;">
|
|
|
|
|
<table style="width:100%;border-collapse:collapse;">
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
|
|
|
|
<th style="text-align:left;padding:6px;border-bottom:1px solid #e5e7eb;">Type</th>
|
|
|
|
|
<th style="text-align:left;padding:6px;border-bottom:1px solid #e5e7eb;">Label</th>
|
|
|
|
|
<th style="text-align:left;padding:6px;border-bottom:1px solid #e5e7eb;">Start</th>
|
|
|
|
|
<th style="text-align:left;padding:6px;border-bottom:1px solid #e5e7eb;">Stop</th>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
2025-10-04 19:18:10 +02:00
|
|
|
@for (f of filteredFeatures; track f.id) {
|
2025-10-03 14:00:35 +02:00
|
|
|
<tr (click)="onSelect({ id: f?.properties?.id ?? f?.id, properties: f.properties, geometry: f.geometry })" style="cursor:pointer;">
|
|
|
|
|
<td style="padding:6px;border-bottom:1px solid #f1f5f9;">{{f?.properties?.what}}</td>
|
|
|
|
|
<td style="padding:6px;border-bottom:1px solid #f1f5f9;">{{f?.properties?.label || f?.properties?.name}}</td>
|
|
|
|
|
<td style="padding:6px;border-bottom:1px solid #f1f5f9;">{{f?.properties?.start || f?.properties?.when}}</td>
|
|
|
|
|
<td style="padding:6px;border-bottom:1px solid #f1f5f9;">{{f?.properties?.stop}}</td>
|
|
|
|
|
</tr>
|
|
|
|
|
}
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
}
|
2025-10-02 22:53:50 +02:00
|
|
|
</div>
|
|
|
|
|
</div>
|