画面エラー修正
All checks were successful
Deploy preview (main_ou) / deploy (push) Successful in 13s

This commit is contained in:
你的名字 2025-08-23 20:32:52 +09:00
parent aac6ff3908
commit 40526ea0cf
26 changed files with 2434 additions and 1726 deletions

View File

@ -44,10 +44,12 @@ class ParkController extends Controller
$query->orderBy('p.park_id', 'asc');
}
$parks = $query->paginate(20);
$cities = \DB::table('city')->orderBy('city_id')->get();
$parks = $query->paginate(20);
$cities = \DB::table('city')->orderBy('city_id')->get();
return view('admin.parks.list', compact('parks', 'cities'));
$sort = $request->input('sort', 'p.park_id');
$sort_type = $request->input('sort_type', 'asc');
return view('admin.parks.list', compact('parks', 'cities', 'sort', 'sort_type'));
}
public function add(Request $request)
@ -77,14 +79,14 @@ class ParkController extends Controller
public function edit(Request $request, $pk, $view = '')
{
$park = Park::getByPk($pk);
$park = Park::find($pk);
if (empty($pk) || empty($park)) {
abort('404');
}
$data = $park->getAttributes();
$dataList = $this->getDataDropList();
$data = array_merge($data, $dataList);
if ($request->isMethod('POST')) {
if ($request->isMethod('POST') || $request->isMethod('PUT')) {
// ここをaddと同じバリデーションに変更
$validated = $request->validate([
'city_id' => 'required|integer',
@ -114,7 +116,7 @@ class ParkController extends Controller
{
$arr_pk = $request->get('pk');
if ($arr_pk) {
if (Park::deleteByPk($arr_pk)) {
if (Park::destroy($arr_pk)) {
return redirect()->route('parks')->with('success', __("削除が完了しました。"));
} else {
return redirect()->route('parks')->with('error', __('削除に失敗しました。'));
@ -153,7 +155,23 @@ class ParkController extends Controller
];
$dataExport = Park::search($inputs);
$dataExport = \DB::table('park as p')
->leftJoin('city as c', 'p.city_id', '=', 'c.city_id')
->select([
'p.park_id',
'c.city_name',
'p.park_name',
'p.park_ruby',
'p.park_syllabary',
'p.park_adrs',
'p.park_close_flag',
'p.park_day',
'p.alert_flag',
'p.print_number',
'p.keep_alive',
])
->orderBy('p.park_id', 'asc')
->get();
$columns = array(
__('駐輪場ID '),// 0
__('市区ID'),// 1
@ -177,14 +195,14 @@ class ParkController extends Controller
$file,
array(
$items->park_id,// 0
$items->city_id,// 1
!empty($items->getCity()) ? $items->getCity()->city_name : "",// 2
null, // city_idselectで取得していないので空欄
$items->city_name ?? '',// 2
$items->park_name, // 3
$items->park_ruby, // 4
$items->park_syllabary, // 5
$items->park_adrs, // 6
$items->park_close_flag,// 7
$items->getParkCloseFlagDisplay(),// 8
($items->park_close_flag == 1 ? '閉設' : '開設'),// 8
$items->park_day,// 9
$items->alert_flag,// 10
$items->print_number,// 11

View File

@ -36,40 +36,33 @@ class PriceController extends Controller
public function add(Request $request)
{
$inputs = [
'price_parkplaceid' => $request->input('price_parkplaceid'), // 駐車場所ID
'park_id' => $request->input('park_id'), // 駐輪場ID
'prine_name' => $request->input('prine_name'), // 商品名
'price_month' => $request->input('price_month',''), // 期間
'park_id' => $request->input('park_name'), // 駐輪場
'psection_id' => $request->input('psection_subject'), // 車種区分
'price_ptypeid' => $request->input('ptype_subject'), // 駐輪分類
'user_categoryid' => $request->input('user_category_name'), // 利用者分類
'pplace_id' => $request->input('pplace_id'), // 駐車車室
'user_categoryid' => $request->input('user_categoryid'), // 利用者分類ID
'price' => $request->input('price'), // 駐輪料金(税込)
'psection_id' => $request->input('psection_id'), // 車種区分ID
'price_ptypeid' => $request->input('price_ptypeid'), // 駐輪分類ID
'pplace_id' => $request->input('pplace_id'), // 駐車車室ID
];
$dataList = $this->getDataDropList();
$inputs = array_merge($inputs, $dataList);
if ($request->isMethod('POST')) {
$type = false;
$validation = new PriceRequest();
$rules = $validation->rules();
$validator = Validator::make($request->all(), $rules, $validation->messages());
if (!$validator->fails()) {
\DB::transaction(function () use ($inputs, &$type) {
$new = new Price();
$new->fill($inputs);
if( $new->save()){
$type = true;
}
});
if ($type) {
$request->session()->flash('success', __('新しい成功を創造する。'));
return redirect()->route('prices');
} else {
$request->session()->flash('error', __('新しい作成に失敗しました'));
\DB::transaction(function () use ($inputs, &$type) {
$new = new Price();
$new->fill($inputs);
if( $new->save()){
$type = true;
}
}else {
$inputs['errorMsg'] = $this->__buildErrorMessasges($validator);
});
if ($type) {
$request->session()->flash('success', __('新しい成功を創造する。'));
return redirect()->route('prices');
} else {
$request->session()->flash('error', __('新しい作成に失敗しました'));
}
}
@ -86,29 +79,28 @@ class PriceController extends Controller
$data = array_merge($data, $dataList);
if ($request->isMethod('POST')) {
$type = false;
$validation = new PriceRequest();
$rules = $validation->rules();
$validator = Validator::make($request->all(), $rules, $validation->messages());
$requestAll = $request->all();
$requestAll['price_ptypeid]'] = $request->input('ptype_subject');
$requestAll['user_categoryid'] = $request->input('user_category_name'); // 利用者分類
$requestAll['psection_id'] = $request->input('psection_subject');
$requestAll['park_id'] = $request->input('park_name');
$requestAll = [
'price_parkplaceid' => $request->input('price_parkplaceid'),
'park_id' => $request->input('park_id'),
'prine_name' => $request->input('prine_name'),
'price_month' => $request->input('price_month',''),
'user_categoryid' => $request->input('user_categoryid'),
'price' => $request->input('price'),
'psection_id' => $request->input('psection_id'),
'price_ptypeid' => $request->input('price_ptypeid'),
'pplace_id' => $request->input('pplace_id'),
];
$data = array_merge($data, $requestAll);
if (!$validator->fails()) {
\DB::transaction(function () use ($data, &$type,$price) {
$price->fill($data);
$price->save();
$type = true;
});
if ($type) {
$request->session()->flash('success', __('更新に成功しました'));
return redirect()->route('prices');
} else {
$request->session()->flash('error', __('更新に失敗しました'));
}
}else {
$data['errorMsg'] = $this->__buildErrorMessasges($validator);
\DB::transaction(function () use ($data, &$type,$price) {
$price->fill($data);
$price->save();
$type = true;
});
if ($type) {
$request->session()->flash('success', __('更新に成功しました'));
return redirect()->route('prices');
} else {
$request->session()->flash('error', __('更新に失敗しました'));
}
}
if ($view != '') {

View File

@ -66,7 +66,6 @@ class User extends Model
'user_remarks',
'user_age',
];
protected static function boot()
{
parent::boot();

View File

@ -2,43 +2,132 @@
namespace App\Models;
use App\Utils;
use App\Models\City;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Auth;
/**
* 駐輪場モデル - parkテーブル正式モデル
* 旧UsingStatusParkの責務を置き換え
*/
class Park extends Model
{
const CREATED_AT = 'created_at';
const UPDATED_AT = 'updated_at';
protected $table = 'park';
protected $primaryKey = 'park_id';
public $timestamps = true;
public const CREATED_AT = 'created_at';
public const UPDATED_AT = 'updated_at';
protected $fillable = [
'park_name',
'park_ruby',
'park_syllabary',
'park_adrs',
'park_close_flag',
'park_day',
'alert_flag',
'print_number',
'keep_alive',
'city_id',
'operator_id',
'park_id', // 駐輪場ID
'city_id', // 市区
'park_name', // 駐輪場名
'park_ruby', // 駐輪場ふりがな
'park_syllabary', // 駐輪場五十音
'park_adrs', // 住所
'park_close_flag', // 閉設フラグ
'park_day', // 閉設日
'price_memo', // 価格メモ
'alert_flag', // 残警告チェックフラグ
'print_number', // 印字数
'keep_alive', // 最新キープアライブ
'renew_start_date', // 更新期間開始日
'renew_start_time', // 更新期間開始時
'renew_end_date', // 更新期間終了日
'renew_end_time', // 更新期間終了時
'parking_start_period', // 駐輪開始期間
'reminder_type', // リマインダー種別
'reminder_time', // リマインダー時間
'immediate_use_after_contract', // 契約後即利用許可
'display_gender', // 項目表示設定:性別
'display_birthday', // 項目表示設定:生年月日
'display_security_registration_number', // 項目表示設定:防犯登録番号
'distance_between_two_points', // 二点間距離
'latitude', // 駐車場座標(緯度)
'longitude', // 駐車場座標(経度)
'phone_number', // 電話番号
'contract_type_regular', // 駐輪場契約形態(定期)
'contract_type_temporary', // 駐輪場契約形態(一時利用)
'vehicle_type_limit', // 車種制限
'procedure_method', // 手続方法
'payment_method', // 支払方法
'usage_time_limit_flag', // 利用可能時間制限フラグ
'usage_time_start', // 利用可能時間(開始)
'usage_time_end', // 利用可能時間(終了)
'resident_manager_flag', // 常駐管理人フラグ
'resident_time_start', // 常駐時間(開始)
'resident_time_end', // 常駐時間(終了)
'roof_flag', // 屋根フラグ
'seal_issuing_machine_flag', // シール発行機フラグ
'usage_method', // 駐輪場利用方法
'periodic_update_period', // 定期更新期間
'waiting_reservation', // 空き待ち予約
'special_notes', // 特記事項
'student_id_confirmation_type', // 学生証確認種別
'reduction_guide_display_flag', // 減免案内表示フラグ
'reduction_target_age', // 減免対象年齢
'reduction_guide_display_start_month', // 減免案内表示開始月数
'cross_year' // 年跨ぎ
// 如有 created_at/updated_at 可省略不填
];
/**
* 料金設定との関連付け
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/
public function prices()
public static function search($inputs)
{
return $this->hasMany(PriceA::class, 'park_id', 'park_id');
$list = self::query();
if ($inputs['isMethodPost']) {
// 搜索条件可追加
}
// Sort
if ($inputs['sort']) {
$list->orderBy($inputs['sort'], $inputs['sort_type']);
}
if ($inputs['isExport']){
$list = $list->get();
}else{
$list = $list->paginate(Utils::item_per_page);
}
return $list;
}
public static function getByPk($pk)
{
return self::find($pk);
}
public static function deleteByPk($arr)
{
return self::whereIn('park_id', $arr)->delete();
}
public static function boot()
{
parent::boot();
self::creating(function (Park $model) {
$model->operator_id = Auth::user()->ope_id ?? null;
});
}
/**
* GET 閉設フラグ
*/
public function getParkCloseFlagDisplay() {
if($this->park_close_flag == 1) {
return '閉設';
}
else if($this->park_close_flag == 0) {
return '開設';
}
return '';
}
public function getCity()
{
// city_id => city_id (City モデル要有 city_id PK)
return $this->belongsTo(City::class, 'city_id', 'city_id')->first();
}
public static function getList(){
return self::pluck('park_name','park_id');
}
public static function getIdByName($park_name){
return self::where('park_name',$park_name)->pluck('park_id')->first();
}
}

View File

@ -4,12 +4,24 @@ namespace App\Models;
use Illuminate\Database\Eloquent\Model;
/**
* 車種分類モデル - ptypeテーブル正式モデル
* 旧UsingStatusPtypeの責務を置き換え
*/
class Ptype extends Model
{
/**
* 主キー配列で一括削除
*/
public static function deleteByPk($arr)
{
return self::whereIn('ptype_id', $arr)->delete();
}
/**
* 主キーで1件取得
*/
public static function getByPk($pk)
{
return self::find($pk);
}
protected $table = 'ptype';
protected $primaryKey = 'ptype_id';
public $timestamps = true;
@ -23,9 +35,28 @@ class Ptype extends Model
'operator_id',
];
/**
* 料金設定
*/
public static function search($inputs)
{
$list = self::query();
if (!empty($inputs['isMethodPost'])) {
// 必要に応じて検索条件を追加
}
if (!empty($inputs['sort'])) {
$list->orderBy($inputs['sort'], $inputs['sort_type'] ?? 'asc');
}
if (!empty($inputs['isExport'])) {
return $list->get();
} else {
return $list->paginate(\App\Models\Utils::item_per_page);
}
}
public static function getList()
{
return self::pluck('ptype_subject', 'ptype_id');
}
public function prices()
{
return $this->hasMany(PriceA::class, 'price_ptypeid', 'ptype_id');
@ -33,3 +64,5 @@ class Ptype extends Model
}

View File

@ -1,7 +1,5 @@
<?php
echo 222222222222222222;
use Illuminate\Foundation\Application;
use Illuminate\Http\Request;

View File

@ -1,170 +1,588 @@
@if(Session::has('success'))
<div class="alert alert-success alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
{{ Session::get('success') }}
</div>
@elseif(Session::has('error'))
<div class="alert alert-danger alert-dismissible">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<h4><i class="icon fa fa-ban"></i> {{__('誤差')}}:</h4>
{!! Session::get('error') !!}
</div>
@elseif(isset($errorMsg))
<div class="alert alert-danger alert-dismissible">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<h4><i class="icon fa fa-ban"></i> {{__('誤差')}}:</h4>
{!! $errorMsg !!}
</div>
@endif
<div class="card-header">
@if($isInfo)
<a href="{{route('park_add')}}" class="btn btn-lg btn-success">{{__('登録')}}</a>
<a href="{{route('park_edit',['id'=>$park_id])}}" class="btn btn-lg btn-danger">{{__('編集')}}</a>
@else($isEdit)
<button type="submit" class="btn btn-lg btn-danger register" >{{__('保存')}}</button>
@endIf
</div>
<div class="card-body">
<div class="row">
@if($isInfo || $isEdit)
<!--駐輪場ID -->
<div class="form-group col-3">
<label>{{__('validation.attributes.park_id')}}</label>
{{-- resources/views/admin/parks/_form.blade.php --}}
{{-- 駐輪場マスタ 共通フォームadd/edit 共用) --}}
@php
$p = $park ?? null;
@endphp
<style>
/* 让布局和目标图更接近 */
.form-section .col-form-label{ font-weight:600 }
.req:after{ content:" *"; color:#dc3545; }
.unit-after{ display:flex; align-items:center; gap:.5rem }
.unit-after span{ white-space:nowrap }
</style>
<div class="form-section">
{{-- 駐輪場ID編集のみ --}}
@if(!empty($p?->park_id))
<div class="form-group row">
<label class="col-md-2 col-form-label">駐輪場ID</label>
<div class="col-md-4">
<input type="text" class="form-control" name="park_id"
value="{{ old('park_id',$p->park_id) }}" readonly>
</div>
<div class="form-group col-9">
<div class="input-group">
<input type="text" value="{{$park_id}}" placeholder="{{__('validation.attributes.park_id')}}"
class="form-control form-control-lg" readonly/>
</div>
</div>
@endIf
<!-- 市区 -->
<div class="form-group col-3">
<label @if(!$isInfo) class="required" @endif>{{__('validation.attributes.city_id')}}</label>
</div>
<div class="form-group col-9">
<select class="form-control form-control-lg mb10" name="city_id" @if($isInfo) disabled @endif>
<option value="" >{{__('都市を選択')}}</option>
@foreach($cities as $val)
<option value="{{$val}}" @if($city_id == $val)selected @endif>{{$val}}</option>
</div>
@endif
{{-- 市区 --}}
<div class="form-group row">
<label class="col-md-2 col-form-label req">市区</label>
<div class="col-md-4">
<select class="form-control" name="city_id" required>
<option value="">都市を選択</option>
@foreach($cities as $city)
<option value="{{ $city->city_id }}"
@selected(old('city_id',$p->city_id ?? '') == $city->city_id)>
{{ $city->city_name }}
</option>
@endforeach
</select>
</div>
<!-- 駐輪場名 -->
<div class="form-group col-3">
<label @if(!$isInfo) class="required" @endif>{{__('validation.attributes.park_name')}}</label>
</div>
<div class="form-group col-9">
<div class="input-group">
<input type="text" value="{{$park_name}}" placeholder="{{__('validation.attributes.park_name')}}" name="park_name"
class="form-control form-control-lg" @if($isInfo) readonly @endif/>
</div>
</div>
<!-- /.form group - 駐輪場名 -->
<!-- 駐輪場ふりがな -->
<div class="form-group col-3">
<label>{{__('validation.attributes.park_ruby')}}</label>
</div>
<div class="form-group col-9">
<div class="input-group">
<input type="text" value="{{$park_ruby}}" placeholder="{{__('validation.attributes.park_ruby')}}" name="park_ruby"
class="form-control form-control-lg" @if($isInfo) readonly @endif/>
</div>
</div>
<!-- /.form group - 駐輪場ふりがな -->
<!-- 駐輪場五十音 -->
<div class="form-group col-3">
<label>{{__('validation.attributes.park_syllabary')}}</label>
</div>
<div class="form-group col-9">
<div class="input-group">
<input type="text" value="{{$park_syllabary}}" placeholder="{{__('validation.attributes.park_syllabary')}}" name="park_syllabary"
class="form-control form-control-lg" @if($isInfo) readonly @endif/>
</div>
</div>
<!-- /.form group - 駐輪場五十音 -->
<!-- 住所 -->
<div class="form-group col-3">
<label>{{__('validation.attributes.park_adrs')}}</label>
</div>
<div class="form-group col-9">
<div class="input-group">
<input type="text" value="{{$park_adrs}}" placeholder="{{__('validation.attributes.park_adrs')}}" name="park_adrs"
class="form-control form-control-lg" @if($isInfo) readonly @endif/>
</div>
</div>
<!-- /.form group - 住所 -->
<!-- 閉設フラグ -->
<div class="form-group col-3">
<label>{{__('validation.attributes.park_close_flag')}}</label>
</div>
<div class="form-group col-9">
<div class="input-group">
<input type="text" value="{{$park_close_flag}}" placeholder="{{__('validation.attributes.park_close_flag')}}" name="park_close_flag"
class="form-control form-control-lg" @if($isInfo) readonly @endif/>
</div>
</div>
<!-- /.form group - 閉設フラグ -->
<!-- 閉設日 -->
<div class="form-group col-3">
<label>{{__('validation.attributes.park_day')}}</label>
</div>
<div class="form-group col-9">
<div class="input-group">
<input type="date" value="{{$park_day}}" placeholder="{{__('validation.attributes.park_day')}}" name="park_day"
class="form-control form-control-lg" @if($isInfo) readonly @endif/>
</div>
</div>
<!-- /.form group - 閉設日 -->
<!-- 残警告チェックフラグ -->
<div class="form-group col-3">
<label>{{__('validation.attributes.alert_flag')}}</label>
</div>
<div class="form-group col-9">
<div class="input-group">
<input type="text" value="{{$alert_flag}}" placeholder="{{__('validation.attributes.alert_flag')}}" name="alert_flag"
class="form-control form-control-lg" @if($isInfo) readonly @endif/>
</div>
</div>
<!-- /.form group - 残警告チェックフラグ -->
<!-- 印字数 -->
<div class="form-group col-3">
<label>{{__('validation.attributes.print_number')}}</label>
</div>
<div class="form-group col-9">
<div class="input-group">
<input type="text" value="{{$print_number}}" placeholder="{{__('validation.attributes.print_number')}}" name="print_number"
class="form-control form-control-lg" @if($isInfo) readonly @endif/>
</div>
</div>
<!-- /.form group - 印字数 -->
<!-- 最新キープアライブ -->
<div class="form-group col-3">
<label>{{__('validation.attributes.keep_alive')}}</label>
</div>
<div class="form-group col-9">
<div class="input-group">
<input type="date" value="@if($keep_alive){{date('Y-m-d',strtotime($keep_alive))}}@endif" placeholder="{{__('validation.attributes.keep_alive')}}" name="keep_alive"
class="form-control form-control-lg" @if($isInfo) readonly @endif/>
</div>
</div>
<!-- /.form group - 最新キープアライブ -->
</div>
@if($isInfo)
<a href="{{route('park_add')}}" class="btn btn-lg btn-success">{{__('登録')}}</a>
<a href="{{route('park_edit',['id'=>$park_id])}}" class="btn btn-lg btn-danger">{{__('編集')}}</a>
@else($isEdit)
<button type="submit" class="btn btn-lg btn-danger register" >{{__('保存')}}</button>
@endIf
</div>
{{-- 駐輪場名 --}}
<div class="form-group row">
<label class="col-md-2 col-form-label req">駐輪場名</label>
<div class="col-md-6">
<input type="text" class="form-control" name="park_name"
value="{{ old('park_name',$p->park_name ?? '') }}" required>
</div>
</div>
{{-- 駐輪場ふりがな / 駐輪場五十音 --}}
<div class="form-group row">
<label class="col-md-2 col-form-label">駐輪場ふりがな</label>
<div class="col-md-6">
<input type="text" class="form-control" name="park_ruby"
value="{{ old('park_ruby',$p->park_ruby ?? '') }}">
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">駐輪場五十音</label>
<div class="col-md-3">
<input type="text" class="form-control" name="park_syllabary"
value="{{ old('park_syllabary',$p->park_syllabary ?? '') }}">
</div>
</div>
{{-- 住所 --}}
<div class="form-group row">
<label class="col-md-2 col-form-label">住所</label>
<div class="col-md-8">
<input type="text" class="form-control" name="park_adrs"
value="{{ old('park_adrs',$p->park_adrs ?? '') }}">
</div>
</div>
{{-- 閉設フラグ / 閉設日 --}}
<div class="form-group row">
<label class="col-md-2 col-form-label">閉設フラグ</label>
<div class="col-md-6 d-flex align-items-center">
@foreach([0=>'開設',1=>'閉設',2=>'準備中'] as $v=>$label)
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="park_close_flag" id="close_{{$v}}"
value="{{$v}}" @checked(old('park_close_flag',$p->park_close_flag ?? 0)==$v)>
<label class="form-check-label" for="close_{{$v}}">{{ $label }}</label>
</div>
@endforeach
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">閉設日</label>
<div class="col-md-3">
<input type="date" class="form-control" name="park_day"
value="{{ old('park_day',$p->park_day ?? '') }}">
</div>
</div>
{{-- 価格メモ --}}
<div class="form-group row">
<label class="col-md-2 col-form-label">価格メモ</label>
<div class="col-md-8">
<textarea class="form-control" name="price_memo" rows="2">{{ old('price_memo',$p->price_memo ?? '') }}</textarea>
</div>
</div>
{{-- 逆利用(一般) / 逆利用フラグ(学生) / 駐輪規定フラグ --}}
<div class="form-group row">
<label class="col-md-2 col-form-label">逆利用(一般)</label>
<div class="col-md-6">
@foreach([1=>'逆利用OK',0=>'逆利用NG'] as $v=>$label)
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="reverse_use_general" id="rug{{$v}}"
value="{{$v}}" @checked(old('reverse_use_general',$p->reverse_use_general ?? 1)==$v)>
<label class="form-check-label" for="rug{{$v}}">{{ $label }}</label>
</div>
@endforeach
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">逆利用フラグ(学生)</label>
<div class="col-md-6">
@foreach([1=>'逆利用OK',0=>'逆利用NG'] as $v=>$label)
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="reverse_use_student" id="rus{{$v}}"
value="{{$v}}" @checked(old('reverse_use_student',$p->reverse_use_student ?? 1)==$v)>
<label class="form-check-label" for="rus{{$v}}">{{ $label }}</label>
</div>
@endforeach
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">駐輪規定フラグ</label>
<div class="col-md-6">
@foreach([1=>'使用する',0=>'使用しない'] as $v=>$label)
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="parking_rule_flag" id="prf{{$v}}"
value="{{$v}}" @checked(old('parking_rule_flag',$p->parking_rule_flag ?? 1)==$v)>
<label class="form-check-label" for="prf{{$v}}">{{ $label }}</label>
</div>
@endforeach
</div>
</div>
{{-- 残警告チェックフラグ / 印字数 / 最新キープアライブ --}}
<div class="form-group row">
<label class="col-md-2 col-form-label">残警告チェックフラグ</label>
<div class="col-md-2">
<input type="number" class="form-control" name="alert_flag"
value="{{ old('alert_flag',$p->alert_flag ?? 0) }}">
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">印字数</label>
<div class="col-md-2">
<input type="number" class="form-control" name="print_number"
value="{{ old('print_number',$p->print_number ?? 0) }}">
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">最新キープアライブ</label>
<div class="col-md-3">
<input type="datetime-local" class="form-control" name="keep_alive"
value="{{ old('keep_alive', !empty($p?->keep_alive) ? date('Y-m-d\TH:i',strtotime($p->keep_alive)) : '') }}">
</div>
</div>
{{-- 更新期間開始/終了(日期+時分) --}}
<div class="form-group row">
<label class="col-md-2 col-form-label">更新期間開始日</label>
<div class="col-md-3">
<input type="date" class="form-control" name="update_from_date"
value="{{ old('update_from_date',$p->update_from_date ?? '') }}">
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">更新期間開始時</label>
<div class="col-md-3">
<div class="d-flex">
<select class="form-control mr-2" name="update_from_hh">
@for($i=0;$i<=23;$i++)
<option value="{{$i}}" @selected(old('update_from_hh',$p->update_from_hh ?? '')==$i)>{{ sprintf('%02d',$i) }}</option>
@endfor
</select>
<select class="form-control" name="update_from_mm">
@for($i=0;$i<=59;$i++)
<option value="{{$i}}" @selected(old('update_from_mm',$p->update_from_mm ?? '')==$i)>{{ sprintf('%02d',$i) }}</option>
@endfor
</select>
</div>
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">更新期間終了日</label>
<div class="col-md-3">
<input type="date" class="form-control" name="update_to_date"
value="{{ old('update_to_date',$p->update_to_date ?? '') }}">
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">更新期間終了時</label>
<div class="col-md-3">
<div class="d-flex">
<select class="form-control mr-2" name="update_to_hh">
@for($i=0;$i<=23;$i++)
<option value="{{$i}}" @selected(old('update_to_hh',$p->update_to_hh ?? '')==$i)>{{ sprintf('%02d',$i) }}</option>
@endfor
</select>
<select class="form-control" name="update_to_mm">
@for($i=0;$i<=59;$i++)
<option value="{{$i}}" @selected(old('update_to_mm',$p->update_to_mm ?? '')==$i)>{{ sprintf('%02d',$i) }}</option>
@endfor
</select>
</div>
</div>
</div>
{{-- 駐輪開始期間 --}}
<div class="form-group row">
<label class="col-md-2 col-form-label">駐輪開始期間</label>
<div class="col-md-2 unit-after">
<input type="number" class="form-control" name="park_start_period"
value="{{ old('park_start_period',$p->park_start_period ?? 20) }}">
<span></span>
</div>
</div>
{{-- リマインダー 種別/時間 --}}
<div class="form-group row">
<label class="col-md-2 col-form-label">リマインダー種別</label>
<div class="col-md-6">
@foreach(['daily'=>'毎日','alt'=>'一日おき','two'=>'二日おき'] as $v=>$label)
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="reminder_type" id="rt_{{$v}}"
value="{{$v}}" @checked(old('reminder_type',$p->reminder_type ?? 'daily')==$v)>
<label class="form-check-label" for="rt_{{$v}}">{{ $label }}</label>
</div>
@endforeach
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">リマインダー時間</label>
<div class="col-md-3 d-flex">
<select class="form-control mr-2" name="reminder_hh">
@for($i=0;$i<=23;$i++)
<option value="{{$i}}" @selected(old('reminder_hh',$p->reminder_hh ?? 20)==$i)>{{ sprintf('%02d',$i) }}</option>
@endfor
</select>
<select class="form-control" name="reminder_mm">
@for($i=0;$i<=59;$i++)
<option value="{{$i}}" @selected(old('reminder_mm',$p->reminder_mm ?? 20)==$i)>{{ sprintf('%02d',$i) }}</option>
@endfor
</select>
</div>
</div>
{{-- 契約後即利用許可 / 項目表示設定 --}}
<div class="form-group row">
<label class="col-md-2 col-form-label">契約後即利用許可</label>
<div class="col-md-6">
@foreach([1=>'許可する',0=>'許可しない'] as $v=>$label)
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="allow_use_after_contract" id="auc{{$v}}"
value="{{$v}}" @checked(old('allow_use_after_contract',$p->allow_use_after_contract ?? 1)==$v)>
<label class="form-check-label" for="auc{{$v}}">{{ $label }}</label>
</div>
@endforeach
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">項目表示設定:性別</label>
<div class="col-md-6">
@foreach([0=>'表示しない',1=>'表示する'] as $v=>$label)
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="disp_gender" id="dg{{$v}}"
value="{{$v}}" @checked(old('disp_gender',$p->disp_gender ?? 0)==$v)>
<label class="form-check-label" for="dg{{$v}}">{{ $label }}</label>
</div>
@endforeach
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">項目表示設定:生年月日</label>
<div class="col-md-6">
@foreach([0=>'表示しない',1=>'表示する'] as $v=>$label)
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="disp_birth" id="db{{$v}}"
value="{{$v}}" @checked(old('disp_birth',$p->disp_birth ?? 0)==$v)>
<label class="form-check-label" for="db{{$v}}">{{ $label }}</label>
</div>
@endforeach
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">項目表示設定:防犯登録番号</label>
<div class="col-md-6">
@foreach([0=>'表示しない',1=>'表示する'] as $v=>$label)
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="disp_crime" id="dc{{$v}}"
value="{{$v}}" @checked(old('disp_crime',$p->disp_crime ?? 0)==$v)>
<label class="form-check-label" for="dc{{$v}}">{{ $label }}</label>
</div>
@endforeach
</div>
</div>
{{-- 二点間距離 / 座標 / 電話番号 --}}
<div class="form-group row">
<label class="col-md-2 col-form-label">二点間距離</label>
<div class="col-md-2 unit-after">
<input type="number" class="form-control" name="distance_2points"
value="{{ old('distance_2points',$p->distance_2points ?? 800) }}">
<span>m</span>
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">駐車場座標(緯度)</label>
<div class="col-md-3">
<input type="text" class="form-control" name="lat" value="{{ old('lat',$p->lat ?? '') }}">
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">駐車場座標(経度)</label>
<div class="col-md-3">
<input type="text" class="form-control" name="lng" value="{{ old('lng',$p->lng ?? '') }}">
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">電話番号</label>
<div class="col-md-3">
<input type="text" class="form-control" name="phone" value="{{ old('phone',$p->phone ?? '') }}">
</div>
</div>
{{-- 契約形態(定期/一時) --}}
<div class="form-group row">
<label class="col-md-2 col-form-label">駐輪場契約形態(定期)</label>
<div class="col-md-6">
@foreach([1=>'定期利用可',0=>'定期利用不可'] as $v=>$label)
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="contract_regular" id="cr{{$v}}"
value="{{$v}}" @checked(old('contract_regular',$p->contract_regular ?? 1)==$v)>
<label class="form-check-label" for="cr{{$v}}">{{ $label }}</label>
</div>
@endforeach
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">駐輪場契約形態(一時利用)</label>
<div class="col-md-6">
@foreach([1=>'一時利用可',0=>'一時利用不可'] as $v=>$label)
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="contract_onetime" id="co{{$v}}"
value="{{$v}}" @checked(old('contract_onetime',$p->contract_onetime ?? 1)==$v)>
<label class="form-check-label" for="co{{$v}}">{{ $label }}</label>
</div>
@endforeach
</div>
</div>
{{-- 申告制利用 / 手続方法 / 支払方法 --}}
<div class="form-group row">
<label class="col-md-2 col-form-label">申告制利用</label>
<div class="col-md-8">
<input type="text" class="form-control" name="declaration_use"
value="{{ old('declaration_use',$p->declaration_use ?? '') }}">
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">手続方法</label>
<div class="col-md-8">
<input type="text" class="form-control" name="procedure"
value="{{ old('procedure',$p->procedure ?? '') }}">
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">支払方法</label>
<div class="col-md-8">
<input type="text" class="form-control" name="payment"
value="{{ old('payment',$p->payment ?? '') }}">
</div>
</div>
{{-- 利用可能時間制限 / 開始 / 終了 --}}
<div class="form-group row">
<label class="col-md-2 col-form-label">利用可能時間制限フラグ</label>
<div class="col-md-6">
@foreach(['limit'=>'制限あり','free'=>'制限なし24時間'] as $v=>$label)
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="use_time_limit_flag" id="utl_{{$v}}"
value="{{$v}}" @checked(old('use_time_limit_flag',$p->use_time_limit_flag ?? 'limit')==$v)>
<label class="form-check-label" for="utl_{{$v}}">{{ $label }}</label>
</div>
@endforeach
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">利用可能時間(開始)</label>
<div class="col-md-3 d-flex">
<select class="form-control mr-2" name="use_from_hh">
@for($i=0;$i<=23;$i++) <option value="{{$i}}" @selected(old('use_from_hh',$p->use_from_hh ?? '')==$i)>{{ sprintf('%02d',$i) }}</option> @endfor
</select>
<select class="form-control" name="use_from_mm">
@for($i=0;$i<=59;$i++) <option value="{{$i}}" @selected(old('use_from_mm',$p->use_from_mm ?? '')==$i)>{{ sprintf('%02d',$i) }}</option> @endfor
</select>
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">利用可能時間(終了)</label>
<div class="col-md-3 d-flex">
<select class="form-control mr-2" name="use_to_hh">
@for($i=0;$i<=23;$i++) <option value="{{$i}}" @selected(old('use_to_hh',$p->use_to_hh ?? '')==$i)>{{ sprintf('%02d',$i) }}</option> @endfor
</select>
<select class="form-control" name="use_to_mm">
@for($i=0;$i<=59;$i++) <option value="{{$i}}" @selected(old('use_to_mm',$p->use_to_mm ?? '')==$i)>{{ sprintf('%02d',$i) }}</option> @endfor
</select>
</div>
</div>
{{-- 常駐管理人 / 常駐時間 --}}
<div class="form-group row">
<label class="col-md-2 col-form-label">常駐管理人フラグ</label>
<div class="col-md-6">
@foreach([1=>'常駐',0=>'非常駐'] as $v=>$label)
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="resident_manager_flag" id="rm{{$v}}"
value="{{$v}}" @checked(old('resident_manager_flag',$p->resident_manager_flag ?? 1)==$v)>
<label class="form-check-label" for="rm{{$v}}">{{ $label }}</label>
</div>
@endforeach
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">常駐時間(開始)</label>
<div class="col-md-3 d-flex">
<select class="form-control mr-2" name="resident_from_hh">
@for($i=0;$i<=23;$i++) <option value="{{$i}}" @selected(old('resident_from_hh',$p->resident_from_hh ?? '')==$i)>{{ sprintf('%02d',$i) }}</option> @endfor
</select>
<select class="form-control" name="resident_from_mm">
@for($i=0;$i<=59;$i++) <option value="{{$i}}" @selected(old('resident_from_mm',$p->resident_from_mm ?? '')==$i)>{{ sprintf('%02d',$i) }}</option> @endfor
</select>
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">常駐時間(終了)</label>
<div class="col-md-3 d-flex">
<select class="form-control mr-2" name="resident_to_hh">
@for($i=0;$i<=23;$i++) <option value="{{$i}}" @selected(old('resident_to_hh',$p->resident_to_hh ?? '')==$i)>{{ sprintf('%02d',$i) }}</option> @endfor
</select>
<select class="form-control" name="resident_to_mm">
@for($i=0;$i<=59;$i++) <option value="{{$i}}" @selected(old('resident_to_mm',$p->resident_to_mm ?? '')==$i)>{{ sprintf('%02d',$i) }}</option> @endfor
</select>
</div>
</div>
{{-- 屋根 / シール発行機 --}}
<div class="form-group row">
<label class="col-md-2 col-form-label">屋根フラグ</label>
<div class="col-md-6">
@foreach([1=>'屋根あり',0=>'屋根なし'] as $v=>$label)
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="roof_flag" id="rf{{$v}}"
value="{{$v}}" @checked(old('roof_flag',$p->roof_flag ?? 1)==$v)>
<label class="form-check-label" for="rf{{$v}}">{{ $label }}</label>
</div>
@endforeach
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">シール発行機フラグ</label>
<div class="col-md-6">
@foreach([1=>'シール発行機あり',0=>'シール発行機なし'] as $v=>$label)
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="seal_machine_flag" id="sm{{$v}}"
value="{{$v}}" @checked(old('seal_machine_flag',$p->seal_machine_flag ?? 1)==$v)>
<label class="form-check-label" for="sm{{$v}}">{{ $label }}</label>
</div>
@endforeach
</div>
</div>
{{-- 駐輪場利用方法 / 定期更新期間 / 空き待ち予約 / 特記事項 --}}
<div class="form-group row">
<label class="col-md-2 col-form-label">駐輪場利用方法</label>
<div class="col-md-9">
<textarea class="form-control" name="usage_method" rows="2">{{ old('usage_method',$p->usage_method ?? '') }}</textarea>
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">定期更新期間</label>
<div class="col-md-6">
<input type="text" class="form-control" name="periodic_update_period"
value="{{ old('periodic_update_period',$p->periodic_update_period ?? '') }}">
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">空き待ち予約</label>
<div class="col-md-6">
<input type="text" class="form-control" name="waiting_reservation"
value="{{ old('waiting_reservation',$p->waiting_reservation ?? '') }}">
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">特記事項</label>
<div class="col-md-9">
<textarea class="form-control" name="special_note" rows="2">{{ old('special_note',$p->special_note ?? '') }}</textarea>
</div>
</div>
{{-- 学生証確認種別 / 減免案内表示 / 年齢 / 開始月数 / 年跨ぎ --}}
<div class="form-group row">
<label class="col-md-2 col-form-label">学生証確認種別</label>
<div class="col-md-8">
@foreach(['none'=>'確認しない','year'=>'年1回','reissue'=>'再発行時'] as $v=>$label)
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="student_card_check" id="scc_{{$v}}"
value="{{$v}}" @checked(old('student_card_check',$p->student_card_check ?? 'none')==$v)>
<label class="form-check-label" for="scc_{{$v}}">{{ $label }}</label>
</div>
@endforeach
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">減免案内表示フラグ</label>
<div class="col-md-6">
@foreach([0=>'表示しない',1=>'表示する'] as $v=>$label)
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="reduction_notice_flag" id="rnf{{$v}}"
value="{{$v}}" @checked(old('reduction_notice_flag',$p->reduction_notice_flag ?? 0)==$v)>
<label class="form-check-label" for="rnf{{$v}}">{{ $label }}</label>
</div>
@endforeach
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">減免対象年齢</label>
<div class="col-md-2">
<input type="number" class="form-control" name="reduction_age"
value="{{ old('reduction_age',$p->reduction_age ?? 90) }}">
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">減免案内表示開始月数</label>
<div class="col-md-2">
<input type="number" class="form-control" name="reduction_notice_start_months"
value="{{ old('reduction_notice_start_months',$p->reduction_notice_start_months ?? 6) }}">
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">年跨ぎ</label>
<div class="col-md-6">
@foreach([0=>'なし',1=>'有り'] as $v=>$label)
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="cross_year_flag" id="cy{{$v}}"
value="{{$v}}" @checked(old('cross_year_flag',$p->cross_year_flag ?? 0)==$v)>
<label class="form-check-label" for="cy{{$v}}">{{ $label }}</label>
</div>
@endforeach
</div>
</div>
{{-- 画像アップロードSAMPLE表示 --}}
<div class="form-group row">
<label class="col-md-2 col-form-label">駐輪場画像1</label>
<div class="col-md-6">
<input type="file" name="parking_image1" class="form-control-file">
<img src="{{ $p->parking_image1_url ?? '/img/sample.png' }}" class="img-thumbnail mt-2" alt="SAMPLE" style="max-width:180px">
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">駐輪場画像2</label>
<div class="col-md-6">
<input type="file" name="parking_image2" class="form-control-file">
<img src="{{ $p->parking_image2_url ?? '/img/sample.png' }}" class="img-thumbnail mt-2" alt="SAMPLE" style="max-width:180px">
</div>
</div>
{{-- 備考(最下段に配置) --}}
<div class="form-group row">
<label class="col-md-2 col-form-label">備考</label>
<div class="col-md-9">
<textarea class="form-control" name="note" rows="2">{{ old('note',$p->note ?? '') }}</textarea>
</div>
</div>
</div>

View File

@ -1,53 +1,69 @@
@extends('layouts.app')
@section('title', '[東京都|〇〇駐輪場] 駐輪場マスタ')
@section('title', '駐輪場マスタ 新規')
@section('content')
<!-- Content Header (Page 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><!-- /.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>
</ol>
</div><!-- /.col -->
</div><!-- /.row -->
</div><!-- /.container-fluid -->
</div>
<!-- /.content-header -->
<div class="container-fluid page-park py-3">
<!-- Main content -->
<section class="content">
<div class="container-fluid">
<!-- SELECT2 EXAMPLE -->
<div class="row">
<div class="col-lg-12">
<div class="card">
<form method="post" action="{{ route('park_add')}}" enctype="multipart/form-data">
<!-- TOKEN FORM -->
<input type="hidden" name="_token" value="{{ csrf_token() }}" >
<!-- / .TOKEN FORM -->
@include('admin.parks._form',['isEdit'=>0,'isInfo'=>0])
</form>
</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>
{{-- 画面上部のツールバー(新規は登録だけ/目标图一致) --}}
<div class="screen-toolbar mb-2">
<div class="left">
<button type="submit" form="park-add-form" class="btn btn-success btn-sm">登録</button>
</div>
</section>
<!-- /.content -->
<div class="right"><!-- 新規は削除無し --></div>
</div>
{{-- 本体フォーム(白背景のカード) --}}
<form id="park-add-form" method="POST" action="{{ route('parks.store') }}" enctype="multipart/form-data" class="card card-body form-card">
@csrf
@include('admin.parks._form')
<div class="form-footer mt-3 pt-2">
<button type="button" id="register-btn" class="btn btn-success">登録</button>
<a href="{{ route('parks') }}" class="btn btn-outline-secondary">戻る</a>
</div>
</form>
</div>
<script>
document.getElementById('register-btn').addEventListener('click', function(e) {
if(confirm('登録してよろしいですか?')) {
// 重複チェック駐輪場名Ajax
const form = document.getElementById('park-add-form');
const formData = new FormData(form);
fetch('{{ route('parks.check_duplicate') }}', {
method: 'POST',
headers: {
'X-CSRF-TOKEN': '{{ csrf_token() }}'
},
body: formData
})
.then(response => response.json())
.then(data => {
if(data.duplicate) {
alert('登録内容に重複があります。重複駐輪場ID' + data.park_id + ' 駐輪場名:' + data.park_name + '');
} else {
form.submit();
}
})
.catch(() => {
alert('重複チェックに失敗しました。');
});
}
});
</script>
<style>
.page-park{background:#f4f6f9;}
.form-card{border:1px solid #e5e7eb;box-shadow:0 1px 1px rgba(0,0,0,.04)}
.screen-toolbar{display:flex;justify-content:space-between;align-items:center}
.screen-toolbar .btn{border-radius:3px;padding:.35rem .7rem}
.screen-toolbar .btn-light{background:#fff;border:1px solid #dcdfe3;color:#333}
.form-group{margin-bottom:.6rem}
.col-form-label{padding-top:.55rem;font-weight:600}
.req:after{content:" *";color:#dc3545}
input.form-control,select.form-control{height:34px;padding:.25rem .5rem}
textarea.form-control{min-height:72px}
.img-thumbnail{border:1px dashed #d0d7de;background:repeating-linear-gradient(45deg,#fafafa,#fafafa 8px,#f3f4f6 8px,#f3f4f6 16px)}
.form-footer{border-top:1px dashed #e9ecef}
</style>
@endsection

View File

@ -1,53 +1,64 @@
@extends('layouts.app')
@section('title', '[東京都|〇〇駐輪場] 駐輪場マスタ')
@section('title', '駐輪場マスタ 編集')
@section('content')
<!-- Content Header (Page 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><!-- /.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>
</ol>
</div><!-- /.col -->
</div><!-- /.row -->
</div><!-- /.container-fluid -->
</div>
<!-- /.content-header -->
<div class="container-fluid page-park py-3">
<!-- Main content -->
<section class="content">
<div class="container-fluid">
<!-- SELECT2 EXAMPLE -->
<div class="row">
<div class="col-lg-12">
<div class="card">
<form method="post" action="{{ route('park_edit',['id'=>$park_id])}}" enctype="multipart/form-data">
<!-- TOKEN FORM -->
<input type="hidden" name="_token" value="{{ csrf_token() }}" >
<!-- / .TOKEN FORM -->
@include('admin.parks._form',['isEdit'=>1,'isInfo'=>0])
</form>
</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>
{{-- 画面上部のツールバー(左:登録/その他、右:削除) --}}
<div class="screen-toolbar mb-2">
<div class="left">
<button type="submit" form="park-edit-form" class="btn btn-success btn-sm">登録</button>
<a href="javascript:void(0)" class="btn btn-light btn-sm">減免確認編集</a>
<a href="javascript:void(0)" class="btn btn-light btn-sm">駐輪状況編集</a>
</div>
</section>
<!-- /.content -->
<div class="right">
<form method="POST" action="{{ route('parks.delete', $park->park_id) }}" onsubmit="return confirm('削除しますか?')">
@csrf
<button class="btn btn-danger btn-sm">削除</button>
</form>
</div>
</div>
{{-- 本体フォーム(白背景のカード) --}}
<form id="park-edit-form" method="POST" action="{{ route('parks.update', $park->park_id) }}" enctype="multipart/form-data" class="card card-body form-card">
@csrf
@method('PUT')
@include('admin.parks._form')
<div class="form-footer mt-3 pt-2">
<button class="btn btn-success">登録</button>
<a href="{{ route('parks') }}" class="btn btn-outline-secondary">戻る</a>
</div>
</form>
</div>
<style>
.page-park{background:#f4f6f9;}
.form-card{
border:1px solid #e5e7eb;
box-shadow:0 1px 1px rgba(0,0,0,.04);
}
.screen-toolbar{display:flex;justify-content:space-between;align-items:center;}
.screen-toolbar .btn{border-radius:3px;padding:.35rem .7rem}
.screen-toolbar .btn-light{background:#fff;border:1px solid #dcdfe3;color:#333}
.form-group{margin-bottom:.6rem}
.col-form-label{padding-top:.55rem;font-weight:600}
.req:after{content:" *";color:#dc3545}
input.form-control,select.form-control{height:34px;padding:.25rem .5rem}
textarea.form-control{min-height:72px}
.img-thumbnail{
border:1px dashed #d0d7de;
background:repeating-linear-gradient(45deg,#fafafa,#fafafa 8px,#f3f4f6 8px,#f3f4f6 16px);
}
.form-footer{border-top:1px dashed #e9ecef}
</style>
@endsection

View File

@ -1,188 +1,184 @@
@extends('layouts.app')
@section('title', '[東京都|〇〇駐輪場] 駐輪場マスタ')
@section('content')
<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><!-- /.col -->
<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 active">{{__('駐輪場マスタ')}}</li>
</ol>
</div><!-- /.col -->
</div><!-- /.row -->
</div><!-- /.container-fluid -->
</div>
<!-- /.content-header -->
<!-- Main content -->
<section class="content">
<div class="container-fluid">
<!-- SELECT2 EXAMPLE -->
<div class="row">
<form action="{{route('parks')}}" method='post' id='list-form'>
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<input type="hidden" value="{{$sort}}" name="sort" id="sort">
<input type="hidden" value="{{$sort_type}}" name="sort_type" id="sort_type">
</form>
<div class="container-fluid mb20">
<button type="submit" class="btn btn-sm btn-default mr10" name="delete"
id="delete">{{__('削除')}}</button>
<button type="submit" class="btn btn-sm btn-default mr10" name="import_csv" id="import_csv" action="{{route('parks_import')}}">{{__('インポート')}}</button>
<button type="submit" class="btn btn-sm btn-default mr10" name="export_csv" id="export_csv" action="{{route('parks_export')}}">{{__('CSV出力')}}</button>
{{ $list->links('pagination') }}
</div>
<div class="form col-lg-12">
@if(Session::has('success'))
<div class="alert alert-success alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
{{ Session::get('success') }}
</div>
@elseif(Session::has('error'))
<div class="alert alert-danger alert-dismissible">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<h4><i class="icon fa fa-ban"></i> {{__('誤差')}}:</h4>
{!! Session::get('error') !!}
</div>
@elseif(isset($errorMsg))
<div class="alert alert-danger alert-dismissible">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<h4><i class="icon fa fa-ban"></i> {{__('誤差')}}:</h4>
{!! $errorMsg !!}
</div>
@endif
</div>
<div class="col-lg-12 row sample03-wrapper no_padding_right mb20">
<div class="col-xl-2 col-lg-2 col-md-2 col-sm-3 col-xs-3 table_left">
<form action="{{route('parks_delete')}}" method="post" id="form_delete">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<table class="table dataTable">
<thead>
<tr>
<th>
<input type="checkbox" class="minimal m-0" id="checkbox_all">
</th>
</tr>
</thead>
<tbody>
@foreach($list as $item)
<tr role="row">
<td>
<input type="checkbox" class="minimal m-0 checkbox"
value="{{$item->park_id}}" name="pk[]">
<div class="btn_action">
{{--<a href="{{route('park_add')}}" class="btn btn-sm btn-default">詳細</a>--}}
<a href="{{route('park_info',['pk'=>$item->park_id])}}"
class="btn btn-sm btn-default ml10">{{__('編集')}}</a>
</div>
</td>
</tr>
@endforeach
</tbody>
</table>
</form>
</div>
<div class="col-lg-10 col-xl-10 col-md-10 col-sm-9 col-xs-9 table_right no_padding_right">
<div class="scroll">
<table class="table dataTable">
<thead>
<tr>
<!-- 駐輪場ID  -->
<th class="sorting @if($sort=="park_id"){{$sort_type == 'asc'?'sorting_asc':'sorting_desc'}}@endif"
sort="park_id"><span>{{__('validation.attributes.park_id')}}</span>
</th>
<!-- 市区 -->
<th class="sorting @if($sort=="city_id"){{$sort_type == 'asc'?'sorting_asc':'sorting_desc'}}@endif"
sort="city_id"><span>{{__('validation.attributes.city_id')}}</span>
</th>
<!-- 駐輪場名 -->
<th class="sorting @if($sort=="park_name"){{$sort_type == 'asc'?'sorting_asc':'sorting_desc'}}@endif"
sort="park_name"><span>{{__('validation.attributes.park_name')}}</span>
</th>
<!-- 駐輪場ふりがな -->
<th class="sorting @if($sort=="park_ruby"){{$sort_type == 'asc'?'sorting_asc':'sorting_desc'}}@endif"
sort="park_ruby"><span>{{__('validation.attributes.park_ruby')}}</span>
</th>
<!-- 駐輪場五十音 -->
<th class="sorting @if($sort=="park_syllabary"){{$sort_type == 'asc'?'sorting_asc':'sorting_desc'}}@endif"
sort="park_syllabary">
<span>{{__('validation.attributes.park_syllabary')}}</span>
</th>
<!-- 住所 -->
<th><span>{{__('validation.attributes.park_adrs')}}</span>
</th>
<!-- 閉設フラグ -->
<th>
<span>{{__('validation.attributes.park_close_flag')}}</span>
</th>
<!-- 閉設日 -->
<th><span>{{__('validation.attributes.park_day')}}</span>
</th>
<th><span>{{__('validation.attributes.alert_flag')}}</span>
</th>
<!-- 印字数 -->
<th><span>{{__('validation.attributes.print_number')}}</span>
</th>
<!-- 最新キープアライブ -->
<th><span>{{__('validation.attributes.keep_alive')}}</span>
</th>
</tr>
</thead>
<tbody>
@foreach($list as $item)
<tr>
<!-- 駐輪場ID  -->
<td class='sm-item text-left'><span>{{mb_substr($item->park_id, 0, 20)}}</span>
</td>
<!-- 市区 -->
<td class='sm-item text-right'>
<span>{{mb_substr(!empty($item->getCity())? $item->getCity()->city_name:"", 0, 20)}}</span>
</td>
<!-- 駐輪場名 -->
<td class='sm-item text-right'>
<span>{{mb_substr($item->park_name, 0, 20)}}</span></td>
<!-- 駐輪場ふりがな -->
<td class='sm-item text-right'>
<span>{{mb_substr($item->park_ruby, 0, 20)}}</span></td>
<!-- 駐輪場五十音 -->
<td class='sm-item text-left'>
<span>{{mb_substr($item->park_syllabary, 0, 1)}}</span></td>
<!-- 住所 -->
<td class='sm-item text-right'>
<span>{{mb_substr($item->park_adrs, 0, 60)}}</span></td>
<!-- 閉設フラグ -->
<td class='sm-item text-right'><span>{{$item->getParkCloseFlagDisplay()}}</span>
</td>
<!-- 閉設日 -->
<td class='sm-item text-right'>
<span>{{mb_substr($item->park_day, 0, 10)}}</span></td>
<!-- 残警告チェックフラグ -->
<td class='sm-item text-left'>
<span>{{mb_substr($item->alert_flag, 0, 6)}}</span></td>
<!-- 印字数 -->
<td class='sm-item text-left'>
<span>{{mb_substr($item->print_number, 0, 6)}}</span></td>
<!-- 最新キープアライブ -->
<td class='sm-item text-left'>
<span>{{mb_substr($item->keep_alive, 0, 6)}}</span></td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
<!-- /.row -->
</div><!-- /.container-fluid -->
<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>
</section>
<!-- /.content -->
<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="キーワード...">
@endsection
</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

View File

@ -21,149 +21,123 @@
<a href="{{route('price_add')}}" class="btn btn-lg btn-success">{{__('登録')}}</a>
<a href="{{route('price_edit',['id'=>$price_parkplaceid])}}" class="btn btn-lg btn-danger">{{__('編集')}}</a>
@else
<button type="submit" class="btn btn-lg btn-danger register" >{{__('保存')}}</button>
<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.price_parkplaceid')}}</label>
</div>
<div class="form-group col-9">
<div class="input-group">
<input type="text" value="{{$price_parkplaceid}}"
@if(!$isInfo) placeholder="{{__('validation.attributes.price_parkplaceid')}}" @endif
class="form-control form-control-lg" readonly/>
</div>
</div>
@endIf
<!-- 駐車場所ID -->
<div class="form-group col-3">
<label @if(!$isInfo) class="required" @endif>{{__('駐車場所ID')}}</label>
</div>
<div class="form-group col-9">
<div class="input-group">
<input type="text" value="{{$price_parkplaceid}}" name="price_parkplaceid" class="form-control form-control-lg" @if($isInfo || $isEdit) readonly @endif/>
</div>
</div>
<!-- 駐輪場ID -->
<div class="form-group col-3">
<label @if(!$isInfo) class="required" @endif>{{__('駐輪場ID')}}</label>
</div>
<div class="form-group col-9">
<div class="input-group">
<select name="park_id" class="form-control form-control-lg" @if($isInfo) disabled @endif>
<option value="">{{__('駐輪場ID')}}</option>
@foreach($parks as $key => $item)
<option value="{{$key}}" @if($key == $park_id) selected @endif>{{$item}}</option>
@endforeach
</select>
</div>
</div>
<!-- 商品名 -->
<div class="form-group col-3">
<label @if(!$isInfo) class="required" @endif>{{__('validation.attributes.prine_name')}}</label>
<div class="form-group col-3">
<label @if(!$isInfo) class="required" @endif>{{__('商品名')}}</label>
</div>
<div class="form-group col-9">
<div class="input-group">
<input type="text" value="{{$prine_name}}" name="prine_name" class="form-control form-control-lg" @if($isInfo) readonly @endif/>
</div>
<div class="form-group col-9">
<div class="input-group">
<input type="text" value="{{$prine_name}}" @if(!$isInfo) placeholder="{{__('validation.attributes.prine_name')}}" @endif
name="prine_name"
class="form-control form-control-lg" @if($isInfo) readonly @endif/>
</div>
</div>
<!-- 期間 -->
<div class="form-group col-3">
<label @if(!$isInfo) class="required" @endif>{{__('期間')}}</label>
</div>
<div class="form-group col-9">
<div class="input-group">
<select name="price_month" class="form-control form-control-lg" @if($isInfo) disabled @endif>
<option value="">{{__('期間')}}</option>
@foreach(\App\Models\Price::PRICE_MONTH as $key => $item)
<option value="{{$key}}" @if($key == $price_month) selected @endif>{{$item}}</option>
@endforeach
</select>
</div>
<!-- /.form group - 商品名 -->
<!-- 期間 -->
<div class="form-group col-3">
<label @if(!$isInfo) class="required" @endif>{{__('validation.attributes.price_month')}}</label>
</div>
<!-- 利用者分類ID -->
<div class="form-group col-3">
<label @if(!$isInfo) class="required" @endif>{{__('利用者分類ID')}}</label>
</div>
<div class="form-group col-9">
<div class="input-group">
<select name="user_categoryid" class="form-control form-control-lg" @if($isInfo) disabled @endif>
<option value="">{{__('利用者分類ID')}}</option>
@foreach($userTypes as $key => $item)
<option value="{{$key}}" @if($key == $user_categoryid) selected @endif>{{$item}}</option>
@endforeach
</select>
</div>
<div class="form-group col-9">
<div class="input-group">
<select name="price_month" class="form-control form-control-lg" @if($isInfo) disabled @endif>
<option value="">{{__('validation.attributes.price_month')}}</option>
@foreach(\App\Price::PRICE_MONTH as $key => $item)
<option value="{{$key}}"
@if($key == $price_month) selected @endif>{{$item}}</option>
@endforeach
</select>
</div>
</div>
<!-- 駐輪料金(税込) -->
<div class="form-group col-3">
<label @if(!$isInfo) class="required" @endif>{{__('駐輪料金(税込)')}}</label>
</div>
<div class="form-group col-9">
<div class="input-group">
<input type="text" value="{{$price}}" name="price" class="form-control form-control-lg" @if($isInfo) readonly @endif/>
</div>
<!-- /.form group - 期間 -->
<!-- 駐輪場ID -->
<div class="form-group col-3">
<label @if(!$isInfo) class="required" @endif>{{__('validation.attributes.park_name')}}</label>
</div>
<!-- 車種区分ID -->
<div class="form-group col-3">
<label @if(!$isInfo) class="required" @endif>{{__('車種区分ID')}}</label>
</div>
<div class="form-group col-9">
<div class="input-group">
<select name="psection_id" class="form-control form-control-lg" @if($isInfo) disabled @endif>
<option value="">{{__('車種区分ID')}}</option>
@foreach($psections as $key => $item)
<option value="{{$key}}" @if($key == $psection_id) selected @endif>{{$item}}</option>
@endforeach
</select>
</div>
<div class="form-group col-9">
<div class="input-group">
<select name="park_name" class="form-control form-control-lg" @if($isInfo ||$isEdit) disabled @endif>
<option value="">{{__('validation.attributes.park_name')}}</option>
@foreach($parks as $key => $item)
<option value="{{$key}}" @if($key == $park_id) selected @endif>{{$item}}</option>
@endforeach
</select>
</div>
</div>
<!-- 駐輪分類ID -->
<div class="form-group col-3">
<label @if(!$isInfo) class="required" @endif>{{__('駐輪分類ID')}}</label>
</div>
<div class="form-group col-9">
<div class="input-group">
<select name="price_ptypeid" class="form-control form-control-lg" @if($isInfo) disabled @endif>
<option value="">{{__('駐輪分類ID')}}</option>
@foreach($ptypes as $key => $item)
<option value="{{$key}}" @if($key == $price_ptypeid) selected @endif>{{$item}}</option>
@endforeach
</select>
</div>
<!-- /.form group - 駐輪場ID -->
<!-- 車種区分ID -->
<div class="form-group col-3">
<label @if(!$isInfo) class="required" @endif>{{__('validation.attributes.psection_subject')}}</label>
</div>
<!-- 駐車車室ID -->
<div class="form-group col-3">
<label @if(!$isInfo) class="required" @endif>{{__('駐車車室ID')}}</label>
</div>
<div class="form-group col-9">
<div class="input-group">
<input type="text" value="{{$pplace_id}}" name="pplace_id" class="form-control form-control-lg" @if($isInfo) readonly @endif/>
</div>
<div class="form-group col-9">
<div class="input-group">
<select name="psection_subject" class="form-control form-control-lg" @if($isInfo ||$isEdit) disabled @endif>
<option value="">{{__('validation.attributes.psection_subject')}}</option>
@foreach($psections as $key => $item)
<option value="{{$key}}" @if($key == $psection_id) selected @endif>{{$item}}</option>
@endforeach
</select>
</div>
</div>
<!-- /.form group - 車種区分ID -->
<!-- 駐輪分類ID -->
<div class="form-group col-3">
<label @if(!$isInfo) class="required" @endif>{{__('validation.attributes.ptype_subject')}}</label>
</div>
<div class="form-group col-9">
<div class="input-group">
<select name="ptype_subject" class="form-control form-control-lg" @if($isInfo ||$isEdit) disabled @endif>
<option value="">{{__('validation.attributes.ptype_subject')}}</option>
@foreach($ptypes as $key => $item)
<option value="{{$key}}" @if($key == $price_ptypeid) selected @endif>{{$item}}</option>
@endforeach
</select>
</div>
</div>
<!-- /.form group - 駐輪分類ID -->
<!-- 利用者分類ID -->
<div class="form-group col-3">
<label @if(!$isInfo) class="required" @endif>{{__('validation.attributes.user_category_name')}}</label>
</div>
<div class="form-group col-9">
<div class="input-group">
<select name="user_category_name" class="form-control form-control-lg" @if($isInfo ||$isEdit) disabled @endif>
<option value="">{{__('validation.attributes.user_category_name')}}</option>
@foreach($userTypes as $key => $item)
<option value="{{$key}}" @if($key == $user_categoryid) selected @endif>{{$item}}</option>
@endforeach
</select>
</div>
</div>
<!-- /.form group - 利用者分類ID -->
<!-- 駐車車室ID -->
<div class="form-group col-3">
<label @if(!$isInfo) class="required" @endif>{{__('validation.attributes.pplace_id')}}</label>
</div>
<div class="form-group col-9">
<div class="input-group">
<input type="text" value="{{$pplace_id}}" @if(!$isInfo) placeholder="{{__('validation.attributes.price')}}" @endif
name="pplace_id"
class="form-control form-control-lg" @if($isInfo ||$isEdit) readonly @endif/>
</div>
</div>
<!-- 駐輪料金(税込) -->
<div class="form-group col-3">
<label>{{__('validation.attributes.price')}}</label>
</div>
<div class="form-group col-9">
<div class="input-group">
<input type="text" value="{{$price}}" @if(!$isInfo) placeholder="{{__('validation.attributes.price')}}" @endif name="price"
class="form-control form-control-lg" @if($isInfo) readonly @endif/>
</div>
</div>
<!-- /.form group - 駐輪料金(税込) -->
</div>
</div>
@if($isInfo)
<a href="{{route('price_add')}}" class="btn btn-lg btn-success">{{__('登録')}}</a>
<a href="{{route('price_edit',['id'=>$price_parkplaceid])}}" class="btn btn-lg btn-danger">{{__('編集')}}</a>
@else
<button type="submit" class="btn btn-lg btn-danger register" >{{__('保存')}}</button>
<button type="submit" class="btn btn-lg btn-danger register" >{{__('登録')}}</button>
@endIf
</div>

View File

@ -1,6 +1,6 @@
@extends('layouts.app')
@section('title', '[東京都|〇〇駐輪場] 駐輪場所、料金マスタ')
@section('title', '駐輪場所、料金マスタ')
@section('content')
<!-- Content Header (Page header) -->
@ -8,13 +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="{{route('home')}}">{{__('ホーム')}}</a></li>
<li class="breadcrumb-item"><a href="{{route('prices')}}">駐輪場所、料金マスタ</a></li>
<li class="breadcrumb-item active">[東京都|〇〇駐輪場] 駐輪場所、料金マスタ</li>
<li class="breadcrumb-item active">新規編集</li>
</ol>
</div><!-- /.col -->
</div><!-- /.row -->
@ -39,12 +39,6 @@
</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>
</div>
</section>
<!-- /.content -->

View File

@ -3,26 +3,6 @@
@section('title', '[東京都|〇〇駐輪場] 駐輪場所、料金マスタ')
@section('content')
<!-- Content Header (Page 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><!-- /.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>
</ol>
</div><!-- /.col -->
</div><!-- /.row -->
</div><!-- /.container-fluid -->
</div>
<!-- /.content-header -->
<!-- Main content -->
<section class="content">
<div class="container-fluid">
@ -41,11 +21,6 @@
</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>
</div>
</section>
<!-- /.content -->

View File

@ -1,6 +1,6 @@
@extends('layouts.app')
@section('title', '[東京都|〇〇駐輪場] 駐輪場所、料金マスタ')
@section('title', '駐輪場所、料金マスタ')
@section('content')
<!-- Content Header (Page header) -->
@ -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="./index2.html">ホーム</a></li>
<li class="breadcrumb-item"><a href="{{ route('prices') }}">駐輪場所、料金マスタ</a></li>
<li class="breadcrumb-item active">編集</li>
</ol>
</div><!-- /.col -->
</div><!-- /.row -->
@ -40,12 +39,6 @@
</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>
</div>
</section>
<!-- /.content -->

View File

@ -1,166 +1,135 @@
@extends('layouts.app')
@section('title', '[東京都|〇〇駐輪場] 駐輪場所、料金マスタ')
@section('content')
<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><!-- /.col -->
<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 active">{{__('駐輪場所、料金マスタ')}}</li>
</ol>
</div><!-- /.col -->
</div><!-- /.row -->
</div><!-- /.container-fluid -->
</div>
<!-- /.content-header -->
<!-- Main content -->
<section class="content">
<div class="container-fluid">
<!-- SELECT2 EXAMPLE -->
<div class="row">
<form action="{{route('prices')}}" method='post' id='list-form'>
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<input type="hidden" value="{{$sort}}" name="sort" id="sort">
<input type="hidden" value="{{$sort_type}}" name="sort_type" id="sort_type">
</form>
<div class="container-fluid mb20">
<button type="submit" class="btn btn-sm btn-default mr10" name="delete" id="delete">{{__('削除')}}</button>
<button type="submit" class="btn btn-sm btn-default mr10" name="import_csv" id="import_csv" action="{{route('prices_import')}}">{{__('インポート')}}</button>
<button type="submit" class="btn btn-sm btn-default mr10" name="export_csv" id="export_csv" action="{{route('prices_export')}}">{{__('CSV出力')}}</button>
{{ $list->appends(['sort' => $sort,'sort_type'=>$sort_type])->links('pagination') }}
</div>
<div class="form col-lg-12">
@if(Session::has('success'))
<div class="alert alert-success alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
{{ Session::get('success') }}
</div>
@elseif(Session::has('error'))
<div class="alert alert-danger alert-dismissible">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<h4><i class="icon fa fa-ban"></i> {{__('誤差')}}:</h4>
{!! Session::get('error') !!}
</div>
@elseif(isset($errorMsg))
<div class="alert alert-danger alert-dismissible">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<h4><i class="icon fa fa-ban"></i> {{__('誤差')}}:</h4>
{!! $errorMsg !!}
</div>
@endif
</div>
<div class="col-lg-12 row sample03-wrapper no_padding_right mb20">
<div class="col-xl-2 col-lg-2 col-md-2 col-sm-3 col-xs-3 table_left">
<form action="{{route('prices_delete')}}" method="post" id="form_delete">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<table class="table dataTable">
<thead>
<tr>
<th>
<input type="checkbox" class="minimal m-0" id="checkbox_all">
</th>
</tr>
</thead>
<tbody>
@foreach($list as $item)
<tr role="row">
<td>
<input type="checkbox" class="minimal m-0 checkbox"
value="{{$item->price_parkplaceid}}" name="pk[]">
<div class="btn_action">
{{--<a href="{{route('price_add')}}" class="btn btn-sm btn-default">詳細</a>--}}
<a href="{{route('price_info',['pk'=>$item->price_parkplaceid])}}"
class="btn btn-sm btn-default ml10">{{__('編集')}}</a>
</div>
</td>
</tr>
@endforeach
</tbody>
</table>
</form>
</div>
<div class="col-lg-10 col-xl-10 col-md-10 col-sm-9 col-xs-9 table_right no_padding_right">
<div class="scroll">
<table class="table dataTable">
<thead>
<tr>
<!-- 駐車場所ID -->
<th class="sorting @if($sort=="price_parkplaceid"){{$sort_type == 'asc'?'sorting_asc':'sorting_desc'}}@endif"
sort="price_parkplaceid"><span>{{__('validation.attributes.price_parkplaceid')}}</span>
</th>
<!-- 商品名 -->
<th><span>{{__('validation.attributes.prine_name')}}</span></th>
<!-- 期間 -->
<th><span>{{__('validation.attributes.price_month')}}</span></th>
<!-- 駐輪場名 -->
<th class="sorting @if($sort=="park_id"){{$sort_type == 'asc'?'sorting_asc':'sorting_desc'}}@endif"
sort="park_id"><span>{{__('validation.attributes.park_name')}}</span>
</th>
<!-- 車種区分 -->
<th class="sorting @if($sort=="psection_id"){{$sort_type == 'asc'?'sorting_asc':'sorting_desc'}}@endif"
sort="psection_id"><span>{{__('validation.attributes.psection_subject')}}</span>
</th>
<!-- 駐輪分類 -->
<th class="sorting @if($sort=="price_ptypeid"){{$sort_type == 'asc'?'sorting_asc':'sorting_desc'}}@endif"
sort="price_ptypeid"><span>{{__('validation.attributes.ptype_subject')}}</span>
</th>
<!-- 利用者分類 -->
<th><span>{{__('validation.attributes.user_category_name')}}</span></th>
<!-- 駐車車室 -->
<th class="sorting @if($sort=="pplace_id"){{$sort_type == 'asc'?'sorting_asc':'sorting_desc'}}@endif"
sort="pplace_id"><span>{{__('validation.attributes.pplace_id')}}</span>
</th>
<!-- 駐輪料金(税込) -->
<th><span>{{__('validation.attributes.price')}}</span></th>
</tr>
</thead>
<tbody>
@foreach($list as $item)
<tr>
<!-- 駐車場所ID -->
<td class='sm-item text-left'><span>{{mb_substr($item->price_parkplaceid, 0, 10)}}</span></td>
<!-- 商品名 -->
<td class='sm-item text-right'><span>{{mb_substr($item->prine_name, 0, 10)}}</span></td>
<!-- 期間 -->
<td class='sm-item text-right'><span>{{mb_substr(__(\App\Price::PRICE_MONTH[$item->price_month]), 0, 10)}}</span></td>
<!-- 駐輪場名 -->
<td class='sm-item text-right'><span>{{mb_substr(!empty($item->getPark())? $item->getPark()->park_name:'' , 0, 10)}}</span></td>
<!-- 車種区分 -->
<td class='sm-item text-right'><span>{{mb_substr(!empty($item->getPSection())? $item->getPSection()->psection_subject:'' , 0, 10)}}</span></td>
<!-- 駐輪分類 -->
<td class='sm-item text-right'><span>{{mb_substr(!empty($item->getPType())? $item->getPType()->ptype_subject:'' , 0, 10)}}</span></td>
<!-- 利用者分類 -->
<td class='sm-item text-right'><span>{{mb_substr(!empty($item->getUserType())? $item->getUserType()->print_name:'' , 0, 10)}}</span></td>
<!-- 駐車車室 -->
<td class='sm-item text-right'><span>{{mb_substr($item->pplace_id, 0, 10)}}</span></td>
<!-- 駐輪料金(税込) -->
<td class='sm-item text-right'><span>{{mb_substr($item->price, 0, 10)}}</span></td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
{{-- コンテンツヘッダー(パンくず) --}}
<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>
<!-- /.row -->
</div><!-- /.container-fluid -->
</section>
<!-- /.content -->
<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 active">{{__('駐輪場所、料金マスタ')}}</li>
</ol>
</div>
</div>
</div>
</div>
@endsection
{{-- メインコンテンツ --}}
<section class="content">
<div class="container-fluid">
{{-- ボタン列新規削除CSV出力インポートエクスポート --}}
<div class="container-fluid mb20">
<button type="button" class="btn btn-sm btn-primary mr10"
onclick="location.href='{{ route('price_add') }}'">新規</button>
<button type="submit" class="btn btn-sm btn-danger mr10" form="form_delete" name="delete" id="delete"
onclick="return confirm('選択した項目を削除しますか?');">削除</button>
<button type="submit" class="btn btn-sm btn-success mr10" name="export_csv" id="export_csv"
action="{{route('prices_export')}}">CSV出力</button>
<button type="submit" class="btn btn-sm btn-info mr10" name="import_csv" id="import_csv"
action="{{route('prices_import')}}">インポート</button>
<button type="button" class="btn btn-sm btn-info mr10"
onclick="location.href='{{ route('prices_export') }}'">エクスポート</button>
</div>
{{-- ページネーション(上部・右寄せ) --}}
<div style="width:100%; text-align: right;">
{{ $list->appends(['sort' => $sort, 'sort_type' => $sort_type])->links('pagination') }}
</div>
{{-- フラッシュメッセージ --}}
<div class="form col-lg-12">
@if(Session::has('success'))
<div class="alert alert-success alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
{{ Session::get('success') }}
</div>
@elseif(Session::has('error'))
<div class="alert alert-danger alert-dismissible">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<h4><i class="icon fa fa-ban"></i> {{__('誤差')}}:</h4>
{!! Session::get('error') !!}
</div>
@elseif(isset($errorMsg))
<div class="alert alert-danger alert-dismissible">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<h4><i class="icon fa fa-ban"></i> {{__('誤差')}}:</h4>
{!! $errorMsg !!}
</div>
@endif
</div>
{{-- 一覧市区マスタ準拠1枚テーブル先頭が「チェック編集」統合列 --}}
<form action="{{route('prices_delete')}}" method="post" id="form_delete">
@csrf
<div class="table-responsive">
<table class="table table-bordered table-hover" style="min-width:1000px;">
<thead class="thead-light">
<tr>
{{-- 統合列:全選択チェック + 編集(背景 #faebd7 --}}
<th style="width:160px;">
<input type="checkbox" id="checkbox_all" >
<span class="text-muted" style="font-weight:normal;"></span>
</th>
{{-- データ列(見出しはそのまま) --}}
<th><span>駐車場所ID</span></th>
<th><span>駐輪場ID</span></th>
<th><span>商品名</span></th>
<th><span>期間</span></th>
<th><span>利用者分類ID</span></th>
<th><span>駐輪料金(税込)</span></th>
<th><span>車種区分ID</span></th>
<th><span>駐輪分類ID</span></th>
<th><span>駐車車室ID</span></th>
</tr>
</thead>
<tbody>
@foreach($list as $item)
<tr>
{{-- 統合セル:チェック + 編集pk[]/背景 #faebd7間隔は ml-2 --}}
<td style="background:#faebd7;">
<input type="checkbox" name="pk[]"
value="{{$item->price_parkplaceid}}">
<a href="{{route('price_info', ['id' => $item->price_parkplaceid])}}"
class="btn btn-sm btn-outline-primary ml-2">{{__('編集')}}</a>
</td>
{{-- データ本体(既存表示そのまま) --}}
<td class='sm-item text-left'><span>{{ mb_substr($item->price_parkplaceid, 0, 10) }}</span></td>
<td class='sm-item text-right'><span>{{ mb_substr($item->park_id, 0, 10) }}</span></td>
<td class='sm-item text-right'><span>{{ mb_substr($item->prine_name, 0, 10) }}</span></td>
<td class='sm-item text-right'><span>{{ mb_substr($item->price_month, 0, 10) }}</span></td>
<td class='sm-item text-right'><span>{{ mb_substr($item->user_categoryid, 0, 10) }}</span></td>
<td class='sm-item text-right'><span>{{ mb_substr($item->price, 0, 10) }}</span></td>
<td class='sm-item text-right'><span>{{ mb_substr($item->psection_id, 0, 10) }}</span></td>
<td class='sm-item text-right'><span>{{ mb_substr($item->price_ptypeid, 0, 10) }}</span></td>
<td class='sm-item text-right'><span>{{ mb_substr($item->pplace_id, 0, 10) }}</span></td>
</tr>
@endforeach
</tbody>
</table>
</div>
{{-- ページネーション(下部・右寄せ:必要に応じて表示) --}}
<div class="mt-3" style="text-align:right;">
{{ $list->appends(['sort' => $sort, 'sort_type' => $sort_type])->links('pagination') }}
</div>
</form>
</div>
</section>
{{-- 全選択/全解除name="pk[]" を対象) --}}
<script>
document.getElementById('checkbox_all')?.addEventListener('change', function(e){
document.querySelectorAll('input[name="pk[]"]').forEach(function(el){
el.checked = e.target.checked;
});
});
</script>
@endsection

View File

@ -17,59 +17,36 @@
</div>
@endif
<div class="card-header">
@if($isInfo)
<a href="{{route('ptype_add')}}" class="btn btn-lg btn-success">{{__('登録')}}</a>
<a href="{{route('ptype_edit',['id'=>$ptype_id])}}" class="btn btn-lg btn-danger">{{__('編集')}}</a>
@else
<button type="submit" class="btn btn-lg btn-danger register" >{{__('保存')}}</button>
@endIf
<button type="submit" class="btn btn-lg btn-success register">{{__('登録')}}</button>
</div>
<div class="card-body">
<div class="row">
@if($isInfo || $isEdit)
<!--駐輪分類ID -->
<div class="form-group col-3">
<label>{{__('validation.attributes.ptype_id')}}</label>
<div class="form-group row">
<label class="col-sm-2 col-form-label">駐輪分類ID</label>
<div class="col-sm-10">
<input type="text" name="ptype_id" class="form-control" value="{{ old('ptype_id', $item->ptype_id ?? '') }}" @if(isset($item->ptype_id)) readonly @endif>
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">駐輪分類名<span class="text-danger">*</span></label>
<div class="col-sm-10">
<input type="text" name="ptype_subject" class="form-control" value="{{ old('ptype_subject', $item->ptype_subject ?? '') }}" required>
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">階数ソート順</label>
<div class="col-sm-10">
<input type="text" name="ptype_sort" class="form-control" value="{{ old('ptype_sort', $item->ptype_sort ?? '') }}">
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">備考</label>
<div class="col-sm-10">
<input type="text" name="ptype_remarks" class="form-control" value="{{ old('ptype_remarks', $item->ptype_remarks ?? '') }}">
</div>
<div class="form-group col-9">
<div class="input-group">
<input type="text" value="{{$ptype_id}}" placeholder="{{__('validation.attributes.ptype_id')}}"
name="ptype_subject"
class="form-control form-control-lg" readonly/>
</div>
</div>
@endIf
<!-- 駐輪分類名 -->
<div class="form-group col-3">
<label @if(!$isInfo) class="required" @endif>{{__('validation.attributes.ptype_subject')}}</label>
</div>
<div class="form-group col-9">
<div class="input-group">
<input type="text" value="{{$ptype_subject}}"
placeholder="{{__('validation.attributes.ptype_subject')}}" name="ptype_subject"
class="form-control form-control-lg" @if($isInfo) readonly @endif/>
</div>
</div>
<!-- /.form group - 駐輪分類名 -->
<!-- 備考 -->
<div class="form-group col-3">
<label <label @if(!$isInfo) class="required" @endif>{{__('validation.attributes.ptype_remarks')}}</label>
</div>
<div class="form-group col-9">
<div class="input-group">
<input type="text" value="{{$ptype_remarks}}"
placeholder="{{__('validation.attributes.ptype_remarks')}}" name="ptype_remarks"
class="form-control form-control-lg" @if($isInfo) readonly @endif/>
</div>
</div>
<!-- /.form group - 備考 -->
</div>
@if($isInfo)
<a href="{{route('ptype_add')}}" class="btn btn-lg btn-success">{{__('登録')}}</a>
<a href="{{route('ptype_edit',['id'=>$ptype_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-header">
<button type="submit" class="btn btn-lg btn-success register">{{__('登録')}}</button>
</div>

View File

@ -8,14 +8,14 @@
<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('ptypes') }}">駐輪分類マスタ</a></li>
<li class="breadcrumb-item active">新規</li>
</ol>
</div><!-- /.col -->
</div><!-- /.row -->
@ -40,12 +40,6 @@
</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>
</div>
</section>
<!-- /.content -->

View File

@ -1,4 +1,3 @@
@extends('layouts.app')
@section('title', '[東京都|〇〇駐輪場] 駐輪分類マスタ')
@ -14,8 +13,8 @@
<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('ptypes') }}">駐輪分類マスタ</a></li>
<li class="breadcrumb-item active">編集</li>
</ol>
</div><!-- /.col -->
</div><!-- /.row -->
@ -32,20 +31,12 @@
<div class="col-lg-12">
<div class="card">
<form method="post" action="{{ route('ptype_edit',['id'=>$ptype_id])}}" enctype="multipart/form-data">
<!-- TOKEN FORM -->
<input type="hidden" name="_token" value="{{ csrf_token() }}" >
<!-- / .TOKEN FORM -->
@csrf
@include('admin.ptypes._form',['isEdit'=>1,'isInfo'=>0])
</form>
</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>
</div>
</section>
<!-- /.content -->

View File

@ -41,12 +41,6 @@
</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>
</div>
</section>
<!-- /.content -->

View File

@ -1,137 +1,144 @@
@extends('layouts.app')
@section('title', '[東京都|〇〇駐輪場] 駐輪分類マスタ')
@section('content')
<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><!-- /.col -->
<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 active">{{__('駐輪分類マスタ')}}</li>
</ol>
</div><!-- /.col -->
</div><!-- /.row -->
</div><!-- /.container-fluid -->
</div>
<!-- /.content-header -->
<!-- Main content -->
<section class="content">
<div class="container-fluid">
<!-- SELECT2 EXAMPLE -->
<div class="row">
<form action="{{route('ptypes')}}" method='post' id='list-form'>
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<input type="hidden" value="{{$sort}}" name="sort" id="sort">
<input type="hidden" value="{{$sort_type}}" name="sort_type" id="sort_type">
</form>
<div class="container-fluid mb20">
<button type="submit" class="btn btn-sm btn-default mr10" name="delete" id="delete">{{__('削除')}}</button>
<button type="submit" class="btn btn-sm btn-default mr10" name="import_csv" id="import_csv" action="{{route('ptypes_import')}}">{{__('インポート')}}</button>
<button type="submit" class="btn btn-sm btn-default mr10" name="export_csv" id="export_csv" action="{{route('ptypes_export')}}">{{__('CSV出力')}}</button>
{{ $list->appends(['sort' => $sort,'sort_type'=>$sort_type])->links('pagination') }}
</div>
<div class="form col-lg-12">
@if(Session::has('success'))
<div class="alert alert-success alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
{{ Session::get('success') }}
</div>
@elseif(Session::has('error'))
<div class="alert alert-danger alert-dismissible">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<h4><i class="icon fa fa-ban"></i> {{__('誤差')}}:</h4>
{!! Session::get('error') !!}
</div>
@elseif(isset($errorMsg))
<div class="alert alert-danger alert-dismissible">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<h4><i class="icon fa fa-ban"></i> {{__('誤差')}}:</h4>
{!! $errorMsg !!}
</div>
@endif
</div>
<div class="col-lg-12 row sample03-wrapper no_padding_right mb20">
<div class="col-xl-2 col-lg-2 col-md-2 col-sm-3 col-xs-3 table_left">
<form action="{{route('ptypes_delete')}}" method="post" id="form_delete">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<table class="table dataTable">
<thead>
<tr>
<th>
<input type="checkbox" class="minimal m-0" id="checkbox_all">
</th>
</tr>
</thead>
<tbody>
@foreach($list as $item)
<tr role="row">
<td>
<input type="checkbox" class="minimal m-0 checkbox"
value="{{$item->ptype_id}}" name="pk[]">
<div class="btn_action">
{{--<a href="{{route('ptype_add')}}" class="btn btn-sm btn-default">詳細</a>--}}
<a href="{{route('ptype_info',['pk'=>$item->ptype_id])}}"
class="btn btn-sm btn-default ml10">{{__('編集')}}</a>
</div>
</td>
</tr>
@endforeach
</tbody>
</table>
</form>
</div>
<div class="col-lg-10 col-xl-10 col-md-10 col-sm-9 col-xs-9 table_right no_padding_right">
<div class="scroll">
<table class="table dataTable">
<thead>
<tr>
<!-- 駐輪分類ID -->
<th class="sorting @if($sort=="ptype_id"){{$sort_type == 'asc'?'sorting_asc':'sorting_desc'}}@endif"
sort="ptype_id"><span>{{__('validation.attributes.ptype_id')}}</span>
</th>
<!-- 駐輪分類名 -->
<th class="sorting @if($sort=="ptype_subject"){{$sort_type == 'asc'?'sorting_asc':'sorting_desc'}}@endif"
sort="ptype_subject"><span>{{__('validation.attributes.ptype_subject')}}</span>
</th>
<!-- 備考 -->
<th class="sorting @if($sort=="ptype_remarks"){{$sort_type == 'asc'?'sorting_asc':'sorting_desc'}}@endif"
sort="ptype_remarks"><span>{{__('validation.attributes.ptype_remarks')}}</span>
</th>
</tr>
</thead>
<tbody>
@foreach($list as $item)
<tr>
<!-- 駐輪分類ID -->
<td class='sm-item text-left'><span>{{mb_substr($item->ptype_id, 0, 10)}}</span></td>
<!-- 駐輪分類名 -->
<td class='sm-item text-right'><span>{{mb_substr($item->ptype_subject, 0, 10)}}</span></td>
<!-- 備考 -->
<td class='sm-item text-right'><span>{{mb_substr($item->ptype_remarks, 0, 20)}}</span></td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
{{-- コンテンツヘッダー(パンくず) --}}
<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>
<!-- /.row -->
</div><!-- /.container-fluid -->
</section>
<!-- /.content -->
<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 active">{{__('駐輪分類マスタ')}}</li>
</ol>
</div>
</div>
</div>
</div>
@endsection
{{-- メインコンテンツ --}}
<section class="content">
{{-- アクションボタン(市区マスタ準拠) --}}
<div class="mb-3">
<a href="{{ route('ptype_add') }}" class="btn btn-sm btn-primary">新規</a>
<button type="submit" form="deleteForm" class="btn btn-sm btn-danger ml-2"
onclick="return confirm('選択した分類を削除しますか?');">削除</button>
</div>
{{-- フラッシュメッセージ --}}
@if(Session::has('success'))
<div class="alert alert-success alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
{{ Session::get('success') }}
</div>
@elseif(Session::has('error'))
<div class="alert alert-danger alert-dismissible">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<h4><i class="icon fa fa-ban"></i> {{__('誤差')}}:</h4>
{!! Session::get('error') !!}
</div>
@elseif(isset($errorMsg))
<div class="alert alert-danger alert-dismissible">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<h4><i class="icon fa fa-ban"></i> {{__('誤差')}}:</h4>
{!! $errorMsg !!}
</div>
@endif
{{-- 一覧(編集+チェックを統合列に変更:背景 #faebd7 --}}
<form id="deleteForm" method="POST" action="{{ route('ptype_delete') }}">
@csrf
<div class="table-responsive">
<table class="table table-bordered table-hover" style="min-width:700px;">
<thead class="thead-light">
<tr>
{{-- 統合列:全選択 + 編集(市区マスタ準拠) --}}
<th style="width:140px;">
<input type="checkbox" onclick="$('input[name*=\'pk\']').prop('checked', this.checked);">
<span class="text-muted" style="font-weight:normal;"></span>
</th>
{{-- ソート可能ヘッダーID / 名称 / 階数ソート順 / 備考) --}}
<th style="width:140px;">
<a href="{{ route('ptypes', ['sort' => 'ptype_id', 'sort_type' => ($sort == 'ptype_id' && $sort_type == 'asc') ? 'desc' : 'asc']) }}"
style="color:inherit;text-decoration:none;">
駐輪分類ID
@if($sort == 'ptype_id')
@if($sort_type == 'asc')
<span style="font-size:1.0em;">&#9650;</span>
@else
<span style="font-size:1.0em;">&#9660;</span>
@endif
@endif
</a>
</th>
<th>
<a href="{{ route('ptypes', ['sort' => 'ptype_subject', 'sort_type' => ($sort == 'ptype_subject' && $sort_type == 'asc') ? 'desc' : 'asc']) }}"
style="color:inherit;text-decoration:none;">
駐輪分類名
@if($sort == 'ptype_subject')
@if($sort_type == 'asc')
<span style="font-size:1.0em;">&#9650;</span>
@else
<span style="font-size:1.0em;">&#9660;</span>
@endif
@endif
</a>
</th>
<th>
<a href="{{ route('ptypes', ['sort' => 'ptype_sort', 'sort_type' => ($sort == 'ptype_sort' && $sort_type == 'asc') ? 'desc' : 'asc']) }}"
style="color:inherit;text-decoration:none;">
階数ソート順
@if($sort == 'ptype_sort')
@if($sort_type == 'asc')
<span style="font-size:1.0em;">&#9650;</span>
@else
<span style="font-size:1.0em;">&#9660;</span>
@endif
@endif
</a>
</th>
<th>
<a href="{{ route('ptypes', ['sort' => 'ptype_remarks', 'sort_type' => ($sort == 'ptype_remarks' && $sort_type == 'asc') ? 'desc' : 'asc']) }}"
style="color:inherit;text-decoration:none;">
備考
@if($sort == 'ptype_remarks')
@if($sort_type == 'asc')
<span style="font-size:1.0em;">&#9650;</span>
@else
<span style="font-size:1.0em;">&#9660;</span>
@endif
@endif
</a>
</th>
</tr>
</thead>
<tbody>
@foreach($list as $item)
<tr>
{{-- 統合セル:チェック + 編集 --}}
<td style="background:#faebd7;">
<input type="checkbox" name="pk[]" value="{{ $item->ptype_id }}">
<a href="{{ route('ptype_edit', ['id' => $item->ptype_id]) }}"
class="btn btn-sm btn-outline-primary ml-2">編集</a>
</td>
{{-- データ列 --}}
<td>{{ $item->ptype_id }}</td>
<td>{{ $item->ptype_subject }}</td>
<td>{{ $item->ptype_sort }}</td>
<td>{{ $item->ptype_remarks }}</td>
</tr>
@endforeach
</tbody>
</table>
{{-- ページネーションをテーブルの外、左下に表示Bootstrap4スタイルパラメータ維持 --}}
<div class="mt-3 text-left">
{{ $list->appends(request()->except('page'))->links('pagination::bootstrap-4') }}
</div>
</form>
</section>
@endsection

View File

@ -1,50 +1,367 @@
@extends('layouts.app')
@section('title', '利用者マスタ|新規')
@section('content')
<!-- Content Header (Page 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">[画面メニュー名]XXXXXX編集画面</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"><a href="./example.html">画面メニュー名</a></li>
<li class="breadcrumb-item active">XXXXXX編集画面</li>
</ol>
</div><!-- /.col -->
</div><!-- /.row -->
</div><!-- /.container-fluid -->
{{-- パンくず --}}
<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"><a href="{{ route('users') }}">利用者マスタ</a></li>
<li class="breadcrumb-item active">新規</li>
</ol>
</div>
</div>
</div>
<!-- /.content-header -->
</div>
<!-- Main content -->
<section class="content">
<div class="container-fluid">
<!-- SELECT2 EXAMPLE -->
<section class="content">
<div class="container-fluid">
{{-- 成功/エラー表示 --}}
@if ($errors->any())
<div class="alert alert-danger">
<ul class="mb-0">
@foreach ($errors->all() as $e)
<li>{{ $e }}</li>
@endforeach
</ul>
</div>
@endif
<div class="row">
<form method="post" action="{{ route('users_add') }}" enctype="multipart/form-data">
@csrf
<div class="col-lg-12">
<div class="card card-outline">
<div class="card-body">
<form method="post" action="{{ route('user_add') }}" enctype="multipart/form-data">
<!-- TOKEN FORM -->
<input type="hidden" name="_token" value="{{ csrf_token() }}" >
<!-- / .TOKEN FORM -->
@include('admin.users._form',['isEdit'=>0,'isInfo'=>0])
</form>
</div>
</div>
</div>
<div class="card">
<div class="card-header">
<h3 class="card-title">基本情報</h3>
</div>
<div class="card-body">
{{-- 1列レイアウト(ラベル左 / 入力右) --}}
<div class="form-group row">
<label class="col-md-2 col-form-label">会員ID</label>
<div class="col-md-10">
<input type="text" name="member_id" value="{{ old('member_id') }}" class="form-control">
</div>
</div>
<!-- /.row -->
</div><!-- /.container-fluid -->
</section>
<!-- /.content -->
<div class="form-group row">
<label class="col-md-2 col-form-label">利用者ID <span class="text-danger">*</span></label>
<div class="col-md-10">
<input type="text" name="user_id" value="{{ old('user_id') }}" class="form-control" required>
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">パスワード</label>
<div class="col-md-10">
<input type="password" name="user_pass" class="form-control" autocomplete="new-password">
</div>
</div>
{{-- タグ/QR & シリアル --}}
<div class="form-group row">
<label class="col-md-2 col-form-label">タグQR</label>
<div class="col-md-10 d-flex align-items-center">
<div class="form-check mr-3">
<input class="form-check-input" type="radio" name="tag_qr_flag" id="tag_qr_qr" value="1" {{ old('tag_qr_flag','0')=='1'?'checked':'' }}>
<label for="tag_qr_qr" class="form-check-label">QR</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="tag_qr_flag" id="tag_qr_tag" value="0" {{ old('tag_qr_flag','0')=='0'?'checked':'' }}>
<label for="tag_qr_tag" class="form-check-label">タグ</label>
</div>
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">タグシリアル</label>
<div class="col-md-10">
<input type="text" name="user_tag_serial" value="{{ old('user_tag_serial') }}" class="form-control">
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">タグシリアル(64)</label>
<div class="col-md-10">
<input type="text" name="user_tag_serial_64" value="{{ old('user_tag_serial_64') }}" class="form-control">
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">QRコード</label>
<div class="col-md-10">
<input type="text" name="qr_code" value="{{ old('qr_code') }}" class="form-control">
</div>
</div>
{{-- AID / 設置場所QR --}}
<div class="form-group row">
<label class="col-md-2 col-form-label">AID</label>
<div class="col-md-10">
<input type="text" name="user_aid" value="{{ old('user_aid') }}" class="form-control">
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">設置場所QR</label>
<div class="col-md-10">
<input type="text" name="user_place_qrid" value="{{ old('user_place_qrid') }}" class="form-control">
</div>
</div>
{{-- 利用者属性 --}}
<div class="form-group row">
<label class="col-md-2 col-form-label">利用者分類ID</label>
<div class="col-md-10">
<input type="text" name="user_categoryid" value="{{ old('user_categoryid') }}" class="form-control">
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">氏名 <span class="text-danger">*</span></label>
<div class="col-md-10">
<input type="text" name="user_name" value="{{ old('user_name') }}" class="form-control" required>
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">フリガナ</label>
<div class="col-md-10">
<input type="text" name="user_phonetic" value="{{ old('user_phonetic') }}" class="form-control">
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">性別</label>
<div class="col-md-10 d-flex align-items-center">
<label class="mr-3"><input type="radio" name="user_gender" value="男性" {{ old('user_gender')=='男性'?'checked':'' }}> 男性</label>
<label class="mr-3"><input type="radio" name="user_gender" value="女性" {{ old('user_gender')=='女性'?'checked':'' }}> 女性</label>
<label><input type="radio" name="user_gender" value="未入力" {{ old('user_gender')=='未入力'?'checked':'' }}> 未入力</label>
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">生年月日</label>
<div class="col-md-4">
<input type="date" name="user_birthdate" value="{{ old('user_birthdate') }}" class="form-control">
</div>
<label class="col-md-2 col-form-label text-md-right">年齢</label>
<div class="col-md-4">
<input type="number" name="user_age" value="{{ old('user_age') }}" class="form-control">
</div>
</div>
{{-- 連絡先 --}}
<div class="form-group row">
<label class="col-md-2 col-form-label">携帯電話番号</label>
<div class="col-md-10">
<input type="text" name="user_mobile" value="{{ old('user_mobile') }}" class="form-control" placeholder="080-0000-0000">
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">自宅電話番号</label>
<div class="col-md-10">
<input type="text" name="user_homephone" value="{{ old('user_homephone') }}" class="form-control" placeholder="000-0000-0000">
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">メールアドレス</label>
<div class="col-md-10">
<input type="email" name="user_primemail" value="{{ old('user_primemail') }}" class="form-control" placeholder="name@example.com">
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">予備メール</label>
<div class="col-md-10">
<input type="email" name="user_submail" value="{{ old('user_submail') }}" class="form-control" placeholder="name@example.com">
</div>
</div>
{{-- 現住所 --}}
<div class="form-group row">
<label class="col-md-2 col-form-label">現住所 郵便番号</label>
<div class="col-md-10">
<input type="text" name="user_regident_zip" value="{{ old('user_regident_zip') }}" class="form-control">
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">現住所 都道府県</label>
<div class="col-md-10">
<input type="text" name="user_regident_pre" value="{{ old('user_regident_pre') }}" class="form-control">
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">現住所 市区町村</label>
<div class="col-md-10">
<input type="text" name="user_regident_city" value="{{ old('user_regident_city') }}" class="form-control">
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">現住所 住所</label>
<div class="col-md-10">
<input type="text" name="user_regident_add" value="{{ old('user_regident_add') }}" class="form-control">
</div>
</div>
{{-- 連絡先住所 --}}
<div class="form-group row">
<label class="col-md-2 col-form-label">連絡先 郵便番号</label>
<div class="col-md-10">
<input type="text" name="user_relate_zip" value="{{ old('user_relate_zip') }}" class="form-control">
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">連絡先 都道府県</label>
<div class="col-md-10">
<input type="text" name="user_relate_pre" value="{{ old('user_relate_pre') }}" class="form-control">
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">連絡先 市区町村</label>
<div class="col-md-10">
<input type="text" name="user_relate_city" value="{{ old('user_relate_city') }}" class="form-control">
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">連絡先 住所</label>
<div class="col-md-10">
<input type="text" name="user_relate_add" value="{{ old('user_relate_add') }}" class="form-control">
</div>
</div>
{{-- その他属性 --}}
<div class="form-group row">
<label class="col-md-2 col-form-label">区民</label>
<div class="col-md-10">
<input type="text" name="ward_residents" value="{{ old('ward_residents') }}" class="form-control">
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">勤務先</label>
<div class="col-md-10">
<input type="text" name="user_workplace" value="{{ old('user_workplace') }}" class="form-control">
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">学校名</label>
<div class="col-md-10">
<input type="text" name="user_school" value="{{ old('user_school') }}" class="form-control">
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">卒業年</label>
<div class="col-md-10">
<input type="date" name="user_graduate" value="{{ old('user_graduate') }}" class="form-control">
</div>
</div>
{{-- 本人確認 --}}
<div class="form-group row">
<label class="col-md-2 col-form-label">本人確認書類</label>
<div class="col-md-10">
<input type="text" name="user_idcard" value="{{ old('user_idcard') }}" class="form-control" placeholder="運転免許証 など">
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">本人確認チェック</label>
<div class="col-md-10">
{{-- 0/1のみのDBの場合は 0=未チェック / 1=手動チェックOK で保存 --}}
<label class="mr-3"><input type="radio" name="user_idcard_chk_flag" value="0" {{ old('user_idcard_chk_flag','0')=='0'?'checked':'' }}> 未チェック</label>
<label><input type="radio" name="user_idcard_chk_flag" value="1" {{ old('user_idcard_chk_flag')=='1'?'checked':'' }}> 手動チェックOK</label>
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">本人確認日時</label>
<div class="col-md-10">
<input type="date" name="user_chk_day" value="{{ old('user_chk_day') }}" class="form-control">
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">本人確認オペレータID</label>
<div class="col-md-10">
<input type="text" name="user_chk_opeid" value="{{ old('user_chk_opeid') }}" class="form-control">
</div>
</div>
{{-- タグ発行 / 発行可否 / 退会 --}}
<div class="form-group row">
<label class="col-md-2 col-form-label">タグ発行数</label>
<div class="col-md-10">
<input type="number" name="user_tag_issue" value="{{ old('user_tag_issue') }}" class="form-control">
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">発行可否</label>
<div class="col-md-10">
<label class="mr-3"><input type="radio" name="issue_permission" value="1" {{ old('issue_permission')=='1'?'checked':'' }}> 発行可</label>
<label><input type="radio" name="issue_permission" value="0" {{ old('issue_permission','0')=='0'?'checked':'' }}> 発行不可</label>
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">退会フラグ</label>
<div class="col-md-10">
<label class="mr-3"><input type="radio" name="user_quit_flag" value="1" {{ old('user_quit_flag')=='1'?'checked':'' }}> はい</label>
<label><input type="radio" name="user_quit_flag" value="0" {{ old('user_quit_flag','0')=='0'?'checked':'' }}> いいえ</label>
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">退会日</label>
<div class="col-md-10">
<input type="date" name="user_quitday" value="{{ old('user_quitday') }}" class="form-control">
</div>
</div>
{{-- 本人確認写真(ダミー:実装は後日) --}}
<div class="form-group row">
<label class="col-md-2 col-form-label">本人確認写真ファイル1</label>
<div class="col-md-10">
<input type="file" name="id_photo1" class="form-control-file">
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">本人確認写真ファイル2</label>
<div class="col-md-10">
<input type="file" name="id_photo2" class="form-control-file">
</div>
</div>
{{-- 備考 --}}
<div class="form-group row">
<label class="col-md-2 col-form-label">備考</label>
<div class="col-md-10">
<textarea name="user_remarks" rows="4" class="form-control">{{ old('user_remarks') }}</textarea>
</div>
</div>
</div>
<div class="card-footer">
<button type="submit" class="btn btn-primary">登録</button>
<a href="{{ route('users') }}" class="btn btn-default ml-2">戻る</a>
</div>
</div>
</form>
</div>
</section>
{{-- 見た目の微調整(間隔を広げる) --}}
<style>
.card .form-group { margin-bottom: .85rem; }
</style>
@endsection

View File

@ -1,431 +1,302 @@
@extends('layouts.app')
@section('title', '[東京都|〇〇駐輪場]利用者マスタ')
@section('content')
{{-- コンテンツヘッダー(パンくず) --}}
<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><!-- /.col -->
<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') }}">XX様info(ホーム)</a></li>
<li class="breadcrumb-item"><a href="./index3.html">[東京都|〇〇駐輪場]</a></li>
<li class="breadcrumb-item active">{{__('利用者マスタ')}}</li>
<li class="breadcrumb-item active">利用者マスタ</li>
</ol>
</div><!-- /.col -->
</div><!-- /.row -->
</div><!-- /.container-fluid -->
</div>
</div>
</div>
</div>
<!-- /.content-header -->
<!-- Main content -->
<section class="content">
<div class="container-fluid">
<!-- SELECT2 EXAMPLE -->
{{-- ===================== 案内文図2 準拠) ===================== --}}
<p class="text-muted small mb-2">
<i class="fa fa-info-circle mr-1"></i>この画面のデータ修正等の必要はありません。
</p>
<div class="row">
<div class="col-lg-12">
<div class="card">
<div class="card-header">
<h3 class="card-title">{{__('絞り込み')}}</h3>
</div>
<div class="card-body">
<form action="{{route('users')}}" method="post" id="list-form">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<input type="hidden" value="{{$sort}}" name="sort" id="sort">
<input type="hidden" value="{{$sort_type}}" name="sort_type" id="sort_type">
<div class="row">
<div class="form-group col-4">
<label>{{__('利用者ID')}}</label>
<div class="input-group">
<input type="text" class="form-control"
placeholder="123456" id="user_id"
name="user_id" value="{{$user_id}}"/>
</div>
</div><!-- /.form group -->
<div class="form-group col-4">
<label>{{__('validation.attributes.member_id')}}</label>
<div class="input-group">
<input type="text" class="form-control"
placeholder="123456"
id="member_id"
name="member_id" value="{{$member_id}}"/>
</div>
</div><!-- /.form group -->
<div class="form-group col-4">
<label>{{__('validation.attributes.user_tag_serial')}}</label>
<div class="input-group">
<input type="text" class="form-control"
placeholder="{{__('キーワード…')}}"
id="user_tag_serial" name="user_tag_serial"
value="{{$user_tag_serial}}"/>
</div>
</div><!-- /.form group -->
<div class="form-group col-4">
<label>{{__('フリガナ(あいまい検索)')}}</label>
<div class="input-group">
<input type="text" class="form-control"
placeholder="{{__('キーワード…')}}"
id="user_phonetic"
name="user_phonetic" value="{{$user_phonetic}}"/>
</div>
</div><!-- /.form group -->
<div class="form-group col-4">
<label>{{__('validation.attributes.phone')}}</label>
<div class="input-group">
<input type="text" class="form-control"
placeholder="{{__('012-3456-7890')}}" id="phone"
name="phone"
value="{{$phone}}"/>
</div>
</div><!-- /.form group -->
<div class="form-group col-4">
<label>{{__('validation.attributes.crime_prevention_registration_number')}}</label>
<div class="input-group">
<input type="text" class="form-control"
placeholder="{{__('validation.attributes.crime_prevention_registration_number')}}"
id="crime" name="crime" value="{{$crime}}"/>
</div>
</div><!-- /.form group -->
{{-- ===================== 絞り込みフィルター ===================== --}}
<div class="card">
<div class="card-header">
<h3 class="card-title">絞り込みフィルター</h3>
</div>
<div class="card-body">
<form action="{{ route('users') }}" method="post" id="filter-form">
@csrf
{{-- ソート保持 --}}
<input type="hidden" name="sort" id="sort" value="{{ $sort }}">
<input type="hidden" name="sort_type" id="sort_type" value="{{ $sort_type }}">
{{-- 1段目左右2カラム --}}
<div class="row">
{{-- 左カラム --}}
<div class="col-lg-6">
<div class="form-group d-flex align-items-center mb-2">
<label class="filter-label">利用者ID</label>
<input type="text" class="form-control filter-input" name="user_id"
value="{{ $user_id ?? '' }}" placeholder="123456">
</div>
<input type="submit" class="btn btn-default" value="{{__('絞り込みを実行')}}">
</form>
</div>
</div>
</div>
<div class="container-fluid mb20">
<button type="submit" class="btn btn-sm btn-default mr10" id="delete">{{__('削除')}}</button>
<button type="submit" class="btn btn-sm btn-default mr10" id="import_csv"
action="{{route('users_import')}}">{{__('インポート')}}</button>
<button type="submit" class="btn btn-sm btn-default mr10" id="export_csv"
action="{{route('users_export')}}">{{__('CSV出力')}}</button>
{{ $list->appends(['sort' => $sort,'sort_type'=>$sort_type])->links('pagination') }}
</div>
<div class="form col-lg-12">
@if(Session::has('success'))
<div class="alert alert-success alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
{!! Session::get('success') !!}
</div>
@elseif(Session::has('error'))
<div class="alert alert-danger alert-dismissible">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<h4><i class="icon fa fa-ban"></i> {{__('誤差')}}:</h4>
{!! Session::get('error') !!}
</div>
@elseif(isset($errorMsg))
<div class="alert alert-danger alert-dismissible">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<h4><i class="icon fa fa-ban"></i> {{__('誤差')}}:</h4>
{!! $errorMsg !!}
</div>
@endif
</div>
<div class="col-lg-12 row sample03-wrapper no_padding_right mb20">
<div class="col-xl-2 col-lg-2 col-md-2 col-sm-3 col-xs-3 table_left">
<form action="{{route('users_delete')}}" method="post" id="form_delete">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<table class="table dataTable">
<thead>
<tr>
<th>
<input type="checkbox" class="minimal m-0" id="checkbox_all">
</th>
</tr>
</thead>
<tbody>
@foreach($list as $item)
<tr role="row">
<td>
<input type="checkbox" class="minimal m-0 checkbox"
value="{{$item->user_seq}}" name="seq[]">
<div class="btn_action">
{{--<a href="{{route('user_add')}}" class="btn btn-sm btn-default">詳細</a>--}}
<a href="{{route('user_info',['seq'=>$item->user_seq])}}"
class="btn btn-sm btn-default ml10">{{__('編集')}}</a>
</div>
</td>
<div class="form-group d-flex align-items-center mb-2">
<label class="filter-label">利用者分類</label>
<select class="form-control filter-input" name="user_categoryid">
<option value="">全て</option>
@if(!empty($categoryOptions))
@foreach($categoryOptions as $val => $label)
<option value="{{ $val }}" @if(($user_categoryid ?? '') == (string) $val) selected
@endif>
{{ $label }}
</option>
@endforeach
@endif
</select>
</div>
</tr>
@endforeach
</tbody>
</table>
</form>
</div>
<div class="col-lg-10 col-xl-10 col-md-10 col-sm-9 col-xs-9 table_right no_padding_right">
<div class="scroll">
<table class="table dataTable">
<thead>
<tr>
<th class="sorting @if($sort=="user_seq"){{$sort_type == 'asc'?'sorting_asc':'sorting_desc'}}@endif"
sort="user_seq"><span>{{__('validation.attributes.user_seq')}}</span>
</th>
<th class="sorting @if($sort=="user_id"){{$sort_type == 'asc'?'sorting_asc':'sorting_desc'}}@endif"
sort="user_id"><span>{{__('validation.attributes.user_id')}}</span></th>
<div class="form-group d-flex align-items-center mb-2">
<label class="filter-label">タグシリアル</label>
<input type="text" class="form-control filter-input" name="user_tag_serial"
value="{{ $user_tag_serial ?? '' }}" placeholder="キーワード…">
</div>
<th class="sorting @if($sort=="member_id"){{$sort_type == 'asc'?'sorting_asc':'sorting_desc'}}@endif"
sort="member_id"><span>{{__('validation.attributes.member_id')}}</span>
</th>
<th><span>{{__('validation.attributes.user_pass')}}</span></th>
<th><span>{{__('validation.attributes.user_manual_regist_flag')}}</span></th>
<th><span>{{__('validation.attributes.user_mailing_flag')}}</span></th>
<th class="sorting @if($sort=="contract_number"){{$sort_type == 'asc'?'sorting_asc':'sorting_desc'}}@endif"
sort="contract_number">
<span>{{__('validation.attributes.contract_number')}}</span></th>
<th class="sorting @if($sort=="user_tag_serial"){{$sort_type == 'asc'?'sorting_asc':'sorting_desc'}}@endif"
sort="user_tag_serial">
<span>{{__('validation.attributes.user_tag_serial')}}</span></th>
<th class="sorting @if($sort=="user_tag_serial_64"){{$sort_type == 'asc'?'sorting_asc':'sorting_desc'}}@endif"
sort="user_tag_serial_64">
<span>{{__('validation.attributes.user_tag_serial_64')}}</span></th>
<th class="sorting @if($sort=="qr_code"){{$sort_type == 'asc'?'sorting_asc':'sorting_desc'}}@endif"
sort="qr_code"><span>{{__('validation.attributes.qr_code')}}</span></th>
<th class="sorting @if($sort=="tag_qr_flag"){{$sort_type == 'asc'?'sorting_asc':'sorting_desc'}}@endif"
sort="tag_qr_flag">
<span>{{__('validation.attributes.tag_qr_flag')}}</span>
</th>
<th class="sorting @if($sort=="user_aid"){{$sort_type == 'asc'?'sorting_asc':'sorting_desc'}}@endif"
sort="user_aid"><span>{{__('validation.attributes.user_aid')}}</span>
</th>
{{--<th class="sorting @if($sort=="user_park_number"){{$sort_type == 'asc'?'sorting_asc':'sorting_desc'}}@endif"--}}
{{--sort="user_park_number">--}}
{{--<span>{{__('validation.attributes.user_park_number')}}</span></th>--}}
<th class="sorting @if($sort=="user_place_qrid"){{$sort_type == 'asc'?'sorting_asc':'sorting_desc'}}@endif"
sort="user_place_qrid">
<span>{{__('validation.attributes.user_place_qrid')}}</span></th>
<th class="sorting @if($sort=="user_categoryid"){{$sort_type == 'asc'?'sorting_asc':'sorting_desc'}}@endif"
sort="user_categoryid">
<span>{{__('validation.attributes.user_categoryid')}}</span></th>
<th class="sorting @if($sort=="user_name"){{$sort_type == 'asc'?'sorting_asc':'sorting_desc'}}@endif"
sort="user_name">
<span>{{__('validation.attributes.user_name')}}</span></th>
{{--<th class="sorting @if($sort=="user_phonetic"){{$sort_type == 'asc'?'sorting_asc':'sorting_desc'}}@endif"--}}
{{--sort="user_phonetic">--}}
{{--<span>{{__('validation.attributes.user_phonetic')}}</span></th>--}}
<th>
<span>{{__('validation.attributes.user_gender')}}</span>
</th>
<th class="sorting @if($sort=="user_birthdate"){{$sort_type == 'asc'?'sorting_asc':'sorting_desc'}}@endif"
sort="user_birthdate">
<span>{{__('validation.attributes.user_birthdate')}}</span></th>
<th class="sorting @if($sort=="user_age"){{$sort_type == 'asc'?'sorting_asc':'sorting_desc'}}@endif"
sort="user_age">
<span>{{__('validation.attributes.user_age')}}</span></th>
<th>
<span>{{__('validation.attributes.user_mobile')}}</span>
</th>
<th class="sorting @if($sort=="user_homephone"){{$sort_type == 'asc'?'sorting_asc':'sorting_desc'}}@endif"
sort="user_homephone">
<span>{{__('validation.attributes.user_homephone')}}</span></th>
<th class="sorting @if($sort=="user_primemail"){{$sort_type == 'asc'?'sorting_asc':'sorting_desc'}}@endif"
sort="user_primemail">
<span>{{__('validation.attributes.user_primemail')}}</span></th>
<th class="sorting @if($sort=="user_submail"){{$sort_type == 'asc'?'sorting_asc':'sorting_desc'}}@endif"
sort="user_submail">
<span>{{__('validation.attributes.user_submail')}}</span></th>
<th>
<span>{{__('validation.attributes.user_regident_zip')}}</span></th>
<th>
<span>{{__('validation.attributes.user_regident_pre')}}</span></th>
<th>
<span>{{__('validation.attributes.user_regident_city')}}</span></th>
<th>
<span>{{__('validation.attributes.user_regident_add')}}</span></th>
<th>
<span>{{__('validation.attributes.user_relate_zip')}}</span></th>
<th>
<span>{{__('validation.attributes.user_relate_pre')}}</span></th>
<th>
<span>{{__('validation.attributes.user_relate_city')}}</span></th>
<th>
<span>{{__('validation.attributes.user_relate_add')}}</span></th>
<th>
<span>{{__('validation.attributes.ward_residents')}}</span></th>
<th>
<span>{{__('validation.attributes.user_workplace')}}</span></th>
<th class="sorting @if($sort=="user_school"){{$sort_type == 'asc'?'sorting_asc':'sorting_desc'}}@endif"
sort="user_school">
<span>{{__('validation.attributes.user_school')}}</span>
</th>
<th>
<span>{{__('validation.attributes.user_graduate')}}</span></th>
{{--<th>--}}
{{--<span>{{__('validation.attributes.user_reduction')}}</span></th>--}}
<th>
<span>{{__('validation.attributes.user_idcard')}}</span>
</th>
<th>
<span>{{__('validation.attributes.user_idcard_chk_flag')}}</span></th>
<th>
<span>{{__('validation.attributes.user_chk_day')}}</span></th>
<th>
<span>{{__('validation.attributes.user_chk_opeid')}}</span></th>
<th>
<span>{{__('validation.attributes.user_tag_issue')}}</span></th>
<th>
<span>{{__('validation.attributes.issue_permission')}}</span></th>
<th>
<span>{{__('validation.attributes.user_quit_flag')}}</span></th>
<th>
<span>{{__('validation.attributes.user_quitday')}}</span></th>
<th>
<span>{{__('validation.attributes.user_remarks')}}</span></th>
{{--<th class="sorting @if($sort=="created_at"){{$sort_type == 'asc'?'sorting_asc':'sorting_desc'}}@endif"--}}
{{--sort="created_at">--}}
{{--<span>{{__('validation.attributes.created_at')}}</span>--}}
{{--</th>--}}
{{--<th class="sorting @if($sort=="updated_at"){{$sort_type == 'asc'?'sorting_asc':'sorting_desc'}}@endif"--}}
{{--sort="updated_at">--}}
{{--<span>{{__('validation.attributes.updated_at')}}</span>--}}
{{--</th>--}}
{{--<th class="sorting @if($sort=="edit_oprator_id"){{$sort_type == 'asc'?'sorting_asc':'sorting_desc'}}@endif"--}}
{{--sort="edit_oprator_id">--}}
{{--<span>{{__('validation.attributes.edit_oprator_id')}}</span>--}}
{{--</th>--}}
</tr>
</thead>
<tbody>
@foreach($list as $item)
<tr>
<td class='sm-item text-left'><span>{{mb_substr($item->user_seq, 0, 10)}}</span>
</td>
<td class='sm-item text-left'><span>{{mb_substr($item->user_id, 0, 10)}}</span>
</td>
<td class='sm-item text-right'>
<span>{{mb_substr($item->member_id, 0, 10)}}</span></td>
<td class='sm-item text-right'>
<span>{{mb_substr($item->user_pass, 0, 10)}}</span></td>
<td class='sm-item text-right'>
<span>{{$item->user_manual_regist_flag?__("はい"):__("いいえ")}}</span></td>
<td class='sm-item text-right'>
<span>{{$item->user_mailing_flag?__("はい"):__("いいえ")}}</span></td>
<td class='sm-item text-left'>
<span>{{mb_substr($item->contract_number, 0, 10)}}</span></td>
<td class='sm-item text-left'>
<span>{{mb_substr($item->user_tag_serial, 0, 10)}}</span></td>
<td class='sm-item text-left'>
<span>{{mb_substr($item->user_tag_serial_64, 0, 10)}}</span></td>
<td class='sm-item text-left'><span>{{mb_substr($item->qr_code, 0, 10)}}</span>
</td>
<td class='sm-item text-right'>
<span>{{mb_substr($item->tag_qr_flag?__('QRコード'):__('タグ'), 0, 10)}}</span>
</td>
<td class='sm-item text-left'><span>{{mb_substr($item->user_aid, 0, 10)}}</span>
</td>
{{--<td class='sm-item text-left'>--}}
{{--<span>{{mb_substr($item->user_park_number, 0, 10)}}</span></td>--}}
<td class='sm-item text-left'>
<span>{{mb_substr($item->user_place_qrid, 0, 10)}}</span></td>
<td class='sm-item text-right'>
<span>{{mb_substr($item->user_categoryid, 0, 10)}}</span>
{{--<span>{{mb_substr($item->getUserType()->print_name, 0, 10)}}</span>--}}
</td>
<td class='sm-item text-right'>
<span>{{mb_substr($item->user_name, 0, 10)}}</span></td>
{{--<td class='sm-item text-left'>--}}
{{--<span>{{mb_substr($item->user_phonetic, 0, 10)}}</span></td>--}}
<td class='sm-item text-right'>
<span>{{mb_substr($item->user_gender, 0, 10)}}</span></td>
<td class='sm-item text-right'>
@if($item->user_birthdate)
<span class="text-muted"><i class="fa fa-clock-o mr-1"></i>
{{mb_substr($item->user_birthdate, 0, 10)}}
</span>
@endif
</td>
<td class='sm-item text-left'>
<span>{{mb_substr($item->user_age, 0, 10)}}</span></td>
<td class='sm-item text-left'>
<span>{{mb_substr($item->user_mobile, 0, 10)}}</span></td>
<td class='sm-item text-left'>
<span>{{mb_substr($item->user_homephone, 0, 10)}}</span></td>
<td class='sm-item text-right'>
<span>{{mb_substr($item->user_primemail, 0, 10)}}</span></td>
<td class='sm-item text-right'>
<span>{{mb_substr($item->user_submail, 0, 10)}}</span></td>
<td class='sm-item text-right'>
<span>{{mb_substr($item->user_regident_zip, 0, 10)}}</span></td>
<td class='sm-item text-right'>
<span>{{mb_substr($item->user_regident_pre, 0, 10)}}</span></td>
<td class='sm-item text-right'>
<span>{{mb_substr($item->user_regident_city, 0, 10)}}</span></td>
<td class='sm-item text-right'>
<span>{{mb_substr($item->user_regident_add, 0, 10)}}</span></td>
<td class='sm-item text-right'>
<span>{{mb_substr($item->user_relate_zip, 0, 10)}}</span></td>
<td class='sm-item text-right'>
<span>{{mb_substr($item->user_relate_pre, 0, 10)}}</span></td>
<td class='sm-item text-right'>
<span>{{mb_substr($item->user_relate_city, 0, 10)}}</span></td>
<td class='sm-item text-right'>
<span>{{mb_substr($item->user_relate_add, 0, 10)}}</span></td>
<td class='sm-item text-right'>
<span>{{mb_substr($item->ward_residents, 0, 10)}}</span></td>
<td class='sm-item text-right'>
<span>{{mb_substr($item->user_workplace, 0, 10)}}</span></td>
<td class='sm-item text-left'>
<span>{{mb_substr($item->user_school, 0, 10)}}</span></td>
<td class='sm-item text-right'>
<span>{{mb_substr($item->user_graduate, 0, 10)}}</span></td>
{{--<td class='sm-item text-right'>--}}
{{--<span>{{mb_substr($item->user_reduction, 0, 10)}}</span></td>--}}
<td class='sm-item text-right'>
<span>{{mb_substr(__($item->user_idcard), 0, 10)}}</span></td>
<td class='sm-item text-right'><span>{{mb_substr(__(\App\User::USER_ID_CARD_CHK_FLG[$item->user_idcard_chk_flag]), 0, 10)}}
</span></td>
<td class='sm-item text-right'>
@if($item->user_chk_day)
<span class="text-muted"><i class="fa fa-clock-o mr-1"></i>
{{mb_substr($item->user_chk_day, 0, 10)}}
</span>
@endif
</td>
{{--TODO user_chk_opeid get name ope_name--}}
<td class='sm-item text-left'>
<span> {{mb_substr($item->user_chk_opeid, 0, 10)}}</span></td>
<td class='sm-item text-left'>
<span>{{mb_substr($item->user_tag_issue, 0, 10)}}</span></td>
<td class='sm-item text-left'>
<span>{{mb_substr($item->issue_permission, 0, 10)}}</span></td>
<td class='sm-item text-right'>
<span>{{$item->user_quit_flag?__("はい"):__("いいえ")}}</span></td>
<td class='sm-item text-right'>
@if($item->user_quitday)
<span class="text-muted"><i class="fa fa-clock-o mr-1"></i>
{{mb_substr($item->user_quitday, 0, 10)}}
</span>
@endif
</td>
<td class='sm-item text-right'>
<span>{{mb_substr($item->user_remarks, 0, 10)}}</span></td>
{{--<td>--}}
{{--@if($item->created_at)--}}
{{--<span class="text-muted"><i class="fa fa-clock-o mr-1"></i>--}}
{{--{{$item->created_at}}</span>--}}
{{--@endif--}}
{{--</td>--}}
{{--<td>--}}
{{--@if($item->updated_at)--}}
{{--<span class="text-muted"><i class="fa fa-clock-o mr-1"></i>--}}
{{--{{$item->updated_at}}</span>--}}
{{--@endif--}}
{{--</td>--}}
{{--<td><span>{{$item->edit_oprator_id}}</span></td>--}}
</tr>
@endforeach
</tbody>
</table>
<div class="form-group d-flex align-items-center mb-2">
<label class="filter-label">退会フラグ</label>
<select class="form-control filter-input" name="quit_flag">
<option value="">全て</option>
<option value="1" @if(($quit_flag ?? '') === '1') selected @endif>はい</option>
<option value="0" @if(($quit_flag ?? '') === '0') selected @endif>いいえ</option>
</select>
</div>
</div>
{{-- 右カラム --}}
<div class="col-lg-6">
<div class="form-group d-flex align-items-center mb-2">
<label class="filter-label">フリガナ</label>
<input type="text" class="form-control filter-input" name="user_phonetic"
value="{{ $user_phonetic ?? '' }}" placeholder="キーワード…">
</div>
<div class="form-group d-flex align-items-center mb-2">
<label class="filter-label">電話番号</label>
<input type="text" class="form-control filter-input" name="phone"
value="{{ $phone ?? '' }}" placeholder="012-3456-7890">
</div>
<div class="form-group d-flex align-items-center mb-2">
<label class="filter-label">メールアドレス</label>
<input type="text" class="form-control filter-input" name="email"
value="{{ $email ?? '' }}" placeholder="example@example.com">
</div>
<div class="form-group d-flex align-items-center mb-2">
<label class="filter-label">タグ・QR</label>
<select class="form-control filter-input" name="tag_qr_flag">
<option value="">全て</option>
<option value="0" @if(($tag_qr_flag ?? '') === '0') selected @endif>タグ</option>
<option value="1" @if(($tag_qr_flag ?? '') === '1') selected @endif>QR</option>
</select>
</div>
</div>
</div>
</div>
</div>
{{-- 2段目:退会日 From〜To --}}
<div class="row">
<div class="col-lg-6">
<div class="form-group d-flex align-items-center mb-2">
<label class="filter-label">退会日</label>
<div class="d-flex flex-grow-1" style="max-width:600px;">
<input type="date" class="form-control filter-input" name="quit_from"
value="{{ $quit_from ?? '' }}">
<span class="mx-2 align-self-center"></span>
<input type="date" class="form-control filter-input" name="quit_to"
value="{{ $quit_to ?? '' }}">
</div>
</div>
</div>
</div>
{{-- 実行/解除 --}}
<div class="mt-2">
<button type="submit" class="btn btn btn-default">絞り込み</button>
<button type="button" class="btn btn btn-default" id="btn-reset">解除</button>
</div>
</form>
</div>
</div>
<!-- /.row -->
</div><!-- /.container-fluid -->
</section>
<!-- /.content -->
@endsection
{{-- 見た目調整(ラベル間隔/入力高さ) --}}
<style>
/* ラベルと入力の水平方向の間隔を拡大 */
.filter-label {
width: 150px;
margin: 0 14px 0 0;
font-weight: 600;
color: #555;
}
.filter-input {
max-width: 280px;
}
.card .form-control,
.card .input-group-text,
.card select.form-control {
height: calc(1.9rem + 2px);
padding: .25rem .5rem;
font-size: .9rem;
}
</style>
{{-- 解除ボタンhidden以外をリセットして送信 --}}
<script>
document.getElementById('btn-reset')?.addEventListener('click', function () {
const f = document.getElementById('filter-form');
if (!f) return;
Array.from(f.elements).forEach(el => {
if (el.tagName === 'INPUT') {
if (['text', 'date', 'number', 'email', 'tel', 'search'].includes(el.type)) el.value = '';
} else if (el.tagName === 'SELECT') {
el.selectedIndex = 0;
}
});
f.submit();
});
</script>
{{-- CSV出力用の隠しフォーム現在の絞り込み条件を同送 --}}
<form id="csvForm" method="post" action="{{ route('users_export') }}" class="d-inline">
@csrf
{{-- 絞り込みのhiddenlistのフォームnameと合わせる --}}
<input type="hidden" name="user_id" value="{{ $user_id ?? '' }}">
<input type="hidden" name="user_categoryid" value="{{ $user_categoryid ?? '' }}">
<input type="hidden" name="user_tag_serial" value="{{ $user_tag_serial ?? '' }}">
<input type="hidden" name="quit_flag" value="{{ $quit_flag ?? '' }}">
<input type="hidden" name="user_phonetic" value="{{ $user_phonetic ?? '' }}">
<input type="hidden" name="phone" value="{{ $phone ?? '' }}">
<input type="hidden" name="email" value="{{ $email ?? '' }}">
<input type="hidden" name="tag_qr_flag" value="{{ $tag_qr_flag ?? '' }}">
<input type="hidden" name="quit_from" value="{{ $quit_from ?? '' }}">
<input type="hidden" name="quit_to" value="{{ $quit_to ?? '' }}">
</form>
<div class="d-flex align-items-center mb-2">
<div>
<a href="{{ route('users_add') }}" class="btn btn btn-default">新規</a>
{{-- クリックで隠しフォーム送信 --}}
<button type="button" class="btn btn btn-default"
onclick="document.getElementById('csvForm').submit();">CSV出力</button>
</div>
<div class="ml-auto">
{{ $list->appends(request()->except('page'))->links('pagination') }}
</div>
</div>
{{-- ===================== 一覧 ===================== --}}
<form action="{{ route('users_delete') }}" method="post" id="form_delete">
@csrf
<div id="users-list" class="table-responsive">
<table class="table table-bordered table-hover text-nowrap" style="min-width:1200px;">
<thead class="thead-light">
<tr>
<th style="width:110px;">利用者ID</th>
<th style="width:110px;">タグ/QRフラグ</th>
<th style="width:140px;">利用者分類ID</th>
<th style="width:160px;">利用者名</th>
<th style="width:160px;">フリガナ</th>
<th style="width:120px;">生年月日</th>
<th style="width:80px;">年齢</th>
<th style="width:140px;">携帯電話番号</th>
<th style="width:140px;">自宅電話番号</th>
<th style="width:220px;">メールアドレス</th>
<th style="width:140px;">本人確認書類</th>
<th style="width:150px;">本人確認チェック済</th>
<th style="width:160px;">本人確認日時</th>
<th style="width:110px;">退会フラグ</th>
<th style="width:140px;">退会日</th>
</tr>
</thead>
<tbody>
@forelse($list as $item)
@php
// ▼ 詳細/編集リンク生成(命名ルート優先)
$userInfoUrl = Route::has('user_info')
? route('user_info', ['seq' => $item->user_seq])
: (Route::has('users_info')
? route('users_info', ['id' => $item->user_seq])
: url('/users/info/' . $item->user_seq));
$chk = (string) ($item->user_idcard_chk_flag ?? '0');
@endphp
<tr>
{{-- 利用者IDリンク --}}
<td class="text-nowrap"><a href="{{ $userInfoUrl }}">{{ $item->user_id }}</a></td>
{{-- タグQR --}}
<td>{{ $item->tag_qr_flag ? '' : 'タグ' }}</td>
{{-- 利用者分類ID氏名フリガナ --}}
<td>{{ $item->user_categoryid }}</td>
<td>{{ $item->user_name }}</td>
<td>{{ $item->user_phonetic }}</td>
{{-- 生年月日/年齢 --}}
<td>{{ $item->user_birthdate ? \Illuminate\Support\Str::limit($item->user_birthdate, 10, '') : '' }}
</td>
<td>{{ $item->user_age }}</td>
{{-- 連絡先 --}}
<td>{{ $item->user_mobile }}</td>
<td>{{ $item->user_homephone }}</td>
<td class="text-nowrap">{{ $item->user_primemail }}</td>
{{-- 本人確認(書類/チェック/日時) --}}
<td>{{ __($item->user_idcard) }}</td>
<td class="text-nowrap">{{ $chk === '1' ? '手動チェックOK' : '未チェック' }}</td>
<td>{{ $item->user_chk_day ? \Illuminate\Support\Str::limit($item->user_chk_day, 10, '') : '' }}
</td>
{{-- 退会 --}}
<td>{{ $item->user_quit_flag ? 'はい' : 'いいえ' }}</td>
<td>{{ $item->user_quitday ? \Illuminate\Support\Str::limit($item->user_quitday, 10, '') : '' }}
</td>
</tr>
@empty
<tr>
<td colspan="15" class="text-center text-muted">データがありません。</td>
</tr>
@endforelse
</tbody>
</table>
</div>
</form>
{{-- 一覧の背景色(グレー)を完全無効化:このページだけ適用 --}}
<style>
#users-list tbody td,
#users-list tfoot th {
background: #fff !important;
}
/* 斑馬柄などの行背景も抑止 */
#users-list .table-striped tbody tr:nth-of-type(odd),
#users-list .dataTable tbody tr:nth-of-type(odd) {
background: #fff !important;
}
/* hover 色を薄くする(必要なら) */
#users-list .table-hover tbody tr:hover {
background-color: rgba(0, 0, 0, 0.02) !important;
}
</style>
</div> {{-- /.container-fluid --}}
</section>
@endsection

View File

@ -1,86 +1,87 @@
@if(Session::has('success'))
<div class="alert alert-success alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
{{ Session::get('success') }}
</div>
@elseif(Session::has('error'))
<div class="alert alert-danger alert-dismissible">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<h4><i class="icon fa fa-ban"></i> {{__('誤差')}}:</h4>
{!! Session::get('error') !!}
</div>
@elseif(isset($errorMsg))
<div class="alert alert-danger alert-dismissible">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<h4><i class="icon fa fa-ban"></i> {{__('誤差')}}:</h4>
{!! $errorMsg !!}
</div>
@endif
<div class="card-header">
@if($isInfo)
<a href="{{route('usertype_add')}}" class="btn btn-lg btn-success">{{__('登録')}}</a>
<a href="{{route('usertype_edit',['id'=>$user_categoryid])}}" class="btn btn-lg btn-danger">{{__('編集')}}</a>
@else
<button type="submit" class="btn btn-lg btn-danger register" >{{__('保存')}}</button>
@endIf
<div class="form col-lg-12">
@if(Session::has('success'))
<div class="alert alert-success alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
{{ Session::get('success') }}
</div>
@elseif(Session::has('error'))
<div class="alert alert-danger alert-dismissible">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<h4><i class="icon fa fa-ban"></i> {{__('誤差')}}:</h4>
{!! Session::get('error') !!}
</div>
@elseif(isset($errorMsg))
<div class="alert alert-danger alert-dismissible">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<h4><i class="icon fa fa-ban"></i> {{__('誤差')}}:</h4>
{!! $errorMsg !!}
</div>
@endif
</div>
<div class="card-body">
<div class="row">
@if($isInfo || $isEdit)
<!-- 利用者分類ID -->
<div class="form-group col-3">
<label>{{__('validation.attributes.user_categoryid')}}</label>
<div class="col-lg-12 row sample03-wrapper no_padding_right mb20">
<div class="col-xl-2 col-lg-2 col-md-2 col-sm-3 col-xs-3 table_left">
<div class="btn_action mb-3">
@if($isInfo)
<a href="{{route('usertype_add')}}" class="btn btn-sm btn-success">{{__('登録')}}</a>
<a href="{{route('usertype_edit',['id'=>$user_categoryid])}}" class="btn btn-sm btn-danger">{{__('編集')}}</a>
@else
<button type="submit" class="btn btn-sm btn-danger register" >{{__('保存')}}</button>
@endif
</div>
</div>
<div class="col-lg-10 col-xl-10 col-md-10 col-sm-9 col-xs-9 table_right no_padding_right">
<div class="scroll">
<form method="post">
@csrf
<table class="table dataTable">
<tbody>
@if($isInfo || $isEdit)
<tr>
<th style="width:200px;">{{__('validation.attributes.user_categoryid')}}</th>
<td>
<input type="text" value="{{$user_categoryid}}" class="form-control" readonly/>
</td>
</tr>
@endif
<tr>
<th style="width:200px;">{{__('validation.attributes.print_name')}}</th>
<td>
<input type="text" value="{{$print_name}}" name="print_name"
class="form-control"
@if($isInfo) readonly @endif
placeholder="{{__('validation.attributes.print_name')}}"/>
</td>
</tr>
<tr>
<th style="width:200px;">{{__('validation.attributes.usertype_money')}}</th>
<td>
<input type="text" value="{{$usertype_money}}" name="usertype_money"
class="form-control"
@if($isInfo) readonly @endif
placeholder="{{__('validation.attributes.usertype_money')}}"/>
</td>
</tr>
<tr>
<th style="width:200px;">{{__('validation.attributes.usertype_remarks')}}</th>
<td>
<input type="text" value="{{$usertype_remarks}}" name="usertype_remarks"
class="form-control"
@if($isInfo) readonly @endif
placeholder="{{__('validation.attributes.usertype_remarks')}}"/>
</td>
</tr>
</tbody>
</table>
<div class="btn_action mt-3">
@if($isInfo)
<a href="{{route('usertype_add')}}" class="btn btn-sm btn-success">{{__('登録')}}</a>
<a href="{{route('usertype_edit',['id'=>$user_categoryid])}}" class="btn btn-sm btn-danger">{{__('編集')}}</a>
@else
<button type="submit" class="btn btn-sm btn-danger register" >{{__('保存')}}</button>
@endif
</div>
</form>
</div>
<div class="form-group col-9">
<div class="input-group">
<input type="text" value="{{$user_categoryid}}"
placeholder="{{__('validation.attributes.user_categoryid')}}"
class="form-control form-control-lg" readonly/>
</div>
</div>
@endif
<div class="form-group col-3">
<label class="@if(!$isInfo) required @endIf">{{__('validation.attributes.print_name')}}</label>
</div>
<div class="form-group col-9">
<div class="input-group">
<input type="text" value="{{$print_name}}" placeholder="{{__('validation.attributes.print_name')}}"
name="print_name"
class="form-control form-control-lg" @if($isInfo) readonly @endif/>
</div>
</div>
<!-- 適用料率 -->
<div class="form-group col-3">
<label class="@if(!$isInfo) required @endIf">{{__('validation.attributes.usertype_money')}}</label>
</div>
<div class="form-group col-9">
<div class="input-group">
<input type="text" value="{{$usertype_money}}"
placeholder="{{__('validation.attributes.usertype_money')}}" name="usertype_money"
class="form-control form-control-lg" @if($isInfo) readonly @endif/>
</div>
</div>
<!-- /.form group - 適用料率 -->
<!-- 備考 -->
<div class="form-group col-3">
<label class="@if(!$isInfo) required @endIf">{{__('validation.attributes.usertype_remarks')}}</label>
</div>
<div class="form-group col-9">
<div class="input-group">
<input type="text" value="{{$usertype_remarks}}"
placeholder="{{__('validation.attributes.usertype_remarks')}}" name="usertype_remarks"
class="form-control form-control-lg" @if($isInfo) readonly @endif/>
</div>
</div>
<!-- /.form group - 備考 -->
</div>
@if($isInfo)
<a href="{{route('usertype_add')}}" class="btn btn-lg btn-success">{{__('登録')}}</a>
<a href="{{route('usertype_edit',['id'=>$user_categoryid])}}" class="btn btn-lg btn-danger">{{__('編集')}}</a>
@else
<button type="submit" class="btn btn-lg btn-danger register" >{{__('保存')}}</button>
@endIf
</div>

View File

@ -1,53 +1,129 @@
@extends('layouts.app')
@section('title', '[東京都|〇〇駐輪場] 利用者分類マスタ')
@section('content')
<!-- Content Header (Page 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><!-- /.col -->
<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="./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')}}">XX様info(ホーム)</a></li>
<li class="breadcrumb-item"><a href="javascript: void(0);">[東京都|〇〇駐輪場]</a></li>
<li class="breadcrumb-item active">{{__('利用者分類マスタ')}}</li>
</ol>
</div><!-- /.col -->
</div><!-- /.row -->
</div><!-- /.container-fluid -->
</div>
</div>
</div>
</div>
<!-- /.content-header -->
<!-- Main content -->
<section class="content">
<div class="container-fluid">
<!-- SELECT2 EXAMPLE -->
<div class="row">
<div class="col-lg-12">
<div class="card">
<form method="post" action="{{ route('usertype_info',['id'=>$user_categoryid])}}" enctype="multipart/form-data">
<!-- TOKEN FORM -->
<input type="hidden" name="_token" value="{{ csrf_token() }}" >
<!-- / .TOKEN FORM -->
@include('admin.usertypes._form',['isEdit'=>0,'isInfo'=>1])
<form action="{{route('usertypes')}}" method='post' id='list-form'>
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<input type="hidden" value="{{$sort ?? ''}}" name="sort" id="sort">
<input type="hidden" value="{{$sort_type ?? ''}}" name="sort_type" id="sort_type">
</form>
<div class="container-fluid mb20">
<button type="submit" class="btn btn-sm btn-default mr10" name="delete"
id="delete">{{__('削除')}}</button>
<button type="submit" class="btn btn-sm btn-default mr10" name="import_csv" id="import_csv" action="{{route('usertypes_import')}}">{{__('インポート')}}</button>
<button type="submit" class="btn btn-sm btn-default mr10" name="export_csv" id="export_csv" action="{{route('usertypes_export')}}">{{__('CSV出力')}}</button>
{{ $list->appends(['sort' => $sort ?? '','sort_type'=>$sort_type ?? ''])->links('pagination') }}
</div>
<div class="form col-lg-12">
@if(Session::has('success'))
<div class="alert alert-success alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
{{ Session::get('success') }}
</div>
@elseif(Session::has('error'))
<div class="alert alert-danger alert-dismissible">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<h4><i class="icon fa fa-ban"></i> {{__('誤差')}}:</h4>
{!! Session::get('error') !!}
</div>
@elseif(isset($errorMsg))
<div class="alert alert-danger alert-dismissible">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<h4><i class="icon fa fa-ban"></i> {{__('誤差')}}:</h4>
{!! $errorMsg !!}
</div>
@endif
</div>
<div class="col-lg-12 row sample03-wrapper no_padding_right mb20">
<div class="col-xl-2 col-lg-2 col-md-2 col-sm-3 col-xs-3 table_left">
<form action="{{route('usertypes_delete')}}" method="post" id="form_delete">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<table class="table dataTable">
<thead>
<tr>
<th>
<input type="checkbox" class="minimal m-0" id="checkbox_all">
</th>
</tr>
</thead>
<tbody>
@foreach($list as $item)
<tr role="row">
<td>
<input type="checkbox" class="minimal m-0 checkbox"
value="{{$item->user_categoryid}}" name="pk[]">
<div class="btn_action">
{{--<a href="{{route('usertype_add')}}" class="btn btn-sm btn-default">詳細</a>--}}
<a href="{{ route('usertype_info', ['id' => $item->user_categoryid]) }}"
class="btn btn-sm btn-default ml10">{{__('編集')}}</a>
</div>
</td>
</tr>
@endforeach
</tbody>
</table>
</form>
</div>
<div class="col-lg-10 col-xl-10 col-md-10 col-sm-9 col-xs-9 table_right no_padding_right">
<div class="scroll">
<table class="table dataTable">
<thead>
<tr>
<th class="sorting @if(($sort ?? '')=="user_categoryid"){{$sort_type == 'asc'?'sorting_asc':'sorting_desc'}}@endif"
sort="user_categoryid">
<span>{{__('validation.attributes.user_categoryid')}}</span>
</th>
<th class="sorting @if(($sort ?? '')=="print_name"){{$sort_type == 'asc'?'sorting_asc':'sorting_desc'}}@endif"
sort="print_name"><span>{{__('validation.attributes.print_name')}}</span>
</th>
<th>
<span>{{__('validation.attributes.usertype_money')}}</span>
</th>
<th>
<span>{{__('validation.attributes.usertype_remarks')}}</span>
</th>
</tr>
</thead>
<tbody>
@foreach($list as $item)
<tr>
<td class='sm-item text-left'>
<span>{{mb_substr($item->user_categoryid, 0, 10)}}</span></td>
<td class='sm-item text-right'>
<span>{{mb_substr($item->print_name, 0, 10)}}</span></td>
<td class='sm-item text-right'>
<span>{{mb_substr($item->usertype_money, 0, 10)}}</span></td>
<td class='sm-item text-right'>
<span>{{mb_substr($item->usertype_remarks, 0, 20)}}</span></td>
</tr>
@endforeach
</tbody>
</table>
</div>
</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>
</div>
</section>
<!-- /.content -->
@endsection

View File

@ -6,38 +6,40 @@
<div class="row mb-2">
<div class="col-lg-6">
<h1 class="m-0 text-dark">{{__('利用者分類マスタ')}}</h1>
</div><!-- /.col -->
</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><!-- /.col -->
</div><!-- /.row -->
</div><!-- /.container-fluid -->
</div>
</div>
</div>
</div>
<!-- /.content-header -->
<!-- Main content -->
<section class="content">
<div class="container-fluid">
<!-- SELECT2 EXAMPLE -->
<div class="row">
<form action="{{route('usertypes')}}" method='post' id='list-form'>
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<form action="{{route('usertypes')}}" method="post" id="list-form">
@csrf
<input type="hidden" value="{{$sort}}" name="sort" id="sort">
<input type="hidden" value="{{$sort_type}}" name="sort_type" id="sort_type">
</form>
<div class="container-fluid mb20">
<button type="submit" class="btn btn-sm btn-default mr10" name="delete"
id="delete">{{__('削除')}}</button>
<button type="submit" class="btn btn-sm btn-default mr10" name="import_csv" id="import_csv" action="{{route('usertypes_import')}}">{{__('インポート')}}</button>
<button type="submit" class="btn btn-sm btn-default mr10" name="export_csv" id="export_csv" action="{{route('usertypes_export')}}">{{__('CSV出力')}}</button>
{{ $list->appends(['sort' => $sort,'sort_type'=>$sort_type])->links('pagination') }}
<div class="d-flex justify-content-between align-items-center">
<div>
<a href="{{route('usertype_add')}}" class="btn btn-sm btn-default mr10">{{__('新規')}}</a>
<button type="submit" class="btn btn-sm btn-default mr10" form="form_delete" name="delete"
id="delete">{{__('削除')}}</button>
<button type="submit" class="btn btn-sm btn-default mr10" name="export_csv" id="export_csv"
action="{{route('usertypes_export')}}">{{__('CSV出力')}}</button>
</div>
<div>
{{ $list->appends(['sort' => $sort, 'sort_type' => $sort_type])->links('pagination') }}
</div>
</div>
</div>
<div class="form col-lg-12">
@if(Session::has('success'))
@ -59,90 +61,93 @@
</div>
@endif
</div>
<div class="col-lg-12 row sample03-wrapper no_padding_right mb20">
<div class="col-xl-2 col-lg-2 col-md-2 col-sm-3 col-xs-3 table_left">
<form action="{{route('usertypes_delete')}}" method="post" id="form_delete">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<table class="table dataTable">
<thead>
<tr>
<th>
<input type="checkbox" class="minimal m-0" id="checkbox_all">
</th>
</tr>
</thead>
<tbody>
@foreach($list as $item)
<tr role="row">
<td>
<input type="checkbox" class="minimal m-0 checkbox"
value="{{$item->user_categoryid}}" name="pk[]">
<div class="btn_action">
{{--<a href="{{route('usertype_add')}}" class="btn btn-sm btn-default">詳細</a>--}}
<a href="{{route('usertype_info',['pk'=>$item->user_categoryid])}}"
class="btn btn-sm btn-default ml10">{{__('編集')}}</a>
</div>
</td>
</tr>
@endforeach
</tbody>
</table>
</form>
</div>
<div class="col-lg-10 col-xl-10 col-md-10 col-sm-9 col-xs-9 table_right no_padding_right">
<div class="col-lg-12 sample03-wrapper no_padding_right mb20">
<form action="{{route('usertypes_delete')}}" method="post" id="form_delete">
@csrf
<div class="scroll">
<table class="table dataTable">
<table class="table table-bordered table-hover rv-table mb-0 text-nowrap">
<thead>
<tr>
<!-- 利用者分類ID -->
<th class="sorting @if($sort=="user_categoryid"){{$sort_type == 'asc'?'sorting_asc':'sorting_desc'}}@endif"
sort="user_categoryid">
<span>{{__('validation.attributes.user_categoryid')}}</span>
</th>
<!--分類名 -->
<th class="sorting @if($sort=="print_name"){{$sort_type == 'asc'?'sorting_asc':'sorting_desc'}}@endif"
sort="print_name"><span>{{__('validation.attributes.print_name')}}</span>
</th>
<!-- 適用料率 -->
<th>
<span>{{__('validation.attributes.usertype_money')}}</span>
</th>
<!-- 備考 -->
<th>
<span>{{__('validation.attributes.usertype_remarks')}}</span>
</th>
</tr>
<tr>
<th style="width:80px;">
<input type="checkbox" id="chkAll">
<span class="ml-1"></span>
</th>
<th class="sorting @if($sort == 'user_categoryid'){{$sort_type == 'asc' ? 'sorting_asc' : 'sorting_desc'}}@endif"
sort="user_categoryid">
<span>{{__('利用者分類ID')}}</span>
</th>
<th class="sorting @if($sort == 'print_name'){{$sort_type == 'asc' ? 'sorting_asc' : 'sorting_desc'}}@endif"
sort="print_name">
<span>{{__('分類名')}}</span>
</th>
<th>
<span>{{__('適用料率')}}</span>
</th>
<th>
<span>{{__('備考')}}</span>
</th>
</tr>
</thead>
<tbody>
@foreach($list as $item)
<tr>
<!-- 利用者分類ID -->
<td class='sm-item text-left'>
<span>{{mb_substr($item->user_categoryid, 0, 10)}}</span></td>
<!-- 分類名 -->
<td class='sm-item text-right'>
<span>{{mb_substr($item->print_name, 0, 10)}}</span></td>
<!-- 適用料率 -->
<td class='sm-item text-right'>
<span>{{mb_substr($item->usertype_money, 0, 10)}}</span></td>
<!-- 備考 -->
<td class='sm-item text-right'>
<span>{{mb_substr($item->usertype_remarks, 0, 20)}}</span></td>
</tr>
@endforeach
@foreach($list as $item)
<tr>
<td style="background-color:#faebd7;" class="op-cell">
<div class="d-flex align-items-center">
<input type="checkbox" class="mr-2 chkRow" name="pk[]"
value="{{ $item->user_categoryid }}">
<a href="{{ route('usertype_edit', ['id' => $item->user_categoryid]) }}"
class="btn btn-sm btn-default">編集</a>
</div>
</td>
<td class='sm-item text-left'>
<span>{{mb_substr($item->user_categoryid, 0, 10)}}</span>
</td>
<td class='sm-item text-left'>
<span>{{mb_substr($item->print_name, 0, 10)}}</span>
</td>
<td class='sm-item text-right'>
<span>{{mb_substr($item->usertype_money, 0, 10)}}</span>
</td>
<td class='sm-item text-left'>
<span>{{mb_substr($item->usertype_remarks, 0, 20)}}</span>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</form>
</div>
</div>
<!-- /.row -->
</div><!-- /.container-fluid -->
</div>
</section>
<!-- /.content -->
<script>
(function () {
// 全選択チェック
var chkAll = document.getElementById('chkAll');
var chks = document.getElementsByClassName('chkRow');
if (chkAll) {
chkAll.addEventListener('change', function () {
Array.prototype.forEach.call(chks, function (c) { c.checked = chkAll.checked; });
});
}
// 一括削除ボタン
var btn = document.getElementById('btnBulkDel');
var form = document.getElementById('bulkDeleteForm');
if (btn && form) {
btn.addEventListener('click', function () {
var any = false;
Array.prototype.forEach.call(chks, function (c) { if (c.checked) any = true; });
if (!any) { alert('削除対象の行を選択してください。'); return; }
if (confirm('選択した予約を削除します。よろしいですか?')) {
form.submit();
}
});
}
})();
</script>
@endsection

View File

@ -451,7 +451,6 @@
<?php $route = [
'opes',
'ptypes',
'prices',
'parks',
'managers',
'settlement_transactions',
@ -464,8 +463,9 @@
'pricelist',
'prices',
'psection',
'price_add',
'price_info',
'price_edit',
];?>
<li
class="nav-item has-treeview @if(in_array(app('router')->currentRouteName(), $route)) menu-open @endif">