Show feedback in the admin panel and as aggregate stats on the briefing page

Feedback was only ever written to session_setting rows with no way to
view it short of querying the database directly. Adds a FeedbackService
that pulls per-player feedback entries and aggregate averages, backing
two new views:

- /admin/feedback: a full table of every submission (game, session,
  player, ratings, comment) plus summary tiles, linked from the admin
  sidebar.
- /briefing: a "Field Reports" block with the average difficulty/
  entertainment/theme ratings, shown to prospective players. Free-text
  comments are deliberately left off this public page since they're
  unmoderated player input.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Frank
2026-08-22 18:41:47 +02:00
co-authored by Claude Sonnet 5
parent 5d9c113eea
commit 2b3c90d3fc
7 changed files with 239 additions and 3 deletions
@@ -0,0 +1,25 @@
<?php
declare(strict_types=1);
namespace App\Game\Controller;
use App\Game\Service\FeedbackService;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Security\Http\Attribute\IsGranted;
#[Route('/admin/feedback')]
#[IsGranted('ROLE_ADMIN')]
final class GameAdminFeedbackController extends AbstractController
{
#[Route('', name: 'game_admin_feedback', methods: ['GET'])]
public function index(FeedbackService $feedbackService): Response
{
return $this->render('game/admin/feedback/index.html.twig', [
'entries' => $feedbackService->getFeedbackEntries(),
'summary' => $feedbackService->getFeedbackSummary(),
]);
}
}