From f4466829cd18d84a51cc1172bf02b7b75215e7a1 Mon Sep 17 00:00:00 2001 From: "kin.rinzen" Date: Fri, 22 Aug 2025 23:31:27 +0900 Subject: [PATCH] =?UTF-8?q?=E8=BF=91=E5=82=8D=E9=A7=85=E3=83=9E=E3=82=B9?= =?UTF-8?q?=E3=82=BF=E3=83=AC=E3=82=A4=E3=82=A2=E3=82=A6=E3=83=88=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Models/City.php | 24 ++ .../admin/neighbor_stations/list.blade.php | 109 +++++---- .../views/admin/regular_types/list.blade.php | 162 +++++++------- resources/views/layouts/app.blade.php | 210 +++--------------- 4 files changed, 193 insertions(+), 312 deletions(-) create mode 100644 app/Models/City.php diff --git a/app/Models/City.php b/app/Models/City.php new file mode 100644 index 0000000..95db5f8 --- /dev/null +++ b/app/Models/City.php @@ -0,0 +1,24 @@ +when($operatorId, fn ($q) => $q->where('operator_id', $operatorId)) + ->orderBy('city_name') + ->pluck('city_name', 'city_id') + ->toArray(); + } +} diff --git a/resources/views/admin/neighbor_stations/list.blade.php b/resources/views/admin/neighbor_stations/list.blade.php index b56d0aa..6e02252 100644 --- a/resources/views/admin/neighbor_stations/list.blade.php +++ b/resources/views/admin/neighbor_stations/list.blade.php @@ -23,6 +23,7 @@
+ {{-- 並び替え用 hidden --}}
@csrf @@ -30,12 +31,28 @@
- + - {{ $stations->appends(['sort' => $sort ?? '', 'sort_type' => $sort_type ?? ''])->links('pagination') }} +
+ {{ $stations->appends(['sort' => $sort ?? '', 'sort_type' => $sort_type ?? ''])->links('pagination') }} +
+
+ @if(Session::has('success')) + + @elseif(Session::has('error')) +
+ +

{{ __('誤差') }}:

+ {!! Session::get('error') !!} +
+ @endif +
@if(session('success')) @@ -45,78 +62,56 @@ @endif
-
- -
+ +
+
@csrf - +
- - - - - @foreach($stations as $station) - - - - - @endforeach - -
- - -
-
-
- - -
-
- - - - - - - - + + + + + - + @foreach($stations as $station) - - - - - - - + {{-- ★ 同じセル内に チェック + 編集ボタン) --}} + + + + + + + + + @endforeach - +
- 近傍駅ID - - 駐車場ID - - 近傍駅 - - 近傍駅ふりがな - - 路線名 + {{-- ★ チェック + 編集 用の1列 --}} + + 近傍駅ID駐車場ID近傍駅近傍駅ふりがな路線名 近傍駅座標(緯度) 近傍駅座標(経度)
{{ $station->station_id }}{{ $station->park_id }}{{ $station->station_neighbor_station }}{{ $station->station_name_ruby }}{{ $station->station_route_name }}{{ $station->station_latitude }}{{ $station->station_longitude }} + + {{ $station->station_id }}{{ $station->park_id }}{{ $station->station_neighbor_station }}{{ $station->station_name_ruby }}{{ $station->station_route_name }}{{ $station->station_latitude }}{{ $station->station_longitude }}
-
+
+
-@endsection \ No newline at end of file +@endsection diff --git a/resources/views/admin/regular_types/list.blade.php b/resources/views/admin/regular_types/list.blade.php index 10571b1..4fed6c6 100644 --- a/resources/views/admin/regular_types/list.blade.php +++ b/resources/views/admin/regular_types/list.blade.php @@ -1,4 +1,3 @@ - @extends('layouts.app') @section('title', '[東京都|〇〇駐輪場] 定期種別マスタ') @section('content') @@ -6,39 +5,36 @@
-

{{__('定期種別マスタ')}}

-
+

{{ __('定期種別マスタ') }}

+
-
-
- + + + - -
- -
-
- - - -
+
+ + + +
- - - - {{ $list->appends(['sort' => $sort,'sort_type'=>$sort_type])->links('pagination') }} + + + + {{ $list->appends(['sort' => $sort, 'sort_type' => $sort_type])->links('pagination') }}
+
@if(Session::has('success')) +
-
+ - + @foreach($list as $item) - @endforeach
- -
- +
+
- - - + - + - + - - + - - + - + - + + + @php + // 统一取一次常量,避免在 Blade 中多次写全限定类名 + $rc = \App\Models\RegularType::RegularClass; + @endphp + @foreach($list as $item) - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @endforeach
{{__('validation.attributes.regular_type_id')}} + + {{ __('validation.attributes.regular_type_id') }} {{__('validation.attributes.city_name')}} - {{ __('validation.attributes.city_name') }} {{__('validation.attributes.regular_class_1')}} - {{ __('validation.attributes.regular_class_1') }} {{__('validation.attributes.regular_class_2')}} - {{ __('validation.attributes.regular_class_2') }} {{__('validation.attributes.regular_class_3')}} - {{ __('validation.attributes.regular_class_3') }} {{__('validation.attributes.regular_class_6')}} - {{ __('validation.attributes.regular_class_6') }} {{__('validation.attributes.regular_class_12')}} - {{ __('validation.attributes.regular_class_12') }} {{__('validation.attributes.memo')}} - {{ __('validation.attributes.memo') }}
{{mb_substr($item->regular_type_id, 0, 10)}}{{mb_substr(!empty($item->getCity())?$item->getCity()->city_name:"", 0, 10)}}{{mb_substr(__(\App\RegularType::RegularClass[$item->regular_class_1]), 0, 10)}}{{mb_substr(__(\App\RegularType::RegularClass[$item->regular_class_2]), 0, 10)}}{{mb_substr(__(\App\RegularType::RegularClass[$item->regular_class_3]), 0, 10)}}{{mb_substr(__(\App\RegularType::RegularClass[$item->regular_class_6]), 0, 10)}}{{mb_substr(__(\App\RegularType::RegularClass[$item->regular_class_12]), 0, 10)}}{{mb_substr($item->memo, 0, 10)}} + {{ mb_substr($item->regular_type_id, 0, 10) }} + + {{ mb_substr($item->getCity()?->city_name ?? '-', 0, 10) }} + + {{ mb_substr(__($rc[$item->regular_class_1] ?? '-'), 0, 10) }} + + {{ mb_substr(__($rc[$item->regular_class_2] ?? '-'), 0, 10) }} + + {{ mb_substr(__($rc[$item->regular_class_3] ?? '-'), 0, 10) }} + + {{ mb_substr(__($rc[$item->regular_class_6] ?? '-'), 0, 10) }} + + {{ mb_substr(__($rc[$item->regular_class_12] ?? '-'), 0, 10) }} + + {{ mb_substr($item->memo ?? '-', 0, 10) }} +
+
-
- -
+
- - -@endsection \ No newline at end of file +@endsection diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index ad3bc01..78feeb9 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -366,6 +366,12 @@ 'seals', 'jurisdiction_parkings', ];?> + + + + + +