mirror of
https://github.com/ericasch6/scrum-poker-internal.git
synced 2026-10-14 06:25:28 +00:00
Add room participant moderation
This commit is contained in:
@@ -19,6 +19,17 @@ class DashboardRoomResource extends JsonResource
|
||||
'current_round' => $this->resource->current_round,
|
||||
'players_count' => $this->resource->players_count,
|
||||
'active_player_count' => $this->resource->active_player_count,
|
||||
'players' => $this->resource->relationLoaded('activePlayers')
|
||||
? $this->resource->activePlayers
|
||||
->map(fn ($player): array => [
|
||||
'id' => $player->id,
|
||||
'name' => $player->name,
|
||||
'is_moderator' => $player->is_moderator,
|
||||
'is_owner' => $player->user_id === $this->resource->owner_id,
|
||||
])
|
||||
->values()
|
||||
->all()
|
||||
: [],
|
||||
'last_activity_at' => $this->resource->last_activity_at?->toIso8601String(),
|
||||
'closed_at' => $this->resource->closed_at?->toIso8601String(),
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user