Bläddra i källkod

correction post recette

Vincent 8 månader sedan
förälder
incheckning
0a7fcb54d8

+ 15 - 0
src/ApiResources/Profile/OrganizationProfile.php

@@ -76,6 +76,9 @@ class OrganizationProfile implements ApiResourcesInterface
     #[Groups('access_profile_read')]
     private ?int $trialCountDown = null;
 
+    #[Groups('access_profile_read')]
+    private ?SettingsProductEnum $productBeforeTrial = null;
+
     public function getId(): ?int
     {
         return $this->id;
@@ -271,4 +274,16 @@ class OrganizationProfile implements ApiResourcesInterface
 
         return $this;
     }
+
+    public function getProductBeforeTrial(): ?SettingsProductEnum
+    {
+        return $this->productBeforeTrial;
+    }
+
+    public function setProductBeforeTrial(?SettingsProductEnum $productBeforeTrial): self
+    {
+        $this->productBeforeTrial = $productBeforeTrial;
+
+        return $this;
+    }
 }

+ 1 - 0
src/Service/Organization/OrganizationProfileCreator.php

@@ -41,6 +41,7 @@ class OrganizationProfileCreator
         $organizationProfile->setPrincipalType($organization->getPrincipalType());
         $organizationProfile->setTrialActive($organization->getSettings()->isTrialActive());
         $organizationProfile->setTrialCountDown($this->trialService->getTrialCountdown($organization->getSettings()->getlLastTrialStartDate()));
+        $organizationProfile->setProductBeforeTrial($organization->getSettings()->getProductBeforeTrial());
         $organizationProfile->setHasChildren($organization->getNetworkOrganizationChildren()->count() > 1);
         $organizationProfile->setShowAdherentList(
             $organization->getParameters()->getShowAdherentList()