feat: relation revendeur sur Customer/Website + WebsiteConfiguration
Customer : - Ajout revendeurCode (VARCHAR 10, nullable) : stocke le code du revendeur apporteur d'affaire (pas de FK, suppression revendeur sans impact) - Select revendeur dans le formulaire de création client - Champ revendeur dans la fiche client (info + section système) Website : - Ajout revendeurCode (VARCHAR 10, nullable) : même logique que Customer WebsiteConfiguration (nouvelle entité) : - website (ManyToOne CASCADE) : site parent - type (VARCHAR 25) : clé de configuration - value (TEXT) : valeur - Contrainte unique (website_id, type) Formulaire création client : - Select "Revendeur (apporteur d'affaire)" avec liste des revendeurs actifs Fiche client : - Onglet Info : champ code revendeur éditable - Section système : affiche le code revendeur Migrations : ALTER TABLE customer/website ADD revendeur_code, CREATE TABLE website_configuration Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -78,7 +78,7 @@ class ClientsControllerTest extends TestCase
|
||||
$userService = $this->createStub(UserManagementService::class);
|
||||
$logger = $this->createStub(LoggerInterface::class);
|
||||
|
||||
$response = $controller->create($request, $repo, $em, $meilisearch, $userService, $logger, $this->createStub(HttpClientInterface::class), $this->createStub(MailerService::class), $this->createStub(Environment::class), 'sk_test_***');
|
||||
$response = $controller->create($request, $repo, $this->createStub(\App\Repository\RevendeurRepository::class), $em, $meilisearch, $userService, $logger, $this->createStub(HttpClientInterface::class), $this->createStub(MailerService::class), $this->createStub(Environment::class), 'sk_test_***');
|
||||
|
||||
$this->assertInstanceOf(Response::class, $response);
|
||||
}
|
||||
@@ -98,7 +98,7 @@ class ClientsControllerTest extends TestCase
|
||||
$userService->method('createBaseUser')->willThrowException(new \InvalidArgumentException('Champs requis'));
|
||||
$logger = $this->createStub(LoggerInterface::class);
|
||||
|
||||
$response = $controller->create($request, $repo, $em, $meilisearch, $userService, $logger, $this->createStub(HttpClientInterface::class), $this->createStub(MailerService::class), $this->createStub(Environment::class), 'sk_test_***');
|
||||
$response = $controller->create($request, $repo, $this->createStub(\App\Repository\RevendeurRepository::class), $em, $meilisearch, $userService, $logger, $this->createStub(HttpClientInterface::class), $this->createStub(MailerService::class), $this->createStub(Environment::class), 'sk_test_***');
|
||||
|
||||
$this->assertInstanceOf(Response::class, $response);
|
||||
}
|
||||
@@ -118,7 +118,7 @@ class ClientsControllerTest extends TestCase
|
||||
$userService->method('createBaseUser')->willThrowException(new \RuntimeException('DB error'));
|
||||
$logger = $this->createStub(LoggerInterface::class);
|
||||
|
||||
$response = $controller->create($request, $repo, $em, $meilisearch, $userService, $logger, $this->createStub(HttpClientInterface::class), $this->createStub(MailerService::class), $this->createStub(Environment::class), 'sk_test_***');
|
||||
$response = $controller->create($request, $repo, $this->createStub(\App\Repository\RevendeurRepository::class), $em, $meilisearch, $userService, $logger, $this->createStub(HttpClientInterface::class), $this->createStub(MailerService::class), $this->createStub(Environment::class), 'sk_test_***');
|
||||
|
||||
$this->assertInstanceOf(Response::class, $response);
|
||||
}
|
||||
@@ -286,6 +286,7 @@ class ClientsControllerTest extends TestCase
|
||||
$response = $controller->create(
|
||||
$request,
|
||||
$repo,
|
||||
$this->createStub(\App\Repository\RevendeurRepository::class),
|
||||
$this->createStub(EntityManagerInterface::class),
|
||||
$this->createStub(MeilisearchService::class),
|
||||
$userService,
|
||||
@@ -326,6 +327,7 @@ class ClientsControllerTest extends TestCase
|
||||
$response = $controller->create(
|
||||
$request,
|
||||
$repo,
|
||||
$this->createStub(\App\Repository\RevendeurRepository::class),
|
||||
$this->createStub(EntityManagerInterface::class),
|
||||
$this->createStub(MeilisearchService::class),
|
||||
$userService,
|
||||
@@ -369,6 +371,7 @@ class ClientsControllerTest extends TestCase
|
||||
$response = $controller->create(
|
||||
$request,
|
||||
$repo,
|
||||
$this->createStub(\App\Repository\RevendeurRepository::class),
|
||||
$this->createStub(EntityManagerInterface::class),
|
||||
$meilisearch,
|
||||
$userService,
|
||||
|
||||
Reference in New Issue
Block a user