diff --git a/app/Livewire/Admin/Dashboard/Profile.php b/app/Livewire/Admin/Dashboard/Profile.php
index 70103ea..d635479 100644
--- a/app/Livewire/Admin/Dashboard/Profile.php
+++ b/app/Livewire/Admin/Dashboard/Profile.php
@@ -29,7 +29,7 @@ public function mount()
$this->email = $user->email;
$this->attribute = $user->attributes()->get()->pluck('pivot.value', 'name')->all();
- $this->completion = $user->isProfileCompletionPercentage();
+ $this->completion = $user->profileCompletionPercentage();
$this->contact_number = $user->attributes()->where('name', 'contact_number')->get()->pluck('pivot.value')->first();
@@ -63,7 +63,7 @@ public function save()
$this->profile_picture = $this->profile_picture ?? 'IMG';
$skillsValue = (is_array($this->skills) && count($this->skills) > 0) ? json_encode($this->skills) : null;
-
+
}
@@ -84,7 +84,7 @@ protected function insertUserAttributes(array $attributes)
return redirect()->route('profile');
}
-
+
public function render()
{
diff --git a/app/Livewire/Requester/Dashboard/MyEvents/Create.php b/app/Livewire/Requester/Dashboard/MyEvents/Create.php
index 470478d..a9aba43 100644
--- a/app/Livewire/Requester/Dashboard/MyEvents/Create.php
+++ b/app/Livewire/Requester/Dashboard/MyEvents/Create.php
@@ -11,6 +11,7 @@
use App\Models\Tag;
use App\Services\EmbeddingService;
use App\Services\GoogleMaps;
+use App\Services\Pro;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Log;
use Livewire\Attributes\On;
diff --git a/app/Models/User.php b/app/Models/User.php
index 2b122fb..27d21e1 100644
--- a/app/Models/User.php
+++ b/app/Models/User.php
@@ -13,7 +13,7 @@
use Illuminate\Notifications\Notifiable;
use App\Services\FileManager;
use Illuminate\Contracts\Auth\MustVerifyEmail;
-
+
class User extends Authenticatable implements MustVerifyEmail
{
@@ -163,13 +163,13 @@ public function setCustomAttribute($attributeName, $value): void
return;
}
$attribute = Attribute::where('name', $attributeName)->firstOrFail();
- $this->attributes()->syncWithoutDetaching([$attribute->id => ['value' => json_encode($value)]]);
+ $this->attributes()->syncWithoutDetaching([$attribute->id => ['value' => $value]]);
}
public function getCustomAttribute($attributeName)
{
$attribute = $this->attributes()->where('name', $attributeName)->first();
- return $attribute ? json_decode($attribute->pivot->value, true) : null;
+ return $attribute ? $attribute->pivot->value : null;
}
public function getAllAttributes()
diff --git a/resources/views/components/common/dashboard/index.blade.php b/resources/views/components/common/dashboard/index.blade.php
index b18eb7c..98dabc4 100644
--- a/resources/views/components/common/dashboard/index.blade.php
+++ b/resources/views/components/common/dashboard/index.blade.php
@@ -45,10 +45,9 @@
@endif