Add admin panel, Meilisearch buyer search, email redesign, and multiple features
Admin panel (/admin, ROLE_ROOT): - Dashboard with CA HT Global/Commission cards and Meilisearch sync button - Buyers page with search (Meilisearch), create form, pagination (KnpPaginator) - Buyer actions: resend verification, force verify, reset password, delete - Organizers page with tabs (pending/approved), approve/reject with emails - Neo-brutalist design matching main site theme - Vite admin entry point with dedicated SCSS - CSP-compatible confirm dialogs via data-confirm attributes Meilisearch integration: - Auto-index buyers on email verification - Remove from index on buyer deletion - Manual sync button on dashboard - Search bar on buyers page - Add Meilisearch service to CI/SonarQube workflows - Add MEILISEARCH env vars to .env.test - Fix MeilisearchMessageHandler infinite loop: use request() directly instead of service methods that re-dispatch messages Email templates: - Redesign base email template to neo-brutalist style (borders, shadows, yellow footer) - Add E-Cosplay logo, "E-Ticket solution proposee par e-cosplay.fr" - Add admin_reset_password, organizer_approved, organizer_rejected templates Other: - Install knplabs/knp-paginator-bundle - Add ^/admin access_control for ROLE_ROOT in security.yaml - Update site footer with E-Ticket branding - 18 admin tests, updated MeilisearchMessageHandler tests Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -21,8 +21,8 @@ class MeilisearchMessageHandlerTest extends TestCase
|
||||
public function testHandleCreateIndex(): void
|
||||
{
|
||||
$this->meilisearch->expects(self::once())
|
||||
->method('createIndex')
|
||||
->with('events', 'uid');
|
||||
->method('request')
|
||||
->with('POST', '/indexes', ['uid' => 'events', 'primaryKey' => 'uid']);
|
||||
|
||||
($this->handler)(new MeilisearchMessage('createIndex', 'events', ['primaryKey' => 'uid']));
|
||||
}
|
||||
@@ -30,8 +30,8 @@ class MeilisearchMessageHandlerTest extends TestCase
|
||||
public function testHandleDeleteIndex(): void
|
||||
{
|
||||
$this->meilisearch->expects(self::once())
|
||||
->method('deleteIndex')
|
||||
->with('events');
|
||||
->method('request')
|
||||
->with('DELETE', '/indexes/events');
|
||||
|
||||
($this->handler)(new MeilisearchMessage('deleteIndex', 'events'));
|
||||
}
|
||||
@@ -40,8 +40,8 @@ class MeilisearchMessageHandlerTest extends TestCase
|
||||
{
|
||||
$docs = [['id' => 1]];
|
||||
$this->meilisearch->expects(self::once())
|
||||
->method('addDocuments')
|
||||
->with('events', $docs);
|
||||
->method('request')
|
||||
->with('POST', '/indexes/events/documents', $docs);
|
||||
|
||||
($this->handler)(new MeilisearchMessage('addDocuments', 'events', ['documents' => $docs]));
|
||||
}
|
||||
@@ -50,8 +50,8 @@ class MeilisearchMessageHandlerTest extends TestCase
|
||||
{
|
||||
$docs = [['id' => 1, 'title' => 'Updated']];
|
||||
$this->meilisearch->expects(self::once())
|
||||
->method('updateDocuments')
|
||||
->with('events', $docs);
|
||||
->method('request')
|
||||
->with('PUT', '/indexes/events/documents', $docs);
|
||||
|
||||
($this->handler)(new MeilisearchMessage('updateDocuments', 'events', ['documents' => $docs]));
|
||||
}
|
||||
@@ -59,8 +59,8 @@ class MeilisearchMessageHandlerTest extends TestCase
|
||||
public function testHandleDeleteDocument(): void
|
||||
{
|
||||
$this->meilisearch->expects(self::once())
|
||||
->method('deleteDocument')
|
||||
->with('events', 42);
|
||||
->method('request')
|
||||
->with('DELETE', '/indexes/events/documents/42');
|
||||
|
||||
($this->handler)(new MeilisearchMessage('deleteDocument', 'events', ['documentId' => 42]));
|
||||
}
|
||||
@@ -68,8 +68,8 @@ class MeilisearchMessageHandlerTest extends TestCase
|
||||
public function testHandleDeleteDocuments(): void
|
||||
{
|
||||
$this->meilisearch->expects(self::once())
|
||||
->method('deleteDocuments')
|
||||
->with('events', [1, 2, 3]);
|
||||
->method('request')
|
||||
->with('POST', '/indexes/events/documents/delete-batch', [1, 2, 3]);
|
||||
|
||||
($this->handler)(new MeilisearchMessage('deleteDocuments', 'events', ['ids' => [1, 2, 3]]));
|
||||
}
|
||||
@@ -78,8 +78,8 @@ class MeilisearchMessageHandlerTest extends TestCase
|
||||
{
|
||||
$settings = ['searchableAttributes' => ['title']];
|
||||
$this->meilisearch->expects(self::once())
|
||||
->method('updateSettings')
|
||||
->with('events', $settings);
|
||||
->method('request')
|
||||
->with('PATCH', '/indexes/events/settings', $settings);
|
||||
|
||||
($this->handler)(new MeilisearchMessage('updateSettings', 'events', ['settings' => $settings]));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user