Replace native dialogs with app modals for Events link and unlink.
Deploy Ladill Meet / deploy (push) Successful in 49s
Deploy Ladill Meet / deploy (push) Successful in 49s
Link opens an in-page modal on conference and webinar show pages; unlink uses the shared confirm-dialog component. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Meet\Concerns;
|
||||
|
||||
use App\Models\Room;
|
||||
use App\Services\Integrations\EventsLinkService;
|
||||
use App\Services\Meet\MeetPermissions;
|
||||
use App\Support\EventsSourceLink;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
trait ResolvesEventsLinkContext
|
||||
{
|
||||
/** @return array{canManageEvents: bool, linkableEvents: list<array<string, mixed>>} */
|
||||
protected function eventsLinkContext(Request $request, Room $room): array
|
||||
{
|
||||
$canManageEvents = app(MeetPermissions::class)->can($this->member($request), 'meetings.manage');
|
||||
|
||||
$linkableEvents = $canManageEvents && ! EventsSourceLink::isLinked($room)
|
||||
? app(EventsLinkService::class)->linkableEvents($request->user())
|
||||
: [];
|
||||
|
||||
return compact('canManageEvents', 'linkableEvents');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user