131 lines
7.1 KiB
PHP
131 lines
7.1 KiB
PHP
@extends('layouts.app')
|
||
@section('title', '[東京都|〇〇駐輪場] シール発行履歴')
|
||
|
||
@section('content')
|
||
<div class="container-fluid">
|
||
<div class="d-flex justify-content-between align-items-center mb-2">
|
||
<h3 class="m-0 text-dark">シール発行履歴</h3>
|
||
<nav aria-label="breadcrumb" class="mb-0" style="background: transparent;">
|
||
<ol class="breadcrumb px-2 py-2 mb-0" style="background: transparent;">
|
||
<li class="breadcrumb-item"><a href="{{ route('home') }}">ホーム</a></li>
|
||
<li class="breadcrumb-item active" aria-current="page">シール発行履歴</li>
|
||
</ol>
|
||
</nav>
|
||
</div>
|
||
|
||
<!-- 絞り込みフィルター -->
|
||
<div class="card mb-3">
|
||
<div class="card-body">
|
||
<form method="GET" action="{{ route('seals') }}">
|
||
<div class="row mb-3">
|
||
<label class="col-sm-2 col-form-label fw-bold">シール発行駐輪場</label>
|
||
<div class="col-sm-4">
|
||
<select name="park_id" class="form-select">
|
||
<option value="">全て</option>
|
||
{{-- @foreach($parks as $park)
|
||
<option value="{{ $park->id }}" {{ request('park_id') == $park->id ? 'selected' : '' }}>{{ $park->name }}</option>
|
||
@endforeach --}}
|
||
</select>
|
||
</div>
|
||
</div>
|
||
<div class="row mb-3 align-items-center">
|
||
<label class="col-sm-2 col-form-label fw-bold">発行日</label>
|
||
<div class="col-sm-10">
|
||
<div class="row g-2 align-items-center mb-2">
|
||
<div class="col-auto">
|
||
<div class="form-check form-check-inline">
|
||
<input class="form-check-input" type="radio" name="period_type" id="period_type_range" value="range" {{ request('period_type', 'range') == 'range' ? 'checked' : '' }}>
|
||
<label class="form-check-label" for="period_type_range">範囲指定</label>
|
||
</div>
|
||
</div>
|
||
<div class="col-auto">
|
||
<div class="input-group">
|
||
<input type="date" name="seal_day_from" id="seal_day_from" class="form-control" value="{{ request('seal_day_from') }}">
|
||
<span class="input-group-text">~</span>
|
||
<input type="date" name="seal_day_to" id="seal_day_to" class="form-control" value="{{ request('seal_day_to') }}">
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="row g-2 align-items-center">
|
||
<div class="col-auto">
|
||
<div class="form-check form-check-inline">
|
||
<input class="form-check-input" type="radio" name="period_type" id="period_type_recent" value="recent" {{ request('period_type') == 'recent' ? 'checked' : '' }}>
|
||
<label class="form-check-label" for="period_type_recent">直近Nヶ月等</label>
|
||
</div>
|
||
</div>
|
||
<div class="col-auto">
|
||
<select name="recent_period" id="recent_period" class="form-select">
|
||
<option value="">全て</option>
|
||
<option value="12m" {{ request('recent_period') == '12m' ? 'selected' : '' }}>直近12ヶ月</option>
|
||
<option value="6m" {{ request('recent_period') == '6m' ? 'selected' : '' }}>直近6ヶ月</option>
|
||
<option value="3m" {{ request('recent_period') == '3m' ? 'selected' : '' }}>直近3ヶ月</option>
|
||
<option value="2m" {{ request('recent_period') == '2m' ? 'selected' : '' }}>直近2ヶ月</option>
|
||
<option value="1m" {{ request('recent_period') == '1m' ? 'selected' : '' }}>直近1ヶ月</option>
|
||
<option value="1w" {{ request('recent_period') == '1w' ? 'selected' : '' }}>直近1週間</option>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="row">
|
||
<div class="col-sm-12 text-end">
|
||
<button type="submit" class="btn btn-default me-2">絞り込み</button>
|
||
<a href="{{ route('seals') }}" class="btn btn-default">解除</a>
|
||
</div>
|
||
</div>
|
||
</form>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- データテーブル -->
|
||
<div class="table-responsive">
|
||
<table class="table table-bordered table-hover table-sm">
|
||
<thead class="thead-light">
|
||
<tr>
|
||
<th>シール発行履歴ID</th>
|
||
<th>シール発行駐輪場</th>
|
||
<th>定期契約ID</th>
|
||
<th>車種区分ID</th>
|
||
<th>発行日</th>
|
||
<th>発行回数</th>
|
||
<th>理由</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
@foreach($list as $item)
|
||
<tr>
|
||
<td>{{ $item->seal_issueid }}</td>
|
||
<td>{{ $item->park_name ?? $item->park_id }}</td>
|
||
<td>
|
||
{{-- @if($item->contract_id)
|
||
<a href="{{ route('contracts.show', ['contract' => $item->contract_id]) }}" target="_blank">{{ $item->contract_id }}</a>
|
||
@endif --}}
|
||
</td>
|
||
<td>{{ $item->psection_name ?? $item->psection_id }}</td>
|
||
<td>{{ $item->seal_day }}</td>
|
||
<td>{{ $item->contract_seal_issue }}</td>
|
||
<td>{{ $item->seal_reason }}</td>
|
||
</tr>
|
||
@endforeach
|
||
</tbody>
|
||
</table>
|
||
<div class="d-flex align-items-center mb-2">
|
||
<div class="ms-auto">
|
||
{{ $list->appends(request()->except('page'))->links('pagination') }}
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<script>
|
||
function togglePeriodInputs() {
|
||
const isRange = document.getElementById('period_type_range').checked;
|
||
document.getElementById('seal_day_from').disabled = !isRange;
|
||
document.getElementById('seal_day_to').disabled = !isRange;
|
||
document.getElementById('recent_period').disabled = isRange;
|
||
}
|
||
document.getElementById('period_type_range').addEventListener('change', togglePeriodInputs);
|
||
document.getElementById('period_type_recent').addEventListener('change', togglePeriodInputs);
|
||
window.addEventListener('DOMContentLoaded', togglePeriodInputs);
|
||
</script>
|
||
@endsection |