feat: frontend member management
- Leden pagina met VDataTable, rol chips, uitnodigingen sectie - InviteMemberDialog + EditMemberRoleDialog - Publieke acceptatiepagina /invitations/[token] - Router guard uitgebreid met requiresAuth: false support - MemberCollection backend uitgebreid met volledige pending_invitations lijst
This commit is contained in:
@@ -24,13 +24,16 @@ final class MemberCollection extends ResourceCollection
|
||||
{
|
||||
$organisation = $request->route('organisation');
|
||||
|
||||
$pendingInvitations = UserInvitation::where('organisation_id', $organisation->id)
|
||||
->pending()
|
||||
->where('expires_at', '>', now())
|
||||
->get();
|
||||
|
||||
return [
|
||||
'meta' => [
|
||||
'total_members' => $this->collection->count(),
|
||||
'pending_invitations_count' => UserInvitation::where('organisation_id', $organisation->id)
|
||||
->pending()
|
||||
->where('expires_at', '>', now())
|
||||
->count(),
|
||||
'pending_invitations_count' => $pendingInvitations->count(),
|
||||
'pending_invitations' => InvitationResource::collection($pendingInvitations),
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
<?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
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('activity_log', function (Blueprint $table) {
|
||||
$table->string('subject_id', 26)->nullable()->change();
|
||||
$table->string('causer_id', 26)->nullable()->change();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('activity_log', function (Blueprint $table) {
|
||||
$table->unsignedBigInteger('subject_id')->nullable()->change();
|
||||
$table->unsignedBigInteger('causer_id')->nullable()->change();
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user