diff --git a/app/Filament/Admin/Resources/Products/Schemas/LandingPageSection.php b/app/Filament/Admin/Resources/Products/Schemas/LandingPageSection.php index e8c587d..167c60f 100644 --- a/app/Filament/Admin/Resources/Products/Schemas/LandingPageSection.php +++ b/app/Filament/Admin/Resources/Products/Schemas/LandingPageSection.php @@ -107,11 +107,9 @@ class LandingPageSection Select::make('icon') ->label(__('products.feature_icon')) ->options($iconOptions) - ->searchable() - ->required(), + ->searchable(), TextInput::make('title') ->label(__('products.feature_title')) - ->required() ->columnSpanFull(), Textarea::make('description') ->label(__('products.feature_description')) @@ -153,11 +151,9 @@ class LandingPageSection TextInput::make('number') ->label(__('products.step_number')) ->numeric() - ->default(fn ($get) => ($get('../../../_index') ?? 0) + 1) - ->required(), + ->default(fn ($get) => ($get('../../../_index') ?? 0) + 1), TextInput::make('title') ->label(__('products.step_title')) - ->required() ->columnSpanFull(), Textarea::make('description') ->label(__('products.step_description')) @@ -165,10 +161,8 @@ class LandingPageSection ->columnSpanFull(), ]) ->columns(1) - ->defaultItems(4) - ->minItems(4) - ->maxItems(4) - ->reorderable(false) + ->defaultItems(0) + ->reorderable() ->collapsible() ->itemLabel(fn (array $state): ?string => __('products.step') . ' ' . ($state['number'] ?? '') . ': ' . ($state['title'] ?? '')) ->columnSpanFull(), @@ -199,12 +193,10 @@ class LandingPageSection ->schema([ TextInput::make('question') ->label(__('products.faq_question')) - ->required() ->columnSpanFull(), Textarea::make('answer') ->label(__('products.faq_answer')) ->rows(3) - ->required() ->columnSpanFull(), ]) ->columns(1) diff --git a/app/Filament/Admin/Resources/Products/Schemas/ProductForm.php b/app/Filament/Admin/Resources/Products/Schemas/ProductForm.php index 219158c..09a1d80 100644 --- a/app/Filament/Admin/Resources/Products/Schemas/ProductForm.php +++ b/app/Filament/Admin/Resources/Products/Schemas/ProductForm.php @@ -54,6 +54,7 @@ class ProductForm ->searchable(), FileUpload::make('hero_image') ->label(__('products.hero_image')) + ->required() ->image() ->disk('public') ->directory('products'),