From aac63f7d0aaa6b9a1ccf751316471777c1f643df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=A0=E7=9A=84=E5=90=8D=E5=AD=97?= <你的邮箱> Date: Thu, 16 Oct 2025 13:34:25 +0900 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E3=82=BF=E3=82=B0=E7=99=BA=E8=A1=8C?= =?UTF-8?q?=E3=82=AD=E3=83=A5=E3=83=BC=E5=87=A6=E7=90=86=E3=80=81=E5=B1=A5?= =?UTF-8?q?=E6=AD=B4=E8=A1=A8=E7=A4=BA=E3=80=91=E6=8F=90=E7=A4=BA=E3=83=A1?= =?UTF-8?q?=E3=83=83=E3=82=BB=E3=83=BC=E3=82=B8=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/admin/tag_issue/list.blade.php | 219 ++++++++++-------- 1 file changed, 123 insertions(+), 96 deletions(-) diff --git a/resources/views/admin/tag_issue/list.blade.php b/resources/views/admin/tag_issue/list.blade.php index e6809f2..755a0dd 100644 --- a/resources/views/admin/tag_issue/list.blade.php +++ b/resources/views/admin/tag_issue/list.blade.php @@ -107,7 +107,7 @@
| + onclick="document.querySelectorAll('#user-table input[name=\'ids[]\'][type=\'checkbox\']').forEach(cb => cb.checked = this.checked);"> | キューID | タグシリアル | @@ -166,12 +167,14 @@ @foreach($users as $user)|||
|---|---|---|---|---|---|
| - + {{-- ★ data-que-status をJOIN結果から出力(未発送=1, 発送済=3 など) --}} + | - @php - $que = \App\Models\OperatorQue::where('user_id', $user->user_id)->first(); - @endphp -{{ $que ? $que->que_id : '' }} | + {{-- ★ 逐行のDB取得は不要。JOIN結果をそのまま使う --}} +{{ $user->que_id }} | {{ $user->user_tag_serial }} | {{ $user->user_tag_serial_64 }} | {{ $user->user_tag_issue }} | @@ -205,15 +208,38 @@ {{-- 印刷処理用 JS --}} + } + + // ソート挙動 + document.addEventListener('DOMContentLoaded', function () { + document.querySelectorAll('th[sort]').forEach(function (th) { + th.addEventListener('click', function () { + var sort = th.getAttribute('sort'); + var params = new URLSearchParams(window.location.search); + var currentSort = params.get('sort'); + var currentType = params.get('sort_type'); + var nextType = (currentSort === sort && currentType === 'asc') ? 'desc' : 'asc'; + params.set('sort', sort); + params.set('sort_type', nextType); + window.location.search = params.toString(); + }); + }); + }); + @endsection