Motif anulation

This commit is contained in:
mepiphana2023
2024-11-25 16:21:50 +01:00
parent 72719df7c2
commit bacd365306
2 changed files with 33 additions and 3 deletions

View File

@@ -22,10 +22,21 @@ document.addEventListener("DOMContentLoaded", () => {
// Initialiser la carte
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", {
maxZoom: 19,
minZoom: 13,
maxZoom: 22, // Zoom infini
minZoom: 3,
}).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
map.on("click", async (e) => {
const { lat, lng } = e.latlng;

View File

@@ -60,6 +60,13 @@ class Sortie
#[ORM\ManyToMany(targetEntity: Participant::class, mappedBy: 'sortiesParticipants')]
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()
{
$this->participants = new ArrayCollection();
@@ -215,4 +222,16 @@ class Sortie
return $this;
}
public function getMotifAnnul(): ?string
{
return $this->motifAnnul;
}
public function setMotifAnnul(?string $motifAnnul): self
{
$this->motifAnnul = $motifAnnul;
return $this;
}
}