bezhanSalleh / filament-shield

The easiest and most intuitive way to add access management to your Filament Admin Resources, Pages & Widgets through `spatie/laravel-permission`
MIT License
1.6k stars 180 forks source link

reorganize resources alphabetically in the rights system according to template translation #330

Closed maxime9446 closed 7 months ago

maxime9446 commented 8 months ago

When you translate a model from its Filament resource:

public static function getModelLabel(): string { return __('key'); } This results in updating the labels of sections on the resources permissions page and sorting them alphabetically.

Capture d’écran du 2024-02-08 17-21-01

bezhanSalleh commented 7 months ago

Could you revert the code formatting changes and push again. Cause right now I cannot differentiate between the added/updated feature and what was before from this pull request. Thanks.

maxime9446 commented 7 months ago

is it good?

bezhanSalleh commented 7 months ago

Now, i can see what you are trying to achive but i'm not going to merge this with the current implementation because of the two map operations it will have a performance cost specially when you have more than 10 models. will add it to the todo list for now. Thanks.