346 lines
19 KiB
PHP
346 lines
19 KiB
PHP
@extends('layouts.app')
|
||
|
||
@section('title', '駐輪場マスタ')
|
||
|
||
@section('content')
|
||
<!-- Content Header -->
|
||
<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="{{ route('home') }}">ホーム</a>
|
||
</li>
|
||
<li class="breadcrumb-item active">駐輪場マスタ</li>
|
||
</ol>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
{{-- ▼ 絞り込みフィルター --}}
|
||
<div class="card mb-3">
|
||
<div class="card-body">
|
||
|
||
<form method="GET" action="{{ route('parks.index') }}" id="filter-form">
|
||
|
||
<div class="row">
|
||
|
||
{{-- 駐輪場名 --}}
|
||
<div class="col-md-6">
|
||
<div class="form-group row mb-2">
|
||
<label class="col-md-4 col-form-label font-weight-bold">
|
||
駐輪場名
|
||
</label>
|
||
<div class="col-md-8">
|
||
<input type="text"
|
||
name="park_name"
|
||
class="form-control"
|
||
placeholder="キーワード..."
|
||
value="{{ request('park_name') }}">
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
{{-- 市区 --}}
|
||
<div class="col-md-6">
|
||
<div class="form-group row mb-2">
|
||
<label class="col-md-4 col-form-label font-weight-bold">
|
||
市区
|
||
</label>
|
||
<div class="col-md-8">
|
||
<select name="city_id" class="form-control">
|
||
<option value="">市町村を選択してください</option>
|
||
@foreach($cities as $city)
|
||
<option value="{{ $city->city_id }}"
|
||
@selected(request('city_id') == $city->city_id)>
|
||
{{ $city->city_name }}
|
||
</option>
|
||
@endforeach
|
||
</select>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
|
||
{{-- ボタン --}}
|
||
<div class="mt-2">
|
||
<button type="submit" class="btn btn-success mr-2">
|
||
絞り込み
|
||
</button>
|
||
|
||
<a href="{{ route('parks.index') }}" class="btn btn-outline-secondary">
|
||
解除
|
||
</a>
|
||
</div>
|
||
|
||
</form>
|
||
</div>
|
||
</div>
|
||
{{-- ▲ 絞り込みフィルター --}}
|
||
|
||
<section class="content">
|
||
<div class="container-fluid">
|
||
|
||
{{-- 並び替え用 hidden --}}
|
||
<form method="GET" action="{{ route('parks.index') }}" id="list-form">
|
||
<input type="hidden" name="sort" id="sort" value="{{ $sort ?? '' }}">
|
||
<input type="hidden" name="sort_type" id="sort_type" value="{{ $sort_type ?? '' }}">
|
||
</form>
|
||
|
||
|
||
{{-- ▼ ボタンエリア --}}
|
||
<div class="col-lg-12 mb-3 px-0">
|
||
<button type="button"
|
||
class="btn btn-sm btn-primary mr10"
|
||
onclick="location.href='{{ route('parks.create') }}?back={{ urlencode(request()->fullUrl()) }}'">
|
||
新規
|
||
</button>
|
||
|
||
<button type="button" class="btn btn-sm btn-danger mr10" id="delete">
|
||
削除
|
||
</button>
|
||
</div>
|
||
|
||
{{-- ▼ ページネーション --}}
|
||
|
||
<div class="col-lg-12 px-0">
|
||
<div class="d-flex flex-column align-items-end mb-2 text-sm">
|
||
{{-- 件数表示(上) --}}
|
||
<div class="text-dark text-sm mb-1">
|
||
@if ($parks->total() > 0)
|
||
全 {{ $parks->total() }} 件中 {{ $parks->firstItem() }}〜{{ $parks->lastItem() }} 件を表示
|
||
@else
|
||
全0件
|
||
@endif
|
||
</div>
|
||
|
||
{{-- ページネーション(下) --}}
|
||
<div>
|
||
{{ $parks->appends([
|
||
'sort' => $sort ?? '',
|
||
'sort_type' => $sort_type ?? '',
|
||
] + request()->except('page'))->links('pagination') }}
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
{{-- ▼ フラッシュメッセージ --}}
|
||
<div class="col-lg-12 px-0">
|
||
@if(Session::has('success'))
|
||
<div class="alert alert-success alert-dismissible">
|
||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||
{{ Session::get('success') }}
|
||
</div>
|
||
@elseif(Session::has('error'))
|
||
<div class="alert alert-danger alert-dismissible">
|
||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||
{!! Session::get('error') !!}
|
||
</div>
|
||
@endif
|
||
</div>
|
||
|
||
|
||
{{-- ▼ テーブル --}}
|
||
<div class="col-lg-12 mb20 px-0">
|
||
<div class="table-responsive">
|
||
<form id="form_delete" method="POST" action="{{ route('parks.destroy') }}">
|
||
@csrf
|
||
|
||
<table class="table table-bordered dataTable text-nowrap">
|
||
<thead class="thead-light">
|
||
<tr>
|
||
<th style="width:140px;">
|
||
<input type="checkbox"
|
||
class="js-check-all"
|
||
onclick="$('input[name*=\'pk\']').prop('checked', this.checked);">
|
||
</th>
|
||
<th class="sorting {{ ($sort ?? '') === 'p.park_id'
|
||
? (($sort_type ?? '') === 'asc' ? 'sorting_asc' : 'sorting_desc')
|
||
: '' }}"
|
||
sort="p.park_id">
|
||
<span>駐輪場ID</span>
|
||
</th>
|
||
|
||
<th class="sorting {{ ($sort ?? '') === 'c.city_name'
|
||
? (($sort_type ?? '') === 'asc' ? 'sorting_asc' : 'sorting_desc')
|
||
: '' }}"
|
||
sort="c.city_name">
|
||
<span>市区</span>
|
||
</th>
|
||
|
||
<th class="sorting {{ ($sort ?? '') === 'p.park_name'
|
||
? (($sort_type ?? '') === 'asc' ? 'sorting_asc' : 'sorting_desc')
|
||
: '' }}"
|
||
sort="p.park_name">
|
||
<span>駐輪場名</span>
|
||
</th>
|
||
|
||
<th class="sorting {{ ($sort ?? '') === 'p.park_ruby'
|
||
? (($sort_type ?? '') === 'asc' ? 'sorting_asc' : 'sorting_desc')
|
||
: '' }}"
|
||
sort="p.park_ruby">
|
||
<span>駐輪場ふりがな</span>
|
||
</th>
|
||
|
||
<th class="sorting {{ ($sort ?? '') === 'p.park_syllabary'
|
||
? (($sort_type ?? '') === 'asc' ? 'sorting_asc' : 'sorting_desc')
|
||
: '' }}"
|
||
sort="p.park_syllabary">
|
||
<span>駐輪場五十音</span>
|
||
</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 class="bg-white">
|
||
@foreach($parks as $park)
|
||
<tr>
|
||
<td style="background-color:#faebd7;">
|
||
<div class="d-flex align-items-center">
|
||
<input type="checkbox" name="pk[]" value="{{ $park->park_id }}">
|
||
<a href="{{ route('parks.edit', ['id' => $park->park_id]) }}?back={{ urlencode(request()->fullUrl()) }}"
|
||
class="btn btn-sm btn-outline-primary ml10">
|
||
編集
|
||
</a>
|
||
</div>
|
||
</td>
|
||
|
||
<td>{{ $park->park_id }}</td>
|
||
<td>{{ $park->city_name ?? '' }}</td>
|
||
<td>{{ $park->park_name ?? '' }}</td>
|
||
<td>{{ $park->park_ruby ?? '' }}</td>
|
||
<td>{{ $park->park_syllabary ?? '' }}</td>
|
||
<td>{{ $park->park_adrs ?? '' }}</td>
|
||
<td>{{ ($park->park_close_flag ?? 0) == 1 ? '閉設' : '営業中' }}</td>
|
||
<td>{{ $park->park_day ?? '' }}</td>
|
||
<td>{{ $park->price_memo ?? '' }}</td>
|
||
|
||
<td>{{ $park->alert_flag ?? '' }}</td>
|
||
<td>{{ $park->print_number ?? '' }}</td>
|
||
<td>{{ $park->keep_alive ?? '' }}</td>
|
||
<td>{{ $park->update_grace_period_start_date ?? '' }}</td>
|
||
<td>{{ substr($park->update_grace_period_start_time ?? '', 0, 5) }}</td>
|
||
<td>{{ $park->update_grace_period_end_date ?? '' }}</td>
|
||
<td>{{ substr($park->update_grace_period_end_time ?? '', 0, 5) }}</td>
|
||
|
||
<td>{{ $park->parking_start_grace_period ?? '' }}</td>
|
||
|
||
<td>
|
||
@switch($park->reminder_type ?? '')
|
||
@case(0) 毎日 @break
|
||
@case(1) 1日おき @break
|
||
@case(2) 2日おき @break
|
||
@default 未設定
|
||
@endswitch
|
||
</td>
|
||
|
||
<td>{{ $park->reminder_time ?? '' }}</td>
|
||
<td>{{ ($park->immediate_use_permit ?? 0) ? '許可する' : '許可しない' }}</td>
|
||
<td>{{ ($park->gender_display_flag ?? 0) ? '表示する' : '表示しない' }}</td>
|
||
<td>{{ ($park->bd_display_flag ?? 0) ? '表示する' : '表示しない' }}</td>
|
||
<td>{{ ($park->securityreg_display_flag ?? 0) ? '表示する' : '表示しない' }}</td>
|
||
<td>{{ $park->distance_twopoints ?? '' }}</td>
|
||
<td>{{ $park->park_latitude ?? '' }}</td>
|
||
<td>{{ $park->park_longitude ?? '' }}</td>
|
||
<td>{{ $park->park_tel ?? '' }}</td>
|
||
|
||
<td>{{ ($park->park_fixed_contract ?? 0) ? '定期利用可' : '定期利用不可' }}</td>
|
||
<td>{{ ($park->park_temporary_contract ?? 0) ? '一時利用可' : '一時利用不可' }}</td>
|
||
<td>{{ $park->park_restriction ?? '' }}</td>
|
||
<td>{{ $park->park_procedure ?? '' }}</td>
|
||
<td>{{ $park->park_payment ?? '' }}</td>
|
||
<td>{{ ($park->park_available_time_flag ?? 0) ? '制限あり' : '制限なし' }}</td>
|
||
<td>{{ substr($park->park_available_time_from ?? '', 0, 5) }}</td>
|
||
<td>{{ substr($park->park_available_time_to ?? '', 0, 5) }}</td>
|
||
<td>{{ ($park->park_manager_flag ?? 0) ? '常駐' : '非常駐' }}</td>
|
||
<td>{{ substr($park->park_manager_resident_from ?? '', 0, 5) }}</td>
|
||
<td>{{ substr($park->park_manager_resident_to ?? '', 0, 5) }}</td>
|
||
<td>{{ ($park->park_roof_flag ?? 0) ? '屋根あり' : '屋根なし' }}</td>
|
||
<td>{{ ($park->park_issuing_machine_flag ?? 0) ? 'あり' : 'なし' }}</td>
|
||
<td>{{ $park->park_using_method ?? '' }}</td>
|
||
<td>{{ $park->park_contract_renewal_term ?? '' }}</td>
|
||
<td>{{ $park->park_reservation ?? '' }}</td>
|
||
<td>{{ $park->park_reference ?? '' }}</td>
|
||
|
||
<td>
|
||
@switch($park->student_id_confirm_type ?? '')
|
||
@case('none') 確認しない @break
|
||
@case('year') 年1回 @break
|
||
@case('reissue') 再発行時 @break
|
||
@default 未設定
|
||
@endswitch
|
||
</td>
|
||
|
||
<td>{{ ($park->reduction_guide_display_flag ?? 0) ? '表示する' : '表示しない' }}</td>
|
||
<td>{{ $park->reduction_age ?? '' }}</td>
|
||
<td>{{ $park->reduction_guide_display_start_month ?? '' }}</td>
|
||
<td>{{ ($park->overyear_flag ?? 0) ? 'あり' : 'なし' }}</td>
|
||
</tr>
|
||
@endforeach
|
||
</tbody>
|
||
</table>
|
||
</form>
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
</section>
|
||
@endsection
|