From f1edf8a19e64834f4b829a1fffc28c576c4499b0 Mon Sep 17 00:00:00 2001 From: isaacclad Date: Fri, 17 Jul 2026 19:59:53 +0000 Subject: [PATCH] Fix Issue ticket queue dropdown HTML breakage. @json inside onchange terminated the attribute and broke the select; use a data-create-url attribute instead. Co-authored-by: Cursor --- resources/views/qms/tickets/create.blade.php | 112 ++++++++++--------- tests/Feature/ServicePointRoutingTest.php | 4 +- 2 files changed, 64 insertions(+), 52 deletions(-) diff --git a/resources/views/qms/tickets/create.blade.php b/resources/views/qms/tickets/create.blade.php index 3172401..b25abfb 100644 --- a/resources/views/qms/tickets/create.blade.php +++ b/resources/views/qms/tickets/create.blade.php @@ -5,64 +5,74 @@ @endphp

Issue ticket

-
- @csrf -
- - - @error('service_queue_id') -

{{ $message }}

- @enderror -
- @if ($needsPoint) + @if ($queues->isEmpty()) +
+

No active queues yet.

+

Create a queue first, then come back to issue tickets.

+ Go to queues → +
+ @else + + @csrf
- - + @foreach ($queues as $queue) + - @empty - - @endforelse + @endforeach -

This queue only serves tickets assigned to a desk or room.

- @error('assigned_counter_id') + @error('service_queue_id')

{{ $message }}

@enderror
- @endif -
- - -
-
- - -
-
- - -
- -
+ @if ($needsPoint) +
+ + +

This queue only serves tickets assigned to a desk or room.

+ @error('assigned_counter_id') +

{{ $message }}

+ @enderror +
+ @endif + +
+ + +
+
+ + +
+
+ + +
+ + + @endif
diff --git a/tests/Feature/ServicePointRoutingTest.php b/tests/Feature/ServicePointRoutingTest.php index 94b84bc..9197cf7 100644 --- a/tests/Feature/ServicePointRoutingTest.php +++ b/tests/Feature/ServicePointRoutingTest.php @@ -125,8 +125,10 @@ class ServicePointRoutingTest extends TestCase ->get(route('qms.tickets.create', ['queue' => $queue->id])) ->assertOk() ->assertSee('Service point') + ->assertSee('data-create-url', false) ->assertDontSee('needsPoint') - ->assertDontSee('onQueueChange'); + ->assertDontSee('onQueueChange') + ->assertDontSee('@json'); } public function test_web_issue_without_service_point_returns_validation_error_not_500(): void