222 lines
14 KiB
PHP
222 lines
14 KiB
PHP
@extends('layouts.app')
|
||
|
||
@section('content')
|
||
<div class="container-fluid pt-4">
|
||
{{-- ▼ フラッシュメッセージ --}}
|
||
@if(session('success'))
|
||
<div class="alert alert-success">{{ session('success') }}</div>
|
||
@endif
|
||
@if(session('error'))
|
||
<div class="alert alert-danger">{{ session('error') }}</div>
|
||
@endif
|
||
|
||
<div class="d-flex justify-content-between align-items-center mb-3">
|
||
<h3 class="mb-0">駐輪場マスタ</h3>
|
||
<ol class="breadcrumb float-sm-right text-sm mb-0" style="background: #f8f9fa;">
|
||
<li class="breadcrumb-item"><a href="{{ url('/home') }}">ホーム</a></li>
|
||
<li class="breadcrumb-item active">駐輪場マスタ</li>
|
||
</ol>
|
||
</div>
|
||
<div class="card mb-2">
|
||
<div class="card-body pb-2">
|
||
<form method="GET" action="{{ route('parks') }}">
|
||
<div class="form-row">
|
||
<div class="form-group col-md-4">
|
||
<label class="mr-1">駐輪場名</label>
|
||
<input type="text" name="park_name" class="form-control" value="{{ request('park_name') }}"
|
||
placeholder="キーワード...">
|
||
|
||
</div>
|
||
<div class="form-group col-md-4">
|
||
<label class="mr-1">市区</label>
|
||
<select name="city_id" class="form-control">
|
||
<option value="">市町村を選択してください</option>
|
||
@foreach($cities as $city)
|
||
<option value="{{ $city->city_id }}" @if(request('city_id') == $city->city_id) selected
|
||
@endif>
|
||
{{ $city->city_name }}
|
||
</option>
|
||
@endforeach
|
||
</select>
|
||
</div>
|
||
<div class="form-group col-md-4 d-flex align-items-end">
|
||
<!-- 空白で高さを揃える -->
|
||
</div>
|
||
</div>
|
||
<button type="submit" class="btn btn-default mr-1">絞り込み</button>
|
||
<a href="{{ route('parks') }}" class="btn btn-default mr-2">解除</a>
|
||
</form>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="form-row mt-2">
|
||
<div class="form-group col-md-6">
|
||
<a href="{{ route('parks.add') }}" class="btn btn-default mr-2">新規</a>
|
||
<a href="{{ route('parks.export') }}" class="btn btn-default mr-2">CSV出力</a>
|
||
<button type="button" id="delete" class="btn btn-default">削除</button>
|
||
</div>
|
||
</div>
|
||
<div class="table-responsive">
|
||
<form id="form_delete" method="POST" action="{{ route('parks.delete') }}">
|
||
@csrf
|
||
<table class="table table-bordered table-hover table-sm text-nowrap">
|
||
<thead class="thead-light">
|
||
<tr>
|
||
<th></th>
|
||
<th>駐輪場ID</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>更新期間開始日</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>
|
||
<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>
|
||
@foreach($parks as $park)
|
||
<tr>
|
||
<td style="background: #faebd7; white-space: nowrap;">
|
||
<input type="checkbox" name="pk[]" value="{{ $park->park_id }}" class="row_checkbox">
|
||
<a href="{{ route('parks.edit', ['id' => $park->park_id]) }}"
|
||
class="btn btn-sm btn-default ml10">編集</a>
|
||
</td>
|
||
<td class='sm-item text-left'><span>{{ $park->park_id }}</span></td>
|
||
<td class='sm-item text-right'><span>{{ $park->city_name }}</span></td>
|
||
<td class='sm-item text-right'><span>{{ $park->park_name }}</span></td>
|
||
<td class='sm-item text-right'><span>{{ $park->park_ruby }}</span></td>
|
||
<td class='sm-item text-left'><span>{{ $park->park_syllabary }}</span></td>
|
||
<td class='sm-item text-right'><span>{{ $park->park_adrs }}</span></td>
|
||
<td class='sm-item text-right'>
|
||
<span>
|
||
@if($park->park_close_flag == 1)
|
||
閉設
|
||
@else
|
||
営業中
|
||
@endif
|
||
</span>
|
||
</td>
|
||
<td class='sm-item text-right'><span>{{ $park->park_day }}</span></td>
|
||
<td class='sm-item text-left'><span>{{ $park->alert_flag }}</span></td>
|
||
<td class='sm-item text-left'><span>{{ $park->print_number }}</span></td>
|
||
<td class='sm-item text-left'><span>{{ $park->keep_alive }}</span></td>
|
||
<td class='sm-item text-left'><span>{{ $park->operator_id ?? '' }}</span></td>
|
||
|
||
<td class='sm-item text-left'><span>{{ $park->update_grace_period_start_date }}</span></td>
|
||
<td class='sm-item text-left'><span>{{ $park->update_grace_period_start_time }}</span></td>
|
||
<td class='sm-item text-left'><span>{{ $park->update_grace_period_end_date }}</span></td>
|
||
<td class='sm-item text-left'><span>{{ $park->update_grace_period_end_time }}</span></td>
|
||
<td class='sm-item text-left'><span>{{ $park->parking_start_grace_period }}</span></td>
|
||
<td class='sm-item text-left'>
|
||
@if($park->reminder_type === 0)
|
||
毎日
|
||
@elseif($park->reminder_type === 1)
|
||
1日おき
|
||
@elseif($park->reminder_type === 2)
|
||
2日おき
|
||
@else
|
||
未設定
|
||
@endif
|
||
</td>
|
||
<td class='sm-item text-left'><span>{{ $park->reminder_time }}</span></td>
|
||
<td class='sm-item text-left'>{{ $park->immediate_use_permit == 1 ? '許可する' : '許可しない' }}</td>
|
||
<td class='sm-item text-left'>{{ $park->gender_display_flag == 1 ? '表示する' : '表示しない' }}</td>
|
||
<td class='sm-item text-left'>{{ $park->bd_display_flag == 1 ? '表示する' : '表示しない' }}</td>
|
||
<td class='sm-item text-left'>{{ $park->securityreg_display_flag == 1 ? '表示する' : '表示しない' }}</td>
|
||
<td class='sm-item text-left'><span>{{ $park->distance_twopoints }}</span></td>
|
||
<td class='sm-item text-left'><span>{{ $park->park_latitude }}</span></td>
|
||
<td class='sm-item text-left'><span>{{ $park->park_longitude }}</span></td>
|
||
<td class='sm-item text-left'><span>{{ $park->park_tel }}</span></td>
|
||
<td class='sm-item text-left'>{{ $park->park_fixed_contract == 1 ? '定期利用可' : '定期利用不可' }}</td>
|
||
<td class='sm-item text-left'>{{ $park->park_temporary_contract == 1 ? '一時利用可' : '一時利用不可' }}</td>
|
||
<td class='sm-item text-left'><span>{{ $park->park_restriction }}</span></td>
|
||
<td class='sm-item text-left'><span>{{ $park->park_procedure }}</span></td>
|
||
<td class='sm-item text-left'><span>{{ $park->park_payment }}</span></td>
|
||
<td class='sm-item text-left'><span>{{ $park->park_available_time_flag }}</span></td>
|
||
<td class='sm-item text-left'><span>{{ $park->park_available_time_from }}</span></td>
|
||
<td class='sm-item text-left'><span>{{ $park->park_available_time_to }}</span></td>
|
||
<td class='sm-item text-left'><span>{{ $park->park_manager_flag }}</span></td>
|
||
<td class='sm-item text-left'><span>{{ $park->park_manager_resident_from }}</span></td>
|
||
<td class='sm-item text-left'><span>{{ $park->park_manager_resident_to }}</span></td>
|
||
<td class='sm-item text-left'><span>{{ $park->park_roof_flag }}</span></td>
|
||
<td class='sm-item text-left'><span>{{ $park->park_issuing_machine_flag }}</span></td>
|
||
<td class='sm-item text-left'><span>{{ $park->park_using_method }}</span></td>
|
||
<td class='sm-item text-left'><span>{{ $park->park_contract_renewal_term }}</span></td>
|
||
<td class='sm-item text-left'><span>{{ $park->park_reservation }}</span></td>
|
||
<td class='sm-item text-left'><span>{{ $park->park_reference }}</span></td>
|
||
<td class='sm-item text-left'><span>{{ $park->student_id_confirm_type }}</span></td>
|
||
<td class='sm-item text-left'><span>{{ $park->reduction_guide_display_flag }}</span></td>
|
||
<td class='sm-item text-left'><span>{{ $park->reduction_age }}</span></td>
|
||
<td class='sm-item text-left'><span>{{ $park->reduction_guide_display_start_month }}</span></td>
|
||
<td class='sm-item text-left'><span>{{ $park->overyear_flag }}</span></td>
|
||
</tr>
|
||
@endforeach
|
||
</tbody>
|
||
</table>
|
||
</form>
|
||
<div class="mt-3">
|
||
{{ $parks->appends(request()->except('page'))->links('pagination::bootstrap-4') }}
|
||
</div>
|
||
</div>
|
||
</div>
|
||
@endsection
|
||
|
||
@push('scripts')
|
||
<script>
|
||
// チェックボックス全選択
|
||
document.getElementById('check_all')?.addEventListener('change', function () {
|
||
document.querySelectorAll('.row_checkbox').forEach(cb => {
|
||
cb.checked = this.checked;
|
||
});
|
||
});
|
||
|
||
// jQuery fallback(もしjQueryが使われていれば)
|
||
if (window.$) {
|
||
$('#check_all').on('change', function () {
|
||
$('.row_checkbox').prop('checked', this.checked);
|
||
});
|
||
}
|
||
|
||
</script>
|
||
@endpush |