-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
254 admin bb organizatii organizatii active cannot deactivate an orga…
…nization from preview table (#270) * clean up * clean up data loading * wip --------- Co-authored-by: Andrei Ioniță <[email protected]>
- Loading branch information
1 parent
b7db9a4
commit b328c54
Showing
10 changed files
with
120 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
app/Filament/Resources/OrganizationResource/Actions/ApproveAction.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace App\Filament\Resources\OrganizationResource\Actions; | ||
|
||
use App\Enums\OrganizationStatus; | ||
use App\Models\Organization; | ||
use Filament\Tables\Actions\Action; | ||
|
||
class ApproveAction extends Action | ||
{ | ||
protected function setUp(): void | ||
{ | ||
parent::setUp(); | ||
|
||
$this->label(__('organization.actions.approve')); | ||
$this->requiresConfirmation(); | ||
$this->modalHeading(__('organization.actions.approve')); | ||
$this->modalButton(__('organization.actions.approve')); | ||
$this->action(function (Organization $record) { | ||
$record->update(['status' => OrganizationStatus::approved]); | ||
}); | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
app/Filament/Resources/OrganizationResource/Actions/RejectAction.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace App\Filament\Resources\OrganizationResource\Actions; | ||
|
||
use App\Enums\OrganizationStatus; | ||
use App\Models\Organization; | ||
use Filament\Tables\Actions\Action; | ||
|
||
class RejectAction extends Action | ||
{ | ||
protected function setUp(): void | ||
{ | ||
parent::setUp(); | ||
|
||
$this->label(__('organization.actions.reject')); | ||
$this->requiresConfirmation(); | ||
$this->modalHeading(__('organization.actions.reject')); | ||
$this->modalButton(__('organization.actions.reject')); | ||
$this->action(function (Organization $record) { | ||
$record->update(['status' => OrganizationStatus::rejected]); | ||
}); | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
app/Filament/Resources/OrganizationResource/Pages/ViewOrganization.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace App\Filament\Resources\OrganizationResource\Pages; | ||
|
||
use App\Filament\Resources\OrganizationResource; | ||
use Filament\Resources\Pages\ViewRecord; | ||
|
||
class ViewOrganization extends ViewRecord | ||
{ | ||
protected static string $resource = OrganizationResource::class; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters