krgm.so-manager-dev.com/resources/views/admin/reservation/list.blade.php
你的名字 c171a26f42
All checks were successful
Deploy main / deploy (push) Successful in 23s
【予約者一覧】【更新予定者一覧】絞り込みボダン修正
2025-09-26 18:33:13 +09:00

273 lines
12 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@extends('layouts.app')
@section('title', '予約者一覧')
@section('content')
<div class="content-header">
<div class="container-fluid">
<div class="row mb-2">
<div class="col-sm-6">
<h1 class="m-0 text-dark">予約者一覧</h1>
</div>
<div class="col-sm-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('reservation') }}" class="mb-3" id="filter-form">
<div class="card p-3">
<h6 class="mb-3">絞り込みフィルター</h6>
<div class="row">
{{-- 左カラム:駐輪場 利用者ID 利用者分類 タグシリアル タグシリアル64進 --}}
<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">
{{-- 既存互換: IDパラメータが残る可能性があるため hidden で保持 --}}
@if(request()->filled('user_categoryid'))
<input type="hidden" name="user_categoryid" value="{{ request('user_categoryid') }}">
@endif
</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_tag_serial" value="{{ request('user_tag_serial') }}" class="form-control" >
</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>
{{-- 右カラム:フリガナ 電話番号 メールアドレス 勤務先 学校 --}}
<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>
</div>
<div class="mt-2">
<button type="submit" class="btn btn-default">絞り込み</button>
<a href="{{ route('reservation') }}" 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>
{{-- ソート可能な項目にはリンクを追加 --}}
<th>
<a href="{{ request()->fullUrlWithQuery(['sort' => 'user_id', 'sort_type' => request('sort') === 'user_id' && request('sort_type') === 'desc' ? 'asc' : 'desc']) }}" class="text-dark text-decoration-none">
利用者ID
@if(request('sort') === 'user_id' && request('sort_type') === 'asc')
<span class="text-muted"></span>
@elseif(request('sort') === 'user_id' && request('sort_type') === 'desc')
<span class="text-muted"></span>
@else
<span class="text-muted">↑↓</span>
@endif
</a>
</th>
<th>
<a href="{{ request()->fullUrlWithQuery(['sort' => 'user_name', 'sort_type' => request('sort') === 'user_name' && request('sort_type') === 'desc' ? 'asc' : 'desc']) }}" class="text-dark text-decoration-none">
氏名
@if(request('sort') === 'user_name' && request('sort_type') === 'asc')
<span class="text-muted"></span>
@elseif(request('sort') === 'user_name' && request('sort_type') === 'desc')
<span class="text-muted"></span>
@else
<span class="text-muted">↑↓</span>
@endif
</a>
</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>定期予約ID</th>
<th>利用者分類1</th>
<th>利用者分類2</th>
<th>利用者分類3</th>
<th>
<a href="{{ request()->fullUrlWithQuery(['sort' => 'park_id', 'sort_type' => request('sort') === 'park_id' && request('sort_type') === 'desc' ? 'asc' : 'desc']) }}" class="text-dark text-decoration-none">
駐輪場ID
@if(request('sort') === 'park_id' && request('sort_type') === 'asc')
<span class="text-muted"></span>
@elseif(request('sort') === 'park_id' && request('sort_type') === 'desc')
<span class="text-muted"></span>
@else
<span class="text-muted">↑↓</span>
@endif
</a>
</th>
<th>
<a href="{{ request()->fullUrlWithQuery(['sort' => 'price_parkplaceid', 'sort_type' => request('sort') === 'price_parkplaceid' && request('sort_type') === 'desc' ? 'asc' : 'desc']) }}" class="text-dark text-decoration-none">
駐輪場所ID
@if(request('sort') === 'price_parkplaceid' && request('sort_type') === 'asc')
<span class="text-muted"></span>
@elseif(request('sort') === 'price_parkplaceid' && request('sort_type') === 'desc')
<span class="text-muted"></span>
@else
<span class="text-muted">↑↓</span>
@endif
</a>
</th>
<th>
<a href="{{ request()->fullUrlWithQuery(['sort' => 'psection_id', 'sort_type' => request('sort') === 'psection_id' && request('sort_type') === 'desc' ? 'asc' : 'desc']) }}" class="text-dark text-decoration-none">
車種区分ID
@if(request('sort') === 'psection_id' && request('sort_type') === 'asc')
<span class="text-muted"></span>
@elseif(request('sort') === 'psection_id' && request('sort_type') === 'desc')
<span class="text-muted"></span>
@else
<span class="text-muted">↑↓</span>
@endif
</a>
</th>
<th>予約日時</th>
<th>減免措置</th>
<th>M以内フラグ</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->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->user_birthdate }}</td>
<td>{{ $row->user_gender }}</td>
<td>{{ $row->user_mobile }}</td>
<td>{{ $row->user_homephone }}</td>
<td>{{ $row->user_school }}</td>
<td>{{ $row->user_graduate }}</td>
<td>{{ $row->user_remarks }}</td>
<td>{{ $row->reserve_id }}</td>
<td>{{ $row->user_category1 ?? '' }}</td>
<td>{{ $row->user_category2 ?? '' }}</td>
<td>{{ $row->user_category3 ?? '' }}</td>
<td>{{ $row->park_id }}</td>
<td>{{ $row->price_parkplaceid }}</td>
<td>{{ $row->psection_id }}</td>
<td>{{ $row->reserve_date }}</td>
<td>{{ $row->reduction ?? '' }}</td>
<td>
@php $f800 = data_get($row,'within_800m_flag', data_get($row,'flag_800m', null)); @endphp
{{ (string)$f800 === '1' ? 'M以内' : '' }}
</td>
</tr>
@empty
<tr><td colspan="28" 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; white-space:nowrap; vertical-align:middle; }
.rv-table tbody tr{ background:#fff; }
</style>
@endsection