up
This commit is contained in:
parent
cc92e2b5d7
commit
4f6a388129
3 changed files with 33 additions and 8 deletions
|
|
@ -88,6 +88,7 @@ export class Home implements OnInit, OnDestroy {
|
|||
const id = (map.get('id') || '').trim();
|
||||
const what = (map.get('what') || '').trim();
|
||||
const pleinAir = (map.get('pleinair') || '').trim().toLowerCase();
|
||||
const preset = (map.get('preset') || '').trim().toLowerCase();
|
||||
const limitParam = map.get('limit');
|
||||
const limit = limitParam ? Number(limitParam) : null;
|
||||
// Charger selon les query params
|
||||
|
|
@ -104,6 +105,10 @@ export class Home implements OnInit, OnDestroy {
|
|||
if (pleinAir === '1' || pleinAir === 'true' || pleinAir === 'yes') {
|
||||
this.enablePleinAirMode();
|
||||
}
|
||||
// Support: preset=plein_air
|
||||
if (preset === 'plein_air') {
|
||||
this.enablePleinAirMode();
|
||||
}
|
||||
});
|
||||
this.startAutoReload();
|
||||
}
|
||||
|
|
@ -355,7 +360,13 @@ export class Home implements OnInit, OnDestroy {
|
|||
geometry: { type: 'Point', coordinates: [lon, lat] }
|
||||
} as any;
|
||||
this.OedbApi.createEvent(feature).subscribe({
|
||||
next: () => { this.pushToast('success', 'Évènement créé'); this.selected = null; this.loadEvents(); },
|
||||
next: () => {
|
||||
this.pushToast('success', 'Évènement créé');
|
||||
this.selected = null;
|
||||
// Après création rapide en plein air: recharger uniquement ce type pour feedback instantané
|
||||
this.selectedWhatFilter = w;
|
||||
this.loadEvents({ what: w });
|
||||
},
|
||||
error: () => { this.pushToast('error', 'Échec de création'); }
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue