diff --git a/app/Livewire/Studio/Master/Category.php b/app/Livewire/Studio/Master/Category.php
index 8549c9a..441214c 100644
--- a/app/Livewire/Studio/Master/Category.php
+++ b/app/Livewire/Studio/Master/Category.php
@@ -2,6 +2,7 @@
namespace App\Livewire\Studio\Master;
+use App\Enums\CategoryType;
use App\Livewire\Forms\Studio\Master\CategoryForm;
use App\Models\Category as CategoryModel;
use App\Traits\Authorization\WithAuthorization;
@@ -27,6 +28,8 @@ class Category extends Component
public string $modalTitle = '';
+ public bool $showDescriptionAndImage = true;
+
public function create(): void
{
$this->canOrAbort('create category');
@@ -92,6 +95,11 @@ public function openModal(string $method, string $modalTitle, ?string $id = null
$id && $this->form->setCategory(CategoryModel::byHashOrFail($id));
}
+ public function updatedFormType(string $value): void
+ {
+ $this->showDescriptionAndImage = $value == CategoryType::PERFUME->value;
+ }
+
public function render(): View
{
return view('livewire.studio.master.categories', [
diff --git a/resources/views/livewire/studio/master/categories.blade.php b/resources/views/livewire/studio/master/categories.blade.php
index e161efe..3c96a42 100644
--- a/resources/views/livewire/studio/master/categories.blade.php
+++ b/resources/views/livewire/studio/master/categories.blade.php
@@ -36,13 +36,9 @@