->groups([
Group::make('priority')
->getDescriptionFromRecordUsing(fn (ToDo $record): string => match ($record->priority) {
'1. Urgent' => 'Needs to be done ASAP',
'2. Easy' => 'A fast task you can knock off your list',
'3. Short Term' => 'An ordinary task that can be done soon',
'4. Long Term' => 'Requires more planning, time and possibly resources',
default => 'Unknown priority', // Handle any other values
})
->titlePrefixedWithLabel(false),
])
->groups([
Group::make('priority')
->getDescriptionFromRecordUsing(fn (ToDo $record): string => match ($record->priority) {
'1. Urgent' => 'Needs to be done ASAP',
'2. Easy' => 'A fast task you can knock off your list',
'3. Short Term' => 'An ordinary task that can be done soon',
'4. Long Term' => 'Requires more planning, time and possibly resources',
default => 'Unknown priority', // Handle any other values
})
->titlePrefixedWithLabel(false),
])