-
-
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.
- Loading branch information
1 parent
2342ec5
commit 819b005
Showing
5 changed files
with
88 additions
and
0 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
app/Filament/Resources/OrganisationResource/Actions/ResendInvitationAction.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,38 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace App\Filament\Resources\OrganisationResource\Actions; | ||
|
||
use App\Models\Organisation; | ||
use Filament\Pages\Actions\Action; | ||
|
||
class ResendInvitationAction extends Action | ||
{ | ||
public static function getDefaultName(): ?string | ||
{ | ||
return 'resend_invitation'; | ||
} | ||
|
||
protected function setUp(): void | ||
{ | ||
parent::setUp(); | ||
|
||
$this->color('secondary'); | ||
|
||
$this->action(function (Organisation $record, Action $action) { | ||
$record->users->first()->sendWelcomeNotification(); | ||
$action->success(); | ||
}); | ||
|
||
$this->requiresConfirmation(); | ||
|
||
$this->label(__('organisation.action.resend_invitation.button')); | ||
|
||
$this->modalHeading(__('organisation.action.resend_invitation.heading')); | ||
$this->modalSubheading(__('organisation.action.resend_invitation.subheading')); | ||
$this->modalButton(__('organisation.action.resend_invitation.button')); | ||
|
||
$this->successNotificationTitle(__('organisation.action.resend_invitation.success')); | ||
} | ||
} |
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
34 changes: 34 additions & 0 deletions
34
database/migrations/2024_04_05_085356_change_status_column_from_orgaisations.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,34 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
return new class extends Migration | ||
{ | ||
/** | ||
* Run the migrations. | ||
*/ | ||
public function up(): void | ||
{ | ||
Schema::table('organisations', function (Blueprint $table) { | ||
$table->string('status') | ||
->default(App\Enum\OrganisationStatus::guest->value) | ||
->change(); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
*/ | ||
public function down(): void | ||
{ | ||
Schema::table('organisations', function (Blueprint $table) { | ||
$table->string('status') | ||
->default(App\Enum\OrganisationStatus::inactive->value) | ||
->change(); | ||
}); | ||
} | ||
}; |
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