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
|
||||
|
||||
Reference in New Issue
Block a user