Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ADVAPP-1199] Feature Flag Cleanup: EngagementFilesCreatedByFeature #1306

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
use AdvisingApp\Engagement\Filament\Resources\EngagementFileResource;
use AdvisingApp\Engagement\Models\EngagementFile;
use AdvisingApp\Prospect\Models\Prospect;
use App\Features\EngagementFilesCreatedByFeature;
use App\Filament\Tables\Columns\IdColumn;
use Filament\Forms\Form;
use Filament\Resources\RelationManagers\RelationManager;
Expand Down Expand Up @@ -117,12 +116,10 @@ public function table(Table $table): Table
}),
TextColumn::make('created_at')
->label('Date Created')
->sortable(query: fn ($query, $direction) => $query->orderBy('engagement_files.created_at', $direction))
->visible(fn (): bool => EngagementFilesCreatedByFeature::active()),
->sortable(query: fn ($query, $direction) => $query->orderBy('engagement_files.created_at', $direction)),
TextColumn::make('createdBy.name')
->label('Created By')
->sortable(query: fn ($query, $direction) => $query->orderBy('engagement_files.created_by_id', $direction))
->visible(fn (): bool => EngagementFilesCreatedByFeature::active()),
->sortable(query: fn ($query, $direction) => $query->orderBy('engagement_files.created_by_id', $direction)),
])
->headerActions([
CreateAction::make()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,14 @@
namespace AdvisingApp\Engagement\Observers;

use AdvisingApp\Engagement\Models\EngagementFile;
use App\Features\EngagementFilesCreatedByFeature;

class EngagementFileObserver
{
public function creating(EngagementFile $engagementFile): void
{
$user = auth()->user();

if (EngagementFilesCreatedByFeature::active() && is_null($engagementFile->created_by_id)) {
if (is_null($engagementFile->created_by_id)) {
$engagementFile->created_by_id = $user?->getKey();
$engagementFile->created_by_type = $user?->getMorphClass();
}
Expand Down
47 changes: 0 additions & 47 deletions app/Features/EngagementFilesCreatedByFeature.php

This file was deleted.

Loading