diff --git a/app/Http/Controllers/DisplayTagsOnMapController.php b/app/Http/Controllers/DisplayTagsOnMapController.php index 6bb95f13c..f245a9b37 100644 --- a/app/Http/Controllers/DisplayTagsOnMapController.php +++ b/app/Http/Controllers/DisplayTagsOnMapController.php @@ -18,14 +18,14 @@ public function show (Request $request) { $photos = Photo::query(); - if ($request->has('custom_tag')) + if ($request->filled('custom_tag')) { $photos = $photos->whereHas('customTags', function (Builder $query) use ($request) { return $query->whereTag($request->custom_tag); }); } - if ($request->has('custom_tags')) + if ($request->filled('custom_tags')) { $tags = explode(',', $request->custom_tags); @@ -34,7 +34,7 @@ public function show (Request $request) }, '=', count($tags)); } - if ($request->has('brand')) + if ($request->filled('brand')) { $photos = $photos->whereHas('brands', function (Builder $query) use ($request) { return $query->whereNotNull($request->brand); diff --git a/app/Http/Controllers/User/ProfileController.php b/app/Http/Controllers/User/ProfileController.php index 7071c3fd4..0f9ea314e 100644 --- a/app/Http/Controllers/User/ProfileController.php +++ b/app/Http/Controllers/User/ProfileController.php @@ -87,6 +87,7 @@ public function geojson () ]) ->whereDate(request()->period, '>=', request()->start) ->whereDate(request()->period, '<=', request()->end) + ->orderBy(request()->period, 'asc') ->get(); // Populate geojson object @@ -109,7 +110,7 @@ public function geojson () 'result_string' => $resultString, 'filename' => $filename, 'datetime' => $photo->datetime, - 'time' => $photo->created_at, + 'time' => $photo->datetime, 'cluster' => false, 'verified' => $photo->verified, 'name' => $name, diff --git a/app/Listeners/Locations/NotifySlackOfNewCity.php b/app/Listeners/Locations/NotifySlackOfNewCity.php index 772e23772..cb0c96ac9 100644 --- a/app/Listeners/Locations/NotifySlackOfNewCity.php +++ b/app/Listeners/Locations/NotifySlackOfNewCity.php @@ -27,6 +27,8 @@ public function handle (NewCityAdded $event) { $link = "https://openlittermap.com/global?lat={$photo->lat}&lon={$photo->lon}&zoom=16'"; } + + \Log::info(['slack city link', $link]); } Slack::send( diff --git a/resources/js/views/home/TagsViewer.vue b/resources/js/views/home/TagsViewer.vue index 879352c61..c528e6b0a 100644 --- a/resources/js/views/home/TagsViewer.vue +++ b/resources/js/views/home/TagsViewer.vue @@ -98,11 +98,13 @@ export default { async load () { const searchParams = new URLSearchParams(window.location.search); const customTag = searchParams.get('custom_tag'); + const customTags = searchParams.get('custom_tags'); const brand = searchParams.get('brand'); await axios.get('/tags-search', { params: { custom_tag: customTag, + custom_tags: customTags, brand } })