Gate ticket handoff as Pro; reorder settings cards.
Deploy Ladill Queue / deploy (push) Successful in 1m19s

Transfer between queues requires Pro (console UI, API, and plans copy).
Branches & team now sits after Organization on the settings page.
This commit is contained in:
isaacclad
2026-07-16 09:54:53 +00:00
parent 26c9edc131
commit 7b2722f471
8 changed files with 263 additions and 52 deletions
@@ -6,6 +6,7 @@ use App\Http\Controllers\Api\Concerns\ScopesApiToAccount;
use App\Http\Controllers\Controller;
use App\Models\ServiceQueue;
use App\Models\Ticket;
use App\Services\Qms\PlanService;
use App\Services\Qms\QueueEngine;
use App\Services\Qms\TicketPresenter;
use Illuminate\Http\JsonResponse;
@@ -17,6 +18,7 @@ class TicketController extends Controller
public function __construct(
protected QueueEngine $engine,
protected PlanService $plans,
) {}
public function index(Request $request): JsonResponse
@@ -108,6 +110,11 @@ class TicketController extends Controller
]);
if ($validated['action'] === 'transfer') {
abort_unless(
$this->plans->hasFeature($this->organization($request), 'transfer'),
403,
'Handing off tickets between queues requires Queue Pro.',
);
$toQueue = ServiceQueue::where('uuid', $validated['to_queue_id'])->firstOrFail();
$this->authorizeOwner($request, $toQueue);
$result = $this->engine->transfer($ticket, $toQueue, null, $validated['reason'] ?? null, $actor);