feat(directory) : add contact/address/report tables, migrate inline addresses, drop inline columns
This commit is contained in:
@@ -47,9 +47,6 @@ final readonly class ConvertProspectProcessor implements ProcessorInterface
|
||||
$client->setName($prospect->getCompany() ?: (string) $prospect->getName());
|
||||
$client->setEmail($prospect->getEmail());
|
||||
$client->setPhone($prospect->getPhone());
|
||||
$client->setStreet($prospect->getStreet());
|
||||
$client->setCity($prospect->getCity());
|
||||
$client->setPostalCode($prospect->getPostalCode());
|
||||
|
||||
$this->entityManager->persist($client);
|
||||
|
||||
|
||||
@@ -41,9 +41,6 @@ class ConvertProspectTool
|
||||
$client->setName($prospect->getCompany() ?: (string) $prospect->getName());
|
||||
$client->setEmail($prospect->getEmail());
|
||||
$client->setPhone($prospect->getPhone());
|
||||
$client->setStreet($prospect->getStreet());
|
||||
$client->setCity($prospect->getCity());
|
||||
$client->setPostalCode($prospect->getPostalCode());
|
||||
|
||||
$this->entityManager->persist($client);
|
||||
|
||||
|
||||
@@ -23,9 +23,6 @@ class CreateClientTool
|
||||
string $name,
|
||||
?string $email = null,
|
||||
?string $phone = null,
|
||||
?string $street = null,
|
||||
?string $city = null,
|
||||
?string $postalCode = null,
|
||||
): string {
|
||||
if (!$this->security->isGranted('ROLE_ADMIN')) {
|
||||
throw new AccessDeniedException('Access denied: ROLE_ADMIN required.');
|
||||
@@ -35,9 +32,6 @@ class CreateClientTool
|
||||
$client->setName($name);
|
||||
$client->setEmail($email);
|
||||
$client->setPhone($phone);
|
||||
$client->setStreet($street);
|
||||
$client->setCity($city);
|
||||
$client->setPostalCode($postalCode);
|
||||
|
||||
$this->entityManager->persist($client);
|
||||
$this->entityManager->flush();
|
||||
|
||||
@@ -28,9 +28,6 @@ class CreateProspectTool
|
||||
?string $company = null,
|
||||
?string $email = null,
|
||||
?string $phone = null,
|
||||
?string $street = null,
|
||||
?string $city = null,
|
||||
?string $postalCode = null,
|
||||
?string $status = null,
|
||||
?string $source = null,
|
||||
?string $notes = null,
|
||||
@@ -44,9 +41,6 @@ class CreateProspectTool
|
||||
$prospect->setCompany($company);
|
||||
$prospect->setEmail($email);
|
||||
$prospect->setPhone($phone);
|
||||
$prospect->setStreet($street);
|
||||
$prospect->setCity($city);
|
||||
$prospect->setPostalCode($postalCode);
|
||||
$prospect->setSource($source);
|
||||
$prospect->setNotes($notes);
|
||||
|
||||
|
||||
@@ -28,9 +28,6 @@ class UpdateClientTool
|
||||
?string $name = null,
|
||||
?string $email = null,
|
||||
?string $phone = null,
|
||||
?string $street = null,
|
||||
?string $city = null,
|
||||
?string $postalCode = null,
|
||||
): string {
|
||||
if (!$this->security->isGranted('ROLE_ADMIN')) {
|
||||
throw new AccessDeniedException('Access denied: ROLE_ADMIN required.');
|
||||
@@ -50,15 +47,6 @@ class UpdateClientTool
|
||||
if (null !== $phone) {
|
||||
$client->setPhone($phone);
|
||||
}
|
||||
if (null !== $street) {
|
||||
$client->setStreet($street);
|
||||
}
|
||||
if (null !== $city) {
|
||||
$client->setCity($city);
|
||||
}
|
||||
if (null !== $postalCode) {
|
||||
$client->setPostalCode($postalCode);
|
||||
}
|
||||
|
||||
$this->entityManager->flush();
|
||||
|
||||
|
||||
@@ -30,9 +30,6 @@ class UpdateProspectTool
|
||||
?string $company = null,
|
||||
?string $email = null,
|
||||
?string $phone = null,
|
||||
?string $street = null,
|
||||
?string $city = null,
|
||||
?string $postalCode = null,
|
||||
?string $status = null,
|
||||
?string $source = null,
|
||||
?string $notes = null,
|
||||
@@ -58,15 +55,6 @@ class UpdateProspectTool
|
||||
if (null !== $phone) {
|
||||
$prospect->setPhone($phone);
|
||||
}
|
||||
if (null !== $street) {
|
||||
$prospect->setStreet($street);
|
||||
}
|
||||
if (null !== $city) {
|
||||
$prospect->setCity($city);
|
||||
}
|
||||
if (null !== $postalCode) {
|
||||
$prospect->setPostalCode($postalCode);
|
||||
}
|
||||
if (null !== $status) {
|
||||
$statusEnum = ProspectStatus::tryFrom($status);
|
||||
if (null === $statusEnum) {
|
||||
|
||||
Reference in New Issue
Block a user