184 lines
9.2 KiB
PHP
184 lines
9.2 KiB
PHP
@extends('layouts.app')
|
|
|
|
@section('content')
|
|
<div class="container-fluid pt-4">
|
|
<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">CSV出力</a>
|
|
</div>
|
|
<div class="form-group col-md-6 text-right">
|
|
<button type="button" id="delete-btn" class="btn btn-default">
|
|
削除
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<div class="table-responsive">
|
|
<form id="parks-delete-form" 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>最新キープアライブ</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-outline-primary ml-2">編集</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>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</form>
|
|
<div class="mt-3">
|
|
{{ $parks->appends(request()->except('page'))->links('pagination::bootstrap-4') }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@endsection
|
|
|
|
@push('scripts')
|
|
|
|
@extends('layouts.app')
|
|
|
|
@section('content')
|
|
<div class="container-fluid pt-4">
|
|
{{-- ここにテーブルやフォーム --}}
|
|
</div>
|
|
@endsection
|
|
|
|
@push('scripts')
|
|
<script>
|
|
// チェックボックス全選択
|
|
document.getElementById('check_all')?.addEventListener('change', function () {
|
|
document.querySelectorAll('.row_checkbox').forEach(cb => {
|
|
cb.checked = this.checked;
|
|
});
|
|
});
|
|
</script>
|
|
@endpush
|
|
<script>
|
|
$('#check_all').on('change', function () {
|
|
$('.row_checkbox').prop('checked', this.checked);
|
|
});
|
|
|
|
// 削除ボタンの確認ダイアログ
|
|
document.getElementById('delete-btn').addEventListener('click', function() {
|
|
if (confirm('削除してよろしいですか?')) {
|
|
document.getElementById('parks-delete-form').submit();
|
|
}
|
|
});
|
|
</script>
|
|
@endpush |