This commit is contained in:
parent
17689e7ef1
commit
7913f58d19
@ -15,106 +15,118 @@ use Response;
|
||||
|
||||
class RegularTypeController extends Controller
|
||||
{
|
||||
public function list(Request $request)
|
||||
{
|
||||
$inputs = [
|
||||
'isMethodPost' => 0,
|
||||
'isExport' => 0,
|
||||
'sort' => $request->input('sort', ''),
|
||||
'sort_type' => $request->input('sort_type', ''),
|
||||
'page' => $request->get('page', 1),
|
||||
|
||||
];
|
||||
$inputs['isMethodPost'] = $request->isMethod('post');
|
||||
$inputs['list'] = RegularType::search($inputs);
|
||||
if ($inputs['list']->total() > 0 && $inputs['page'] > $inputs['list']->lastPage()) {
|
||||
return redirect()->route('regular_types');
|
||||
}
|
||||
return view('admin.regular_types.list', $inputs);
|
||||
}
|
||||
|
||||
|
||||
public function add(Request $request)
|
||||
{
|
||||
$inputs = [
|
||||
'regular_type_id' => $request->input('regular_type_id'), // 定期種別ID
|
||||
'city_id' => $request->input('city_name', ''), // 市区名
|
||||
'regular_class_1' => $request->input('regular_class_1'), // 定期種別1
|
||||
'regular_class_2' => $request->input('regular_class_2'), // 定期種別2
|
||||
'regular_class_3' => $request->input('regular_class_3'), // 定期種別3
|
||||
'regular_class_6' => $request->input('regular_class_6'), // 定期種別6
|
||||
'regular_class_12' => $request->input('regular_class_12'), // 定期種別12
|
||||
'memo' => $request->input('memo'), // 備考
|
||||
];
|
||||
// 画面用データ
|
||||
$dataList = $this->getDataDropList();
|
||||
$inputs = array_merge($inputs, $dataList);
|
||||
if ($request->isMethod('POST')) {
|
||||
$type = false;
|
||||
$validation = new RegularTypeRequest();
|
||||
$rules = $validation->rules();
|
||||
$validator = Validator::make($request->all(), $rules, $validation->messages());
|
||||
if (!$validator->fails()) {
|
||||
\DB::transaction(function () use ($inputs, &$type) {
|
||||
$new = new RegularType();
|
||||
$new->fill($inputs);
|
||||
if ($new->save()) {
|
||||
$type = true;
|
||||
}
|
||||
|
||||
});
|
||||
if ($type) {
|
||||
$request->session()->flash('success', __('新しい成功を創造する。'));
|
||||
return redirect()->route('regular_types');
|
||||
} else {
|
||||
$request->session()->flash('error', __('新しい作成に失敗しました'));
|
||||
}
|
||||
} else {
|
||||
$inputs['errorMsg'] = $this->__buildErrorMessasges($validator);
|
||||
// フォーム入力(画面初期表示用)
|
||||
$inputs = [
|
||||
'city_id' => $request->input('city_id'),
|
||||
'regular_class_1' => $request->input('regular_class_1'),
|
||||
'regular_class_2' => $request->input('regular_class_2'),
|
||||
'regular_class_3' => $request->input('regular_class_3'),
|
||||
'regular_class_6' => $request->input('regular_class_6'),
|
||||
'regular_class_12' => $request->input('regular_class_12'),
|
||||
'memo' => $request->input('memo'),
|
||||
];
|
||||
$viewData = array_merge($inputs, $dataList);
|
||||
|
||||
if ($request->isMethod('POST')) {
|
||||
$validation = new RegularTypeRequest();
|
||||
$rules = $validation->rules();
|
||||
$validator = Validator::make($request->all(), $rules, $validation->messages());
|
||||
|
||||
if ($validator->fails()) {
|
||||
$viewData['errorMsg'] = $this->buildErrorMessages($validator);
|
||||
return view('admin.regular_types.add', array_merge($viewData, $request->all()));
|
||||
}
|
||||
|
||||
// 仅允许写入的字段(白名单)
|
||||
$payload = array_intersect_key($request->all(), array_flip([
|
||||
'city_id',
|
||||
'regular_class_1',
|
||||
'regular_class_2',
|
||||
'regular_class_3',
|
||||
'regular_class_6',
|
||||
'regular_class_12',
|
||||
'memo',
|
||||
]));
|
||||
|
||||
DB::transaction(function () use ($payload) {
|
||||
$new = new RegularType();
|
||||
$new->fill($payload);
|
||||
$new->operator_id = \Auth::user()->ope_id;
|
||||
$new->save();
|
||||
});
|
||||
|
||||
$request->session()->flash('success', __('新しい成功を創造する。'));
|
||||
return redirect()->route('regular_types');
|
||||
}
|
||||
|
||||
return view('admin.regular_types.add', $inputs);
|
||||
return view('admin.regular_types.add', $viewData);
|
||||
}
|
||||
|
||||
public function edit(Request $request, $pk, $view = '')
|
||||
public function edit(Request $request, $id, $view = '')
|
||||
{
|
||||
$regular_type = RegularType::getByPk($pk);
|
||||
if (empty($pk) || empty($regular_type)) {
|
||||
abort('404');
|
||||
$regular_type = RegularType::getById($id);
|
||||
if (empty($id) || empty($regular_type)) {
|
||||
abort(404);
|
||||
}
|
||||
$data = $regular_type->getAttributes();
|
||||
$dataList = $this->getDataDropList();
|
||||
$data = array_merge($data, $dataList);
|
||||
if ($request->isMethod('POST')) {
|
||||
$type = false;
|
||||
$validation = new RegularTypeRequest();
|
||||
$rules = $validation->rules();
|
||||
$validator = Validator::make($request->all(), $rules, $validation->messages());
|
||||
$requestAll = $request->all();
|
||||
$requestAll['city_id'] = $request->input('city_name');
|
||||
$data = array_merge($data, $requestAll);
|
||||
if (!$validator->fails()) {
|
||||
|
||||
\DB::transaction(function () use ($data, &$type, $regular_type) {
|
||||
$regular_type->fill($data);
|
||||
$regular_type->save();
|
||||
$type = true;
|
||||
});
|
||||
if ($type) {
|
||||
$request->session()->flash('success', __('更新に成功しました'));
|
||||
return redirect()->route('regular_types');
|
||||
} else {
|
||||
$request->session()->flash('error', __('更新に失敗しました'));
|
||||
}
|
||||
} else {
|
||||
$data['errorMsg'] = $this->__buildErrorMessasges($validator);
|
||||
$data = array_merge($regular_type->getAttributes(), $this->getDataDropList());
|
||||
|
||||
if ($request->isMethod('POST')) {
|
||||
|
||||
$validation = new RegularTypeRequest();
|
||||
$rules = $validation->rules();
|
||||
$validator = Validator::make($request->all(), $rules, $validation->messages());
|
||||
|
||||
$requestAll = $request->all();
|
||||
if (isset($requestAll['city_name']) && !isset($requestAll['city_id'])) {
|
||||
$requestAll['city_id'] = $requestAll['city_name'];
|
||||
}
|
||||
|
||||
$payload = array_intersect_key($requestAll, array_flip([
|
||||
'city_id',
|
||||
'regular_class_1',
|
||||
'regular_class_2',
|
||||
'regular_class_3',
|
||||
'regular_class_6',
|
||||
'regular_class_12',
|
||||
'memo',
|
||||
]));
|
||||
|
||||
if ($validator->fails()) {
|
||||
$data['errorMsg'] = $this->buildErrorMessages($validator);
|
||||
|
||||
$data = array_merge($data, $payload);
|
||||
if ($view !== '') return view($view, $data);
|
||||
return view('admin.regular_types.edit', $data);
|
||||
}
|
||||
|
||||
DB::transaction(function () use (&$regular_type, $payload) {
|
||||
$regular_type->fill($payload);
|
||||
$regular_type->save();
|
||||
});
|
||||
|
||||
$request->session()->flash('success', __('更新に成功しました'));
|
||||
return redirect()->route('regular_types');
|
||||
}
|
||||
if ($view != '') {
|
||||
|
||||
if ($view !== '') {
|
||||
return view($view, $data);
|
||||
}
|
||||
return view('admin.regular_types.edit', $data);
|
||||
}
|
||||
|
||||
/** バリデーションエラーをまとめる */
|
||||
protected function buildErrorMessages(\Illuminate\Contracts\Validation\Validator $validator): string
|
||||
{
|
||||
return implode("\n", $validator->errors()->all());
|
||||
}
|
||||
|
||||
public function delete(Request $request)
|
||||
{
|
||||
$arr_pk = $request->get('pk');
|
||||
@ -128,6 +140,7 @@ class RegularTypeController extends Controller
|
||||
return redirect()->route('regular_types')->with('error', __('削除するユーザーを選択してください。'));
|
||||
}
|
||||
|
||||
|
||||
public function export(Request $request)
|
||||
{
|
||||
|
||||
@ -168,5 +181,20 @@ class RegularTypeController extends Controller
|
||||
$data['cities'] = City::getList();
|
||||
return $data;
|
||||
}
|
||||
public function list(Request $request)
|
||||
{
|
||||
$sort = $request->input('sort', 'regular_type_id');
|
||||
$sort_type = $request->input('sort_type', 'asc');
|
||||
|
||||
$list = \App\Models\RegularType::orderBy($sort, $sort_type)->paginate(20);
|
||||
|
||||
return view('admin.regular_types.list', [
|
||||
'list' => $list,
|
||||
'sort' => $sort,
|
||||
'sort_type' => $sort_type,
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -5,6 +5,7 @@ namespace App\Http\Controllers\Admin;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Models\Zone;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class ZoneController extends Controller
|
||||
{
|
||||
@ -47,11 +48,18 @@ class ZoneController extends Controller
|
||||
// ページネーション
|
||||
$zones = $query->orderBy($sort, $sort_type)->paginate(20);
|
||||
|
||||
// === 下拉选单用の一覧データ ===
|
||||
$parkList = DB::table('park')->pluck('park_name', 'park_id');
|
||||
$ptypeList = DB::table('ptype')->pluck('ptype_id', 'ptype_id'); // 暂时显示 ID
|
||||
$psectionList = DB::table('psection')->pluck('psection_id', 'psection_id'); // 暂时显示 ID
|
||||
|
||||
return view('admin.zones.list', compact(
|
||||
'zones', 'sort', 'sort_type'
|
||||
'zones', 'sort', 'sort_type',
|
||||
'parkList', 'ptypeList', 'psectionList'
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新規登録
|
||||
*/
|
||||
|
||||
27
app/Http/Requests/RegularTypeRequest.php
Normal file
27
app/Http/Requests/RegularTypeRequest.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class RegularTypeRequest extends FormRequest
|
||||
{
|
||||
public function authorize()
|
||||
{
|
||||
return true; // 認証はコントローラーで行うため、ここでは常にtrueを返す
|
||||
}
|
||||
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'name' => 'required|string|max:255',
|
||||
];
|
||||
}
|
||||
|
||||
public function messages()
|
||||
{
|
||||
return [
|
||||
'name.required' => '市区名は必須です。',
|
||||
];
|
||||
}
|
||||
}
|
||||
@ -29,6 +29,7 @@ class RegularType extends Model
|
||||
'regular_class_6',
|
||||
'regular_class_12',
|
||||
'memo',
|
||||
'operator_id',
|
||||
];
|
||||
|
||||
public static function boot()
|
||||
@ -60,14 +61,14 @@ class RegularType extends Model
|
||||
return $list;
|
||||
}
|
||||
|
||||
public static function getByPk($pk)
|
||||
public static function getById($id)
|
||||
{
|
||||
return self::find($pk);
|
||||
return self::find($id);
|
||||
}
|
||||
|
||||
public static function deleteByPk($arr)
|
||||
public static function deleteById($id)
|
||||
{
|
||||
return self::whereIn('regular_type_id', $arr)->delete();
|
||||
return self::where('regular_type_id', $id)->delete();
|
||||
}
|
||||
|
||||
public function getCity()
|
||||
|
||||
@ -6,13 +6,13 @@
|
||||
<div class="container-fluid">
|
||||
<div class="row mb-2">
|
||||
<div class="col-sm-6">
|
||||
<h1 class="m-0 text-dark">新規</h1>
|
||||
<h1 class="m-0 text-dark">新規登録</h1>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<ol class="breadcrumb float-sm-right text-sm">
|
||||
<li class="breadcrumb-item"><a href="{{ route('home') }}">ホーム</a></li>
|
||||
<li class="breadcrumb-item"><a href="{{ route('contract_allowable_cities') }}">契約許容市区マスタ</a></li>
|
||||
<li class="breadcrumb-item active">新規</li>
|
||||
<li class="breadcrumb-item active">新規登録</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
@ -25,13 +25,6 @@
|
||||
@csrf
|
||||
<div class="card p-4">
|
||||
|
||||
{{-- 上部登録ボタン --}}
|
||||
<div class="mb-3">
|
||||
<button type="submit" class="btn btn-success btn-lg" onclick="return confirm('登録してよろしいですか?')">登録</button>
|
||||
</div>
|
||||
|
||||
<div class="border-top my-3"></div>
|
||||
|
||||
{{-- 契約許容市区マスタID --}}
|
||||
<div class="row mb-3">
|
||||
<label class="col-md-2 col-form-label">契約許容市区マスタID<span class="text-danger">*</span></label>
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
<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"><a href="javascript:void(0);">[東京都|〇〇駐輪場]</a></li>
|
||||
<!-- <li class="breadcrumb-item"><a href="javascript:void(0);">[東京都|〇〇駐輪場]</a></li> -->
|
||||
<li class="breadcrumb-item active">契約許容市区マスタ</li>
|
||||
</ol>
|
||||
</div>
|
||||
@ -23,7 +23,7 @@
|
||||
<!-- Main Content -->
|
||||
<section class="content">
|
||||
<div class="container-fluid">
|
||||
<!-- ▼ 検索条件(ここはそのまま保持) -->
|
||||
<!-- ▼ 検索条件 -->
|
||||
<div class="col-lg-12">
|
||||
<div class="card">
|
||||
<div class="card-header"><h3 class="card-title">絞り込み</h3></div>
|
||||
@ -90,11 +90,11 @@
|
||||
<div class="table-responsive">
|
||||
<form method="post" action="{{ route('contract_allowable_cities_delete') }}" id="form_delete">
|
||||
@csrf
|
||||
<table class="table table-bordered table-striped dataTable text-nowrap">
|
||||
<table class="table table-bordered dataTable text-nowrap">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width:120px;" class="text-left">
|
||||
<input type="checkbox" class="minimal m-0" id="checkbox_all">
|
||||
<th style="width:140px;" class="text-left">
|
||||
<input type="checkbox" onclick="$('input[name*=\'pk\']').prop('checked', this.checked);">
|
||||
</th>
|
||||
<th class="sorting {{ ($sort=='contract_allowable_city_id') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}" sort="contract_allowable_city_id"><span>契約許容市区ID</span></th>
|
||||
<th class="sorting {{ ($sort=='city_id') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}" sort="city_id"><span>市区ID</span></th>
|
||||
@ -103,15 +103,13 @@
|
||||
<th><span>隣接区フラグ</span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tbody class="bg-white">
|
||||
@foreach($list as $item)
|
||||
<tr>
|
||||
<td class="table-warning align-middle">
|
||||
<td class="align-middle" style="background-color:#faebd7;">
|
||||
<div class="d-flex align-items-center">
|
||||
<input type="checkbox" class="minimal m-0 checkbox"
|
||||
value="{{ $item->contract_allowable_city_id }}" name="id[]">
|
||||
<a href="{{ route('contract_allowable_cities_edit', ['id' => $item->contract_allowable_city_id]) }}"
|
||||
class="btn btn-sm btn-default ml-2">{{ __('編集') }}</a>
|
||||
<input type="checkbox" class="m-0 checkbox" name="id[]" value="{{ $item->contract_allowable_city_id }}">
|
||||
<a href="{{ route('contract_allowable_cities_edit', ['id' => $item->contract_allowable_city_id]) }}" class="btn btn-sm btn-default ml10">編集</a>
|
||||
</div>
|
||||
</td>
|
||||
<td class="sm-item text-left align-middle">{{ $item->contract_allowable_city_id }}</td>
|
||||
|
||||
@ -8,8 +8,8 @@
|
||||
<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') }}">XX様info(ホーム)</a></li>
|
||||
<li class="breadcrumb-item"><a href="javascript:void(0);">[東京都|〇〇駐輪場]</a></li>
|
||||
<li class="breadcrumb-item"><a href="{{ route('home') }}">ホーム</a></li>
|
||||
<!-- <li class="breadcrumb-item"><a href="javascript:void(0);">[東京都|〇〇駐輪場]</a></li> -->
|
||||
<li class="breadcrumb-item active">{{ __('デバイス管理マスタ') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
@ -6,13 +6,13 @@
|
||||
<div class="container-fluid">
|
||||
<div class="row mb-2">
|
||||
<div class="col-sm-6">
|
||||
<h1 class="m-0 text-dark">新規</h1>
|
||||
<h1 class="m-0 text-dark">新規登録</h1>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<ol class="breadcrumb float-sm-right text-sm">
|
||||
<li class="breadcrumb-item"><a href="{{ route('home') }}">ホーム</a></li>
|
||||
<li class="breadcrumb-item"><a href="{{ route('jurisdiction_parkings') }}">管轄駐輪場</a></li>
|
||||
<li class="breadcrumb-item active">新規</li>
|
||||
<li class="breadcrumb-item active">新規登録</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
@ -24,13 +24,6 @@
|
||||
<form action="{{ route('jurisdiction_parkings_add') }}" method="POST">
|
||||
@csrf
|
||||
<div class="card p-4">
|
||||
{{-- 上部登録ボタン --}}
|
||||
<div class="mb-3">
|
||||
<button type="submit" class="btn btn-success btn-lg" onclick="return confirm('登録してよろしいですか?')">登録</button>
|
||||
</div>
|
||||
|
||||
<div class="border-top my-3"></div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<label class="col-md-2 col-form-label">管轄名<span class="text-danger">*</span></label>
|
||||
<div class="col-md-10">
|
||||
@ -64,7 +57,7 @@
|
||||
|
||||
{{-- 下部登録ボタン --}}
|
||||
<div class="mb-3">
|
||||
<button type="submit" class="btn btn-success btn-lg" onclick="return confirm('登録してよろしいですか?')">登録</button>
|
||||
<button type="submit" class="btn btn-success btn-lg mt-3" onclick="return confirm('登録してよろしいですか?')">登録</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@ -11,8 +11,8 @@
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<ol class="breadcrumb float-sm-right text-sm">
|
||||
<li class="breadcrumb-item"><a href="{{ route('home') }}">XX様info(ホーム)</a></li>
|
||||
<li class="breadcrumb-item"><a href="javascript:void(0);">[東京都|〇〇駐輪場]</a></li>
|
||||
<li class="breadcrumb-item"><a href="{{ route('home') }}">ホーム</a></li>
|
||||
<!-- <li class="breadcrumb-item"><a href="javascript:void(0);">[東京都|〇〇駐輪場]</a></li> -->
|
||||
<li class="breadcrumb-item active">管轄駐輪場マスタ</li>
|
||||
</ol>
|
||||
</div>
|
||||
@ -30,13 +30,25 @@
|
||||
<input type="hidden" name="sort_type" value="{{ $sort_type ?? '' }}">
|
||||
</form>
|
||||
|
||||
<div class="container-fluid mb20 d-flex justify-content-between">
|
||||
<div class="container-fluid mb20 justify-content-between">
|
||||
<div>
|
||||
<button type="button" class="btn btn-sm btn-default mr10" onclick="location.href='{{ route('jurisdiction_parkings_add') }}'">新規</button>
|
||||
<button type="button" class="btn btn-sm btn-default mr10" id="delete">削除</button>
|
||||
<button type="submit" class="btn btn-sm btn-default mr10" form="form_export">{{ __('CSV出力') }}</button>
|
||||
<!-- CSVインポート -->
|
||||
<form action="{{ route('jurisdiction_parkings_import') }}"
|
||||
method="POST" enctype="multipart/form-data"
|
||||
style="display:inline-block">
|
||||
@csrf
|
||||
<input type="file" name="csv_file" accept=".csv" class="d-none" id="csvInput"
|
||||
onchange="this.form.submit()">
|
||||
<button type="button" class="btn btn-sm btn-default mr10"
|
||||
onclick="document.getElementById('csvInput').click()">
|
||||
{{ __('インポート') }}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
<div>
|
||||
<div class="d-flex justify-content-end">
|
||||
{{ $list->appends(['sort' => $sort ?? '', 'sort_type' => $sort_type ?? ''])->links('pagination') }}
|
||||
</div>
|
||||
</div>
|
||||
@ -55,12 +67,12 @@
|
||||
<div class="table-responsive">
|
||||
<form action="{{ route('jurisdiction_parkings_delete') }}" method="POST" id="form_delete">
|
||||
@csrf
|
||||
<table class="table table-bordered table-striped dataTable text-nowrap">
|
||||
<table class="table table-bordered dataTable text-nowrap">
|
||||
<thead>
|
||||
<tr>
|
||||
{{-- ★ チェック + 編集 用の1列 --}}
|
||||
<th style="width:120px;" class="text-left">
|
||||
<input type="checkbox" class="minimal m-0" id="checkbox_all">
|
||||
<th style="width:140px;" class="text-left">
|
||||
<input type="checkbox" onclick="$('input[name*=\'pk\']').prop('checked', this.checked);">
|
||||
</th>
|
||||
<th class="sorting {{ ($sort=='jurisdiction_parking_id') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}" sort="jurisdiction_parking_id"><span>管轄駐輪場ID</span></th>
|
||||
<th class="sorting {{ ($sort=='jurisdiction_parking_name') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}" sort="jurisdiction_parking_name"><span>管轄名</span></th>
|
||||
@ -68,15 +80,14 @@
|
||||
<th><span>駐車場</span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tbody class="bg-white">
|
||||
@foreach($list as $item)
|
||||
<tr>
|
||||
{{-- ★ チェック + 編集ボタン --}}
|
||||
<td class="table-warning align-middle">
|
||||
<td class="align-middle" style="background-color:#faebd7;">
|
||||
<div class="d-flex align-items-center">
|
||||
<input type="checkbox" class="minimal m-0 checkbox" name="pk[]" value="{{ $item->jurisdiction_parking_id }}">
|
||||
<a href="{{ route('jurisdiction_parkings_edit', ['id' => $item->jurisdiction_parking_id]) }}"
|
||||
class="btn btn-sm btn-default ml-2">{{ __('編集') }}</a>
|
||||
<input type="checkbox" class="m-0 checkbox" name="pk[]" value="{{ $item->jurisdiction_parking_id }}">
|
||||
<a href="{{ route('jurisdiction_parkings_edit', ['id' => $item->jurisdiction_parking_id]) }}" class="btn btn-sm btn-default ml-2">編集</a>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
|
||||
@ -21,23 +21,6 @@
|
||||
$isAddPage = request()->routeIs('managers_add'); // 新規ページなら true
|
||||
@endphp
|
||||
|
||||
{{-- 上部ボタン --}}
|
||||
|
||||
<div class="card-header">
|
||||
<div class="d-flex justify-content-start align-items-center">
|
||||
@if($isInfo)
|
||||
<a href="{{ route('managers_add') }}" class="btn btn-lg btn-success mr-2">{{ __('登録') }}</a>
|
||||
<a href="{{ route('managers_edit', ['id' => $manager_id]) }}" class="btn btn-lg btn-danger">{{ __('編集') }}</a>
|
||||
@else
|
||||
<button type="submit" class="btn btn-lg btn-success mr-2">
|
||||
{{ $isAddPage ? __('登録') : __('保存') }}
|
||||
</button>
|
||||
<a href="{{ route('managers') }}" class="btn btn-lg btn-secondary">{{ __('戻る') }}</a>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
|
||||
|
||||
@ -6,12 +6,12 @@
|
||||
<div class="container-fluid">
|
||||
<div class="row mb-2">
|
||||
<div class="col-lg-6">
|
||||
<h1 class="m-0 text-dark">新規</h1>
|
||||
<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') }}">XX様info(ホーム)</a></li>
|
||||
<li class="breadcrumb-item"><a href="javascript:void(0);">[東京都|〇〇駐輪場]</a></li>
|
||||
<li class="breadcrumb-item"><a href="{{ route('home') }}">ホーム</a></li>
|
||||
<!-- <li class="breadcrumb-item"><a href="javascript:void(0);">[東京都|〇〇駐輪場]</a></li> -->
|
||||
<li class="breadcrumb-item"><a href="{{ route('managers') }}">駐輪場管理者マスタ</a></li>
|
||||
<li class="breadcrumb-item active">新規登録</li>
|
||||
</ol>
|
||||
|
||||
@ -14,8 +14,8 @@
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<ol class="breadcrumb float-sm-right text-sm">
|
||||
<li class="breadcrumb-item"><a href="{{ route('home') }}">XX様info(ホーム)</a></li>
|
||||
<li class="breadcrumb-item"><a href="javascript:void(0);">[東京都|〇〇駐輪場]</a></li>
|
||||
<li class="breadcrumb-item"><a href="{{ route('home') }}">ホーム</a></li>
|
||||
<!-- <li class="breadcrumb-item"><a href="javascript:void(0);">[東京都|〇〇駐輪場]</a></li> -->
|
||||
<li class="breadcrumb-item"><a href="{{ route('managers') }}">駐輪場管理者マスタ</a></li>
|
||||
<li class="breadcrumb-item active">編集</li>
|
||||
</ol>
|
||||
|
||||
@ -61,12 +61,12 @@
|
||||
<div class="table-responsive">
|
||||
<form action="{{ route('managers_delete') }}" method="POST" id="form_delete">
|
||||
@csrf
|
||||
<table class="table table-bordered table-striped dataTable text-nowrap">
|
||||
<table class="table table-bordered dataTable text-nowrap">
|
||||
<thead>
|
||||
<tr>
|
||||
{{-- ★ チェック + 編集ボタン列 --}}
|
||||
<th style="width:120px;" class="text-left">
|
||||
<input type="checkbox" class="minimal m-0" id="checkbox_all">
|
||||
<th style="width:140px;" class="text-left">
|
||||
<input type="checkbox" onclick="$('input[name*=\'pk\']').prop('checked', this.checked);">
|
||||
</th>
|
||||
<th class="sorting {{ ($sort=='manager_id') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}" sort="manager_id"><span>駐輪場管理者ID</span></th>
|
||||
<th class="sorting {{ ($sort=='manager_name') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}" sort="manager_name"><span>駐輪場管理者名</span></th>
|
||||
@ -82,17 +82,17 @@
|
||||
<th><span>退職日</span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tbody class="bg-white">
|
||||
@foreach($list as $item)
|
||||
<tr>
|
||||
{{-- チェック+編集ボタン --}}
|
||||
<td class="table-warning align-middle">
|
||||
<td class="align-middle" style="background-color:#faebd7;">
|
||||
<div class="d-flex align-items-center">
|
||||
<input type="checkbox" class="minimal m-0 checkbox" name="pk[]" value="{{ $item->manager_id }}">
|
||||
<a href="{{ route('managers_info', ['id' => $item->manager_id]) }}"
|
||||
class="btn btn-sm btn-default ml-2">{{ __('編集') }}</a>
|
||||
<input type="checkbox" class="m-0 checkbox" name="pk[]" value="{{ $item->manager_id }}">
|
||||
<a href="{{ route('managers_info', ['id' => $item->manager_id]) }}" class="btn btn-sm btn-default ml10">編集</a>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<td class="sm-item text-left align-middle">{{ $item->manager_id }}</td>
|
||||
<td class="sm-item text-left align-middle">{{ $item->manager_name }}</td>
|
||||
<td class="sm-item text-left align-middle">{{ $item->manager_type }}</td>
|
||||
|
||||
@ -19,31 +19,6 @@
|
||||
|
||||
<div class="card p-4">
|
||||
|
||||
{{-- 上部登録ボタン --}}
|
||||
<div class="text-left mt-4">
|
||||
@if($isInfo)
|
||||
{{-- 詳細モード(info)では、編集ボタンを表示 --}}
|
||||
<a href="{{ route('print_areas_add') }}" class="btn btn-lg btn-success">{{ __('登録') }}</a>
|
||||
<a href="{{ route('print_areas_edit', ['id' => $record->print_area_id]) }}" class="btn btn-danger px-5">{{ __('編集') }}</a>
|
||||
@else
|
||||
{{-- 登録 or 更新 --}}
|
||||
<button type="submit" class="btn btn-lg btn-success">
|
||||
{{ $isEdit ? '登録' : '登録' }}
|
||||
</button>
|
||||
|
||||
{{-- 削除ボタン--}}
|
||||
@if($isEdit)
|
||||
<a href="{{ route('print_areas_delete', ['id' => $record->print_area_id]) }}"
|
||||
class="btn btn-lg btn-danger ml-3"
|
||||
onclick="return confirm('削除してよろしいですか?')">
|
||||
削除
|
||||
</a>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="border-top my-3"></div>
|
||||
|
||||
<div class="row mb-3">
|
||||
@if($isInfo || $isEdit)
|
||||
<label class="col-md-2 col-form-label">{{ __('validation.attributes.print_area_id') }}</label>
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
<div class="container-fluid">
|
||||
<div class="row mb-2">
|
||||
<div class="col-sm-6">
|
||||
<h1 class="m-0 text-dark">新規</h1>
|
||||
<h1 class="m-0 text-dark">新規登録</h1>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<ol class="breadcrumb float-sm-right text-sm">
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<ol class="breadcrumb float-sm-right text-sm">
|
||||
<li class="breadcrumb-item"><a href="{{ route('home') }}">XX様info(ホーム)</a></li>
|
||||
<li class="breadcrumb-item"><a href="{{ route('home') }}">ホーム</a></li>
|
||||
<li class="breadcrumb-item"><a href="{{ route('print_areas') }}">シール印刷範囲マスタ</a></li>
|
||||
<li class="breadcrumb-item active">編集</li>
|
||||
</ol>
|
||||
|
||||
@ -11,8 +11,8 @@
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<ol class="breadcrumb float-sm-right text-sm">
|
||||
<li class="breadcrumb-item"><a href="{{ route('home') }}">XX様info(ホーム)</a></li>
|
||||
<li class="breadcrumb-item"><a href="javascript:void(0);">[東京都|〇〇駐輪場]</a></li>
|
||||
<li class="breadcrumb-item"><a href="{{ route('home') }}">ホーム</a></li>
|
||||
<!-- <li class="breadcrumb-item"><a href="javascript:void(0);">[東京都|〇〇駐輪場]</a></li> -->
|
||||
<li class="breadcrumb-item active">シール印刷範囲マスタ</li>
|
||||
</ol>
|
||||
</div>
|
||||
@ -36,11 +36,13 @@
|
||||
<button type="button" class="btn btn-sm btn-default mr10" onclick="location.href='{{ route('print_areas_add') }}'">新規</button>
|
||||
<button type="button" class="btn btn-sm btn-default mr10" id="delete">削除</button>
|
||||
<button type="submit" class="btn btn-sm btn-default mr10" form="form_export">CSV出力</button>
|
||||
<button type="button" class="btn btn-sm btn-default mr10" onclick="location.href='{{ route('print_areas_import') }}'">インポート</button>
|
||||
<div class="d-flex justify-content-end">
|
||||
{{ $list->appends(['sort' => $sort ?? '', 'sort_type' => $sort_type ?? ''])->links('pagination') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- メッセージ表示 -->
|
||||
<div class="col-lg-12">
|
||||
@if(session('success'))
|
||||
@ -55,26 +57,26 @@
|
||||
<div class="table-responsive">
|
||||
<form action="{{ route('print_areas_delete') }}" method="POST" id="form_delete">
|
||||
@csrf
|
||||
<table class="table table-bordered table-striped dataTable text-nowrap">
|
||||
<table class="table table-bordered dataTable text-nowrap">
|
||||
<thead>
|
||||
<tr>
|
||||
{{-- チェック + 編集ボタン --}}
|
||||
<th style="width:120px;" class="text-left">
|
||||
<input type="checkbox" class="minimal m-0" id="checkbox_all">
|
||||
<th style="width:140px;" class="text-left">
|
||||
<input type="checkbox" onclick="$('input[name*=\'pk\']').prop('checked', this.checked);">
|
||||
</th>
|
||||
<th class="sorting {{ ($sort=='print_area_id') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}" sort="print_area_id"><span>印刷範囲ID</span></th>
|
||||
<th class="sorting {{ ($sort=='print_area_name') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}" sort="print_area_name"><span>印刷範囲名</span></th>
|
||||
<th><span>駐輪場名</span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tbody class=bg-white>
|
||||
{{-- データ表示 --}}
|
||||
@foreach($list as $item)
|
||||
<tr>
|
||||
<td class="table-warning align-middle">
|
||||
<td class="align-middle" style="background-color:#faebd7;">
|
||||
<div class="d-flex align-items-center">
|
||||
<input type="checkbox" class="minimal m-0 checkbox" name="pk[]" value="{{ $item->print_area_id }}">
|
||||
<a href="{{ route('print_areas_edit', ['id' => $item->print_area_id]) }}"
|
||||
class="btn btn-sm btn-default ml-2">{{ __('編集') }}</a>
|
||||
<input type="checkbox" class="m-0 checkbox" name="pk[]" value="{{ $item->print_area_id }}">
|
||||
<a href="{{ route('print_areas_edit', ['id' => $item->print_area_id]) }}" class="btn btn-sm btn-default ml10">編集</a>
|
||||
</div>
|
||||
</td>
|
||||
<td class="sm-item text-left align-middle">{{ $item->print_area_id }}</td>
|
||||
|
||||
@ -16,20 +16,13 @@
|
||||
{!! $errorMsg !!}
|
||||
</div>
|
||||
@endif
|
||||
<div class="card-header">
|
||||
@if($isInfo)
|
||||
<a href="{{route('regular_types_add')}}" class="btn btn-lg btn-success">{{__('登録')}}</a>
|
||||
<a href="{{route('regular_types_edit',['id'=>$regular_type_id])}}" class="btn btn-lg btn-danger">{{__('編集')}}</a>
|
||||
@else
|
||||
<button type="submit" class="btn btn-lg btn-danger register" >{{__('保存')}}</button>
|
||||
@endIf
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
@if($isEdit || $isInfo)
|
||||
<!-- 定期種別ID -->
|
||||
<div class="form-group col-3">
|
||||
<label>{{__('validation.attributes.regular_type_id')}}</label>
|
||||
<label>{{__('定期種別ID')}}</label>
|
||||
</div>
|
||||
<div class="form-group col-9">
|
||||
<div class="input-group">
|
||||
@ -43,19 +36,20 @@
|
||||
|
||||
<!-- 市区名 -->
|
||||
<div class="form-group col-3">
|
||||
<label @if(!$isInfo) class="required" @endif>{{__('validation.attributes.city_name')}}</label>
|
||||
<label @if(!$isInfo) class="required" @endif>{{__('市区名')}}</label>
|
||||
</div>
|
||||
<div class="form-group col-9">
|
||||
<select class="form-control form-control-lg mb10" name="city_name" @if($isInfo) disabled @endif>
|
||||
<option value="">{{__('validation.attributes.city_name')}}</option>
|
||||
<select class="form-control form-control-lg mb10" name="city_id" @if($isInfo) disabled @endif>
|
||||
<option value="">{{__('市区名')}}</option>
|
||||
@foreach($cities as $key => $val)
|
||||
<option value="{{$key}}" @if($city_id == $key) selected @endif>{{$val}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- 定期種別1 -->
|
||||
<div class="form-group col-3">
|
||||
<label>{{__('validation.attributes.regular_class_1')}}</label>
|
||||
<label>{{__('定期種別1')}}</label>
|
||||
</div>
|
||||
<div class="form-group col-9">
|
||||
<div class="row">
|
||||
@ -77,7 +71,7 @@
|
||||
|
||||
<!-- 定期種別2 -->
|
||||
<div class="form-group col-3">
|
||||
<label>{{__('validation.attributes.regular_class_2')}}</label>
|
||||
<label>{{__('定期種別2')}}</label>
|
||||
</div>
|
||||
<div class="form-group col-9">
|
||||
<div class="row">
|
||||
@ -99,7 +93,7 @@
|
||||
|
||||
<!-- 定期種別3 -->
|
||||
<div class="form-group col-3">
|
||||
<label>{{__('validation.attributes.regular_class_3')}}</label>
|
||||
<label>{{__('定期種別3')}}</label>
|
||||
</div>
|
||||
<div class="form-group col-9">
|
||||
<div class="row">
|
||||
@ -121,7 +115,7 @@
|
||||
|
||||
<!-- 定期種別6 -->
|
||||
<div class="form-group col-3">
|
||||
<label>{{__('validation.attributes.regular_class_6')}}</label>
|
||||
<label>{{__('定期種別6')}}</label>
|
||||
</div>
|
||||
<div class="form-group col-9">
|
||||
<div class="row">
|
||||
@ -142,7 +136,7 @@
|
||||
|
||||
<!-- 定期種別12 -->
|
||||
<div class="form-group col-3">
|
||||
<label>{{__('validation.attributes.regular_class_12')}}</label>
|
||||
<label>{{__('定期種別12')}}</label>
|
||||
</div>
|
||||
<div class="form-group col-9">
|
||||
<div class="row">
|
||||
@ -160,8 +154,11 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.form group - 定期種別12 -->
|
||||
|
||||
<!-- 備考 -->
|
||||
<div class="form-group col-3">
|
||||
<label>{{__('validation.attributes.memo')}}</label>
|
||||
<label>{{__('備考')}}</label>
|
||||
</div>
|
||||
<div class="form-group col-9">
|
||||
<div class="input-group">
|
||||
@ -169,12 +166,25 @@
|
||||
name="memo" @if($isInfo) readonly @endif>{{$memo}}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.form group - 備考 -->
|
||||
</div>
|
||||
@if($isInfo)
|
||||
<a href="{{route('regular_types_add')}}" class="btn btn-lg btn-success">{{__('登録')}}</a>
|
||||
<a href="{{route('regular_types_edit',['id'=>$regular_type_id])}}" class="btn btn-lg btn-danger">{{__('編集')}}</a>
|
||||
|
||||
@if(!$isEdit)
|
||||
{{-- 新規登録画面の場合:「登録」ボタンを表示 --}}
|
||||
<button type="submit" class="btn btn-lg btn-success register">
|
||||
{{ __('登録') }}
|
||||
</button>
|
||||
|
||||
@else
|
||||
<button type="submit" class="btn btn-lg btn-danger register" >{{__('保存')}}</button>
|
||||
@endIf
|
||||
{{-- 編集画面の場合:「更新」「戻る」ボタンを表示 --}}
|
||||
<button type="submit" class="btn btn-lg btn-success register">
|
||||
{{ __('更新') }}
|
||||
</button>
|
||||
|
||||
<a href="{{ route('regular_types') }}" class="btn btn-lg btn-secondary">
|
||||
{{ __('戻る') }}
|
||||
</a>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@ -8,14 +8,13 @@
|
||||
<div class="container-fluid">
|
||||
<div class="row mb-2">
|
||||
<div class="col-lg-6">
|
||||
<h1 class="m-0 text-dark">[東京都|〇〇駐輪場] 定期種別マスタ</h1>
|
||||
<h1 class="m-0 text-dark">新規登録</h1>
|
||||
</div><!-- /.col -->
|
||||
<div class="col-lg-6">
|
||||
<ol class="breadcrumb float-sm-right text-sm">
|
||||
<li class="breadcrumb-item"><a href="./index2.html">XX様info(ホーム)</a></li>
|
||||
<li class="breadcrumb-item"><a href="./index3.html">[東京都|〇〇駐輪場]</a></li>
|
||||
<li class="breadcrumb-item">定期種別マスタ</li>
|
||||
<li class="breadcrumb-item active">[東京都|〇〇駐輪場] 定期種別マスタ</li>
|
||||
<li class="breadcrumb-item"><a href="{{ route('home') }}">ホーム</a></li>
|
||||
<li class="breadcrumb-item"><a href="{{ route('regular_types') }}">定期種別マスタ</a></li>
|
||||
<li class="breadcrumb-item">新規登録</li>
|
||||
</ol>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
@ -40,12 +39,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid mb20">
|
||||
<button type="submit" class="btn btn-sm btn-default mr10">{{__('削除')}}</button>
|
||||
<button type="submit" class="btn btn-sm btn-default mr10">{{__('インポート')}}</button>
|
||||
<button type="submit" class="btn btn-sm btn-default mr10">{{__('CSV出力')}}</button>
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
|
||||
@ -8,14 +8,13 @@
|
||||
<div class="container-fluid">
|
||||
<div class="row mb-2">
|
||||
<div class="col-lg-6">
|
||||
<h1 class="m-0 text-dark">[東京都|〇〇駐輪場] 定期種別マスタ</h1>
|
||||
<h1 class="m-0 text-dark">編集</h1>
|
||||
</div><!-- /.col -->
|
||||
<div class="col-lg-6">
|
||||
<ol class="breadcrumb float-sm-right text-sm">
|
||||
<li class="breadcrumb-item"><a href="./index2.html">XX様info(ホーム)</a></li>
|
||||
<li class="breadcrumb-item"><a href="./index3.html">[東京都|〇〇駐輪場]</a></li>
|
||||
<li class="breadcrumb-item">定期種別マスタ</li>
|
||||
<li class="breadcrumb-item active">利用者マスタ</li>
|
||||
<li class="breadcrumb-item"><a href="{{ route('home') }}">ホーム</a></li>
|
||||
<li class="breadcrumb-item"><a href="{{ route('regular_types') }}">定期種別マスタ</a></li>
|
||||
<li class="breadcrumb-item">編集</li>
|
||||
</ol>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
@ -40,12 +39,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid mb20">
|
||||
<button type="submit" class="btn btn-sm btn-default mr10">{{__('削除')}}</button>
|
||||
<button type="submit" class="btn btn-sm btn-default mr10">{{__('インポート')}}</button>
|
||||
<button type="submit" class="btn btn-sm btn-default mr10">{{__('CSV出力')}}</button>
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
|
||||
@ -11,8 +11,7 @@
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<ol class="breadcrumb float-sm-right text-sm">
|
||||
<li class="breadcrumb-item"><a href="{{ route('home') }}">XX様info(ホーム)</a></li>
|
||||
<li class="breadcrumb-item"><a href="javascript:void(0);">[東京都|〇〇駐輪場]</a></li>
|
||||
<li class="breadcrumb-item"><a href="{{ route('home') }}">ホーム</a></li>
|
||||
<li class="breadcrumb-item active">定期種別マスタ</li>
|
||||
</ol>
|
||||
</div>
|
||||
@ -34,7 +33,7 @@
|
||||
<div class="container-fluid mb20">
|
||||
<button type="button" class="btn btn-sm btn-default mr10" onclick="location.href='{{ route('regular_types_add') }}'">新規</button>
|
||||
<button type="button" class="btn btn-sm btn-default mr10" id="delete">削除</button>
|
||||
<button type="submit" class="btn btn-sm btn-default mr10" form="form_export">{{ __('CSV出力') }}</button>
|
||||
<!-- <button type="submit" class="btn btn-sm btn-default mr10" form="form_export">{{ __('CSV出力') }}</button> -->
|
||||
<div class="d-flex justify-content-end">
|
||||
{{ $list->appends(['sort' => $sort ?? '', 'sort_type' => $sort_type ?? ''])->links('pagination') }}
|
||||
</div>
|
||||
@ -61,13 +60,14 @@
|
||||
<div class="table-responsive">
|
||||
<form action="{{ route('regular_types_delete') }}" method="POST" id="form_delete">
|
||||
@csrf
|
||||
<table class="table table-bordered table-striped dataTable text-nowrap">
|
||||
<table class="table table-bordered dataTable text-nowrap">
|
||||
<thead>
|
||||
<tr>
|
||||
{{-- チェック + 編集ボタン --}}
|
||||
<th style="width:140px;" class="text-left">
|
||||
<input type="checkbox" onclick="$('input[name*=\'pk\']').prop('checked', this.checked);">
|
||||
<input type="checkbox" onclick="$('input[name*=\'pk\']').prop('checked', this.checked);">
|
||||
</th>
|
||||
{{-- ソート --}}
|
||||
<th class="sorting {{ ($sort=='regular_type_id') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}" sort="regular_type_id"><span>定期種別ID</span></th>
|
||||
<th><span>市区名</span></th>
|
||||
<th><span>定期種別1</span></th>
|
||||
@ -78,19 +78,19 @@
|
||||
<th><span>備考</span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tbody class="bg-white">
|
||||
@php
|
||||
$rc = \App\Models\RegularType::RegularClass;
|
||||
@endphp
|
||||
@foreach($list as $item)
|
||||
<tr>
|
||||
<td class="table-warning align-middle">
|
||||
<td class="align-middle" style="background-color:#faebd7;">
|
||||
<div class="d-flex align-items-center">
|
||||
<input type="checkbox" class="minimal m-0 checkbox" name="pk[]" value="{{ $item->regular_type_id }}">
|
||||
<a href="{{ route('regular_types_info', ['id' => $item->regular_type_id]) }}"
|
||||
class="btn btn-sm btn-default ml-2">{{ __('編集') }}</a>
|
||||
<input type="checkbox" class="m-0 checkbox" name="pk[]" value="{{ $item->regular_type_id }}">
|
||||
<a href="{{ route('regular_types_edit', ['id' => $item->regular_type_id]) }}" class="btn btn-sm btn-default ml10">編集</a>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<td class="sm-item text-left align-middle">{{ $item->regular_type_id }}</td>
|
||||
<td class="sm-item text-left align-middle">{{ $item->getCity()?->city_name ?? '-' }}</td>
|
||||
<td class="sm-item text-left align-middle">{{ __($rc[$item->regular_class_1] ?? '-') }}</td>
|
||||
|
||||
@ -11,64 +11,140 @@
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="card-header">
|
||||
<a href="{{ route('stations') }}" class="btn btn-secondary">戻る</a>
|
||||
</div>
|
||||
@php
|
||||
// $isEdit = 1 or 0
|
||||
@endphp
|
||||
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
{{-- 近傍駅名 --}}
|
||||
<div class="form-group col-3">
|
||||
<label class="required">{{ __('近傍駅名') }}</label>
|
||||
</div>
|
||||
<div class="form-group col-9">
|
||||
<input type="text" name="station_neighbor_station" class="form-control form-control-lg"
|
||||
value="{{ old('station_neighbor_station', $station->station_neighbor_station ?? '') }}"
|
||||
placeholder="{{ __('近傍駅名') }}" @if($isInfo) readonly @endif />
|
||||
</div>
|
||||
<table class="table table-borderless">
|
||||
{{-- 近傍駅ID(自動採番) --}}
|
||||
<tr>
|
||||
<th>{{ __('近傍駅ID') }}</th>
|
||||
<td>
|
||||
<input type="text" name="station_id"
|
||||
class="form-control text-right bg-light"
|
||||
value="{{ old('station_id', $station->station_id ?? '') }}"
|
||||
maxlength="10" readonly>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{{-- フリガナ --}}
|
||||
<div class="form-group col-3">
|
||||
<label>{{ __('フリガナ') }}</label>
|
||||
</div>
|
||||
<div class="form-group col-9">
|
||||
<input type="text" name="station_name_ruby" class="form-control form-control-lg"
|
||||
value="{{ old('station_name_ruby', $station->station_name_ruby ?? '') }}"
|
||||
placeholder="{{ __('フリガナ') }}" @if($isInfo) readonly @endif />
|
||||
</div>
|
||||
{{-- 駐輪場ID --}}
|
||||
<tr>
|
||||
<th>{{ __('駐車場ID') }}</th>
|
||||
<td>
|
||||
<input type="text" name="park_id"
|
||||
class="form-control text-right bg-light"
|
||||
value="{{ old('park_id', $station->park_id ?? '') }}"
|
||||
maxlength="10" readonly>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{{-- 近傍駅 --}}
|
||||
<tr>
|
||||
<th>{{ __('近傍駅') }} <span class="text-danger">※</span></th>
|
||||
<td>
|
||||
<input type="text" name="station_neighbor_station"
|
||||
class="form-control text-left"
|
||||
value="{{ old('station_neighbor_station', $station->station_neighbor_station ?? '') }}"
|
||||
maxlength="10" required>
|
||||
@error('station_neighbor_station')
|
||||
<div class="text-danger small">{{ $message }}</div>
|
||||
@enderror
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{{-- 近傍駅ふりがな --}}
|
||||
<tr>
|
||||
<th>{{ __('近傍駅ふりがな') }} <span class="text-danger">※</span></th>
|
||||
<td>
|
||||
<input type="text" name="station_name_ruby"
|
||||
class="form-control text-left"
|
||||
value="{{ old('station_name_ruby', $station->station_name_ruby ?? '') }}"
|
||||
maxlength="10" required>
|
||||
@error('station_name_ruby')
|
||||
<div class="text-danger small">{{ $message }}</div>
|
||||
@enderror
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{{-- 路線名 --}}
|
||||
<div class="form-group col-3">
|
||||
<label>{{ __('路線名') }}</label>
|
||||
</div>
|
||||
<div class="form-group col-9">
|
||||
<input type="text" name="station_route_name" class="form-control form-control-lg"
|
||||
value="{{ old('station_route_name', $station->station_route_name ?? '') }}"
|
||||
placeholder="{{ __('路線名') }}" @if($isInfo) readonly @endif />
|
||||
</div>
|
||||
<tr>
|
||||
<th>{{ __('路線名') }} <span class="text-danger">※</span></th>
|
||||
<td>
|
||||
<input type="text" name="station_route_name"
|
||||
class="form-control text-left"
|
||||
value="{{ old('station_route_name', $station->station_route_name ?? '') }}"
|
||||
maxlength="10" required>
|
||||
@error('station_route_name')
|
||||
<div class="text-danger small">{{ $message }}</div>
|
||||
@enderror
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{{-- park_id --}}
|
||||
<div class="form-group col-3">
|
||||
<label>{{ __('駐輪場ID') }}</label>
|
||||
</div>
|
||||
<div class="form-group col-9">
|
||||
<input type="number" name="park_id" class="form-control form-control-lg"
|
||||
value="{{ old('park_id', $station->park_id ?? '') }}"
|
||||
placeholder="{{ __('駐輪場ID') }}" @if($isInfo) readonly @endif />
|
||||
</div>
|
||||
{{-- 緯度 --}}
|
||||
<tr>
|
||||
<th>{{ __('近傍駅座標(緯度)') }} <span class="text-danger">※</span></th>
|
||||
<td>
|
||||
<input type="number" name="latitude"
|
||||
class="form-control text-left"
|
||||
value="{{ old('latitude', $station->latitude ?? '') }}"
|
||||
step="any" maxlength="10" required>
|
||||
@error('latitude')
|
||||
<div class="text-danger small">{{ $message }}</div>
|
||||
@enderror
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{{-- operator_id --}}
|
||||
<div class="form-group col-3">
|
||||
<label>{{ __('オペレーターID') }}</label>
|
||||
</div>
|
||||
<div class="form-group col-9">
|
||||
<input type="number" name="operator_id" class="form-control form-control-lg"
|
||||
value="{{ old('operator_id', $station->operator_id ?? '') }}"
|
||||
placeholder="{{ __('オペレーターID') }}" @if($isInfo) readonly @endif />
|
||||
</div>
|
||||
</div>
|
||||
{{-- 経度 --}}
|
||||
<tr>
|
||||
<th>{{ __('近傍駅座標(経度)') }} <span class="text-danger">※</span></th>
|
||||
<td>
|
||||
<input type="number" name="longitude"
|
||||
class="form-control text-l"
|
||||
value="{{ old('longitude', $station->longitude ?? '') }}"
|
||||
step="any" maxlength="10" required>
|
||||
@error('longitude')
|
||||
<div class="text-danger small">{{ $message }}</div>
|
||||
@enderror
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="text-right">
|
||||
<button type="submit" class="btn btn-lg btn-danger register">{{ __('保存') }}</button>
|
||||
{{-- 登録・削除 ボタン --}}
|
||||
<div class="text-left mt-4">
|
||||
@if($isInfo)
|
||||
{{-- 詳細画面:編集に遷移 --}}
|
||||
|
||||
<a href="{{ route('stations_edit', ['id' => $station->id]) }}" class="btn btn-lg btn-success">
|
||||
編集
|
||||
</a>
|
||||
@else
|
||||
{{-- 新規/編集 共通フォーム --}}
|
||||
<button type="submit" class="btn btn-lg btn-success">
|
||||
{{ $isEdit ? '更新' : '登録' }}
|
||||
</button>
|
||||
|
||||
{{-- 編集時のみ削除可能 --}}
|
||||
@if($isEdit && isset($station->id))
|
||||
<form id="delete-form" method="POST"
|
||||
action="{{ route('stations_delete') }}"
|
||||
style="display:inline;">
|
||||
@csrf
|
||||
<input type="hidden" name="pk[]" value="{{ $station->id }}">
|
||||
<button type="submit" class="btn btn-lg btn-danger ml-2"
|
||||
onclick="return confirm('削除してよろしいですか?')">削除</button>
|
||||
</form>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@section('scripts')
|
||||
<script>
|
||||
function confirmDelete() {
|
||||
if (confirm('削除してよろしいですか?')) {
|
||||
document.getElementById('delete-form').submit();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
|
||||
@ -6,13 +6,13 @@
|
||||
<div class="container-fluid">
|
||||
<div class="row mb-2">
|
||||
<div class="col-lg-6">
|
||||
<h1 class="m-0 text-dark">[東京都|〇〇駐輪場] 近傍駅マスタ</h1>
|
||||
<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') }}">XX様info(ホーム)</a></li>
|
||||
<li class="breadcrumb-item"><a href="{{ route('stations') }}">[東京都|〇〇駐輪場]</a></li>
|
||||
<li class="breadcrumb-item active">[東京都|〇〇駐輪場] 近傍駅マスタ</li>
|
||||
<li class="breadcrumb-item"><a href="{{ route('home') }}">ホーム</a></li>
|
||||
<li class="breadcrumb-item"><a href="{{ route('stations') }}">近傍駅マスタ</a></li>
|
||||
<li class="breadcrumb-item active">新規登録</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
@ -21,125 +21,16 @@
|
||||
|
||||
<section class="content">
|
||||
<div class="container-fluid">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-8">
|
||||
<form method="POST" action="{{ route('stations_add') }}">
|
||||
@csrf
|
||||
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<th>近傍駅ID</th>
|
||||
<td>
|
||||
<input type="text" name="station_id"
|
||||
class="form-control text-right bg-ro"
|
||||
value="{{ old('station_id', $station->station_id ?? '') }}"
|
||||
maxlength="10"
|
||||
readonly>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>駐車場ID</th>
|
||||
<td>
|
||||
<input type="text" name="park_id"
|
||||
class="form-control text-right bg-ro"
|
||||
value="{{ old('park_id', $station->park_id ?? '') }}"
|
||||
maxlength="10"
|
||||
readonly>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>近傍駅 <span class="text-danger">※</span></th>
|
||||
<td>
|
||||
<input type="text" name="station_neighbor_station"
|
||||
class="form-control text-left"
|
||||
maxlength="10"
|
||||
required
|
||||
value="{{ old('station_neighbor_station', $station->station_neighbor_station ?? '') }}">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>近傍駅ふりがな <span class="text-danger">※</span></th>
|
||||
<td>
|
||||
<input type="text" name="station_name_ruby"
|
||||
class="form-control text-left"
|
||||
maxlength="10"
|
||||
required
|
||||
value="{{ old('station_name_ruby', $station->station_name_ruby ?? '') }}">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>路線名 <span class="text-danger">※</span></th>
|
||||
<td>
|
||||
<input type="text" name="station_route_name"
|
||||
class="form-control text-left"
|
||||
maxlength="10"
|
||||
required
|
||||
value="{{ old('station_route_name', $station->station_route_name ?? '') }}">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>近傍駅座標(緯度) <span class="text-danger">※</span></th>
|
||||
<td>
|
||||
<input type="number" name="latitude"
|
||||
class="form-control text-right"
|
||||
maxlength="10"
|
||||
step="any"
|
||||
required
|
||||
value="{{ old('latitude', $station->latitude ?? '') }}">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>近傍駅座標(経度) <span class="text-danger">※</span></th>
|
||||
<td>
|
||||
<input type="number" name="longitude"
|
||||
class="form-control text-right"
|
||||
maxlength="10"
|
||||
step="any"
|
||||
required
|
||||
value="{{ old('longitude', $station->longitude ?? '') }}">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="text-center mt-4">
|
||||
<button type="submit" class="btn btn-primary">登録</button>
|
||||
|
||||
<button type="button" class="btn btn-danger ml-3" onclick="confirmDelete()">削除</button>
|
||||
|
||||
<form id="delete-form" method="POST"
|
||||
action="{{ route('stations_delete') }}"
|
||||
style="display:none;">
|
||||
@csrf
|
||||
<input type="hidden" name="pk[]" value="{{ old('station_id') ?? 0 }}">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<div class="card">
|
||||
<form method="POST" action="{{ route('stations_add') }}">
|
||||
@csrf
|
||||
@include('admin.stations._form', [
|
||||
'isEdit' => 0,
|
||||
'isInfo' => 0,
|
||||
'station' => $station ?? null
|
||||
])
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script>
|
||||
function confirmDelete() {
|
||||
if (confirm('削除してよろしいですか?')) {
|
||||
document.getElementById('delete-form').submit();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
|
||||
<style>
|
||||
.bg-ro {
|
||||
background-color: #e9ecef;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -2,18 +2,17 @@
|
||||
@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>
|
||||
<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') }}">XX様info(ホーム)</a></li>
|
||||
<li class="breadcrumb-item"><a href="#">[東京都|〇〇駐輪場]</a></li>
|
||||
<li class="breadcrumb-item">近傍駅マスタ</li>
|
||||
<li class="breadcrumb-item"><a href="{{ route('home') }}">ホーム</a></li>
|
||||
<li class="breadcrumb-item"><a href="{{ route('stations') }}">近傍駅マスタ</a></li>
|
||||
<li class="breadcrumb-item active">編集</li>
|
||||
</ol>
|
||||
</div>
|
||||
@ -21,19 +20,19 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Main content -->
|
||||
{{-- フォーム --}}
|
||||
<section class="content">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="card">
|
||||
<form method="post" action="{{ route('stations_edit', ['id' => $station->station_id]) }}" enctype="multipart/form-data">
|
||||
@csrf
|
||||
@include('admin.stations._form', ['isEdit' => 1, 'isInfo' => 0, 'station' => $station])
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<form method="POST" action="{{ route('stations_edit', ['id' => $station->station_id]) }}">
|
||||
@csrf
|
||||
@include('admin.stations._form', [
|
||||
'isEdit' => 1,
|
||||
'isInfo' => 0,
|
||||
'station' => $station
|
||||
])
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
@endsection
|
||||
|
||||
@ -1,16 +0,0 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('content')
|
||||
<h1>近傍駅 インポート</h1>
|
||||
|
||||
<form method="POST" action="{{ route('stations_import') }}" enctype="multipart/form-data">
|
||||
@csrf
|
||||
<div class="form-group">
|
||||
<label for="csv_file">CSVファイルを選択:</label>
|
||||
<input type="file" name="csv_file" class="form-control" required>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">アップロード</button>
|
||||
</form>
|
||||
|
||||
<a href="{{ route('stations') }}" class="btn btn-secondary mt-3">戻る</a>
|
||||
@endsection
|
||||
@ -11,8 +11,8 @@
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<ol class="breadcrumb float-sm-right text-sm">
|
||||
<li class="breadcrumb-item"><a href="{{ route('home') }}">XX様info(ホーム)</a></li>
|
||||
<li class="breadcrumb-item"><a href="javascript:void(0);">[東京都|〇〇駐輪場]</a></li>
|
||||
<li class="breadcrumb-item"><a href="{{ route('home') }}">ホーム</a></li>
|
||||
<!-- <li class="breadcrumb-item"><a href="javascript:void(0);">[東京都|〇〇駐輪場]</a></li> -->
|
||||
<li class="breadcrumb-item active">近傍駅マスタ</li>
|
||||
</ol>
|
||||
</div>
|
||||
@ -67,13 +67,14 @@
|
||||
<div class="table-responsive">
|
||||
<form action="{{ route('stations_delete') }}" method="POST" id="form_delete">
|
||||
@csrf
|
||||
<table class="table table-bordered table-striped dataTable text-nowrap">
|
||||
<table class="table table-bordered dataTable text-nowrap">
|
||||
<thead>
|
||||
<tr>
|
||||
{{-- ★ チェック + 編集 用の1列 --}}
|
||||
<th style="width:120px;" class="text-left">
|
||||
<input type="checkbox" class="minimal m-0" id="checkbox_all">
|
||||
<th style="width:140px;" class="text-left">
|
||||
<input type="checkbox" onclick="$('input[name*=\'pk\']').prop('checked', this.checked);">
|
||||
</th>
|
||||
{{-- ソート --}}
|
||||
<th class="sorting {{ ($sort=='station_id') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}" sort="station_id"><span>近傍駅ID</span></th>
|
||||
<th class="sorting {{ ($sort=='park_id') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}" sort="park_id"><span>駐車場ID</span></th>
|
||||
<th class="sorting {{ ($sort=='station_neighbor_station') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}" sort="station_neighbor_station"><span>近傍駅</span></th>
|
||||
@ -83,18 +84,17 @@
|
||||
<th><span>近傍駅座標(経度)</span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tbody class="bg-white">
|
||||
@foreach($stations as $station)
|
||||
<tr>
|
||||
{{-- ★ 同じセル内に チェック + 編集ボタン) --}}
|
||||
<td class="table-warning align-middle">
|
||||
<td class="align-middle" style="background-color:#faebd7;">
|
||||
<div class="d-flex align-items-center">
|
||||
<input type="checkbox" class="minimal m-0 checkbox" name="pk[]" value="{{ $station->station_id }}">
|
||||
<a href="{{ route('stations_edit', ['id' => $station->station_id]) }}"
|
||||
class="btn btn-sm btn-default ml-2">{{ __('編集') }}</a>
|
||||
<input type="checkbox" class="m-0 checkbox" name="pk[]" value="{{ $station->station_id }}">
|
||||
<a href="{{ route('stations_edit', ['id' => $station->station_id]) }}" class="btn btn-sm btn-default ml10">編集</a>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
|
||||
<td class="sm-item text-left align-middle">{{ $station->station_id }}</td>
|
||||
<td class="sm-item text-left align-middle">{{ $station->park_id }}</td>
|
||||
<td class="sm-item text-left align-middle">{{ $station->station_neighbor_station }}</td>
|
||||
|
||||
@ -4,109 +4,109 @@
|
||||
<div class="alert alert-danger alert-dismissible">{{ Session::get('error') }}</div>
|
||||
@endif
|
||||
|
||||
<div class="card p-4">
|
||||
|
||||
{{-- 登録・削除 ボタン --}}
|
||||
<div class="text-left mt-4">
|
||||
@if($isInfo)
|
||||
<a href="{{ route('terms_edit', ['id' => $term->terms_id]) }}" class="btn btn-lg btn-success">編集</a>
|
||||
@else
|
||||
<button type="submit" class="btn btn-lg btn-success">登録</button>
|
||||
@if($isEdit)
|
||||
<a href="{{ route('terms_delete', ['id' => $term->terms_id]) }}"
|
||||
class="btn btn-lg btn-danger ml-2"
|
||||
onclick="return confirm('削除してよろしいですか?')">削除</a>
|
||||
@endif
|
||||
<section class="content">
|
||||
<div class="container-fluid">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
{{-- 利用契約ID --}}
|
||||
@if($isEdit || $isInfo)
|
||||
<div class="row mb-3">
|
||||
<label class="col-md-2 col-form-label">利用契約ID</label>
|
||||
<div class="col-md-10">
|
||||
<input type="text" class="form-control" value="{{ $term->terms_id ?? '' }}" readonly>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="border-top my-3"></div>
|
||||
{{-- 利用契約ID --}}
|
||||
@if($isEdit || $isInfo)
|
||||
<div class="row mb-3">
|
||||
<label class="col-md-2 col-form-label">利用契約ID</label>
|
||||
<div class="col-md-10">
|
||||
<input type="text" class="form-control" value="{{ $term->terms_id ?? '' }}" readonly>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
{{-- 市区ID --}}
|
||||
<div class="row mb-3">
|
||||
<label class="col-md-2 col-form-label">市区ID<span class="text-danger">*</span></label>
|
||||
<div class="col-md-10">
|
||||
<select name="city_id" class="form-control" @if($isInfo) disabled @endif>
|
||||
<option value="">都市を選択</option>
|
||||
@foreach($cities as $id => $city_name)
|
||||
<option value="{{ $id }}" @if(old('city_id', $term->city_id ?? '') == $id) selected @endif>{{ $city_name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- 市区ID --}}
|
||||
<div class="row mb-3">
|
||||
<label class="col-md-2 col-form-label">市区ID<span class="text-danger">*</span></label>
|
||||
<div class="col-md-10">
|
||||
<select name="city_id" class="form-control" @if($isInfo) disabled @endif>
|
||||
<option value="">都市を選択</option>
|
||||
@foreach($cities as $id => $city_name)
|
||||
<option value="{{ $id }}" @if(old('city_id', $term->city_id ?? '') == $id) selected @endif>{{ $city_name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
{{-- 使用中 --}}
|
||||
<div class="row mb-3">
|
||||
<label class="col-md-2 col-form-label">使用中</label>
|
||||
<div class="col-md-10 pt-2">
|
||||
<div class="form-check form-check-inline">
|
||||
<input class="form-check-input" type="radio" name="use_flag" value="1" @if(($term->use_flag ?? '') == 1) checked @endif @if($isInfo) disabled @endif>
|
||||
<label class="form-check-label">使用中</label>
|
||||
</div>
|
||||
<div class="form-check form-check-inline">
|
||||
<input class="form-check-input" type="radio" name="use_flag" value="0" @if(($term->use_flag ?? '') == 0) checked @endif @if($isInfo) disabled @endif>
|
||||
<label class="form-check-label">過去のバージョン</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- 使用中 --}}
|
||||
<div class="row mb-3">
|
||||
<label class="col-md-2 col-form-label">使用中</label>
|
||||
<div class="col-md-10 pt-2">
|
||||
<div class="form-check form-check-inline">
|
||||
<input class="form-check-input" type="radio" name="use_flag" value="1" @if(($term->use_flag ?? '') == 1) checked @endif @if($isInfo) disabled @endif>
|
||||
<label class="form-check-label">使用中</label>
|
||||
</div>
|
||||
<div class="form-check form-check-inline">
|
||||
<input class="form-check-input" type="radio" name="use_flag" value="0" @if(($term->use_flag ?? '') == 0) checked @endif @if($isInfo) disabled @endif>
|
||||
<label class="form-check-label">過去のバージョン</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{-- リビジョン --}}
|
||||
<div class="row mb-3">
|
||||
<label class="col-md-2 col-form-label">リビジョン<span class="text-danger">*</span></label>
|
||||
<div class="col-md-10">
|
||||
<input type="text" name="terms_revision" class="form-control"
|
||||
value="{{ old('terms_revision', $term->terms_revision ?? '') }}"
|
||||
@if($isInfo) readonly @endif>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- リビジョン --}}
|
||||
<div class="row mb-3">
|
||||
<label class="col-md-2 col-form-label">リビジョン<span class="text-danger">*</span></label>
|
||||
<div class="col-md-10">
|
||||
<input type="text" name="terms_revision" class="form-control"
|
||||
value="{{ old('terms_revision', $term->terms_revision ?? '') }}"
|
||||
@if($isInfo) readonly @endif>
|
||||
</div>
|
||||
</div>
|
||||
{{-- 契約内容 --}}
|
||||
<div class="row mb-3">
|
||||
<label class="col-md-2 col-form-label">契約内容<span class="text-danger">*</span></label>
|
||||
<div class="col-md-10">
|
||||
<textarea name="terms_text" rows="5" class="form-control" @if($isInfo) readonly @endif>{{ old('terms_text', $term->terms_text ?? '') }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- 契約内容 --}}
|
||||
<div class="row mb-3">
|
||||
<label class="col-md-2 col-form-label">契約内容<span class="text-danger">*</span></label>
|
||||
<div class="col-md-10">
|
||||
<textarea name="terms_text" rows="5" class="form-control" @if($isInfo) readonly @endif>{{ old('terms_text', $term->terms_text ?? '') }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
{{-- 備考 --}}
|
||||
<div class="row mb-3">
|
||||
<label class="col-md-2 col-form-label">備考</label>
|
||||
<div class="col-md-10">
|
||||
<input type="text" name="memo" class="form-control"
|
||||
value="{{ old('memo', $term->memo ?? '') }}" @if($isInfo) readonly @endif>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- 備考 --}}
|
||||
<div class="row mb-3">
|
||||
<label class="col-md-2 col-form-label">備考</label>
|
||||
<div class="col-md-10">
|
||||
<input type="text" name="memo" class="form-control"
|
||||
value="{{ old('memo', $term->memo ?? '') }}" @if($isInfo) readonly @endif>
|
||||
</div>
|
||||
</div>
|
||||
{{-- 使用開始日 --}}
|
||||
<div class="row mb-3">
|
||||
<label class="col-md-2 col-form-label">使用開始日</label>
|
||||
<div class="col-md-10">
|
||||
<input type="date" name="start_date" class="form-control"
|
||||
value="{{ old('start_date', $term->start_date ?? '') }}" @if($isInfo) readonly @endif>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- 使用開始日 --}}
|
||||
<div class="row mb-3">
|
||||
<label class="col-md-2 col-form-label">使用開始日</label>
|
||||
<div class="col-md-10">
|
||||
<input type="date" name="start_date" class="form-control"
|
||||
value="{{ old('start_date', $term->start_date ?? '') }}" @if($isInfo) readonly @endif>
|
||||
</div>
|
||||
</div>
|
||||
{{-- 登録・削除 ボタン --}}
|
||||
<div class="text-left mt-4">
|
||||
@if($isInfo)
|
||||
{{-- 詳細画面:編集に遷移 --}}
|
||||
<a href="{{ route('terms_edit', ['id' => $term->terms_id]) }}" class="btn btn-lg btn-success">
|
||||
編集
|
||||
</a>
|
||||
@else
|
||||
{{-- 新規/編集 共通フォーム --}}
|
||||
<button type="submit" class="btn btn-lg btn-success">
|
||||
{{ $isEdit ? '更新' : '登録' }}
|
||||
</button>
|
||||
|
||||
{{-- 登録・削除 ボタン --}}
|
||||
<div class="text-left mt-4">
|
||||
@if($isInfo)
|
||||
<a href="{{ route('terms_edit', ['id' => $term->terms_id]) }}" class="btn btn-lg btn-success">編集</a>
|
||||
@else
|
||||
<button type="submit" class="btn btn-lg btn-success">登録</button>
|
||||
@if($isEdit)
|
||||
<a href="{{ route('terms_delete', ['id' => $term->terms_id]) }}"
|
||||
class="btn btn-lg btn-danger ml-2"
|
||||
onclick="return confirm('削除してよろしいですか?')">削除</a>
|
||||
{{-- 編集時のみ削除可能 --}}
|
||||
@if($isEdit && isset($term->terms_id))
|
||||
<form id="delete-form" method="POST" action="{{ route('terms_delete', ['id' => $term->terms_id]) }}" style="display:inline;">
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
<button type="submit" class="btn btn-lg btn-danger ml-2"
|
||||
onclick="return confirm('削除してよろしいですか?')">削除</button>
|
||||
</form>
|
||||
@endif
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
<ol class="breadcrumb float-sm-right text-sm">
|
||||
<li class="breadcrumb-item"><a href="{{ route('home') }}">ホーム</a></li>
|
||||
<li class="breadcrumb-item"><a href="{{ route('terms') }}">利用契約マスタ</a></li>
|
||||
<li class="breadcrumb-item active">新規</li>
|
||||
<li class="breadcrumb-item active">新規登録</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
<div class="container-fluid">
|
||||
<div class="row mb-2">
|
||||
<div class="col-sm-6">
|
||||
<h1 class="m-0 text-dark">利用契約 編集</h1>
|
||||
<h1 class="m-0 text-dark">編集</h1>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<ol class="breadcrumb float-sm-right text-sm">
|
||||
|
||||
@ -11,8 +11,8 @@
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<ol class="breadcrumb float-sm-right text-sm">
|
||||
<li class="breadcrumb-item"><a href="{{ route('home') }}">XX様info(ホーム)</a></li>
|
||||
<li class="breadcrumb-item"><a href="javascript:void(0);">[東京都|〇〇駐輪場]</a></li>
|
||||
<li class="breadcrumb-item"><a href="{{ route('home') }}">ホーム</a></li>
|
||||
<!-- <li class="breadcrumb-item"><a href="javascript:void(0);">[東京都|〇〇駐輪場]</a></li> -->
|
||||
<li class="breadcrumb-item active">利用契約マスタ</li>
|
||||
</ol>
|
||||
</div>
|
||||
@ -31,13 +31,12 @@
|
||||
</form>
|
||||
|
||||
<!-- 操作ボタン&ページネーション -->
|
||||
<div class="container-fluid mb20 d-flex justify-content-between align-items-center">
|
||||
<div class="container-fluid mb20 d-flex justify-content-between">
|
||||
<div>
|
||||
<button type="button" class="btn btn-sm btn-default mr10" onclick="location.href='{{ route('terms_add') }}'">新規</button>
|
||||
<button type="button" class="btn btn-sm btn-default mr10" id="delete">削除</button>
|
||||
<button type="submit" class="btn btn-sm btn-default mr10" form="form_export">CSV出力</button>
|
||||
</div>
|
||||
<div>
|
||||
<div style="margin-top:20px;">
|
||||
{{ $terms->appends(['sort' => $sort ?? '', 'sort_type' => $sort_type ?? ''])->links('pagination') }}
|
||||
</div>
|
||||
</div>
|
||||
@ -62,12 +61,12 @@
|
||||
<div class="table-responsive">
|
||||
<form action="{{ route('terms_delete') }}" method="POST" id="form_delete">
|
||||
@csrf
|
||||
<table class="table table-bordered table-striped dataTable text-nowrap">
|
||||
<table class="table table-bordered dataTable text-nowrap">
|
||||
<thead>
|
||||
<tr>
|
||||
{{-- ★ チェック + 編集 用の1列 --}}
|
||||
<th style="width:120px;" class="text-left">
|
||||
<input type="checkbox" class="minimal m-0" id="checkbox_all">
|
||||
<th style="width:140px;" class="text-left">
|
||||
<input type="checkbox" onclick="$('input[name*=\'pk\']').prop('checked', this.checked);">
|
||||
</th>
|
||||
<th class="sorting {{ ($sort=='terms_id') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}" sort="terms_id">
|
||||
<span>利用契約ID</span>
|
||||
@ -84,15 +83,14 @@
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tbody class="bg-white">
|
||||
@foreach($terms as $term)
|
||||
<tr>
|
||||
{{-- ★ チェックボックス + 編集ボタン --}}
|
||||
<td class="table-warning align-middle">
|
||||
<td class="align-middle" style="background-color:#faebd7;">
|
||||
<div class="d-flex align-items-center">
|
||||
<input type="checkbox" class="minimal m-0 checkbox" name="pk[]" value="{{ $term->terms_id }}">
|
||||
<a href="{{ route('terms_edit', ['id' => $term->terms_id]) }}"
|
||||
class="btn btn-sm btn-default ml-2">{{ __('編集') }}</a>
|
||||
<input type="checkbox" class="m-0 checkbox" name="pk[]" value="{{ $term->terms_id }}">
|
||||
<a href="{{ route('terms_edit', ['id' => $term->terms_id]) }}" class="btn btn-sm btn-default ml10">編集</a>
|
||||
</div>
|
||||
</td>
|
||||
<td class="sm-item text-left align-middle">{{ $term->terms_id }}</td>
|
||||
|
||||
@ -7,11 +7,11 @@
|
||||
<div class="container-fluid">
|
||||
<div class="row mb-2">
|
||||
<div class="col-lg-6">
|
||||
<h1 class="m-0 text-dark">新規</h1>
|
||||
<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') }}">XX様info(ホーム)</a></li>
|
||||
<li class="breadcrumb-item"><a href="{{ route('home') }}">ホーム</a></li>
|
||||
<li class="breadcrumb-item"><a href="{{ route('zones') }}">ゾーンマスタ</a></li>
|
||||
<li class="breadcrumb-item active">新規登録</li>
|
||||
</ol>
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<ol class="breadcrumb float-sm-right text-sm">
|
||||
<li class="breadcrumb-item"><a href="{{ route('home') }}">XX様info(ホーム)</a></li>
|
||||
<li class="breadcrumb-item"><a href="{{ route('home') }}">ホーム</a></li>
|
||||
<li class="breadcrumb-item"><a href="{{ route('zones') }}">ゾーンマスタ</a></li>
|
||||
<li class="breadcrumb-item active">編集</li>
|
||||
</ol>
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<ol class="breadcrumb float-sm-right text-sm">
|
||||
<li class="breadcrumb-item"><a href="{{ route('home') }}">XX様info(ホーム)</a></li>
|
||||
<li class="breadcrumb-item"><a href="{{ route('home') }}">ホーム</a></li>
|
||||
<li class="breadcrumb-item"><a href="{{ route('zones') }}">ゾーンマスタ</a></li>
|
||||
<li class="breadcrumb-item active">詳細</li>
|
||||
</ol>
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<ol class="breadcrumb float-sm-right text-sm">
|
||||
<li class="breadcrumb-item"><a href="{{ route('home') }}">XX様info(ホーム)</a></li>
|
||||
<li class="breadcrumb-item"><a href="{{ route('home') }}">ホーム</a></li>
|
||||
<li class="breadcrumb-item active">ゾーンマスタ</li>
|
||||
</ol>
|
||||
</div>
|
||||
@ -35,27 +35,46 @@
|
||||
<table class="table table-borderless mb-0" style="width: 100%;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th style="text-align: left;">駐輪場ID</th>
|
||||
<th style="form-group col-2">駐輪場ID</th>
|
||||
<td>
|
||||
<input type="text" name="park_id" value="{{ old('park_id', $park_id ?? '') }}"
|
||||
class="form-control input-sm" placeholder="123456">
|
||||
<select name="park_id" class="form-control form-control-sm" style="width: 300px;">
|
||||
<option value="">全て</option>
|
||||
@foreach($parkList as $id => $label)
|
||||
<option value="{{ $id }}" {{ old('park_id', $park_id ?? '') == $id ? 'selected' : '' }}>
|
||||
{{ $label }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</td>
|
||||
<th style="text-align: left;">駐輪分類ID</th>
|
||||
<th style="form-group col-2">駐輪分類ID</th>
|
||||
<td>
|
||||
<input type="text" name="ptype_id" value="{{ old('ptype_id', $ptype_id ?? '') }}"
|
||||
class="form-control input-sm" placeholder="1">
|
||||
<select name="ptype_id" class="form-control form-control-sm" style="width: 300px;">
|
||||
<option value="">全て</option>
|
||||
@foreach($ptypeList as $id => $label)
|
||||
<option value="{{ $id }}" {{ old('ptype_id', $ptype_id ?? '') == $id ? 'selected' : '' }}>
|
||||
{{ $label }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="text-align: left;">車種区分ID</th>
|
||||
<th style="form-group col-2">車種区分ID</th>
|
||||
<td>
|
||||
<input type="text" name="psection_id" value="{{ old('psection_id', $psection_id ?? '') }}"
|
||||
class="form-control input-sm" placeholder="2">
|
||||
<select name="psection_id" class="form-control form-control-sm" style="width: 300px;">
|
||||
<option value="">全て</option>
|
||||
@foreach($psectionList as $id => $label)
|
||||
<option value="{{ $id }}" {{ old('psection_id', $psection_id ?? '') == $id ? 'selected' : '' }}>
|
||||
{{ $label }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
<div class="form-group col-12 text-left mt-3">
|
||||
<button type="submit" name="action" value="filter" class="btn btn-default">絞り込み</button>
|
||||
<button type="submit" name="action" value="reset" class="btn btn-default">解除</button>
|
||||
@ -82,7 +101,7 @@
|
||||
<div class="table-responsive">
|
||||
<form id="deleteForm" method="POST" action="{{ route('zones_delete') }}">
|
||||
@csrf
|
||||
<table class="table table-bordered table-striped dataTable text-nowrap">
|
||||
<table class="table table-bordered dataTable text-nowrap">
|
||||
<thead>
|
||||
<tr>
|
||||
<!-- 全選択チェックボックス -->
|
||||
@ -139,11 +158,11 @@
|
||||
|
||||
<tbody>
|
||||
@foreach($zones as $item)
|
||||
<tr>
|
||||
<td class="table-warning align-middle">
|
||||
<tr class="bg-white">
|
||||
<td class="align-middle" style="background-color:#faebd7;">
|
||||
<div class="d-flex align-items-center">
|
||||
<input type="checkbox" class="m-0 checkbox" name="pk[]" value="{{ $item->zone_id }}">
|
||||
<a href="{{ route('zones_edit', ['id' => $item->zone_id]) }}" class="btn btn-sm btn-default ml-2">編集</a>
|
||||
<a href="{{ route('zones_edit', ['id' => $item->zone_id]) }}" class="btn btn-sm btn-default ml10">編集</a>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user