Skip to content

Commit

Permalink
cs-fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
gheorghelupu17 committed Oct 17, 2023
1 parent dbab3f8 commit 5c0e89e
Show file tree
Hide file tree
Showing 16 changed files with 11 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@

use App\Filament\Resources\OrganizationResource;
use App\Filament\Resources\OrganizationResource\Actions\Pages\ApproveOrganizationAction;
use App\Filament\Resources\OrganizationResource\Actions\Pages\ApproveProjectAction;
use App\Filament\Resources\OrganizationResource\Actions\Pages\DeactivateOrganizationAction;
use App\Filament\Resources\OrganizationResource\Actions\Pages\ReactivateOrganizationAction;
use App\Filament\Resources\OrganizationResource\Actions\Pages\RejectProjectAction;
use Filament\Pages\Actions\EditAction;
use Filament\Resources\Pages\ViewRecord;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ protected function getTableColumns(): array

protected function getTableRecordUrlUsing(): \Closure
{
return fn (Organization $record) => OrganizationResource::getUrl('view', ['record'=>$record,'activeRelationManager'=>5]);
return fn (Organization $record) => OrganizationResource::getUrl('view', ['record' => $record, 'activeRelationManager' => 5]);
}

protected function getTableActions(): array
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace App\Filament\Resources\ProjectResource\Actions\Pages;

use App\Models\Organization;
use App\Models\Project;
use Filament\Pages\Actions\Action;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace App\Filament\Resources\ProjectResource\Actions\Pages;

use App\Models\Organization;
use App\Models\Project;
use Filament\Pages\Actions\Action;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace App\Filament\Resources\ProjectResource\Actions\Pages;

use App\Models\Organization;
use App\Models\Project;
use Filament\Forms\Components\Textarea;
use Filament\Pages\Actions\Action;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace App\Filament\Resources\ProjectResource\Actions\Tables\Projects;

use App\Models\Organization;
use App\Models\Project;
use Filament\Tables\Actions\Action;
use Livewire\Component;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace App\Filament\Resources\ProjectResource\Actions\Tables\Projects;

use App\Models\Organization;
use App\Models\Project;
use Filament\Forms\Components\Textarea;
use Filament\Tables\Actions\Action;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace App\Filament\Resources\ProjectResource\Actions\Tables\Projects;

use App\Models\Organization;
use App\Models\Project;
use Filament\Forms\Components\Textarea;
use Filament\Tables\Actions\Action;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace App\Filament\Resources\ProjectResource\Widgets;

use App\Filament\Resources\ProjectResource\Actions\Tables\Projects\ApproveProjectAction;
use App\Filament\Resources\ProjectResource\Actions\Tables\Projects\RejectProjectAction;
use App\Models\Project;
use Filament\Tables\Actions\EditAction;
Expand Down
2 changes: 0 additions & 2 deletions app/Filament/Resources/ProjectResource/Widgets/NewProject.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@

namespace App\Filament\Resources\ProjectResource\Widgets;

use App\Enums\ProjectStatus;
use App\Filament\Resources\ProjectResource;
use App\Filament\Resources\ProjectResource\Actions\Tables\Projects\ApproveProjectAction;
use App\Filament\Resources\ProjectResource\Actions\Tables\Projects\RejectProjectAction;
use App\Models\Project;
use Filament\Tables\Actions\Action;
use Filament\Tables\Actions\EditAction;
use Filament\Tables\Actions\ViewAction;
use Illuminate\Database\Eloquent\Builder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use App\Models\Activity;
use App\Models\Organization;
use App\Models\Project;
use App\Tables\Columns\TitleWithImageColumn;
use Filament\Tables\Actions\ViewAction;
use Filament\Tables\Columns\TextColumn;
use Illuminate\Database\Eloquent\Builder;
Expand Down Expand Up @@ -75,14 +74,14 @@ protected function getTableColumns(): array
->sortable(),
];
}

protected function getTableRecordUrlUsing(): \Closure
{
return function (Project $record) {
return route('filament.resources.projects.view',['record'=> $record, 'activeRelationManager' => 2]);
return route('filament.resources.projects.view', ['record' => $record, 'activeRelationManager' => 2]);
};
}


protected function getTableActions(): array
{
return [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

class RejectedProject extends BaseProjectWidget
{

protected $listeners = [
'refreshRejectedProjectWidget' => '$refresh',
];
Expand Down
7 changes: 1 addition & 6 deletions app/Models/Activity.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,6 @@ public function approve(): void

public function reject(?string $reason): void
{


if ($this->isApproved()) {
return;
}
Expand All @@ -154,8 +152,7 @@ public function reject(?string $reason): void
'content' => $reason,
'user_id' => auth()->user()->id,
]);
}
else{
} else {
$this->subject->tickets()->create([
'subject' => __('project.ticket_rejected.subject', ['project' => $this->subject->name]),
'content' => $reason,
Expand All @@ -166,8 +163,6 @@ public function reject(?string $reason): void
'rejected_at' => now(),
]);



$this->organization->tickets()->create([
'subject' => __('project.ticket_rejected.subject', ['project' => $this->name]),
'content' => $reason,
Expand Down
8 changes: 4 additions & 4 deletions database/factories/ProjectFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ public function definition(): array
'accepting_volunteers' => fake()->boolean(),
'accepting_comments' => fake()->boolean(),
'videos' => fake()->randomElements([
['url'=>'https://www.youtube.com/watch?v=9bZkp7q19f0'],
['url'=>'https://www.youtube.com/watch?v=2Vv-BfVoq4g'],
['url'=>'https://www.youtube.com/watch?v=JGwWNGJdvx8'],
['url' => 'https://www.youtube.com/watch?v=9bZkp7q19f0'],
['url' => 'https://www.youtube.com/watch?v=2Vv-BfVoq4g'],
['url' => 'https://www.youtube.com/watch?v=JGwWNGJdvx8'],
], 2),
'external_links' => [['title'=>$this->faker->name, 'url'=>$this->faker->url]],
'external_links' => [['title' => $this->faker->name, 'url' => $this->faker->url]],
];
}

Expand Down
6 changes: 3 additions & 3 deletions lang/ro/field.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
'updated_at' => 'Actualizată la',
'id' => 'ID',
'id_format' => '#:number',
'boolean'=>[
'true'=>'Da',
'false'=>'Nu',
'boolean' => [
'true' => 'Da',
'false' => 'Nu',
],

];
1 change: 0 additions & 1 deletion lang/ro/project.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,5 +113,4 @@
'subheading' => 'Sunteți sigur că doriți să reactivați proiectul ":name"?',
],


];

0 comments on commit 5c0e89e

Please sign in to comment.