diff --git a/packages/admin/resources/lang/en/relationmanagers.php b/packages/admin/resources/lang/en/relationmanagers.php index 15f2b90dd1..9f9223eb93 100644 --- a/packages/admin/resources/lang/en/relationmanagers.php +++ b/packages/admin/resources/lang/en/relationmanagers.php @@ -28,7 +28,7 @@ ], ], 'table' => [ - 'description' => 'Associate customer groups to this product to determine it\'s availability.', + 'description' => 'Associate customer groups to this :type to determine it\'s availability.', 'name' => [ 'label' => 'Name', ], diff --git a/packages/admin/src/Filament/Resources/ProductResource/RelationManagers/CustomerGroupRelationManager.php b/packages/admin/src/Filament/Resources/ProductResource/RelationManagers/CustomerGroupRelationManager.php index 7ca2e66be7..fdc8232280 100644 --- a/packages/admin/src/Filament/Resources/ProductResource/RelationManagers/CustomerGroupRelationManager.php +++ b/packages/admin/src/Filament/Resources/ProductResource/RelationManagers/CustomerGroupRelationManager.php @@ -6,6 +6,7 @@ use Filament\Forms\Form; use Filament\Tables; use Filament\Tables\Table; +use Illuminate\Support\Str; use Lunar\Admin\Events\ProductCustomerGroupsUpdated; use Lunar\Admin\Support\RelationManagers\BaseRelationManager; @@ -85,7 +86,9 @@ public function getDefaultTable(Table $table): Table return $table ->description( - $this->description ?: __('lunarpanel::relationmanagers.customer_groups.table.description') + $this->description ?: __('lunarpanel::relationmanagers.customer_groups.table.description', [ + 'type' => Str::lower(class_basename(get_class($this->getOwnerRecord()))), + ]) ) ->paginated(false) ->headerActions([