feat: add invite notification emails, functionality to admin dashboard and sign up page
Signed-off-by: Miguel Nogueira <me@nogueira.codes>
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('invitations', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('requestor_email')->unique();
|
||||
$table->ipAddress('requestor_ip_address')->unique();
|
||||
$table->string('invitation_code');
|
||||
$table->enum('status', ['approved', 'denied', 'pending']);
|
||||
$table->boolean('notified')->default(false);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('invitations');
|
||||
}
|
||||
};
|
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('invitations', function (Blueprint $table) {
|
||||
$table->timestamp('expiration')->after('notified');
|
||||
$table->enum('status', ['approved', 'denied', 'pending', 'completed'])->change();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('invitations', function (Blueprint $table) {
|
||||
$table->dropColumn('expiration');
|
||||
$table->enum('status', ['approved', 'denied', 'pending'])->change();
|
||||
});
|
||||
}
|
||||
};
|
@@ -133,6 +133,7 @@ class PermissionSeeder extends Seeder
|
||||
'admin.notificationsettings.*',
|
||||
'profiles.view.others',
|
||||
'profiles.edit.others',
|
||||
'admin.manageInvites'
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user