Collapse all labor groups by default — use correct Table method
collapsedGroupsByDefault() is on Table, not Group::collapsedByDefault() Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -122,13 +122,13 @@ class LaborResource extends Resource
|
|||||||
->label(__('Categorie'))
|
->label(__('Categorie'))
|
||||||
->titlePrefixedWithLabel(false)
|
->titlePrefixedWithLabel(false)
|
||||||
->collapsible()
|
->collapsible()
|
||||||
->collapsedByDefault()
|
|
||||||
->getTitleFromRecordUsing(function ($record) {
|
->getTitleFromRecordUsing(function ($record) {
|
||||||
$opts = \App\Models\Tenant\LaborCategory::optionsForSelect();
|
$opts = \App\Models\Tenant\LaborCategory::optionsForSelect();
|
||||||
return $opts[$record->category] ?? $record->category;
|
return $opts[$record->category] ?? $record->category;
|
||||||
}),
|
}),
|
||||||
])
|
])
|
||||||
->defaultGroup('category');
|
->defaultGroup('category')
|
||||||
|
->collapsedGroupsByDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getRelations(): array
|
public static function getRelations(): array
|
||||||
|
|||||||
Reference in New Issue
Block a user