mirror of
https://forge.chapril.org/tykayn/osm-commerces
synced 2025-10-04 17:04:53 +02:00
fix décompte de notes
This commit is contained in:
parent
8136d8e0cb
commit
73e021c854
5 changed files with 11 additions and 7 deletions
|
@ -94,8 +94,6 @@ final class AdminController extends AbstractController
|
|||
->setSiret($this->motocultrice->find_siret($placeData['tags']) ?? '')
|
||||
->setAskedHumainsSupport(false)
|
||||
->setLastContactAttemptDate(null)
|
||||
->setNote($this->motocultrice->find_tag($placeData['tags'], 'note') ? true : false)
|
||||
->setNoteContent($this->motocultrice->find_tag($placeData['tags'], 'note') ?? '')
|
||||
->setPlaceCount(0)
|
||||
// ->setOsmData($placeData['modified'] ?? null)
|
||||
;
|
||||
|
@ -575,8 +573,6 @@ final class AdminController extends AbstractController
|
|||
->setSiret($this->motocultrice->find_siret($placeData['tags']) ?? '')
|
||||
->setAskedHumainsSupport(false)
|
||||
->setLastContactAttemptDate(null)
|
||||
->setNote($this->motocultrice->find_tag($placeData['tags'], 'note') ? true : false)
|
||||
->setNoteContent($this->motocultrice->find_tag($placeData['tags'], 'note') ?? '')
|
||||
->setPlaceCount(0)
|
||||
// ->setOsmData($placeData['modified'] ?? null)
|
||||
;
|
||||
|
|
|
@ -314,6 +314,7 @@ class Place
|
|||
}
|
||||
$this->setNoteContent($noteContent ? $noteContent : null);
|
||||
$this->setHasNote($hasNote);
|
||||
$this->setNote($noteContent);
|
||||
}
|
||||
|
||||
public function __construct()
|
||||
|
|
|
@ -223,10 +223,17 @@ class Stats
|
|||
}
|
||||
if($place->getSiret()) {
|
||||
$this->avec_siret++;
|
||||
$place_completions++;
|
||||
}
|
||||
if($place->getName()) {
|
||||
$this->avec_name++;
|
||||
$place_completions++;
|
||||
}
|
||||
if($place->getNoteContent()) {
|
||||
$this->avec_note++;
|
||||
// on ne compte pas les notes comme indice de complétion
|
||||
}
|
||||
|
||||
$somme_completions += $place_completions / 6;
|
||||
}
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ class Motocultrice
|
|||
public $overpass_base_places = '
|
||||
(
|
||||
nw["amenity"~"^(cafe|bar|restaurant|library|cinema|fast_food|post_office|marketplace|community_centre|theatre|bank|townhall|animal_boarding|animal_breeding|animal_shelter|animal_training|archive|arts_centre|bicycle_rental|biergarten|boat_rental|boat_storage|bureau_de_change|canteen|car_rental|car_wash|casino|childcare|clinic|college|conference_centre|courthouse|coworking_space|crematorium|dancing_school|dentist|dive_centre|doctors)$"](area.searchArea);
|
||||
nw["shop"](area.searchArea);
|
||||
nw["shop"]["shop"!~"vacant"](area.searchArea);
|
||||
nw["tourism"~"^(hotel|hostel|motel|wilderness_hut|yes|chalet|gallery|guest_house|museum|zoo|theme_park|aquarium|alpine_hut|apartment)$"](area.searchArea);
|
||||
nw["healthcare"](area.searchArea);
|
||||
nw["information"="office"](area.searchArea);
|
||||
|
@ -191,7 +191,8 @@ out meta;';
|
|||
}
|
||||
|
||||
foreach ($data['elements'] as $element) {
|
||||
if (isset($element['tags'])) {
|
||||
if (isset($element['tags'])) {
|
||||
|
||||
$places[] = [
|
||||
'id' => $element['id'],
|
||||
'type' => $element['type'],
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
</td>
|
||||
<td>
|
||||
<a href="{{ path('app_admin_make_email_for_place', {'id': commerce.id}) }}">
|
||||
voir email
|
||||
<i class="bi bi-envelope-fill"></i>
|
||||
</a>
|
||||
</td>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue