diff --git a/app/Http/Controllers/Reports/GenerateImpactReportController.php b/app/Http/Controllers/Reports/GenerateImpactReportController.php index ac8ea7e8c..c7520664b 100644 --- a/app/Http/Controllers/Reports/GenerateImpactReportController.php +++ b/app/Http/Controllers/Reports/GenerateImpactReportController.php @@ -48,7 +48,7 @@ public function __invoke (): View // Tags // We should move this to Redis - $totalTags = Photo::sum('tags_count'); + $totalTags = Photo::sum('total_litter'); [$topTags, $topBrands, $newTags] = $this->getTopLitter($start, $end); diff --git a/resources/views/reports/impact.blade.php b/resources/views/reports/impact.blade.php index a85090108..d4fe99517 100644 --- a/resources/views/reports/impact.blade.php +++ b/resources/views/reports/impact.blade.php @@ -229,7 +229,280 @@ @endif - @if ($topUser['social']) +
+ {{ $topUser['xp'] }} xp +
+ + + + + OpenLitterMap Impact Report + + + + + +
+ +
+
+ OpenLitterMap Logo + +
+

Impact Report

+

{{ $startDate }}
to {{ $endDate }}

+
+ +
+
+
+

{{ number_format($newUsers) }} New Users

+

{{ number_format($totalUsers) }} Total Users

+
+
+ +
+
+

{{ number_format($newPhotos) }} New Photos

+

{{ number_format($totalPhotos) }} Total Photos

+
+
+ +
+
+

{{ number_format($newTags) }} New Tags

+

{{ number_format($totalTags) }} Total Tags

+
+
+
+
+
+ +
+ +
+

Top 10 Users

+ + @if (count($topUsers) > 0) + @foreach ($topUsers as $index => $topUser) +
+ +
+ @if ($index <= 2) + {{ $medals[$index]['alt'] }} + @else +
+ @endif +
+ +
+ {{ $topUser['ordinal'] }} + +
+ @if ($topUser['global_flag']) + {{ $topUser['global_flag'] }} Flag + @endif +
+
+ +
+ @if($topUser['name'] || $topUser['username']) + {{ $topUser['name'] }} {{ $topUser['username'] }} + @else + Anonymous + @endif +
+ + @if ($topUser['social']) + + @endif +
+ @endforeach + @endif +
+ +
+

Top 10 Tags

+ + @if (count($topTags) > 0) + @foreach ($topTags as $tag => $quantity) +

{{ $tag }}: {{ $quantity }}

+ @endforeach + @endif +
+ +
+

Top 10 Brands

+ + @if (count($topBrands) > 0) + @foreach ($topBrands as $brand => $quantity) +

{{ $brand }}: {{ $quantity }}

+ @endforeach + @endif +
+
+
+ + + + + + @if ($topUser['social'])
@foreach (array_slice($topUser['social'], 0, 3) as $social => $url)