refactor: remove console-specific resource registration and enhance OnboardingResource form schema
This commit is contained in:
@@ -36,8 +36,7 @@ class OnboardingResource extends Resource
|
||||
public static function form(Form $form): Form
|
||||
{
|
||||
return $form
|
||||
->columns(1)
|
||||
->components([
|
||||
->schema([
|
||||
TextInput::make('title')
|
||||
->label('Title')
|
||||
->required()
|
||||
@@ -85,8 +84,6 @@ class OnboardingResource extends Resource
|
||||
|
||||
Select::make('page_route')
|
||||
->label('Page to Guide To')
|
||||
->visible(fn (Get $get): bool => $get('is_guided'))
|
||||
->required(fn (Get $get): bool => $get('is_guided'))
|
||||
->options([
|
||||
'dashboard' => 'Dashboard',
|
||||
'services' => 'Services',
|
||||
@@ -100,8 +97,11 @@ class OnboardingResource extends Resource
|
||||
'account.notifications' => 'Notifications',
|
||||
'products' => 'Browse Products',
|
||||
])
|
||||
->helperText('Select which page the user should be guided to'),
|
||||
]);
|
||||
->helperText('Select which page the user should be guided to')
|
||||
->visible(fn (Get $get): bool => $get('is_guided'))
|
||||
->required(fn (Get $get): bool => $get('is_guided')),
|
||||
])
|
||||
->columns(1);
|
||||
}
|
||||
|
||||
public static function table(Table $table): Table
|
||||
|
||||
@@ -62,13 +62,6 @@ class Onboarding extends Extension
|
||||
public function boot()
|
||||
{
|
||||
|
||||
if (app()->runningInConsole() === false) {
|
||||
\Filament\Facades\Filament::getCurrentPanel()?->resources([
|
||||
\Paymenter\Extensions\Others\Onboarding\Admin\Resources\OnboardingResource::class,
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
app('view')->addNamespace('onboarding', __DIR__ . '/resources/views');
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
@php use Illuminate\Support\Facades\Storage; @endphp
|
||||
<div>
|
||||
@if($showModal && count($slides) > 0)
|
||||
<div x-data="{ open: @entangle('showModal'), currentSlide: @entangle('currentSlide') }"
|
||||
|
||||
Reference in New Issue
Block a user