diff --git a/app/Filament/Pages/Settings/General/Index.php b/app/Filament/Pages/Settings/General/Index.php new file mode 100644 index 0000000..1a9db95 --- /dev/null +++ b/app/Filament/Pages/Settings/General/Index.php @@ -0,0 +1,49 @@ +user()->can('View:GeneralSettings'); + } + + public function form(Schema $schema): Schema + { + return GeneralSettingsForm::configure($schema); + } + + public function getSavedNotification(): ?Notification + { + return CheerfulNotification::update(); + } +} diff --git a/app/Filament/Pages/Settings/ManageGeneralSettings.php b/app/Filament/Pages/Settings/General/Schemas/GeneralSettingsForm.php similarity index 80% rename from app/Filament/Pages/Settings/ManageGeneralSettings.php rename to app/Filament/Pages/Settings/General/Schemas/GeneralSettingsForm.php index 604bf55..5c2a79a 100644 --- a/app/Filament/Pages/Settings/ManageGeneralSettings.php +++ b/app/Filament/Pages/Settings/General/Schemas/GeneralSettingsForm.php @@ -1,39 +1,18 @@ components([ @@ -106,9 +85,4 @@ public function form(Schema $schema): Schema ]) ->columns(3); } - - public function getSavedNotification(): ?Notification - { - return CheerfulNotification::update(); - } } diff --git a/app/Filament/Pages/Settings/Seo/Index.php b/app/Filament/Pages/Settings/Seo/Index.php new file mode 100644 index 0000000..0ea4ad8 --- /dev/null +++ b/app/Filament/Pages/Settings/Seo/Index.php @@ -0,0 +1,48 @@ +user()->can('View:SeoSettings'); + } + + public function form(Schema $schema): Schema + { + return SeoSettingsForm::configure($schema); + } + + public function getSavedNotification(): ?Notification + { + return CheerfulNotification::update(); + } +} diff --git a/app/Filament/Pages/Settings/ManageSeoSettings.php b/app/Filament/Pages/Settings/Seo/Schemas/SeoSettingsForm.php similarity index 63% rename from app/Filament/Pages/Settings/ManageSeoSettings.php rename to app/Filament/Pages/Settings/Seo/Schemas/SeoSettingsForm.php index 57c0034..63fec08 100644 --- a/app/Filament/Pages/Settings/ManageSeoSettings.php +++ b/app/Filament/Pages/Settings/Seo/Schemas/SeoSettingsForm.php @@ -1,37 +1,16 @@ components([ @@ -60,9 +39,4 @@ public function form(Schema $schema): Schema ->columnSpanFull(), ]); } - - public function getSavedNotification(): ?Notification - { - return CheerfulNotification::update(); - } } diff --git a/app/Filament/Pages/Settings/SocialMedia/Index.php b/app/Filament/Pages/Settings/SocialMedia/Index.php new file mode 100644 index 0000000..82316b1 --- /dev/null +++ b/app/Filament/Pages/Settings/SocialMedia/Index.php @@ -0,0 +1,48 @@ +user()->can('View:SocialMediaSettings'); + } + + public function form(Schema $schema): Schema + { + return SocialMediaSettingsForm::configure($schema); + } + + public function getSavedNotification(): ?Notification + { + return CheerfulNotification::update(); + } +} diff --git a/app/Filament/Pages/Settings/ManageSocialMediaSettings.php b/app/Filament/Pages/Settings/SocialMedia/Schemas/SocialMediaSettingsForm.php similarity index 68% rename from app/Filament/Pages/Settings/ManageSocialMediaSettings.php rename to app/Filament/Pages/Settings/SocialMedia/Schemas/SocialMediaSettingsForm.php index 3b18cd0..f0899a0 100644 --- a/app/Filament/Pages/Settings/ManageSocialMediaSettings.php +++ b/app/Filament/Pages/Settings/SocialMedia/Schemas/SocialMediaSettingsForm.php @@ -1,37 +1,16 @@ components([ @@ -69,9 +48,4 @@ public function form(Schema $schema): Schema ->columnSpanFull(), ]); } - - public function getSavedNotification(): ?Notification - { - return CheerfulNotification::update(); - } } diff --git a/database/seeders/ShieldSeeder.php b/database/seeders/ShieldSeeder.php index 91b17bc..0386382 100644 --- a/database/seeders/ShieldSeeder.php +++ b/database/seeders/ShieldSeeder.php @@ -152,11 +152,11 @@ public function run(): void "Replicate:Location", "Reorder:Location", - "View:ManageGeneralSettings", + "View:GeneralSettings", - "View:ManageSeoSettings", + "View:SeoSettings", - "View:ManageSocialMediaSettings", + "View:SocialMediaSettings", "View:MediaClassificationChart", @@ -413,11 +413,11 @@ public function run(): void "Replicate:Location", "Reorder:Location", - "View:ManageGeneralSettings", + "View:GeneralSettings", - "View:ManageSeoSettings", + "View:SeoSettings", - "View:ManageSocialMediaSettings", + "View:SocialMediaSettings", "View:MediaClassificationChart",