From 589163f772839cd0fa5084b9d6519d2def33c4aa Mon Sep 17 00:00:00 2001 From: payal-canyon Date: Fri, 18 Oct 2024 08:22:12 +0000 Subject: [PATCH] [AIDAPP-314]: Feature Flag cleanup: KnowledgeBaseCategorySlug --- .../Pages/CreateKnowledgeBaseCategory.php | 4 +- .../Pages/EditKnowledgeBaseCategory.php | 4 +- .../Pages/ViewKnowledgeBaseCategory.php | 4 +- app/Features/KnowledgeBaseCategorySlug.php | 47 ----------------- ...ture_flag_knowledge_base_category_slug.php | 50 ------------------- 5 files changed, 3 insertions(+), 106 deletions(-) delete mode 100644 app/Features/KnowledgeBaseCategorySlug.php delete mode 100644 database/migrations/2024_10_10_142117_data_activate_feature_flag_knowledge_base_category_slug.php diff --git a/app-modules/knowledge-base/src/Filament/Resources/KnowledgeBaseCategoryResource/Pages/CreateKnowledgeBaseCategory.php b/app-modules/knowledge-base/src/Filament/Resources/KnowledgeBaseCategoryResource/Pages/CreateKnowledgeBaseCategory.php index f0ca78dd6..ed2181ca5 100644 --- a/app-modules/knowledge-base/src/Filament/Resources/KnowledgeBaseCategoryResource/Pages/CreateKnowledgeBaseCategory.php +++ b/app-modules/knowledge-base/src/Filament/Resources/KnowledgeBaseCategoryResource/Pages/CreateKnowledgeBaseCategory.php @@ -40,7 +40,6 @@ use Filament\Forms\Components\Textarea; use Filament\Forms\Components\TextInput; use Filament\Resources\Pages\CreateRecord; -use App\Features\KnowledgeBaseCategorySlug; use App\Filament\Forms\Components\IconSelect; use AidingApp\KnowledgeBase\Filament\Resources\KnowledgeBaseCategoryResource; @@ -62,8 +61,7 @@ public function form(Form $form): Form ->unique() ->maxLength(255) ->required() - ->dehydrateStateUsing(fn (string $state): string => strtolower($state)) - ->visible(KnowledgeBaseCategorySlug::active()), + ->dehydrateStateUsing(fn (string $state): string => strtolower($state)), Textarea::make('description') ->label('Description') ->nullable() diff --git a/app-modules/knowledge-base/src/Filament/Resources/KnowledgeBaseCategoryResource/Pages/EditKnowledgeBaseCategory.php b/app-modules/knowledge-base/src/Filament/Resources/KnowledgeBaseCategoryResource/Pages/EditKnowledgeBaseCategory.php index 903e3272d..67d55cc7d 100644 --- a/app-modules/knowledge-base/src/Filament/Resources/KnowledgeBaseCategoryResource/Pages/EditKnowledgeBaseCategory.php +++ b/app-modules/knowledge-base/src/Filament/Resources/KnowledgeBaseCategoryResource/Pages/EditKnowledgeBaseCategory.php @@ -42,7 +42,6 @@ use Filament\Forms\Components\Textarea; use Filament\Forms\Components\TextInput; use Filament\Resources\Pages\EditRecord; -use App\Features\KnowledgeBaseCategorySlug; use App\Filament\Forms\Components\IconSelect; use AidingApp\KnowledgeBase\Filament\Resources\KnowledgeBaseCategoryResource; @@ -64,8 +63,7 @@ public function form(Form $form): Form ->unique(ignoreRecord: true) ->maxLength(255) ->required() - ->dehydrateStateUsing(fn (string $state): string => strtolower($state)) - ->visible(KnowledgeBaseCategorySlug::active()), + ->dehydrateStateUsing(fn (string $state): string => strtolower($state)), Textarea::make('description') ->label('Description') ->nullable() diff --git a/app-modules/knowledge-base/src/Filament/Resources/KnowledgeBaseCategoryResource/Pages/ViewKnowledgeBaseCategory.php b/app-modules/knowledge-base/src/Filament/Resources/KnowledgeBaseCategoryResource/Pages/ViewKnowledgeBaseCategory.php index 12bece06d..ee5c9f82c 100644 --- a/app-modules/knowledge-base/src/Filament/Resources/KnowledgeBaseCategoryResource/Pages/ViewKnowledgeBaseCategory.php +++ b/app-modules/knowledge-base/src/Filament/Resources/KnowledgeBaseCategoryResource/Pages/ViewKnowledgeBaseCategory.php @@ -40,7 +40,6 @@ use Filament\Infolists\Infolist; use Filament\Resources\Pages\ViewRecord; use Filament\Infolists\Components\Section; -use App\Features\KnowledgeBaseCategorySlug; use Filament\Infolists\Components\TextEntry; use AidingApp\KnowledgeBase\Models\KnowledgeBaseCategory; use AidingApp\KnowledgeBase\Filament\Resources\KnowledgeBaseCategoryResource; @@ -65,8 +64,7 @@ public function infolist(Infolist $infolist): Infolist ->label('Description') ->columnSpanFull(), TextEntry::make('slug') - ->hidden(fn (KnowledgeBaseCategory $record): bool => blank($record->slug)) - ->visible(KnowledgeBaseCategorySlug::active()), + ->hidden(fn (KnowledgeBaseCategory $record): bool => blank($record->slug)), ]) ->columns(), ]); diff --git a/app/Features/KnowledgeBaseCategorySlug.php b/app/Features/KnowledgeBaseCategorySlug.php deleted file mode 100644 index 8502504d0..000000000 --- a/app/Features/KnowledgeBaseCategorySlug.php +++ /dev/null @@ -1,47 +0,0 @@ - - - Copyright © 2016-2024, Canyon GBS LLC. All rights reserved. - - Aiding App™ is licensed under the Elastic License 2.0. For more details, - see - - Notice: - - - You may not provide the software to third parties as a hosted or managed - service, where the service provides users with access to any substantial set of - the features or functionality of the software. - - You may not move, change, disable, or circumvent the license key functionality - in the software, and you may not remove or obscure any functionality in the - software that is protected by the license key. - - You may not alter, remove, or obscure any licensing, copyright, or other notices - of the licensor in the software. Any use of the licensor’s trademarks is subject - to applicable law. - - Canyon GBS LLC respects the intellectual property rights of others and expects the - same in return. Canyon GBS™ and Aiding App™ are registered trademarks of - Canyon GBS LLC, and we are committed to enforcing and protecting our trademarks - vigorously. - - The software solution, including services, infrastructure, and code, is offered as a - Software as a Service (SaaS) by Canyon GBS LLC. - - Use of this software implies agreement to the license terms and conditions as stated - in the Elastic License 2.0. - - For more information or inquiries please visit our website at - or contact us via email at legal@canyongbs.com. - - -*/ - -namespace App\Features; - -use App\Support\AbstractFeatureFlag; - -class KnowledgeBaseCategorySlug extends AbstractFeatureFlag -{ - public function resolve(mixed $scope): mixed - { - return false; - } -} diff --git a/database/migrations/2024_10_10_142117_data_activate_feature_flag_knowledge_base_category_slug.php b/database/migrations/2024_10_10_142117_data_activate_feature_flag_knowledge_base_category_slug.php deleted file mode 100644 index 3f00ef09e..000000000 --- a/database/migrations/2024_10_10_142117_data_activate_feature_flag_knowledge_base_category_slug.php +++ /dev/null @@ -1,50 +0,0 @@ - - - Copyright © 2016-2024, Canyon GBS LLC. All rights reserved. - - Aiding App™ is licensed under the Elastic License 2.0. For more details, - see - - Notice: - - - You may not provide the software to third parties as a hosted or managed - service, where the service provides users with access to any substantial set of - the features or functionality of the software. - - You may not move, change, disable, or circumvent the license key functionality - in the software, and you may not remove or obscure any functionality in the - software that is protected by the license key. - - You may not alter, remove, or obscure any licensing, copyright, or other notices - of the licensor in the software. Any use of the licensor’s trademarks is subject - to applicable law. - - Canyon GBS LLC respects the intellectual property rights of others and expects the - same in return. Canyon GBS™ and Aiding App™ are registered trademarks of - Canyon GBS LLC, and we are committed to enforcing and protecting our trademarks - vigorously. - - The software solution, including services, infrastructure, and code, is offered as a - Software as a Service (SaaS) by Canyon GBS LLC. - - Use of this software implies agreement to the license terms and conditions as stated - in the Elastic License 2.0. - - For more information or inquiries please visit our website at - or contact us via email at legal@canyongbs.com. - - -*/ - -use App\Features\KnowledgeBaseCategorySlug; -use Illuminate\Database\Migrations\Migration; - -return new class () extends Migration { - public function up(): void - { - KnowledgeBaseCategorySlug::activate(); - } - - public function down(): void - { - KnowledgeBaseCategorySlug::deactivate(); - } -};