Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions app/Http/Controllers/DisplayTagsOnMapController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion app/Http/Controllers/User/ProfileController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions app/Listeners/Locations/NotifySlackOfNewCity.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 2 additions & 0 deletions resources/js/views/home/TagsViewer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
})
Expand Down