Olivier Massot 9 miesięcy temu
rodzic
commit
efbb02c8eb
2 zmienionych plików z 3 dodań i 3 usunięć
  1. 1 1
      .env
  2. 2 2
      src/Service/Dolibarr/DolibarrSyncService.php

+ 1 - 1
.env

@@ -93,7 +93,7 @@ MERCURE_URL=xxx
 # The public URL of the Mercure hub, used by the browser to connect
 MERCURE_PUBLIC_URL=xxx
 # The secret key used to sign the JWTs
-MERCURE_JWT_SECRET=xxx
+# >> MERCURE_JWT_SECRET, with the secret vars above
 ###< symfony/mercure-bundle ###
 
 ###> typo3 client ###

+ 2 - 2
src/Service/Dolibarr/DolibarrSyncService.php

@@ -257,8 +257,8 @@ class DolibarrSyncService
                     'lastname' => trim($person->getName()),
                     'firstname' => trim($person->getGivenName()),
                     'email' => $contact?->getEmail() ?? $dolibarrContact['email'] ?? null,
-                    'phone_pro' => $contact?->getTelphone() ? $this->formatPhoneNumber($contact->getTelphone()) : $dolibarrContact['phone_pro'] ?? null,
-                    'phone_mobile' => $contact?->getMobilPhone() ? $this->formatPhoneNumber($contact->getMobilPhone()) : $dolibarrContact['phone_mobile'] ?? null,
+                    'phone_pro' => !empty($contact?->getTelphone()) ? $this->formatPhoneNumber($contact->getTelphone()) : $dolibarrContact['phone_pro'] ?? null,
+                    'phone_mobile' => !empty($contact?->getMobilPhone()) ? $this->formatPhoneNumber($contact->getMobilPhone()) : $dolibarrContact['phone_mobile'] ?? null,
                     'poste' => !empty($missions) ? $this->formatContactPosition($missions, $person->getGender()?->value) : $dolibarrContact['poste'] ?? null,
                     'statut' => '1',
                 ];