]> _ Git - cubedesigners_userdatabase.git/commitdiff
wip #6374 @0.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 16 Oct 2023 14:59:35 +0000 (16:59 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 16 Oct 2023 14:59:35 +0000 (16:59 +0200)
src/app/Models/User.php

index e9ea5b4c018f3040cd62b4be2f525395c2c64e04..02e022a682e831073dc20c5e2952b0012450aead 100644 (file)
@@ -189,6 +189,17 @@ class User extends CubistMagicAuthenticatable implements HasLocalePreference
     }
 
     public function getAllTreeInfosAttribute()
+    {
+        $res = $this->getBasicTreeInfosAttribute();
+
+        $invoicable = Permissions::getInvoicableCompany($this->company);
+        if ($invoicable != $this->company) {
+            $res .= '<br>(€ : ' . Permissions::getCompanyName($invoicable) . ')';
+        }
+        return $res;
+    }
+
+    public function getBasicTreeInfosAttribute()
     {
         $name = $this->name;
         $res = '';
@@ -196,12 +207,6 @@ class User extends CubistMagicAuthenticatable implements HasLocalePreference
             $res .= $name . '<br>';
         }
         $res .= '<em> ' . $this->companyName . '</em>';
-
-        $invoicable = Permissions::getInvoicableCompany($this->company);
-        if ($invoicable != $this->company) {
-            $res .= '<br>(€ : ' . Permissions::getCompanyName($invoicable) . ')';
-        }
-        //$res .= '<br><i class="las la-user-shield"></i> ' . $this->getAdministratorFirstname();
         return $res;
     }