From 73caa6bdf34f0bf3e794e2126c46dc2a57cf79b5 Mon Sep 17 00:00:00 2001 From: xlcrr Date: Thu, 8 Dec 2022 18:39:53 +0000 Subject: [PATCH 1/4] add log to slack notification --- app/Listeners/Locations/NotifySlackOfNewCity.php | 2 ++ 1 file changed, 2 insertions(+) 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( From 985a8ff03dfd835a11f989462dcd61e1c65bf3fc Mon Sep 17 00:00:00 2001 From: xlcrr Date: Thu, 8 Dec 2022 18:56:53 +0000 Subject: [PATCH 2/4] add order to photos request --- app/Http/Controllers/User/ProfileController.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Http/Controllers/User/ProfileController.php b/app/Http/Controllers/User/ProfileController.php index 7071c3fd4..7d4c63fe9 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 From e13b55e5abf897eeb4d89fea56286fa4d9fa1f02 Mon Sep 17 00:00:00 2001 From: xlcrr Date: Thu, 8 Dec 2022 19:11:53 +0000 Subject: [PATCH 3/4] get photos in order of datetime --- app/Http/Controllers/User/ProfileController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/User/ProfileController.php b/app/Http/Controllers/User/ProfileController.php index 7d4c63fe9..0f9ea314e 100644 --- a/app/Http/Controllers/User/ProfileController.php +++ b/app/Http/Controllers/User/ProfileController.php @@ -110,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, From 24840cefa7db4746a434cccacd030307473ee428 Mon Sep 17 00:00:00 2001 From: geni_jaho Date: Thu, 22 Dec 2022 23:17:26 +0100 Subject: [PATCH 4/4] Allow filtering by multiple custom tags at once at tags page --- app/Http/Controllers/DisplayTagsOnMapController.php | 6 +++--- resources/js/views/home/TagsViewer.vue | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) 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/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 } })