Skip to content

Commit

Permalink
[ADVAPP-1046]:Feature Flag Cleanup: TagFeatureFlag (#1170)
Browse files Browse the repository at this point in the history
  • Loading branch information
kandarp-canyon authored Dec 10, 2024
1 parent cbd0561 commit 67bd1d5
Show file tree
Hide file tree
Showing 9 changed files with 6 additions and 123 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
use App\Enums\TagType;
use Filament\Forms\Get;
use Filament\Tables\Table;
use App\Features\TagFeatureFlag;
use Filament\Actions\CreateAction;
use Filament\Actions\ImportAction;
use Filament\Tables\Filters\Filter;
Expand Down Expand Up @@ -171,8 +170,7 @@ function (Builder $query, array $data) {
$query->whereIn('tag_id', $data['values']);
});
}
)
->visible(fn (): bool => TagFeatureFlag::active()),
),
])
->actions([
ViewAction::make(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@

namespace AdvisingApp\Prospect\Filament\Resources\ProspectResource\Pages;

use App\Features\TagFeatureFlag;
use Filament\Actions\EditAction;
use Filament\Infolists\Infolist;
use Filament\Resources\Pages\ViewRecord;
Expand Down Expand Up @@ -116,8 +115,7 @@ public function infolist(Infolist $infolist): Infolist
TextEntry::make('tags.name')
->label('Tags')
->badge()
->placeholder('-')
->visible(fn (): bool => TagFeatureFlag::active()),
->placeholder('-'),
])
->columns(2),
Section::make('Engagement Restrictions')
Expand All @@ -142,7 +140,7 @@ public function infolist(Infolist $infolist): Infolist
protected function getHeaderActions(): array
{
return [
ProspectTagsAction::make()->visible(fn (): bool => TagFeatureFlag::active() && auth()->user()?->can('prospect.tags.manage')),
ProspectTagsAction::make()->visible(fn (): bool => auth()->user()?->can('prospect.tags.manage')),
ConvertToStudent::make()->visible(fn (Prospect $record) => ! $record->student()->exists()),
DisassociateStudent::make()->visible(fn (Prospect $record) => $record->student()->exists()),
EditAction::make(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@

use App\Models\Tag;
use App\Enums\TagType;
use App\Features\TagFeatureFlag;
use Filament\Resources\Resource;
use Illuminate\Database\Eloquent\Builder;
use App\Filament\Clusters\ConstituentManagement;
Expand All @@ -61,11 +60,6 @@ class ProspectTagResource extends Resource

protected static ?string $navigationGroup = 'Prospects';

public static function canAccess(): bool
{
return TagFeatureFlag::active() && parent::canAccess();
}

public static function getPages(): array
{
return [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@

namespace AdvisingApp\StudentDataModel\Filament\Resources\StudentResource\Pages\Concerns;

use App\Features\TagFeatureFlag;
use App\Settings\DisplaySettings;
use Illuminate\Contracts\View\View;
use AdvisingApp\Notification\Filament\Actions\SubscribeHeaderAction;
Expand Down Expand Up @@ -92,7 +91,7 @@ public function getHeader(): ?View
protected function getHeaderActions(): array
{
return [
StudentTagsAction::make()->visible(fn (): bool => TagFeatureFlag::active() && auth()->user()->can('student.tags.manage')),
StudentTagsAction::make()->visible(fn (): bool => auth()->user()->can('student.tags.manage')),
SyncStudentSisAction::make(),
SubscribeHeaderAction::make(),
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
use App\Models\User;
use App\Enums\TagType;
use Filament\Tables\Table;
use App\Features\TagFeatureFlag;
use Filament\Tables\Filters\Filter;
use AdvisingApp\Segment\Models\Segment;
use Filament\Tables\Actions\ViewAction;
Expand Down Expand Up @@ -155,7 +154,7 @@ function (Builder $query, array $data) {
$query->whereIn('tag_id', $data['values']);
});
}
)->visible(fn (): bool => TagFeatureFlag::active()),
),
])
->actions([
ViewAction::make()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@

namespace AdvisingApp\StudentDataModel\Filament\Resources\StudentResource\Schemas;

use App\Features\TagFeatureFlag;
use Filament\Infolists\Infolist;
use App\Infolists\Components\Subsection;
use Filament\Infolists\Components\Section;
Expand All @@ -54,8 +53,7 @@ public static function configure(Infolist $infolist): Infolist
TextEntry::make('tags.name')
->label('Tags')
->badge()
->placeholder('-')
->visible(fn (): bool => TagFeatureFlag::active()),
->placeholder('-'),
TextEntry::make('email_2')
->label('Alternate Email')
->placeholder('-'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@

use App\Models\Tag;
use App\Enums\TagType;
use App\Features\TagFeatureFlag;
use Filament\Resources\Resource;
use Illuminate\Database\Eloquent\Builder;
use App\Filament\Clusters\ConstituentManagement;
Expand All @@ -61,11 +60,6 @@ class StudentTagResource extends Resource

protected static ?string $navigationGroup = 'Students';

public static function canAccess(): bool
{
return TagFeatureFlag::active() && parent::canAccess();
}

public static function getPages(): array
{
return [
Expand Down
47 changes: 0 additions & 47 deletions app/Features/TagFeatureFlag.php

This file was deleted.

This file was deleted.

0 comments on commit 67bd1d5

Please sign in to comment.