diff --git a/app/Filament/Resources/Manage/Cooperations/RelationManagers/ReportRelationManager.php b/app/Filament/Resources/Manage/Cooperations/RelationManagers/ReportRelationManager.php index d4d59e5..bf34515 100644 --- a/app/Filament/Resources/Manage/Cooperations/RelationManagers/ReportRelationManager.php +++ b/app/Filament/Resources/Manage/Cooperations/RelationManagers/ReportRelationManager.php @@ -214,6 +214,10 @@ public function table(Table $table): Table return $this->getOwnerRecord()->status === CooperationStatus::ASSIGNMENT && $taskAssignment->start_date->toDateString() <= now()->toDateString() && $taskAssignment->end_date->toDateString() >= now()->toDateString() + && $this->getOwnerRecord()->proposal() + ->whereHas('partnerMedia.company', fn ($q) => $q->where('user_id', auth()->id())) + ->accepted() + ->exists() && $taskAssignment->reports() ->whereHas('mediaTaskAssignment.partnerMedia.company', fn ($q) => $q->where('user_id', auth()->id())) ->where('reports.status', '!=', ApprovalStatus::REJECTED)