Motif anulation
This commit is contained in:
@@ -22,10 +22,21 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||||||
// Initialiser la carte
|
// Initialiser la carte
|
||||||
map = L.map("map").setView([48.8566, 2.3522], 13); // Coordonnées par défaut (Paris)
|
map = L.map("map").setView([48.8566, 2.3522], 13); // Coordonnées par défaut (Paris)
|
||||||
L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", {
|
L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", {
|
||||||
maxZoom: 19,
|
maxZoom: 22, // Zoom infini
|
||||||
minZoom: 13,
|
minZoom: 3,
|
||||||
}).addTo(map);
|
}).addTo(map);
|
||||||
|
|
||||||
|
// Ajouter la barre de recherche
|
||||||
|
const searchControl = new GeoSearch.GeoSearchControl({
|
||||||
|
provider: new GeoSearch.OpenStreetMapProvider(),
|
||||||
|
style: 'bar', // Style de la barre de recherche
|
||||||
|
showMarker: false, // Ne pas ajouter de marqueur automatique
|
||||||
|
retainZoomLevel: false,
|
||||||
|
keepResult: true,
|
||||||
|
searchLabel: "Rechercher un lieu...",
|
||||||
|
});
|
||||||
|
map.addControl(searchControl);
|
||||||
|
|
||||||
// Gérer les clics sur la carte
|
// Gérer les clics sur la carte
|
||||||
map.on("click", async (e) => {
|
map.on("click", async (e) => {
|
||||||
const { lat, lng } = e.latlng;
|
const { lat, lng } = e.latlng;
|
||||||
@@ -123,4 +134,4 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||||||
alert("Une erreur inattendue s'est produite.");
|
alert("Une erreur inattendue s'est produite.");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -60,6 +60,13 @@ class Sortie
|
|||||||
#[ORM\ManyToMany(targetEntity: Participant::class, mappedBy: 'sortiesParticipants')]
|
#[ORM\ManyToMany(targetEntity: Participant::class, mappedBy: 'sortiesParticipants')]
|
||||||
private Collection $participants;
|
private Collection $participants;
|
||||||
|
|
||||||
|
#[ORM\Column(type: Types::TEXT, nullable: true)]
|
||||||
|
#[Assert\Length(
|
||||||
|
max: 1000,
|
||||||
|
maxMessage: 'Le motif d\'annulation ne peut pas dépasser {{ limit }} caractères.'
|
||||||
|
)]
|
||||||
|
private ?string $motifAnnul = null;
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->participants = new ArrayCollection();
|
$this->participants = new ArrayCollection();
|
||||||
@@ -215,4 +222,16 @@ class Sortie
|
|||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getMotifAnnul(): ?string
|
||||||
|
{
|
||||||
|
return $this->motifAnnul;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setMotifAnnul(?string $motifAnnul): self
|
||||||
|
{
|
||||||
|
$this->motifAnnul = $motifAnnul;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user