Allow adding conference speakers after creation on details page.
Deploy Ladill Meet / deploy (push) Successful in 35s
Deploy Ladill Meet / deploy (push) Successful in 35s
Hosts can assign team speakers and invite panelists by email from the conference show page, with presenter refs synced to live sessions. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -10,6 +10,28 @@ use App\Models\User;
|
||||
|
||||
class ConferenceService
|
||||
{
|
||||
/**
|
||||
* @param list<string> $presenterRefs
|
||||
*/
|
||||
public function syncPresenterRefs(Room $room, array $presenterRefs): Room
|
||||
{
|
||||
$presenterRefs = array_values(array_unique(array_filter($presenterRefs)));
|
||||
$settings = array_merge($room->settings ?? [], ['presenter_refs' => $presenterRefs]);
|
||||
$room->update(['settings' => $settings]);
|
||||
|
||||
$session = $room->activeSession();
|
||||
if ($session) {
|
||||
$merged = collect($session->presenter_refs ?? [])
|
||||
->merge($presenterRefs)
|
||||
->unique()
|
||||
->values()
|
||||
->all();
|
||||
$session->update(['presenter_refs' => $merged]);
|
||||
}
|
||||
|
||||
return $room->fresh();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return list<string>
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user