diff --git a/src/Controller/AdminController.php b/src/Controller/AdminController.php index d60ecc04..027f7651 100644 --- a/src/Controller/AdminController.php +++ b/src/Controller/AdminController.php @@ -632,7 +632,7 @@ final class AdminController extends AbstractController 'completion_data' => json_encode($completionData), 'icons' => \App\Service\FollowUpService::getFollowUpIcons(), 'geojson' => json_encode($geojson), - 'overpass_query' => $overpass_query, + 'overpass_query' => $overpass_query | "", 'josm_url' => $josm_url, 'center' => $center, 'maptiler_token' => $_ENV['MAPTILER_TOKEN'] ?? null, diff --git a/src/Controller/PublicController.php b/src/Controller/PublicController.php index eac9dc66..9778527e 100644 --- a/src/Controller/PublicController.php +++ b/src/Controller/PublicController.php @@ -339,11 +339,13 @@ class PublicController extends AbstractController $currentObjectData = $this->motocultrice->get_osm_object_data($osm_kind, $osm_object_id); $tags_before_modif = $currentObjectData['tags_converted'] ?? []; $tags_after_modif = $tags; - // var_dump('POST brut', $_POST); - // var_dump('request->request->all()', $request->request->all()); - // var_dump('tags extraits', $tags); - // DEBUG : enlever ce die après analyse - // die('DEBUG avant envoi OSM'); +// var_dump('POST brut', $_POST); +// var_dump('request->request->all()', $request->request->all()); +// var_dump('tags extraits', $tags); + var_dump('tags_before_modif', $tags_before_modif); + var_dump('tags after modif', $tags_after_modif); +// DEBUG : enlever ce die après analyse + die('DEBUG avant envoi OSM'); // Récupérer le token OSM depuis les variables d'environnement $osm_api_token = $_ENV['APP_OSM_BEARER']; diff --git a/src/Service/FollowUpService.php b/src/Service/FollowUpService.php index 441c7389..92f5aff6 100644 --- a/src/Service/FollowUpService.php +++ b/src/Service/FollowUpService.php @@ -330,7 +330,13 @@ class FollowUpService public static function getFollowUpOverpassQueries(): array { - return [ + return [ + 'places' => 'nw["amenity"~"^(library|townhall|restaurant|fast_food|cafe|fuel|pharmacy|bank|bar|hospital|post_office|clinic|pub|car_wash|ice_cream|driving_school|cinema|car_rental|nightclub|bureau_de_change|studio|internet_cafe|money_transfer|casino|vehicle_inspection|frozen_food|boat_rental|coworking_space|workshop|personal_service|camping|dancing_school|training|ski_school|ski_rental|dive_centre|driver_training|nursing_home|funeral_hall|doctors|dentist|theatre|kindergarten|language_school|stripclub|veterinary|convenience|supermarket|clothes|hairdresser|car_repair|bakery|beauty|car|hardware|mobile_phone|butcher|furniture|car_parts|alcohol|florist|scooter|variety_store|electronics|shoes|optician|jewelry|mall|gift|doityourself|greengrocer|books|bicycle|chemist|department_store|laundry|travel_agency|stationery|pet|sports|confectionery|tyres|cosmetics|computer|tailor|tobacco|storage_rental|dry_cleaning|trade|copyshop|motorcycle|funeral_directors|beverages|newsagent|garden_centre|massage|pastry|interior_decoration|general|deli|toys|houseware|wine|seafood|pawnbroker|tattoo|paint|wholesale|photo|second_hand|bed|kitchen|outdoor|fabric|antiques|coffee|gas|e-cigarette|perfumery|craft|hearing_aids|money_lender|appliance|electrical|tea|motorcycle_repair|boutique|baby_goods|bag|musical_instrument|dairy|pet_grooming|music|carpet|rental|fashion_accessories|cheese|chocolate|medical_supply|leather|sewing|cannabis|locksmith|games|video_games|hifi|window_blind|caravan|tool_hire|household_linen|bathroom_furnishing|shoe_repair|watches|nutrition_supplements|fishing|erotic|frame|grocery|boat|repair|weapons|gold_buyer|lighting|pottery|security|groundskeeping|herbalist|curtain|health_food|flooring|printer_ink|anime|camera|scuba_diving|candles|printing|garden_furniture|food|estate_agent|insurance|it|accountant|employment_agency|tax_advisor|financial|advertising_agency|logistics|newspaper|financial_advisor|consulting|travel_agent|coworking|moving_company|lawyer|architect|construction_company|credit_broker|graphic_design|property_management|cleaning)$"](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); + nw["office"](area.searchArea);', 'fire_hydrant' => 'nwr["emergency"="fire_hydrant"](area.searchArea);', 'charging_station' => 'nwr["amenity"="charging_station"](area.searchArea);', 'toilets' => 'nwr["amenity"="toilets"](area.searchArea);', diff --git a/src/Service/Motocultrice.php b/src/Service/Motocultrice.php index 5f5ef7e0..b49e3e28 100644 --- a/src/Service/Motocultrice.php +++ b/src/Service/Motocultrice.php @@ -179,7 +179,7 @@ out meta;'; } if($has_opening_hours) { - $modified_request_post['commerce_tag_value__opening_hours'] = $request_post['commerce_tag_value__opening_hours']; + $modified_request_post['commerce_tag_value__custom__opening_hours'] = $request_post['custom__opening_hours']; } return $modified_request_post; diff --git a/templates/admin/stats.html.twig b/templates/admin/stats.html.twig index 71d00cc7..3e0f9b63 100644 --- a/templates/admin/stats.html.twig +++ b/templates/admin/stats.html.twig @@ -191,6 +191,7 @@ {% set overpass_type_queries = { 'fire_hydrant': 'nwr["emergency"="fire_hydrant"](area.searchArea);', 'charging_station': 'nwr["amenity"="charging_station"](area.searchArea);', + 'bicycle_parking' : 'nwr["amenity"="bicycle_parking"](area.searchArea);', 'toilets': 'nwr["amenity"="toilets"](area.searchArea);', 'bus_stop': 'nwr["highway"="bus_stop"](area.searchArea);', 'defibrillator': 'nwr["emergency"="defibrillator"](area.searchArea);', @@ -200,13 +201,14 @@ 'laboratory': 'nwr["healthcare"="laboratory"](area.searchArea);', 'school': 'nwr["amenity"="school"](area.searchArea);', 'police': 'nwr["amenity"="police"](area.searchArea);', + 'drinking_water' : 'nwr["amenity"="drinking_water"](area.searchArea);', 'healthcare': 'nwr["healthcare"](area.searchArea);nwr["amenity"="doctors"](area.searchArea);nwr["amenity"="pharmacy"](area.searchArea);nwr["amenity"="hospital"](area.searchArea);nwr["amenity"="clinic"](area.searchArea);nwr["amenity"="social_facility"](area.searchArea);' } %} {% set theme_groups = { 'emergency': ['fire_hydrant', 'defibrillator'], - 'transport': ['bus_stop', 'charging_station'], - 'healthcare': ['healthcare', 'laboratory'], + 'transport': ['bus_stop', 'charging_station', 'bicycle_parking'], + 'healthcare': ['healthcare', 'laboratory', 'drinking_water'], 'education': ['school'], 'security': ['police', 'camera'], 'infrastructure': ['toilets', 'recycling', 'substation'] diff --git a/templates/public/edit.html.twig b/templates/public/edit.html.twig index 91cbf7dc..01eccd9e 100644 --- a/templates/public/edit.html.twig +++ b/templates/public/edit.html.twig @@ -4,204 +4,219 @@ {% block body %} -