krgm.so-manager-dev.com/resources/views/admin/contractor_list/list.blade.php
你的名字 c7db94973b
All checks were successful
Deploy main / deploy (push) Successful in 23s
[契約者一覧][未更新者一覧]絞り込み条件修正
2025-09-24 10:27:25 +09:00

332 lines
14 KiB
PHP

@extends('layouts.app')
@section('title', '未更新者一覧')
@section('content')
<div class="content-header">
<div class="container-fluid">
<div class="row mb-2">
<div class="col-lg-6">
<h1 class="m-0 text-dark">未更新者一覧</h1>
</div>
<div class="col-lg-6">
<ol class="breadcrumb float-sm-right text-sm">
<li class="breadcrumb-item"><a href="{{ url('/home') }}">ホーム</a></li>
<li class="breadcrumb-item active">未更新者一覧</li>
</ol>
</div>
</div>
</div>
</div>
<section class="content">
<div class="container-fluid">
{{-- 絞り込みフィルター --}}
<form method="GET" action="{{ route('contractor_List') }}" class="mb-3" id="list-form">
<input type="hidden" name="sort" value="{{ $sort ?? request('sort','rc.contract_id') }}">
<input type="hidden" name="sort_type" value="{{ $sortType ?? request('sort_type','desc') }}">
<div class="card p-3">
<h6 class="mb-3">絞り込みフィルター</h6>
<div class="row">
{{-- 左カラム --}}
<div class="col-md-6">
<div class="form-group row">
<label class="col-sm-3 col-form-label">駐輪場</label>
<div class="col-sm-9">
@isset($parks)
<select name="park_id" class="form-control">
<option value="">全て</option>
@foreach($parks as $p)
<option value="{{ $p->park_id }}" {{ (string) request('park_id') === (string) $p->park_id ? 'selected' : '' }}>
{{ $p->park_name }}
</option>
@endforeach
</select>
@else
<input type="text" name="park_name" value="{{ request('park_name') }}" class="form-control">
@endisset
</div>
</div>
<div class="form-group row">
<label class="col-sm-3 col-form-label">利用者ID</label>
<div class="col-sm-9">
<input type="text" name="user_id" value="{{ request('user_id') }}" class="form-control">
</div>
</div>
<div class="form-group row">
<label class="col-sm-3 col-form-label">利用者分類</label>
<div class="col-sm-9">
<input type="text" name="user_category1"
value="{{ request('user_category1') }}"
class="form-control" placeholder="分類名1">
</div>
</div>
<div class="form-group row">
<label class="col-sm-3 col-form-label">タグシリアル64進</label>
<div class="col-sm-9">
<input type="text" name="user_tag_serial_64" value="{{ request('user_tag_serial_64') }}"
class="form-control">
</div>
</div>
<div class="form-group row">
<label class="col-sm-3 col-form-label">有効期限</label>
<div class="col-sm-9">
<input type="date" name="contract_periode" value="{{ request('contract_periode') }}"
class="form-control">
</div>
</div>
</div>
{{-- 右カラム --}}
<div class="col-md-6">
<div class="form-group row">
<label class="col-sm-3 col-form-label">フリガナ</label>
<div class="col-sm-9">
<input type="text" name="user_phonetic" value="{{ request('user_phonetic') }}" class="form-control">
</div>
</div>
<div class="form-group row">
<label class="col-sm-3 col-form-label">電話番号</label>
<div class="col-sm-9">
<input type="text" name="user_mobile" value="{{ request('user_mobile') }}" class="form-control">
</div>
</div>
<div class="form-group row">
<label class="col-sm-3 col-form-label">メールアドレス</label>
<div class="col-sm-9">
<input type="text" name="user_primemail" value="{{ request('user_primemail') }}" class="form-control">
</div>
</div>
<div class="form-group row">
<label class="col-sm-3 col-form-label">勤務先</label>
<div class="col-sm-9">
<input type="text" name="user_workplace" value="{{ request('user_workplace') }}" class="form-control">
</div>
</div>
<div class="form-group row">
<label class="col-sm-3 col-form-label">学校</label>
<div class="col-sm-9">
<input type="text" name="user_school" value="{{ request('user_school') }}" class="form-control">
</div>
</div>
<div class="form-group row">
<label class="col-sm-3 col-form-label">タグ・QR</label>
<div class="col-sm-9">
<select name="tag_qr_flag" class="form-control">
<option value="" {{ request('tag_qr_flag') === '' ? 'selected' : '' }}>全て</option>
<option value="1" {{ request('tag_qr_flag') === '1' ? 'selected' : '' }}>QR</option>
<option value="0" {{ request('tag_qr_flag') === '0' ? 'selected' : '' }}>タグ</option>
</select>
</div>
</div>
</div>
</div>
<div class="mt-2">
<button type="submit" class="btn btn-default">絞り込み</button>
<a href="{{ route('contractor_List') }}" class="btn btn-default">解除</a>
</div>
</div>
</form>
{{-- 一覧テーブル --}}
<div class="table-responsive">
<table class="table table-bordered table-hover table-sm rv-table text-nowrap">
<thead>
<tr>
@php($activeSort = request('sort'))
@php($activeType = request('sort_type'))
<th
class="sorting {{ $activeSort === 'rc.user_id' ? ($activeType === 'asc' ? 'sorting_asc' : 'sorting_desc') : '' }}"
sort="rc.user_id"
aria-sort="{{ $activeSort === 'rc.user_id' ? ($activeType === 'asc' ? 'ascending' : 'descending') : 'none' }}">
<span class="th-inner"><span class="th-label">利用者ID</span><span class="th-arrows"><span
class="up"></span><span class="down"></span></span></span>
</th>
<th
class="sorting {{ $activeSort === 'u.user_name' ? ($activeType === 'asc' ? 'sorting_asc' : 'sorting_desc') : '' }}"
sort="u.user_name"
aria-sort="{{ $activeSort === 'u.user_name' ? ($activeType === 'asc' ? 'ascending' : 'descending') : 'none' }}">
<span class="th-inner"><span class="th-label">氏名</span><span class="th-arrows"><span
class="up"></span><span class="down"></span></span></span>
</th>
<th>フリガナ</th>
<th
class="sorting {{ $activeSort === 'rc.contract_id' ? ($activeType === 'asc' ? 'sorting_asc' : 'sorting_desc') : '' }}"
sort="rc.contract_id"
aria-sort="{{ $activeSort === 'rc.contract_id' ? ($activeType === 'asc' ? 'ascending' : 'descending') : 'none' }}">
<span class="th-inner"><span class="th-label">定期契約ID</span><span class="th-arrows"><span
class="up"></span><span class="down"></span></span></span>
</th>
<th
class="sorting {{ $activeSort === 'rc.tag_qr_flag' ? ($activeType === 'asc' ? 'sorting_asc' : 'sorting_desc') : '' }}"
sort="rc.tag_qr_flag"
aria-sort="{{ $activeSort === 'rc.tag_qr_flag' ? ($activeType === 'asc' ? 'ascending' : 'descending') : 'none' }}">
<span class="th-inner"><span class="th-label">タグ・QR</span><span class="th-arrows"><span
class="up"></span><span class="down"></span></span></span>
</th>
<th
class="sorting {{ $activeSort === 'p.park_name' ? ($activeType === 'asc' ? 'sorting_asc' : 'sorting_desc') : '' }}"
sort="p.park_name"
aria-sort="{{ $activeSort === 'p.park_name' ? ($activeType === 'asc' ? 'ascending' : 'descending') : 'none' }}">
<span class="th-inner"><span class="th-label">駐輪場</span><span class="th-arrows"><span
class="up"></span><span class="down"></span></span></span>
</th>
<th>車種区分</th>
<th>減免措置</th>
<th>利用者分類1</th>
<th>利用者分類2</th>
<th>利用者分類3</th>
<th>携帯電話番号</th>
<th>自宅電話番号</th>
<th>生年月日</th>
<th>性別</th>
<th>居住所:郵便番号</th>
<th>居住所:都道府県</th>
<th>居住所:市区群</th>
<th>居住所:住所</th>
<th>関連住所:郵便番号</th>
<th>関連住所:都道府県</th>
<th>関連住所:市区群</th>
<th>関連住所:住所</th>
<th>契約日</th>
<th>利用期間</th>
<th>有効期間</th>
<th>定期券区分</th>
<th>勤務先名</th>
<th>学校</th>
<th>卒業予定</th>
<th>シール発行回数</th>
<th>防犯登録</th>
<th>備考</th>
</tr>
</thead>
<tbody>
@forelse ($rows as $row)
<tr>
<td>{{ $row->user_id }}</td>
<td>{{ $row->user_name }}</td>
<td>{{ $row->user_phonetic }}</td>
<td>{{ $row->contract_id }}</td>
<td>{{ $row->tag_qr_flag ? 'QR' : 'タグ' }}</td>
<td>{{ $row->park_name }}</td>
<td>{{ $row->vehicle_type ?? '' }}</td>
<td>{{ $row->user_reduction ?? '' }}</td>
<td>{{ $row->user_category1 ?? '' }}</td>
<td>{{ $row->user_category2 ?? '' }}</td>
<td>{{ $row->user_category3 ?? '' }}</td>
<td>{{ $row->user_mobile }}</td>
<td>{{ $row->user_homephone }}</td>
<td>{{ $row->user_birthdate }}</td>
<td>{{ $row->user_gender }}</td>
<td>{{ $row->user_regident_zip }}</td>
<td>{{ $row->user_regident_pre }}</td>
<td>{{ $row->user_regident_city }}</td>
<td>{{ $row->user_regident_add }}</td>
<td>{{ $row->user_relate_zip }}</td>
<td>{{ $row->user_relate_pre }}</td>
<td>{{ $row->user_relate_city }}</td>
<td>{{ $row->user_relate_add }}</td>
<td>{{ $row->contract_created_at }}</td>
<td>{{ $row->contract_periods }}</td>
<td>{{ $row->contract_periode }}</td>
<td>{{ $row->ticket_type ?? '' }}</td>
<td>{{ $row->user_workplace }}</td>
<td>{{ $row->user_school }}</td>
<td>{{ $row->user_graduate }}</td>
<td>{{ $row->seal_issue_count ?? '' }}</td>
<td>{{ $row->crime_prevention ?? '' }}</td>
<td>{{ $row->user_remarks }}</td>
</tr>
@empty
<tr>
<td colspan="33" class="text-center">データがありません。</td>
</tr>
@endforelse
</tbody>
</table>
</div>
<div class="mt-3">
{{ $rows->appends(request()->except('page'))->links('pagination::bootstrap-4') }}
</div>
</div>
</section>
{{-- 画面用スタイル(表頭をグレー、データ部分を白) --}}
<style>
.rv-table thead th {
background: #eeeeee;
/* settlement_transactions も薄グレー系 */
white-space: nowrap;
vertical-align: middle;
padding: 8px 10px;
/* settlement_transactions のデフォルトに近い余白 */
font-size: 0.875rem;
/* 視認性と行高を近づける */
}
.rv-table tbody tr {
background: #fff;
}
/* 矢印色制御:デフォルトはグレー、アクティブ方向のみ黒 */
th.sorting .th-arrows .up,
th.sorting .th-arrows .down {
color: #999;
}
th.sorting_asc .th-arrows .up {
color: #000;
}
th.sorting_desc .th-arrows .down {
color: #000;
}
/* アクセシビリティ向上:フォーカス時の視認性 */
th.sorting:focus,
th.sorting_asc:focus,
th.sorting_desc:focus {
outline: 2px solid #999;
outline-offset: -2px;
}
th[aria-sort] {
cursor: pointer;
}
</style>
@push('scripts')
<script>
// 未更新者一覧:決済トランザクション方式のクリックソート
document.querySelectorAll('th.sorting, th.sorting_asc, th.sorting_desc').forEach(th => {
th.addEventListener('click', function () {
const col = this.getAttribute('sort');
if (!col) return;
const form = document.getElementById('list-form');
const sortInput = form.querySelector('input[name="sort"]');
const typeInput = form.querySelector('input[name="sort_type"]');
const current = sortInput.value;
const currentType = typeInput.value;
let nextType = 'asc';
if (current === col) {
nextType = (currentType === 'asc') ? 'desc' : 'asc';
}
sortInput.value = col;
typeInput.value = nextType;
form.submit();
});
});
</script>
@endpush
@endsection