float places

This commit is contained in:
Tykayn 2025-06-19 11:48:07 +02:00 committed by tykayn
parent 123bd8d4d1
commit 43139d50d9
3 changed files with 20 additions and 8 deletions

View file

@ -20,7 +20,7 @@ body {
} }
.filled { .filled {
background-color: #b0dfa0 !important; background-color: rgba(0, 255, 0, 0.2) !important;
} }
.filled:hover { .filled:hover {

View file

@ -239,8 +239,8 @@ class Place
$this $this
->setOsmId( $orignal_overpass_data['id']) ->setOsmId( $orignal_overpass_data['id'])
->setOsmKind($orignal_overpass_data['type'] ) ->setOsmKind($orignal_overpass_data['type'] )
->setLat($orignal_overpass_data['lat']) ->setLat((float) $orignal_overpass_data['lat'])
->setLon($orignal_overpass_data['lon']) ->setLon((float) $orignal_overpass_data['lon'])
->setName(isset($overpass_data['name']) && $overpass_data['name'] != '' ? $overpass_data['name'] : null); ->setName(isset($overpass_data['name']) && $overpass_data['name'] != '' ? $overpass_data['name'] : null);
// Traiter le timestamp OSM si disponible // Traiter le timestamp OSM si disponible
@ -613,24 +613,24 @@ class Place
return $this; return $this;
} }
public function getLat(): ?int public function getLat(): ?float
{ {
return $this->lat; return $this->lat;
} }
public function setLat(?int $lat): static public function setLat(?float $lat): static
{ {
$this->lat = $lat; $this->lat = $lat;
return $this; return $this;
} }
public function getLon(): ?int public function getLon(): ?float
{ {
return $this->lon; return $this->lon;
} }
public function setLon(?int $lon): static public function setLon(?float $lon): static
{ {
$this->lon = $lon; $this->lon = $lon;

View file

@ -90,7 +90,19 @@
<td class="{{ commerce.hasWheelchair() ? 'filled' : '' }}">{{ commerce.wheelchair }}</td> <td class="{{ commerce.hasWheelchair() ? 'filled' : '' }}">{{ commerce.wheelchair }}</td>
<td class="{{ commerce.hasNote() ? 'filled' : '' }}">{{ commerce.note }}</td> <td class="{{ commerce.hasNote() ? 'filled' : '' }}">{{ commerce.note }}</td>
<td class="{{ commerce.noteContent ? 'filled' : '' }}">{{ commerce.noteContent }}</td> <td class="{{ commerce.noteContent ? 'filled' : '' }}">{{ commerce.noteContent }}</td>
<td class="{{ commerce.siret ? 'filled' : '' }}"> <a href="https://annuaire-entreprises.data.gouv.fr/etablissement/{{ commerce.siret }}" > {{ commerce.siret }}</a></td> <td class="{{ commerce.siret ? 'filled' : '' }}">
{% if commerce.siret %}
{% set sirets = commerce.siret|split(';')|map(siret => siret|trim)|filter(siret => siret) %}
{% for siret in sirets %}
{% if not loop.first %}, {% endif %}
<a href="https://annuaire-entreprises.data.gouv.fr/etablissement/{{ siret }}" >{{ siret }}</a>
{% endfor %}
{% else %}
<a href="https://annuaire-entreprises.data.gouv.fr/etablissement/{{ commerce.siret }}" >
{% endif %}
<td> <td>
{# (si siret clos) #} {# (si siret clos) #}
</td> </td>