From 1d7e3941b51a7da18dba8a32cf53b48bc18c936a 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, 30 Oct 2025 16:38:22 +0900 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=88=A9=E7=94=A8=E8=80=85=E3=83=9E?= =?UTF-8?q?=E3=82=B9=E3=82=BF=E3=80=91=E4=BB=B6=E6=95=B0=E3=82=AB=E3=82=A6?= =?UTF-8?q?=E3=83=B3=E3=83=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/views/admin/users/list.blade.php | 86 ++++++++++++---------- 1 file changed, 47 insertions(+), 39 deletions(-) diff --git a/resources/views/admin/users/list.blade.php b/resources/views/admin/users/list.blade.php index 1d28125..353a663 100644 --- a/resources/views/admin/users/list.blade.php +++ b/resources/views/admin/users/list.blade.php @@ -3,40 +3,40 @@ @section('title', '利用者マスタ') @section('content') -@php - $curSort = $sort ?? request('sort', 'user_seq'); - $curDir = strtolower($dir ?? request('dir', $sort_type ?? 'desc')); - if (!in_array($curDir, ['asc', 'desc'], true)) { - $curDir = 'desc'; - } - - $queryBase = collect([ - 'user_id' => $user_id ?? null, - 'user_categoryid' => $user_categoryid ?? null, - 'user_tag_serial' => $user_tag_serial ?? null, - 'quit_flag' => $quit_flag ?? null, - 'user_phonetic' => $user_phonetic ?? null, - 'phone' => $phone ?? null, - 'email' => $email ?? null, - 'tag_qr_flag' => $tag_qr_flag ?? null, - 'quit_from' => $quit_from ?? null, - 'quit_to' => $quit_to ?? null, - ])->filter(function ($value) { - return !is_null($value) && $value !== ''; - })->all(); - - $thClass = function (string $key) use ($curSort, $curDir) { - if ($curSort !== $key) { - return 'sorting'; + @php + $curSort = $sort ?? request('sort', 'user_seq'); + $curDir = strtolower($dir ?? request('dir', $sort_type ?? 'desc')); + if (!in_array($curDir, ['asc', 'desc'], true)) { + $curDir = 'desc'; } - return $curDir === 'asc' ? 'sorting_asc' : 'sorting_desc'; - }; - $urlFor = function (string $key) use ($curSort, $curDir, $queryBase) { - $next = ($curSort === $key && $curDir === 'asc') ? 'desc' : 'asc'; - return route('users', array_merge($queryBase, ['sort' => $key, 'dir' => $next])); - }; -@endphp + $queryBase = collect([ + 'user_id' => $user_id ?? null, + 'user_categoryid' => $user_categoryid ?? null, + 'user_tag_serial' => $user_tag_serial ?? null, + 'quit_flag' => $quit_flag ?? null, + 'user_phonetic' => $user_phonetic ?? null, + 'phone' => $phone ?? null, + 'email' => $email ?? null, + 'tag_qr_flag' => $tag_qr_flag ?? null, + 'quit_from' => $quit_from ?? null, + 'quit_to' => $quit_to ?? null, + ])->filter(function ($value) { + return !is_null($value) && $value !== ''; + })->all(); + + $thClass = function (string $key) use ($curSort, $curDir) { + if ($curSort !== $key) { + return 'sorting'; + } + return $curDir === 'asc' ? 'sorting_asc' : 'sorting_desc'; + }; + + $urlFor = function (string $key) use ($curSort, $curDir, $queryBase) { + $next = ($curSort === $key && $curDir === 'asc') ? 'desc' : 'asc'; + return route('users', array_merge($queryBase, ['sort' => $key, 'dir' => $next])); + }; + @endphp {{-- ▼ コンテンツヘッダー(パンくず) --}}
@@ -242,6 +242,10 @@ +
+ 全 {{ $list->total() }} 件中 {{ $list->firstItem() }}〜{{ $list->lastItem() }} 件を表示 +
+
新規 @@ -259,7 +263,8 @@ @csrf
- +
{{-- 利用者ID(リンク) --}} - + {{-- タグ/QR --}} {{-- 利用者分類ID/氏名/フリガナ --}} @@ -345,6 +351,7 @@ #users-list tfoot th { background: #fff !important; } + .table-users thead th .header-link { color: #212529 !important; text-decoration: none !important; @@ -352,6 +359,7 @@ white-space: nowrap; padding-right: 1.8rem; } + .table-users.dataTable thead th.sorting, .table-users.dataTable thead th.sorting_asc, .table-users.dataTable thead th.sorting_desc {
@@ -296,15 +301,16 @@ ? route('user_edit', ['seq' => $item->user_seq]) : url('/users/edit/' . $item->user_seq)); $chk = (string) ($item->user_idcard_chk_flag ?? '0'); - $categoryDisplay = collect([ - $item->usertype_subject1 ?? '', - $item->usertype_subject2 ?? '', - $item->usertype_subject3 ?? '', - ])->filter(fn ($v) => $v !== '')->implode('/'); + $categoryDisplay = collect([ + $item->usertype_subject1 ?? '', + $item->usertype_subject2 ?? '', + $item->usertype_subject3 ?? '', + ])->filter(fn($v) => $v !== '')->implode('/'); @endphp
{{ $item->user_id }} △ {{ $item->user_name }}{{ $item->user_id }} △ + {{ $item->user_name }}{{ $item->tag_qr_flag ? 'QR' : 'タグ' }}