Compare commits
2 Commits
f674043430
...
b535309a5f
| Author | SHA1 | Date | |
|---|---|---|---|
| b535309a5f | |||
| 5e00cbc99a |
87
app/Http/Controllers/ParkDetailController.php
Normal file
87
app/Http/Controllers/ParkDetailController.php
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Support\Facades\Log;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
|
||||||
|
class ParkDetailController extends Controller
|
||||||
|
{
|
||||||
|
public function show($park_id)
|
||||||
|
{
|
||||||
|
$park = DB::table('park')->where('park_id', $park_id)->first();
|
||||||
|
Log::debug('park:', (array)$park);
|
||||||
|
$zones = DB::table('zone')
|
||||||
|
->leftJoin('psection', 'zone.psection_id', '=', 'psection.psection_id')
|
||||||
|
->leftJoin('ptype', 'zone.ptype_id', '=', 'ptype.ptype_id')
|
||||||
|
->select('zone.*', 'psection.psection_subject', 'ptype.ptype_subject')
|
||||||
|
->where('zone.park_id', $park_id)
|
||||||
|
->get();
|
||||||
|
Log::debug('zones:', $zones->toArray());
|
||||||
|
$reserves = DB::table('reserve')
|
||||||
|
->join('zone', function ($join) {
|
||||||
|
$join->on('reserve.psection_id', '=', 'zone.psection_id')
|
||||||
|
->on('reserve.ptype_id', '=', 'zone.ptype_id');
|
||||||
|
})
|
||||||
|
->join('ptype', 'zone.ptype_id', '=', 'ptype.ptype_id')
|
||||||
|
->where('reserve.park_id', $park_id)
|
||||||
|
->where('reserve.valid_flag', 1)
|
||||||
|
->select('reserve.*', 'ptype.ptype_subject')
|
||||||
|
->get();
|
||||||
|
Log::debug('reserves:', $reserves->toArray());
|
||||||
|
|
||||||
|
$zoneStandardSum = [];
|
||||||
|
/*foreach ($zones as $zone) {
|
||||||
|
$psectionId = $zone->psection_id;
|
||||||
|
if (!isset($zoneStandardSum[$psectionId])) {
|
||||||
|
$zoneStandardSum[$psectionId] = 0;
|
||||||
|
}
|
||||||
|
$zoneStandardSum[$psectionId] += $zone->zone_standard;
|
||||||
|
}*/
|
||||||
|
$zoneStandardSum = [];
|
||||||
|
foreach ($zones as $zone) {
|
||||||
|
$key = $zone->psection_subject; // 「自転車」「原付」など
|
||||||
|
if (!isset($zoneStandardSum[$key])) {
|
||||||
|
$zoneStandardSum[$key] = 0;
|
||||||
|
}
|
||||||
|
$zoneStandardSum[$key] += $zone->zone_standard;
|
||||||
|
}
|
||||||
|
Log::debug('zoneStandardSum:', $zoneStandardSum);
|
||||||
|
|
||||||
|
// 空き台数集計用配列
|
||||||
|
$vacancyData = [];
|
||||||
|
foreach ($zones as $zone) {
|
||||||
|
$key = $zone->psection_id . '_' . $zone->ptype_subject;
|
||||||
|
if (!isset($vacancyData[$key])) {
|
||||||
|
$vacancyData[$key] = 0;
|
||||||
|
}
|
||||||
|
// zone_tolerance - zone_number を合計
|
||||||
|
$vacancyData[$key] += ($zone->zone_tolerance - $zone->zone_number);
|
||||||
|
}
|
||||||
|
Log::debug('vacancyData:', $vacancyData);
|
||||||
|
|
||||||
|
// reserve件数分を減算
|
||||||
|
foreach ($reserves as $reserve) {
|
||||||
|
$key = $reserve->psection_id . '_' . $reserve->ptype_subject;
|
||||||
|
if (isset($vacancyData[$key])) {
|
||||||
|
$vacancyData[$key] -= 1; // 1件分減算
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新期間取得
|
||||||
|
$city_grace_periods = DB::table('city')
|
||||||
|
->select('city_id', 'update_grace_period_start_date', 'update_grace_period_start_time', 'update_grace_period_end_date', 'update_grace_period_end_time')
|
||||||
|
->whereIn('city_id', function ($query) {
|
||||||
|
$query->select('city_id')->from('park');
|
||||||
|
})
|
||||||
|
->get()
|
||||||
|
->keyBy('city_id');
|
||||||
|
Log::debug('city_grace_periods:', $city_grace_periods->toArray());
|
||||||
|
|
||||||
|
// 必要なら他テーブルJOINや追加情報も取得
|
||||||
|
return response()->json([
|
||||||
|
'html' => view('regular_contract.park_detail', compact('park', 'zones', 'reserves', 'zoneStandardSum', 'vacancyData', 'city_grace_periods'))->render()
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -396,8 +396,6 @@ class RegularContractController extends Controller
|
|||||||
// 必要な各マスタ情報を取得
|
// 必要な各マスタ情報を取得
|
||||||
$user = DB::table('user')->where('user_id', $user_id)->first();
|
$user = DB::table('user')->where('user_id', $user_id)->first();
|
||||||
$contract = DB::table('regular_contract')->where('contract_id', $contract_id)->first();
|
$contract = DB::table('regular_contract')->where('contract_id', $contract_id)->first();
|
||||||
// $city_id = DB::table('park')->where('park_id', $contract->park_id)->value('city_id');
|
|
||||||
//$city_name = DB::table('city')->where('city_id', $city_id)->value('city_name');
|
|
||||||
$park = DB::table('park')->where('park_id', $contract->park_id)->first();
|
$park = DB::table('park')->where('park_id', $contract->park_id)->first();
|
||||||
$city = DB::table('city')->where('city_id', $park->city_id)->first();
|
$city = DB::table('city')->where('city_id', $park->city_id)->first();
|
||||||
$regular_type = DB::table('regular_type')->where('city_id', $city->city_id)->first();
|
$regular_type = DB::table('regular_type')->where('city_id', $city->city_id)->first();
|
||||||
|
|||||||
793
app/Http/Controllers/RegularContractCreateController.php
Normal file
793
app/Http/Controllers/RegularContractCreateController.php
Normal file
@ -0,0 +1,793 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
use Illuminate\Validation\Rule;
|
||||||
|
use Illuminate\Support\Facades\Validator;
|
||||||
|
use Illuminate\Validation\ValidationException;
|
||||||
|
use Illuminate\Support\Facades\Redirect;
|
||||||
|
use function redirect;
|
||||||
|
|
||||||
|
class RegularContractCreateController extends Controller
|
||||||
|
{
|
||||||
|
// 新規作成画面表示
|
||||||
|
public function show()
|
||||||
|
{
|
||||||
|
$user_id = session('user_id');
|
||||||
|
if (!$user_id) {
|
||||||
|
return redirect('/login');
|
||||||
|
}
|
||||||
|
$user = DB::table('user')->where('user_id', $user_id)->first();
|
||||||
|
|
||||||
|
// 市町村名(park→city JOINで重複排除)
|
||||||
|
$cities = DB::table('park')
|
||||||
|
->join('city', 'park.city_id', '=', 'city.city_id')
|
||||||
|
->select('city.city_id', 'city.city_name')
|
||||||
|
->distinct()
|
||||||
|
->get();
|
||||||
|
|
||||||
|
// city_idごとの更新可能期間情報を取得
|
||||||
|
$city_grace_periods = DB::table('city')
|
||||||
|
->select('city_id', 'update_grace_period_start_date', 'update_grace_period_start_time', 'update_grace_period_end_date', 'update_grace_period_end_time')
|
||||||
|
->get()
|
||||||
|
->keyBy('city_id');
|
||||||
|
|
||||||
|
// 駅名(stationテーブルのstation_neighbor_station全件)
|
||||||
|
$stations = DB::table('station')
|
||||||
|
->select('station_neighbor_station')
|
||||||
|
->distinct()
|
||||||
|
->get();
|
||||||
|
|
||||||
|
// 駐輪場名(parkテーブルのpark_name全件)
|
||||||
|
$parks = DB::table('park')
|
||||||
|
->select('park_id', 'park_name')
|
||||||
|
->distinct()
|
||||||
|
->get();
|
||||||
|
|
||||||
|
// テーブル表示用データ(park/city/station JOIN, park_id昇順, 10件ずつページング)
|
||||||
|
$page = request()->input('page', 1);
|
||||||
|
$perPage = 10;
|
||||||
|
$city_id = request()->input('city_id');
|
||||||
|
$station_name = request()->input('station_neighbor_station');
|
||||||
|
$park_id = request()->input('park_id');
|
||||||
|
|
||||||
|
$query = DB::table('park')
|
||||||
|
->join('city', 'park.city_id', '=', 'city.city_id')
|
||||||
|
->leftJoin('station', 'park.park_id', '=', 'station.park_id')
|
||||||
|
->select(
|
||||||
|
'park.park_id',
|
||||||
|
'park.park_name',
|
||||||
|
'park.park_ruby',
|
||||||
|
'city.city_name',
|
||||||
|
'city.city_id',
|
||||||
|
'station.station_neighbor_station',
|
||||||
|
'station.station_name_ruby'
|
||||||
|
);
|
||||||
|
|
||||||
|
if ($city_id) {
|
||||||
|
$query->where('city.city_id', $city_id);
|
||||||
|
}
|
||||||
|
if ($station_name) {
|
||||||
|
$query->where('station.station_neighbor_station', $station_name);
|
||||||
|
}
|
||||||
|
if ($park_id) {
|
||||||
|
$query->where('park.park_id', $park_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 並び替えパラメータ取得
|
||||||
|
$sort = request()->input('sort', 'park_id');
|
||||||
|
$order = request()->input('order', 'asc');
|
||||||
|
$sortable = [
|
||||||
|
'park_ruby' => 'park.park_ruby',
|
||||||
|
'city_id' => 'city.city_id',
|
||||||
|
'station_name_ruby' => 'station.station_name_ruby',
|
||||||
|
'park_id' => 'park.park_id',
|
||||||
|
];
|
||||||
|
if (isset($sortable[$sort])) {
|
||||||
|
$query->orderBy($sortable[$sort], $order);
|
||||||
|
} else {
|
||||||
|
$query->orderBy('park.park_id', 'asc');
|
||||||
|
}
|
||||||
|
|
||||||
|
$total = $query->count();
|
||||||
|
$parks_table = $query->skip(($page - 1) * $perPage)->take($perPage)->get();
|
||||||
|
|
||||||
|
// zoneテーブルデータを取得(psectionテーブルとJOINしてpsection_subjectも取得)
|
||||||
|
$zones = DB::table('zone')
|
||||||
|
->leftJoin('psection', 'zone.psection_id', '=', 'psection.psection_id')
|
||||||
|
->select('zone.zone_id', 'zone.park_id', 'zone.psection_id', 'zone.zone_number', 'zone.zone_tolerance', 'psection.psection_subject')
|
||||||
|
->get()
|
||||||
|
->groupBy('park_id');
|
||||||
|
|
||||||
|
// 空き予約マスタデータを取得
|
||||||
|
$reserve = DB::table('reserve')
|
||||||
|
->select('reserve_id', 'park_id', 'psection_id')
|
||||||
|
->where('valid_flag', 1)
|
||||||
|
->get()
|
||||||
|
->groupBy('park_id');
|
||||||
|
|
||||||
|
\Log::info('新規定期契約-駐輪場選択画面にアクセス', [
|
||||||
|
'user_id' => $user_id,
|
||||||
|
]);
|
||||||
|
|
||||||
|
return view('regular_contract.create', [
|
||||||
|
'active_menu' => 'SWC-8-1', // この画面のID
|
||||||
|
'user_name' => $user ? $user->user_name : '', // ユーザー名(ヘッダー用)
|
||||||
|
'cities' => $cities,
|
||||||
|
'stations' => $stations,
|
||||||
|
'parks' => $parks,
|
||||||
|
'parks_table' => $parks_table,
|
||||||
|
'parks_table_total' => $total,
|
||||||
|
'parks_table_page' => $page,
|
||||||
|
'parks_table_perPage' => $perPage,
|
||||||
|
'zones' => $zones,
|
||||||
|
'city_grace_periods' => $city_grace_periods,
|
||||||
|
'reserve' => $reserve,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function regulationCheck(Request $request)
|
||||||
|
{
|
||||||
|
// GETパラメータを取得
|
||||||
|
$parkId = $request->query('park_id');
|
||||||
|
$psectionId = $request->query('psection_id');
|
||||||
|
$ptypeId = $request->query('ptype_id');
|
||||||
|
|
||||||
|
// 必要なDB処理やロジック
|
||||||
|
$park_regulation = DB::table('park')->where('park_id', $parkId)->value('parking_regulations_flag');
|
||||||
|
|
||||||
|
if ($park_regulation == 1) {
|
||||||
|
// 駐輪規定画面へ
|
||||||
|
return redirect()->route('regular_contract.regulation', [
|
||||||
|
'park_id' => $parkId,
|
||||||
|
'psection_id' => $psectionId,
|
||||||
|
'ptype_id' => $ptypeId,
|
||||||
|
]);
|
||||||
|
} else {
|
||||||
|
// 契約情報入力画面へ
|
||||||
|
return redirect()->route('regular_contract.input', [
|
||||||
|
'park_id' => $parkId,
|
||||||
|
'psection_id' => $psectionId,
|
||||||
|
'ptype_id' => $ptypeId,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function showRegulation(Request $request)
|
||||||
|
{
|
||||||
|
$user_id = session('user_id');
|
||||||
|
if (!$user_id) {
|
||||||
|
return redirect('/login');
|
||||||
|
}
|
||||||
|
$user_name = DB::table('user')->where('user_id', $user_id)->value('user_name');
|
||||||
|
|
||||||
|
// 必要なパラメータ取得
|
||||||
|
$parkId = $request->query('park_id');
|
||||||
|
$psectionId = $request->query('psection_id');
|
||||||
|
$ptypeId = $request->query('ptype_id');
|
||||||
|
|
||||||
|
$park_name = DB::table('park')->where('park_id', $parkId)->value('park_name');
|
||||||
|
$psection_subject = DB::table('psection')->where('psection_id', $psectionId)->value('psection_subject');
|
||||||
|
$ptype_subject = DB::table('ptype')->where('ptype_id', $ptypeId)->value('ptype_subject');
|
||||||
|
$regulations_text = DB::table('parking_regulations')
|
||||||
|
->where('park_id', $parkId)
|
||||||
|
->where('psection_id', $psectionId)
|
||||||
|
->where('ptype_id', $ptypeId)
|
||||||
|
->value('regulations_text');
|
||||||
|
|
||||||
|
\Log::info('駐輪規定確認画面にアクセス', [
|
||||||
|
'user_id' => $user_id,
|
||||||
|
]);
|
||||||
|
|
||||||
|
return view('regular_contract.regulation', [
|
||||||
|
'park_id' => $parkId,
|
||||||
|
'park_name' => $park_name,
|
||||||
|
'psection_id' => $psectionId,
|
||||||
|
'psection_subject' => $psection_subject,
|
||||||
|
'ptype_id' => $ptypeId,
|
||||||
|
'ptype_subject' => $ptype_subject,
|
||||||
|
'regulations_text' => $regulations_text,
|
||||||
|
'active_menu' => 'SWC-8-1', // この画面のID
|
||||||
|
'user_name' => $user_name, // ユーザー名(ヘッダー用)
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function insertRegulation(Request $request)
|
||||||
|
{
|
||||||
|
$user_id = session('user_id');
|
||||||
|
if (!$user_id) {
|
||||||
|
return redirect('/login');
|
||||||
|
}
|
||||||
|
$park_id = $request->input('park_id');
|
||||||
|
$psection_id = $request->input('psection_id');
|
||||||
|
$ptype_id = $request->input('ptype_id');
|
||||||
|
|
||||||
|
DB::table('parking_regulations_read')->insert([
|
||||||
|
'park_id' => $park_id,
|
||||||
|
'psection_id' => $psection_id,
|
||||||
|
'ptype_id' => $ptype_id,
|
||||||
|
'user_id' => $user_id,
|
||||||
|
'created_at' => now(),
|
||||||
|
]);
|
||||||
|
|
||||||
|
// 契約入力画面へリダイレクト
|
||||||
|
return redirect()->route('regular_contract.input', [
|
||||||
|
'park_id' => $park_id,
|
||||||
|
'psection_id' => $psection_id,
|
||||||
|
'ptype_id' => $ptype_id,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 契約入力画面表示
|
||||||
|
public function showContractForm(Request $request)
|
||||||
|
{
|
||||||
|
$user_id = session('user_id');
|
||||||
|
if (!$user_id) {
|
||||||
|
return redirect('/login');
|
||||||
|
}
|
||||||
|
$user = DB::table('user')->where('user_id', $user_id)->first();
|
||||||
|
$park_id = $request->query('park_id');
|
||||||
|
$park = DB::table('park')->where('park_id', $park_id)->first();
|
||||||
|
$psection_id = $request->query('psection_id');
|
||||||
|
$ptype_id = $request->query('ptype_id');
|
||||||
|
$city_id = DB::table('park')->where('park_id', $park_id)->value('city_id');
|
||||||
|
$terms_text = DB::table('terms')->where('city_id', $city_id)->value('terms_text');
|
||||||
|
// 利用者区分をusertypeテーブルから取得
|
||||||
|
$user_category = '';
|
||||||
|
if (isset($user->user_categoryid)) {
|
||||||
|
$usertype = DB::table('usertype')
|
||||||
|
->where('user_categoryid', $user->user_categoryid)
|
||||||
|
->first();
|
||||||
|
if ($usertype && isset($usertype->usertype_subject1)) {
|
||||||
|
$user_category = $usertype->usertype_subject1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$user->user_homephone = explode('-', $user->user_homephone ?? '');
|
||||||
|
$user->user_mobile = explode('-', $user->user_mobile ?? '');
|
||||||
|
$user->user_regident_zip_1 = substr($user->user_regident_zip ?? '', 0, 3);
|
||||||
|
$user->user_regident_zip_2 = substr($user->user_regident_zip ?? '', 3, 4);
|
||||||
|
$user->user_relate_zip_1 = substr($user->user_relate_zip ?? '', 0, 3);
|
||||||
|
$user->user_relate_zip_2 = substr($user->user_relate_zip ?? '', 3, 4);
|
||||||
|
|
||||||
|
\Log::info('新規定期契約-契約情報入力画面にアクセス', [
|
||||||
|
'user_id' => $user_id,
|
||||||
|
]);
|
||||||
|
|
||||||
|
session()->forget('show_terms_modal');
|
||||||
|
|
||||||
|
return view('regular_contract.input', [
|
||||||
|
'park' => $park,
|
||||||
|
'psection_id' => $psection_id,
|
||||||
|
'ptype_id' => $ptype_id,
|
||||||
|
'terms_text' => $terms_text,
|
||||||
|
'user' => $user,
|
||||||
|
'user_name' => $user->user_name, // ユーザー名(ヘッダー用)
|
||||||
|
'active_menu' => 'SWC-8-1', // この画面のID
|
||||||
|
'user_category' => $user_category,
|
||||||
|
'show_terms_modal' => true,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
public function inputCheck(Request $request)
|
||||||
|
{
|
||||||
|
$user_id = session('user_id');
|
||||||
|
if (!$user_id) {
|
||||||
|
return redirect('/login');
|
||||||
|
}
|
||||||
|
$user = DB::table('user')->where('user_id', $user_id)->first();
|
||||||
|
|
||||||
|
$park_id = $request->input('park_id');
|
||||||
|
$park = DB::table('park')->where('park_id', $park_id)->first();
|
||||||
|
|
||||||
|
// バリデーションルール
|
||||||
|
$rules = [
|
||||||
|
'user_phonetic' => ['required', 'regex:/^[ァ-ヶー \s]+$/u'],
|
||||||
|
'user_regident_zip_1' => 'required|digits:3',
|
||||||
|
'user_regident_zip_2' => 'required|digits:4',
|
||||||
|
'user_regident_pre' => [
|
||||||
|
'required',
|
||||||
|
Rule::in([
|
||||||
|
'北海道',
|
||||||
|
'青森県',
|
||||||
|
'岩手県',
|
||||||
|
'宮城県',
|
||||||
|
'秋田県',
|
||||||
|
'山形県',
|
||||||
|
'福島県',
|
||||||
|
'茨城県',
|
||||||
|
'栃木県',
|
||||||
|
'群馬県',
|
||||||
|
'埼玉県',
|
||||||
|
'千葉県',
|
||||||
|
'東京都',
|
||||||
|
'神奈川県',
|
||||||
|
'新潟県',
|
||||||
|
'富山県',
|
||||||
|
'石川県',
|
||||||
|
'福井県',
|
||||||
|
'山梨県',
|
||||||
|
'長野県',
|
||||||
|
'岐阜県',
|
||||||
|
'静岡県',
|
||||||
|
'愛知県',
|
||||||
|
'三重県',
|
||||||
|
'滋賀県',
|
||||||
|
'京都府',
|
||||||
|
'大阪府',
|
||||||
|
'兵庫県',
|
||||||
|
'奈良県',
|
||||||
|
'和歌山県',
|
||||||
|
'鳥取県',
|
||||||
|
'島根県',
|
||||||
|
'岡山県',
|
||||||
|
'広島県',
|
||||||
|
'山口県',
|
||||||
|
'徳島県',
|
||||||
|
'香川県',
|
||||||
|
'愛媛県',
|
||||||
|
'高知県',
|
||||||
|
'福岡県',
|
||||||
|
'佐賀県',
|
||||||
|
'長崎県',
|
||||||
|
'熊本県',
|
||||||
|
'大分県',
|
||||||
|
'宮崎県',
|
||||||
|
'鹿児島県',
|
||||||
|
'沖縄県'
|
||||||
|
]),
|
||||||
|
],
|
||||||
|
'user_regident_city' => ['required', 'string', 'max:20', 'regex:/^(?:(?![\xF0-\xF7][\x80-\xBF]{3}).)*$/'],
|
||||||
|
'user_regident_add' => ['required', 'string', 'max:50', 'regex:/^(?:(?![\xF0-\xF7][\x80-\xBF]{3}).)*$/'],
|
||||||
|
'user_homephone.*' => 'nullable|digits_between:1,5',
|
||||||
|
'user_mobile.*' => 'nullable|digits_between:1,5',
|
||||||
|
'user_submail' => 'nullable|email|different:user_primemail|max:80',
|
||||||
|
'user_category' => ['required', Rule::in(['一般', '学生'])],
|
||||||
|
'contract_reduction' => ['required', Rule::in(['はい', 'いいえ'])],
|
||||||
|
'user_relate_zip_1' => 'nullable|digits:3',
|
||||||
|
'user_relate_zip_2' => 'nullable|digits:4',
|
||||||
|
'user_relate_pre' => [
|
||||||
|
'nullable',
|
||||||
|
Rule::in([
|
||||||
|
'北海道',
|
||||||
|
'青森県',
|
||||||
|
'岩手県',
|
||||||
|
'宮城県',
|
||||||
|
'秋田県',
|
||||||
|
'山形県',
|
||||||
|
'福島県',
|
||||||
|
'茨城県',
|
||||||
|
'栃木県',
|
||||||
|
'群馬県',
|
||||||
|
'埼玉県',
|
||||||
|
'千葉県',
|
||||||
|
'東京都',
|
||||||
|
'神奈川県',
|
||||||
|
'新潟県',
|
||||||
|
'富山県',
|
||||||
|
'石川県',
|
||||||
|
'福井県',
|
||||||
|
'山梨県',
|
||||||
|
'長野県',
|
||||||
|
'岐阜県',
|
||||||
|
'静岡県',
|
||||||
|
'愛知県',
|
||||||
|
'三重県',
|
||||||
|
'滋賀県',
|
||||||
|
'京都府',
|
||||||
|
'大阪府',
|
||||||
|
'兵庫県',
|
||||||
|
'奈良県',
|
||||||
|
'和歌山県',
|
||||||
|
'鳥取県',
|
||||||
|
'島根県',
|
||||||
|
'岡山県',
|
||||||
|
'広島県',
|
||||||
|
'山口県',
|
||||||
|
'徳島県',
|
||||||
|
'香川県',
|
||||||
|
'愛媛県',
|
||||||
|
'高知県',
|
||||||
|
'福岡県',
|
||||||
|
'佐賀県',
|
||||||
|
'長崎県',
|
||||||
|
'熊本県',
|
||||||
|
'大分県',
|
||||||
|
'宮崎県',
|
||||||
|
'鹿児島県',
|
||||||
|
'沖縄県'
|
||||||
|
]),
|
||||||
|
],
|
||||||
|
'user_relate_city' => ['nullable', 'string', 'max:20', 'regex:/^(?:(?![\xF0-\xF7][\x80-\xBF]{3}).)*$/'],
|
||||||
|
'user_relate_add' => ['nullable', 'string', 'max:50', 'regex:/^(?:(?![\xF0-\xF7][\x80-\xBF]{3}).)*$/'],
|
||||||
|
];
|
||||||
|
// 性別欄が表示されている場合のみ必須
|
||||||
|
if ((int)$park->gender_display_flag === 1) {
|
||||||
|
$rules['user_gender'] = ['required', Rule::in(['男性', '女性'])];
|
||||||
|
}
|
||||||
|
// 生年月日欄が表示されている場合のみ必須
|
||||||
|
if ((int)$park->bd_display_flag === 1) {
|
||||||
|
$rules['user_birthdate'] = ['required', 'date'];
|
||||||
|
}
|
||||||
|
// 防犯登録番号欄が表示されている場合のみ必須
|
||||||
|
if ((int)$park->securityreg_display_flag === 1) {
|
||||||
|
$rules['user_securitynum'] = ['required', 'max:50', 'regex:/^[a-zA-Z0-9]+$/'];
|
||||||
|
}
|
||||||
|
// 利用者区分ごとの追加バリデーション
|
||||||
|
if ($request->input('user_category') === '学生') {
|
||||||
|
$rules['user_school'] = ['required', 'string', 'max:50', 'regex:/^(?:(?![\xF0-\xF7][\x80-\xBF]{3}).)*$/'];
|
||||||
|
$rules['user_graduate'] = ['required', 'date'];
|
||||||
|
} else {
|
||||||
|
$rules['user_workplace'] = ['nullable', 'string', 'max:50', 'regex:/^(?:(?![\xF0-\xF7][\x80-\xBF]{3}).)*$/'];
|
||||||
|
}
|
||||||
|
$messages = [
|
||||||
|
'user_phonetic.required' => 'フリガナが入力されていません。',
|
||||||
|
'user_phonetic.regex' => 'フリガナはカタカナでご入力ください。',
|
||||||
|
'user_gender.required' => '性別が入力されていません。',
|
||||||
|
'user_gender.in' => '性別は「男性」または「女性」を選択してください。',
|
||||||
|
'user_regident_zip_1.required' => '居住所の郵便番号(前半3桁)が入力されていません。',
|
||||||
|
'user_regident_zip_2.required' => '居住所の郵便番号(後半4桁)が入力されていません。',
|
||||||
|
'user_regident_zip_1.digits' => '居住所の郵便番号(前半3桁)は3桁の数字で入力してください。',
|
||||||
|
'user_regident_zip_2.digits' => '居住所の郵便番号(後半4桁)は4桁の数字で入力してください。',
|
||||||
|
'user_regident_pre.required' => '居住所の都道府県が選択されていません。',
|
||||||
|
'user_regident_pre.in' => '都道府県は選択肢から選んでください。',
|
||||||
|
'user_regident_city.required' => '居住所の市区町村が入力されていません。',
|
||||||
|
'user_regident_city.max' => '居住所の市区町村は20文字以内で入力してください。',
|
||||||
|
'user_regident_city.regex' => '居住所の市区町村に絵文字などの特殊文字は使用できません。',
|
||||||
|
'user_regident_add.required' => '居住所の住所が入力されていません。',
|
||||||
|
'user_regident_add.max' => '居住所の住所は50文字以内で入力してください。',
|
||||||
|
'user_regident_add.regex' => '居住所の住所に絵文字などの特殊文字は使用できません。',
|
||||||
|
'user_birthdate.required' => '生年月日が入力されていません。',
|
||||||
|
'user_birthdate.date' => '生年月日は正しい日付で入力してください。',
|
||||||
|
'user_homephone.*.digits_between' => '自宅電話番号はそれぞれ1~5桁の数字で入力してください。',
|
||||||
|
'user_mobile.*.digits_between' => '携帯電話番号はそれぞれ1~5桁の数字で入力してください。',
|
||||||
|
'user_submail.email' => '予備メールアドレスは正しい形式で入力してください。',
|
||||||
|
'user_submail.max' => '予備メールアドレスは80文字以内で入力してください。',
|
||||||
|
'user_submail.different' => 'メールアドレスと予備メールアドレスに同じアドレスを入力できません。',
|
||||||
|
'user_category.required' => '利用者区分は必須です。',
|
||||||
|
'user_category.in' => '利用者区分の値が不正です。',
|
||||||
|
'contract_reduction.required' => '減免が選択されていません。',
|
||||||
|
'contract_reduction.in' => '減免の値が不正です。',
|
||||||
|
'user_workplace.max' => '勤務先は50文字以内で入力してください。',
|
||||||
|
'user_workplace.regex' => '勤務先に絵文字などの特殊文字は使用できません。',
|
||||||
|
'user_school.required' => '学校名が入力されていません。',
|
||||||
|
'user_school.max' => '学校名は50文字以内で入力してください。',
|
||||||
|
'user_school.regex' => '学校名に絵文字などの特殊文字は使用できません。',
|
||||||
|
'user_graduate.required' => '卒業年月日が入力されていません。',
|
||||||
|
'user_graduate.date' => '卒業年月日は正しい日付で入力してください。',
|
||||||
|
'user_relate_zip_1.digits' => '住所の郵便番号(前半3桁)は3桁の数字で入力してください。',
|
||||||
|
'user_relate_zip_2.digits' => '住所の郵便番号(後半4桁)は4桁の数字で入力してください。',
|
||||||
|
'user_relate_pre.in' => '住所の都道府県は選択肢から選んでください。',
|
||||||
|
'user_relate_city.max' => '住所の市区町村は20文字以内で入力してください。',
|
||||||
|
'user_relate_city.regex' => '住所の市区町村に絵文字などの特殊文字は使用できません。',
|
||||||
|
'user_relate_add.max' => '住所は50文字以内で入力してください。',
|
||||||
|
'user_relate_add.regex' => '住所に絵文字などの特殊文字は使用できません。',
|
||||||
|
'user_securitynum.required' => '防犯登録番号が入力されていません。',
|
||||||
|
'user_securitynum.max' => '防犯登録番号は50文字以内で入力してください。',
|
||||||
|
'user_securitynum.regex' => '防犯登録番号は英数字のみで入力してください。',
|
||||||
|
];
|
||||||
|
try {
|
||||||
|
$validated = $request->validate($rules, $messages);
|
||||||
|
} catch (ValidationException $e) {
|
||||||
|
return Redirect()->back()
|
||||||
|
->withErrors($e->validator)
|
||||||
|
->withInput($request->except('_token') + ['show_terms_modal' => false]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (empty(implode('', $request->input('user_homephone', []))) && empty(implode('', $request->input('user_mobile', [])))) {
|
||||||
|
return redirect()->back()
|
||||||
|
->withErrors(['user_homephone' => '自宅電話番号または携帯電話番号のいずれかは必須です'])
|
||||||
|
->withInput($request->except('_token') + ['show_terms_modal' => false]);
|
||||||
|
}
|
||||||
|
|
||||||
|
$city = DB::table('city')->where('city_id', $park->city_id)->first();
|
||||||
|
$matched = (mb_strpos($request->user_regident_city, $city->city_name) !== false);
|
||||||
|
if ($matched === true) {
|
||||||
|
$ward_residents = 1;
|
||||||
|
DB::table('user')
|
||||||
|
->where('user_id', $user->user_id)
|
||||||
|
->update(['ward_residents' => $ward_residents]);
|
||||||
|
} else {
|
||||||
|
$contract_allowable_city_name = DB::table('contract_allowable_city')->where('city_id', $city->city_id)->value('contract_allowable_city_name');
|
||||||
|
$matched_allowable = (mb_strpos($request->user_regident_city, $contract_allowable_city_name) !== false);
|
||||||
|
if ($matched_allowable) {
|
||||||
|
$ward_residents = 0;
|
||||||
|
DB::table('user')
|
||||||
|
->where('user_id', $user->user_id)
|
||||||
|
->update(['ward_residents' => $ward_residents]);
|
||||||
|
} else {
|
||||||
|
return redirect()->back()->withErrors(['契約対象地域にお住まいでないためお申込みできません'])->withInput()->with(['show_terms_modal' => false]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($ward_residents == 1) {
|
||||||
|
$usertype_subject2 = '区民';
|
||||||
|
} else {
|
||||||
|
$usertype_subject2 = '区民外';
|
||||||
|
}
|
||||||
|
|
||||||
|
$user_categoryid = DB::table('usertype')
|
||||||
|
->where('usertype_subject1', $request->user_category)
|
||||||
|
->where('usertype_subject2', $usertype_subject2)
|
||||||
|
->value('user_categoryid');
|
||||||
|
|
||||||
|
$updateData = [
|
||||||
|
'user_categoryid' => $user_categoryid,
|
||||||
|
'user_phonetic' => $request->user_phonetic,
|
||||||
|
'user_mobile' => implode('-', $request->input('user_mobile', [])),
|
||||||
|
'user_homephone' => implode('-', $request->input('user_homephone', [])),
|
||||||
|
'user_submail' => $request->filled('user_submail') ? $request->user_submail : null,
|
||||||
|
'user_regident_zip' => $request->user_regident_zip_1 . $request->user_regident_zip_2,
|
||||||
|
'user_regident_pre' => $request->user_regident_pre,
|
||||||
|
'user_regident_city' => $request->user_regident_city,
|
||||||
|
'user_regident_add' => $request->user_regident_add,
|
||||||
|
'user_relate_zip' => ($request->filled('user_relate_zip_1') && $request->filled('user_relate_zip_2')) ? ($request->user_relate_zip_1 . $request->user_relate_zip_2) : null,
|
||||||
|
'user_relate_pre' => $request->filled('user_relate_pre') ? $request->user_relate_pre : null,
|
||||||
|
'user_relate_city' => $request->filled('user_relate_city') ? $request->user_relate_city : null,
|
||||||
|
'user_relate_add' => $request->filled('user_relate_add') ? $request->user_relate_add : null,
|
||||||
|
'ward_residents' => $ward_residents,
|
||||||
|
'user_workplace' => $request->user_category === '一般' ? $request->user_workplace : null,
|
||||||
|
'user_school' => $request->user_category === '学生' ? $request->user_school : null,
|
||||||
|
'user_graduate' => $request->user_category === '学生' ? $request->user_graduate : null,
|
||||||
|
'updated_at' => now()
|
||||||
|
];
|
||||||
|
|
||||||
|
// 性別欄が表示されている場合のみ追加
|
||||||
|
if (!empty($park->gender_display_flag) && $park->gender_display_flag == 1) {
|
||||||
|
$updateData['user_gender'] = $request->user_gender;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 生年月日欄が表示されている場合のみ追加
|
||||||
|
if (!empty($park->bd_display_flag) && $park->bd_display_flag == 1) {
|
||||||
|
$updateData['user_birthdate'] = $request->user_birthdate;
|
||||||
|
$updateData['user_age'] = $request->user_age;
|
||||||
|
}
|
||||||
|
|
||||||
|
DB::table('user')
|
||||||
|
->where('user_id', $user->user_id)
|
||||||
|
->update($updateData);
|
||||||
|
|
||||||
|
$zone_id = DB::table('zone')
|
||||||
|
->where('park_id', $request->park_id)
|
||||||
|
->where('ptype_id', $request->ptype_id)
|
||||||
|
->where('psection_id', $request->psection_id)
|
||||||
|
->orderBy('zone_sort', 'asc')
|
||||||
|
->value('zone_id');
|
||||||
|
|
||||||
|
$contract_id = DB::table('regular_contract')->insertGetId([
|
||||||
|
'created_at' => now(),
|
||||||
|
'updated_at' => now(),
|
||||||
|
'user_id' => $user->user_id,
|
||||||
|
'user_categoryid' => $user_categoryid,
|
||||||
|
'park_id' => $park->park_id,
|
||||||
|
'contract_created_at' => now(),
|
||||||
|
'contract_reduction' => $ward_residents,
|
||||||
|
'update_flag' => 2,
|
||||||
|
'contract_cancel_flag' => 0,
|
||||||
|
'psection_id' => $request->psection_id,
|
||||||
|
'ptype_id' => $request->ptype_id,
|
||||||
|
'zone_id' => $zone_id
|
||||||
|
]);
|
||||||
|
|
||||||
|
$contractUpdateData = [
|
||||||
|
'contract_qr_id' => DB::raw("TO_BASE64(AES_ENCRYPT($contract_id, 'LJLASR4FAS34SAADFA72ASDFALLSDRGT'))")
|
||||||
|
];
|
||||||
|
// 防犯登録番号が表示されている場合のみ追加
|
||||||
|
if (!empty($park->securityreg_display_flag) && $park->securityreg_display_flag == 1) {
|
||||||
|
$contractUpdateData['user_securitynum'] = $request->user_securitynum;
|
||||||
|
}
|
||||||
|
|
||||||
|
DB::table('regular_contract')
|
||||||
|
->where('contract_id', $contract_id)
|
||||||
|
->update($contractUpdateData);
|
||||||
|
|
||||||
|
return redirect()->route('regular_contract.upload_identity_create', [
|
||||||
|
'contract_id' => $contract_id,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function showUploadIdentityCreate(Request $request)
|
||||||
|
{
|
||||||
|
$user_id = session('user_id');
|
||||||
|
if (!$user_id) {
|
||||||
|
return redirect('/login');
|
||||||
|
}
|
||||||
|
$user_name = DB::table('user')->where('user_id', $user_id)->value('user_name');
|
||||||
|
$contract = DB::table('regular_contract')->where('contract_id', $request->contract_id)->first();
|
||||||
|
|
||||||
|
\Log::info('新規定期契約-本人確認書類アップロード画面にアクセス', [
|
||||||
|
'user_id' => $user_id,
|
||||||
|
]);
|
||||||
|
|
||||||
|
return view('regular_contract.upload_identity_create', [
|
||||||
|
'contract_id' => $request->contract_id,
|
||||||
|
'park_id' => $contract->park_id,
|
||||||
|
'psection_id' => $contract->psection_id,
|
||||||
|
'ptype_id' => $contract->ptype_id,
|
||||||
|
'user_name' => $user_name,
|
||||||
|
'active_menu' => 'SWC-8-1'
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
public function confirmUploadIdentity(Request $request, $contract_id)
|
||||||
|
{
|
||||||
|
$user_id = session('user_id');
|
||||||
|
if (!$user_id) {
|
||||||
|
return redirect('/login');
|
||||||
|
}
|
||||||
|
|
||||||
|
$validator = Validator::make($request->all(), [
|
||||||
|
'idcard_type' => 'required',
|
||||||
|
'user_idcard' => 'required|file|mimes:jpg,jpeg,png,pdf',
|
||||||
|
], [
|
||||||
|
'idcard_type.required' => '本人確認書類の種類を選択してください。',
|
||||||
|
'user_idcard.required' => '本人確認書類のおもて画像をアップロードしてください。',
|
||||||
|
'user_idcard.file' => '本人確認書類のおもて画像はファイルで指定してください。',
|
||||||
|
'user_idcard.mimes' => 'アップロードできるファイル形式はjpg、jpeg、png、pdfのみです。',
|
||||||
|
]);
|
||||||
|
if ($validator->fails()) {
|
||||||
|
return redirect()->route('regular_contract.upload_identity_create', [
|
||||||
|
'contract_id' => $contract_id,
|
||||||
|
])
|
||||||
|
->withErrors($validator)
|
||||||
|
->withInput();
|
||||||
|
}
|
||||||
|
|
||||||
|
// おもて画像保存
|
||||||
|
$front = $request->file('user_idcard');
|
||||||
|
$filename_front = uniqid('photo1_') . '.' . $front->getClientOriginalExtension();
|
||||||
|
$front->storeAs('photo', $filename_front, 'public');
|
||||||
|
// userテーブルに保存 本人確認書類チェック済フラグや更新日時も更新項目に追加
|
||||||
|
$updateData = [
|
||||||
|
'photo_filename1' => $filename_front,
|
||||||
|
'user_idcard' => $request->idcard_type,
|
||||||
|
'user_idcard_chk_flag' => 1,
|
||||||
|
'updated_at' => now(),
|
||||||
|
];
|
||||||
|
// ウラ画像がある場合保存し更新項目に追加
|
||||||
|
if ($request->hasFile('user_idcard2')) {
|
||||||
|
$back = $request->file('user_idcard2');
|
||||||
|
$filename_back = uniqid('photo2_') . '.' . $back->getClientOriginalExtension();
|
||||||
|
$back->storeAs('photo', $filename_back, 'public');
|
||||||
|
$updateData['photo_filename2'] = $filename_back;
|
||||||
|
}
|
||||||
|
DB::table('user')->where('user_id', $user_id)->update($updateData);
|
||||||
|
$user = DB::table('user')->where('user_id', $user_id)->first();
|
||||||
|
$park = DB::table('park')->where('park_id', $request->park_id)->first();
|
||||||
|
$psection = DB::table('psection')->where('psection_id', $request->psection_id)->first();
|
||||||
|
$usertype = DB::table('usertype')->where('user_categoryid', $user->user_categoryid)->first();
|
||||||
|
|
||||||
|
\Log::info('新規定期契約-契約情報確認画面にアクセス', [
|
||||||
|
'user_id' => $user_id,
|
||||||
|
]);
|
||||||
|
|
||||||
|
return view('regular_contract.create_confirm', [
|
||||||
|
'contract_id' => $request->contract_id,
|
||||||
|
'user' => $user,
|
||||||
|
'park' => $park,
|
||||||
|
'psection' => $psection,
|
||||||
|
'usertype' => $usertype,
|
||||||
|
'user_name' => $user->user_name,
|
||||||
|
'active_menu' => 'SWC-8-1'
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function createConfirmNext($contract_id)
|
||||||
|
{
|
||||||
|
$user_id = session('user_id');
|
||||||
|
if (!$user_id) {
|
||||||
|
return redirect('/login');
|
||||||
|
}
|
||||||
|
$user = DB::table('user')->where('user_id', $user_id)->first();
|
||||||
|
|
||||||
|
// 本人確認自動処理結果を取得
|
||||||
|
if ($user && $user->user_idcard_chk_flag == 2) {
|
||||||
|
// 本人確認OKの場合は利用期間選択画面へ
|
||||||
|
// 必要な各マスタ情報を取得
|
||||||
|
$contract = DB::table('regular_contract')->where('contract_id', $contract_id)->first();
|
||||||
|
$park = DB::table('park')->where('park_id', $contract->park_id)->first();
|
||||||
|
$city = DB::table('city')->where('city_id', $park->city_id)->first();
|
||||||
|
$regular_type = DB::table('regular_type')->where('city_id', $city->city_id)->first();
|
||||||
|
$usertype = DB::table('usertype')->where('user_categoryid', $contract->user_categoryid)->first();
|
||||||
|
|
||||||
|
// 2重化しているマスタのため現在のテーブル名を取得
|
||||||
|
$master_setting = DB::table('setting')->value('web_master');
|
||||||
|
$tableName = 'price' . $master_setting;
|
||||||
|
|
||||||
|
// 利用者区分に応じた逆利用フラグを取得
|
||||||
|
$inverse_use_flag_column = ($usertype->usertype_subject1 == '一般') ? 'inverse_use_flag1' : 'inverse_use_flag2';
|
||||||
|
$inverse_use_flag = $park->$inverse_use_flag_column;
|
||||||
|
|
||||||
|
if ($inverse_use_flag == 0) {
|
||||||
|
// regident_cityまたはrelate_cityが一致するか
|
||||||
|
$is_same = (
|
||||||
|
strpos($user->user_regident_city, $city->city_name) !== false ||
|
||||||
|
strpos($user->user_relate_city, $city->city_name) !== false
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
// regident_cityのみ一致するか
|
||||||
|
$is_same = (strpos($user->user_regident_city, $city->city_name) !== false);
|
||||||
|
}
|
||||||
|
|
||||||
|
$target_subject2 = $is_same ? '区民' : '区民外';
|
||||||
|
$user_categoryid = DB::table('usertype')
|
||||||
|
->where('usertype_subject1', $usertype->usertype_subject1)
|
||||||
|
->where('usertype_subject2', $target_subject2)
|
||||||
|
->where('usertype_subject3', $usertype->usertype_subject3)
|
||||||
|
->value('user_categoryid');
|
||||||
|
|
||||||
|
// 駐輪場所マスタから料金を取得
|
||||||
|
$prices = DB::table($tableName)
|
||||||
|
->where('park_id', $contract->park_id)
|
||||||
|
->where('psection_id', $contract->psection_id)
|
||||||
|
->where('ptype_id', $contract->ptype_id)
|
||||||
|
->where('user_categoryid', $user_categoryid)
|
||||||
|
->get();
|
||||||
|
|
||||||
|
\Log::info('利用期間選択画面にアクセス', [
|
||||||
|
'user_id' => $user_id,
|
||||||
|
]);
|
||||||
|
|
||||||
|
// 利用期間選択画面へ遷移
|
||||||
|
return view('regular_contract.create_select_period', [
|
||||||
|
'active_menu' => 'SWC-4-1', // マイページメニューの選択状態用
|
||||||
|
'user_name' => $user->user_name, // ユーザー名(ヘッダー用)
|
||||||
|
'contract_id' => $contract_id,
|
||||||
|
'regular_type' => $regular_type,
|
||||||
|
'prices' => $prices,
|
||||||
|
]);
|
||||||
|
} else {
|
||||||
|
// NGの場合は本人確認書類確認中画面へ
|
||||||
|
\Log::info('本人確認書類確認中画面にアクセス', [
|
||||||
|
'user_id' => $user_id,
|
||||||
|
]);
|
||||||
|
return view('regular_contract.create_idcard_checking', [
|
||||||
|
'active_menu' => 'SWC-8-1', // マイページメニューの選択状態用
|
||||||
|
'user_name' => $user->user_name, // ユーザー名(ヘッダー用)
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function selectPeriod(Request $request)
|
||||||
|
{
|
||||||
|
$user_id = session('user_id');
|
||||||
|
if (!$user_id) {
|
||||||
|
return redirect('/login');
|
||||||
|
}
|
||||||
|
|
||||||
|
// 期間選択チェック
|
||||||
|
$request->validate([
|
||||||
|
'month' => 'required',
|
||||||
|
], [
|
||||||
|
'month.required' => '契約期間が選択されていません。',
|
||||||
|
]);
|
||||||
|
|
||||||
|
$contract_id = $request->input('contract_id');
|
||||||
|
$month = $request->input('month');
|
||||||
|
$price = $request->input('price_' . $month);
|
||||||
|
|
||||||
|
\Log::info('契約期間更新処理', [
|
||||||
|
'month' => $month,
|
||||||
|
'price' => $price,
|
||||||
|
]);
|
||||||
|
$today = now();
|
||||||
|
$day = $today->day;
|
||||||
|
if ($day <= 19) {
|
||||||
|
// 今月の1日
|
||||||
|
$contract_periods = $today->copy()->startOfMonth()->format('Y-m-d');
|
||||||
|
} else {
|
||||||
|
// 翌月の1日
|
||||||
|
$contract_periods = $today->copy()->addMonth()->startOfMonth()->format('Y-m-d');
|
||||||
|
}
|
||||||
|
$contract_periode = Carbon::parse($contract_periods)->addMonths($month - 1)->endOfMonth()->format('Y-m-d');
|
||||||
|
// 契約更新
|
||||||
|
DB::table('regular_contract')->where('contract_id', $contract_id)->update([
|
||||||
|
'enable_months' => $month,
|
||||||
|
'billing_amount' => $price,
|
||||||
|
'contract_periods' => $contract_periods,
|
||||||
|
'contract_periode' => $contract_periode,
|
||||||
|
'updated_at' => now(),
|
||||||
|
]);
|
||||||
|
|
||||||
|
// 完了後はウェルネット決済画面(仮)へリダイレクト
|
||||||
|
return redirect()->route('wellnet.payment');
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,88 +1,87 @@
|
|||||||
/* ハンバーガーメニュー開閉
|
/* ハンバーガーメニュー開閉
|
||||||
============================*/
|
============================*/
|
||||||
$(function() {
|
$(function () {
|
||||||
//ナビメニューボタンの開く・閉じる
|
//ナビメニューボタンの開く・閉じる
|
||||||
$('#nav-menu-btn').on('click', function() {
|
$('#nav-menu-btn').on('click', function () {
|
||||||
$('#nav-menu-btn span').toggleClass('typcn-th-menu');
|
$('#nav-menu-btn span').toggleClass('typcn-th-menu');
|
||||||
$('#nav-menu-btn span').toggleClass('typcn-times');
|
$('#nav-menu-btn span').toggleClass('typcn-times');
|
||||||
});
|
});
|
||||||
|
|
||||||
//ナビメニューボタンの「開く・閉じる」文字変更
|
//ナビメニューボタンの「開く・閉じる」文字変更
|
||||||
var flg = "default";
|
var flg = "default";
|
||||||
$('#my-menu-btn').click(function(){
|
$('#my-menu-btn').click(function () {
|
||||||
if(flg == "default"){
|
if (flg == "default") {
|
||||||
$(this).text("マイメニューを閉じる");
|
$(this).text("マイメニューを閉じる");
|
||||||
flg = "changed";
|
flg = "changed";
|
||||||
}else{
|
} else {
|
||||||
$(this).text("マイメニューを開く");
|
$(this).text("マイメニューを開く");
|
||||||
flg = "default";
|
flg = "default";
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
/* slick slider
|
/* slick slider
|
||||||
============================*/
|
============================*/
|
||||||
$(function() {
|
$(function () {
|
||||||
$('.slider_1-1').slick({
|
$('.slider_1-1').slick({
|
||||||
infinite: true,
|
infinite: true,
|
||||||
dots:true,
|
dots: true,
|
||||||
arrows: true,
|
arrows: true,
|
||||||
slidesToShow: 1,
|
slidesToShow: 1,
|
||||||
slidesToScroll: 1,
|
slidesToScroll: 1,
|
||||||
responsive: [{
|
responsive: [{
|
||||||
breakpoint: 992,
|
breakpoint: 992,
|
||||||
settings: {
|
settings: {
|
||||||
slidesToShow: 1,
|
slidesToShow: 1,
|
||||||
slidesToScroll: 1,
|
slidesToScroll: 1,
|
||||||
}
|
}
|
||||||
}]
|
}]
|
||||||
});
|
});
|
||||||
$('.slider_2-1').slick({
|
$('.slider_2-1').slick({
|
||||||
infinite: true,
|
infinite: true,
|
||||||
dots:true,
|
dots: true,
|
||||||
arrows: true,
|
arrows: true,
|
||||||
slidesToShow: 2,
|
slidesToShow: 2,
|
||||||
slidesToScroll: 2,
|
slidesToScroll: 2,
|
||||||
responsive: [{
|
responsive: [{
|
||||||
breakpoint: 992,
|
breakpoint: 992,
|
||||||
settings: {
|
settings: {
|
||||||
slidesToShow: 1,
|
slidesToShow: 1,
|
||||||
slidesToScroll: 1,
|
slidesToScroll: 1,
|
||||||
}
|
}
|
||||||
}]
|
}]
|
||||||
});
|
});
|
||||||
$('.info-slider_1-1').slick({
|
$('.info-slider_1-1').slick({
|
||||||
infinite: true,
|
infinite: true,
|
||||||
dots: false,
|
dots: false,
|
||||||
arrows: true,
|
arrows: true,
|
||||||
slidesToShow: 1,
|
slidesToShow: 1,
|
||||||
slidesToScroll: 1,
|
slidesToScroll: 1,
|
||||||
responsive: [{
|
responsive: [{
|
||||||
breakpoint: 992,
|
breakpoint: 992,
|
||||||
settings: {
|
settings: {
|
||||||
slidesToShow: 1,
|
slidesToShow: 1,
|
||||||
slidesToScroll: 1,
|
slidesToScroll: 1,
|
||||||
}
|
}
|
||||||
}]
|
}]
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
/* jquery.tablesorter(空き駐輪場検索)
|
/* jquery.tablesorter(空き駐輪場検索)
|
||||||
============================*/
|
============================*/
|
||||||
$(document).ready(function()
|
$(document).ready(function () {
|
||||||
{
|
$("#searchTable").tablesorter({
|
||||||
$("#searchTable").tablesorter({
|
sortList: [[0, 0]]
|
||||||
sortList: [[0,0]]
|
});
|
||||||
});
|
}
|
||||||
}
|
);
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
/* 文字の拡大・縮小
|
/* 文字の拡大・縮小
|
||||||
============================*/
|
============================*/
|
||||||
$(function() {
|
$(function () {
|
||||||
//文字サイズ・大きく
|
//文字サイズ・大きく
|
||||||
$('#scale-control-area .btn-success').on('click', function() {
|
$('#scale-control-area .btn-success').on('click', function () {
|
||||||
$(this).toggleClass('d-none');
|
$(this).toggleClass('d-none');
|
||||||
$('#scale-control-area .btn-submit').toggleClass('d-none');
|
$('#scale-control-area .btn-submit').toggleClass('d-none');
|
||||||
$('#scale-control-area .btn-secondary').addClass('d-none');
|
$('#scale-control-area .btn-secondary').addClass('d-none');
|
||||||
@ -91,26 +90,80 @@ $(function() {
|
|||||||
$('#font-scale').removeClass('f-bigger');
|
$('#font-scale').removeClass('f-bigger');
|
||||||
$('#font-scale').removeClass('f-small');
|
$('#font-scale').removeClass('f-small');
|
||||||
});
|
});
|
||||||
//文字サイズ・さらに大きく
|
//文字サイズ・さらに大きく
|
||||||
$('#scale-control-area .btn-submit').on('click', function() {
|
$('#scale-control-area .btn-submit').on('click', function () {
|
||||||
$('#scale-control-area .btn-success').toggleClass('d-none');
|
$('#scale-control-area .btn-success').toggleClass('d-none');
|
||||||
$('#font-scale').addClass('f-bigger');
|
$('#font-scale').addClass('f-bigger');
|
||||||
$('#font-scale').removeClass('f-big');
|
$('#font-scale').removeClass('f-big');
|
||||||
$('#font-scale').removeClass('f-small');
|
$('#font-scale').removeClass('f-small');
|
||||||
});
|
});
|
||||||
//文字サイズ・小さく
|
//文字サイズ・小さく
|
||||||
$('#scale-control-area .btn-secondary').on('click', function() {
|
$('#scale-control-area .btn-secondary').on('click', function () {
|
||||||
$(this).toggleClass('d-none');
|
$(this).toggleClass('d-none');
|
||||||
$('#scale-control-area .btn-cancel').toggleClass('d-none');
|
$('#scale-control-area .btn-cancel').toggleClass('d-none');
|
||||||
$('#font-scale').addClass('f-small');
|
$('#font-scale').addClass('f-small');
|
||||||
$('#font-scale').removeClass('f-bigger');
|
$('#font-scale').removeClass('f-bigger');
|
||||||
$('#font-scale').removeClass('f-big');
|
$('#font-scale').removeClass('f-big');
|
||||||
});
|
});
|
||||||
//文字サイズ・元のサイズへ
|
//文字サイズ・元のサイズへ
|
||||||
$('#scale-control-area .btn-cancel').on('click', function() {
|
$('#scale-control-area .btn-cancel').on('click', function () {
|
||||||
$('#scale-control-area .btn-secondary').toggleClass('d-none');
|
$('#scale-control-area .btn-secondary').toggleClass('d-none');
|
||||||
$('#font-scale').removeClass('f-bigger');
|
$('#font-scale').removeClass('f-bigger');
|
||||||
$('#font-scale').removeClass('f-big');
|
$('#font-scale').removeClass('f-big');
|
||||||
$('#font-scale').removeClass('f-small');
|
$('#font-scale').removeClass('f-small');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 駐輪場詳細ポップアップ
|
||||||
|
$(document).on('click', '.btn-popup', function () {
|
||||||
|
var parkId = $(this).data('park-id');
|
||||||
|
$.ajax({
|
||||||
|
url: '/api/park-detail/' + parkId,
|
||||||
|
method: 'GET',
|
||||||
|
success: function (data) {
|
||||||
|
$('#modalArea').html(data.html); // モーダル全体を挿入
|
||||||
|
$('#parkDetailModal').modal('show'); // モーダルを表示
|
||||||
|
},
|
||||||
|
error: function () {
|
||||||
|
alert('詳細情報の取得に失敗しました');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).on('click', '.btn-reserve', function (e) {
|
||||||
|
e.preventDefault();
|
||||||
|
var parkId = $(this).data('park-id');
|
||||||
|
var psectionId = $(this).data('psection-id');
|
||||||
|
var ptypeId = $(this).data('ptype-id');
|
||||||
|
|
||||||
|
$.confirm({
|
||||||
|
title: '確認',
|
||||||
|
content: 'こちらの駐輪場を予約しますか?<br>お申込みいただく各自治体の条例等によって、駐輪場までの距離制限等によりご契約いただけない場合がございます。<br>予めご了承くださいますようお願いいたします。',
|
||||||
|
buttons: {
|
||||||
|
OK: function () {
|
||||||
|
// GETパラメータでregulationメソッドに遷移
|
||||||
|
location.href = '/park-waitlist/create?park_id=' + parkId + '&psection_id=' + psectionId + '&ptype_id=' + ptypeId;
|
||||||
|
},
|
||||||
|
キャンセル: function () { }
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).on('click', '.btn-contract', function (e) {
|
||||||
|
e.preventDefault();
|
||||||
|
var parkId = $(this).data('park-id');
|
||||||
|
var psectionId = $(this).data('psection-id');
|
||||||
|
var ptypeId = $(this).data('ptype-id');
|
||||||
|
|
||||||
|
$.confirm({
|
||||||
|
title: '確認',
|
||||||
|
content: 'こちらの駐輪場で定期契約を申し込みますか?',
|
||||||
|
buttons: {
|
||||||
|
OK: function () {
|
||||||
|
// GETパラメータでregulationCheckメソッドに遷移
|
||||||
|
location.href = '/regular-contract/regulationCheck?park_id=' + parkId + '&psection_id=' + psectionId + '&ptype_id=' + ptypeId;
|
||||||
|
},
|
||||||
|
キャンセル: function () { }
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|||||||
@ -46,18 +46,12 @@
|
|||||||
{{-- フッター --}}
|
{{-- フッター --}}
|
||||||
@include('partials.footer')
|
@include('partials.footer')
|
||||||
</div>
|
</div>
|
||||||
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" crossorigin="anonymous"></script>
|
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
||||||
<script>
|
|
||||||
var jqueryPath = "{{ asset('assets/js/vendor/jquery.min.js') }}";
|
|
||||||
window.jQuery || document.write('<script src="' + jqueryPath + '"><\/script>');
|
|
||||||
</script>
|
|
||||||
<script src="{{ asset('assets/js/vendor/popper.min.js') }}"></script>
|
<script src="{{ asset('assets/js/vendor/popper.min.js') }}"></script>
|
||||||
<script src="{{ asset('bootstrap/js/bootstrap.min.js') }}"></script>
|
|
||||||
<script src="{{ asset('assets/js/ie10-viewport-bug-workaround.js') }}"></script>
|
<script src="{{ asset('assets/js/ie10-viewport-bug-workaround.js') }}"></script>
|
||||||
<script src="{{ asset('assets/js/commons.js') }}"></script>
|
|
||||||
<script src="{{ asset('assets/js/vendor/slick/slick.js') }}"></script>
|
<script src="{{ asset('assets/js/vendor/slick/slick.js') }}"></script>
|
||||||
<script src="{{ asset('assets/js/vendor/jquery.tablesorter/jquery.tablesorter.min.js') }}" type="text/javascript"></script>
|
<script src="{{ asset('assets/js/vendor/jquery.tablesorter/jquery.tablesorter.min.js') }}" type="text/javascript"></script>
|
||||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
<script src="{{ asset('assets/js/commons.js') }}"></script>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js"></script>
|
||||||
@yield('scripts')
|
@yield('scripts')
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
35
resources/views/partials/paging.blade.php
Normal file
35
resources/views/partials/paging.blade.php
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
@if ($paginator->hasPages())
|
||||||
|
<nav>
|
||||||
|
<ul class="pagination justify-content-center">
|
||||||
|
{{-- 前へ --}}
|
||||||
|
@if ($paginator->onFirstPage())
|
||||||
|
<li class="page-item disabled"><span class="page-link">前へ</span></li>
|
||||||
|
@else
|
||||||
|
<li class="page-item"><a class="page-link" href="{{ $paginator->previousPageUrl() }}" rel="prev">前へ</a></li>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
{{-- ページ番号 --}}
|
||||||
|
@foreach ($elements as $element)
|
||||||
|
@if (is_string($element))
|
||||||
|
<li class="page-item disabled"><span class="page-link">{{ $element }}</span></li>
|
||||||
|
@endif
|
||||||
|
@if (is_array($element))
|
||||||
|
@foreach ($element as $page => $url)
|
||||||
|
@if ($page == $paginator->currentPage())
|
||||||
|
<li class="page-item active" aria-current="page"><span class="page-link">{{ $page }}</span></li>
|
||||||
|
@else
|
||||||
|
<li class="page-item"><a class="page-link" href="{{ $url }}">{{ $page }}</a></li>
|
||||||
|
@endif
|
||||||
|
@endforeach
|
||||||
|
@endif
|
||||||
|
@endforeach
|
||||||
|
|
||||||
|
{{-- 次へ --}}
|
||||||
|
@if ($paginator->hasMorePages())
|
||||||
|
<li class="page-item"><a class="page-link" href="{{ $paginator->nextPageUrl() }}" rel="next">次へ</a></li>
|
||||||
|
@else
|
||||||
|
<li class="page-item disabled"><span class="page-link">次へ</span></li>
|
||||||
|
@endif
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
@endif
|
||||||
184
resources/views/regular_contract/create.blade.php
Normal file
184
resources/views/regular_contract/create.blade.php
Normal file
@ -0,0 +1,184 @@
|
|||||||
|
@extends('layouts.app')
|
||||||
|
@section('content')
|
||||||
|
<main>
|
||||||
|
<header class="alert alert-success">
|
||||||
|
<h4 class="container">新規定期契約 > 空き駐輪場を確認する</h4>
|
||||||
|
</header>
|
||||||
|
<section id="" class="container mt20 mb20">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12 col-lg-10 offset-0 offset-lg-1 mt20 mb20">
|
||||||
|
<div class="card border-success">
|
||||||
|
<div class="card-header border-success">
|
||||||
|
<h5 class="card-title text-success">駐輪場をお選びください。</h5>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<form class="row form" method="GET" action="">
|
||||||
|
<div class="w-100 alert alert-success">
|
||||||
|
<h6><a class="text-success" data-toggle="collapse" href="#search-option" role="button"
|
||||||
|
aria-expanded="false" aria-controls="search-option">絞込み条件を追加する</a></h6>
|
||||||
|
<div class="collapse row" id="search-option">
|
||||||
|
<div class="col-3">市町村名</div>
|
||||||
|
<div class="col-9 mb10">
|
||||||
|
<select id="city-select" name="city_id" class="form-control form-control-lg" onchange="this.form.submit()">
|
||||||
|
<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="col-3">駅名</div>
|
||||||
|
<div class="col-9 mb10">
|
||||||
|
<select id="station-select" name="station_neighbor_station" class="form-control form-control-lg" onchange="this.form.submit()">
|
||||||
|
<option value="">駅名を選択してください</option>
|
||||||
|
@foreach($stations as $station)
|
||||||
|
<option value="{{ $station->station_neighbor_station }}" @if(request('station_neighbor_station')==$station->station_neighbor_station) selected @endif>{{ $station->station_neighbor_station }}</option>
|
||||||
|
@endforeach
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="col-3">駐輪場名</div>
|
||||||
|
<div class="col-9 mb10">
|
||||||
|
<select id="park-select" name="park_id" class="form-control form-control-lg" onchange="this.form.submit()">
|
||||||
|
<option value="">全て</option>
|
||||||
|
@foreach($parks as $park)
|
||||||
|
<option value="{{ $park->park_id }}" @if(request('park_id')==$park->park_id) selected @endif>{{ $park->park_name }}</option>
|
||||||
|
@endforeach
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<table id="searchTable" class="tablesorter table table-striped">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th class="header">
|
||||||
|
駐輪場名
|
||||||
|
<a href="{{ request()->fullUrlWithQuery(['sort' => 'park_ruby', 'order' => 'asc', 'page' => 1]) }}" class="text-success"><i class="bi bi-caret-up-fill"></i></a>
|
||||||
|
<a href="{{ request()->fullUrlWithQuery(['sort' => 'park_ruby', 'order' => 'desc', 'page' => 1]) }}" class="text-success"><i class="bi bi-caret-down-fill"></i></a>
|
||||||
|
</th>
|
||||||
|
<th class="header">
|
||||||
|
市町村名
|
||||||
|
<a href="{{ request()->fullUrlWithQuery(['sort' => 'city_id', 'order' => 'asc', 'page' => 1]) }}" class="text-success"><i class="bi bi-caret-up-fill"></i></a>
|
||||||
|
<a href="{{ request()->fullUrlWithQuery(['sort' => 'city_id', 'order' => 'desc', 'page' => 1]) }}" class="text-success"><i class="bi bi-caret-down-fill"></i></a>
|
||||||
|
</th>
|
||||||
|
<th class="header">
|
||||||
|
駅名
|
||||||
|
<a href="{{ request()->fullUrlWithQuery(['sort' => 'station_name_ruby', 'order' => 'asc', 'page' => 1]) }}" class="text-success"><i class="bi bi-caret-up-fill"></i></a>
|
||||||
|
<a href="{{ request()->fullUrlWithQuery(['sort' => 'station_name_ruby', 'order' => 'desc', 'page' => 1]) }}" class="text-success"><i class="bi bi-caret-down-fill"></i></a>
|
||||||
|
</th>
|
||||||
|
<th class="header">自転車</th>
|
||||||
|
<th class="header">原付</th>
|
||||||
|
<th class="header">自動二輪</th>
|
||||||
|
<th class="header">自動車</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
@forelse($parks_table as $row)
|
||||||
|
<tr>
|
||||||
|
<td><a href="javascript:void(0);" class="btn-popup text-primary" data-park-id="{{ $row->park_id }}">
|
||||||
|
{{ $row->park_name }}
|
||||||
|
</a></td>
|
||||||
|
<td>{{ $row->city_name }}</td>
|
||||||
|
<td>{{ $row->station_neighbor_station }}</td>
|
||||||
|
{{-- 自転車・原付・自動二輪・自動車列 --}}
|
||||||
|
@foreach(['自転車', '原付', '自動二輪', '自動車'] as $vehicle)
|
||||||
|
<td>
|
||||||
|
@php
|
||||||
|
$zonesForType = ($zones[$row->park_id] ?? collect())->where('psection_subject', $vehicle);
|
||||||
|
@endphp
|
||||||
|
@forelse ($zonesForType as $zone)
|
||||||
|
@php
|
||||||
|
$reserveCount = ($reserve[$row->park_id] ?? collect())
|
||||||
|
->where('psection_id', $zone->psection_id)
|
||||||
|
->count();
|
||||||
|
$vacancy = $zone->zone_tolerance - $zone->zone_number - $reserveCount;
|
||||||
|
// 猶予期間判定
|
||||||
|
$grace = $city_grace_periods[$row->city_id] ?? null;
|
||||||
|
$now = \Carbon\Carbon::now();
|
||||||
|
$inGrace = false;
|
||||||
|
if ($grace && $grace->update_grace_period_start_date && $grace->update_grace_period_start_time && $grace->update_grace_period_end_date && $grace->update_grace_period_end_time) {
|
||||||
|
$year = $now->year;
|
||||||
|
$month = $now->month;
|
||||||
|
$startDay = (int)$grace->update_grace_period_start_date;
|
||||||
|
$endDay = (int)$grace->update_grace_period_end_date;
|
||||||
|
if ($startDay > $endDay) {
|
||||||
|
// 月またぎ
|
||||||
|
// 前月の開始日~今月の終了日
|
||||||
|
$prevMonth = $now->copy()->subMonth();
|
||||||
|
$startPrev = \Carbon\Carbon::createFromFormat('Y-m-d H:i', sprintf('%04d-%02d-%02d %s', $prevMonth->year, $prevMonth->month, $startDay, $grace->update_grace_period_start_time));
|
||||||
|
$endCurr = \Carbon\Carbon::createFromFormat('Y-m-d H:i', sprintf('%04d-%02d-%02d %s', $year, $month, $endDay, $grace->update_grace_period_end_time));
|
||||||
|
// 今月の開始日~翌月の終了日
|
||||||
|
$startCurr = \Carbon\Carbon::createFromFormat('Y-m-d H:i', sprintf('%04d-%02d-%02d %s', $year, $month, $startDay, $grace->update_grace_period_start_time));
|
||||||
|
$nextMonth = $month == 12 ? 1 : $month + 1;
|
||||||
|
$nextYear = $month == 12 ? $year + 1 : $year;
|
||||||
|
$endNext = \Carbon\Carbon::createFromFormat('Y-m-d H:i', sprintf('%04d-%02d-%02d %s', $nextYear, $nextMonth, $endDay, $grace->update_grace_period_end_time));
|
||||||
|
$inGrace = $now->between($startPrev, $endCurr) || $now->between($startCurr, $endNext);
|
||||||
|
} else {
|
||||||
|
// 同月
|
||||||
|
$start = \Carbon\Carbon::createFromFormat('Y-m-d H:i', sprintf('%04d-%02d-%02d %s', $year, $month, $startDay, $grace->update_grace_period_start_time));
|
||||||
|
$end = \Carbon\Carbon::createFromFormat('Y-m-d H:i', sprintf('%04d-%02d-%02d %s', $year, $month, $endDay, $grace->update_grace_period_end_time));
|
||||||
|
$inGrace = $now->between($start, $end);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@endphp
|
||||||
|
@if ($vacancy > 0 && $inGrace)
|
||||||
|
<button class="btn btn-block btn-sm btn-outline-success btn_82-table btn-popup" data-park-id="{{ $row->park_id }}">定期契約</button>
|
||||||
|
@elseif ($vacancy > 0 && !$inGrace)
|
||||||
|
<button class="btn btn-block btn-sm btn-outline-danger btn_103-table btn-popup" data-park-id="{{ $row->park_id }}">販売期間外</button>
|
||||||
|
@else
|
||||||
|
<button class="btn btn-block btn-sm btn-outline-danger btn_103-table btn-popup" data-park-id="{{ $row->park_id }}">空き待ち申込</button>
|
||||||
|
@endif
|
||||||
|
@empty
|
||||||
|
<span class="text-muted"></span>
|
||||||
|
@endforelse
|
||||||
|
</td>
|
||||||
|
@endforeach
|
||||||
|
</tr>
|
||||||
|
@empty
|
||||||
|
<tr>
|
||||||
|
<td colspan="7" class="text-center">該当する駐輪場はありません。</td>
|
||||||
|
</tr>
|
||||||
|
@endforelse
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
@php
|
||||||
|
$totalPages = ceil($parks_table_total / $parks_table_perPage);
|
||||||
|
$currentPage = $parks_table_page;
|
||||||
|
@endphp
|
||||||
|
<nav aria-label="searchTable-pager">
|
||||||
|
<ul class="pagination justify-content-center">
|
||||||
|
<li class="page-item {{ $currentPage <= 1 ? 'disabled' : '' }}">
|
||||||
|
<a class="page-link text-success" href="{{ request()->fullUrlWithQuery(['page' => $currentPage - 1]) }}" aria-label="前">
|
||||||
|
<span aria-hidden="true">«</span>
|
||||||
|
<span class="sr-only">前</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
@for($i = 1; $i <= $totalPages; $i++)
|
||||||
|
<li class="page-item {{ $i == $currentPage ? 'active' : '' }}">
|
||||||
|
<a class="page-link text-success" href="{{ request()->fullUrlWithQuery(['page' => $i]) }}">{{ $i }}</a>
|
||||||
|
</li>
|
||||||
|
@endfor
|
||||||
|
<li class="page-item {{ $currentPage >= $totalPages ? 'disabled' : '' }}">
|
||||||
|
<a class="page-link text-success" href="{{ request()->fullUrlWithQuery(['page' => $currentPage + 1]) }}" aria-label="次">
|
||||||
|
<span aria-hidden="true">»</span>
|
||||||
|
<span class="sr-only">次</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</main>
|
||||||
|
<div id="modalArea"></div>
|
||||||
|
<div class="modal fade" id="popup-modal" tabindex="-1">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<div class="modal-content" id="popup-content">
|
||||||
|
<!-- Ajaxで詳細HTMLを挿入 -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
157
resources/views/regular_contract/create_confirm.blade.php
Normal file
157
resources/views/regular_contract/create_confirm.blade.php
Normal file
@ -0,0 +1,157 @@
|
|||||||
|
@extends('layouts.app')
|
||||||
|
@section('content')
|
||||||
|
<main>
|
||||||
|
<header class="alert alert-success">
|
||||||
|
<h4 class="container">新規定期契約 > 入力内容の確認</h4>
|
||||||
|
</header>
|
||||||
|
<section class="container mt30 mb50">
|
||||||
|
<h3 class="mb30 offset-md-2 alert-success">ご入力内容をご確認ください。</h3>
|
||||||
|
<form class="row form" action="{{ route('regular_contract.create_confirm_next', ['contract_id' => $contract_id]) }}" method="post">
|
||||||
|
@csrf
|
||||||
|
<!-- 本人確認書類1 -->
|
||||||
|
<div class="col-12 offset-md-2">
|
||||||
|
<img src="{{ asset('storage/photo/' . $user->photo_filename1) }}" style="max-width:200px; margin-top:8px;">
|
||||||
|
</div>
|
||||||
|
<!-- 本人確認書類2 -->
|
||||||
|
<div class="col-12 offset-md-2">
|
||||||
|
@if(isset($user->photo_filename2) && $user->photo_filename2 !== '')
|
||||||
|
<img src="{{ asset('storage/photo/' . $user->photo_filename2) }}" style="max-width:200px; margin-top:10px; margin-bottom:30px;">
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
<!-- 駐輪場名 -->
|
||||||
|
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||||
|
<label for="park_name">駐輪場名</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-lg-6 mb10">
|
||||||
|
<h3>{{ $park->park_name }}</h3>
|
||||||
|
</div>
|
||||||
|
<!-- お申し込み内容 -->
|
||||||
|
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||||
|
<label for="psection_subject">お申し込み内容</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-lg-6 mb10">
|
||||||
|
<h3>{{ $psection->psection_subject }}</h3>
|
||||||
|
</div>
|
||||||
|
<!-- お名前 -->
|
||||||
|
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||||
|
<label for="user_name">お名前</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-lg-6 mb10">
|
||||||
|
<h3>{{ $user->user_name }}</h3>
|
||||||
|
</div>
|
||||||
|
<!-- 性別 -->
|
||||||
|
@if (!empty($park->gender_display_flag) && $park->gender_display_flag == 1)
|
||||||
|
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||||
|
<label for="user_gender">性別</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-lg-6 mb10">
|
||||||
|
<h3>{{ $user->user_gender }}</h3>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
<!-- 住所 -->
|
||||||
|
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||||
|
<label for="user_regident_zip">住所</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-lg-6 mb10">
|
||||||
|
<h3>
|
||||||
|
@php
|
||||||
|
$pre = $user->user_regident_pre;
|
||||||
|
$city = $user->user_regident_city;
|
||||||
|
$add = $user->user_regident_add;
|
||||||
|
@endphp
|
||||||
|
{{ $pre }}{{ $city }}{{ $add }}
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
<!-- 生年月日 -->
|
||||||
|
@if (!empty($park->bd_display_flag) && $park->bd_display_flag == 1)
|
||||||
|
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||||
|
<label for="user_birthdate">生年月日</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-lg-6 mb10">
|
||||||
|
<h3>
|
||||||
|
@if(!empty($user->user_birthdate))
|
||||||
|
{{ \Carbon\Carbon::parse($user->user_birthdate)->format('Y年m月d日') }}
|
||||||
|
@endif
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
<!-- 自宅電話番号 -->
|
||||||
|
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||||
|
<label for="user_homephone">自宅電話番号</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-lg-6 mb10">
|
||||||
|
<h3>
|
||||||
|
{{ $user->user_homephone }}
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
<!-- 携帯電話番号 -->
|
||||||
|
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||||
|
<label for="user_mobile">携帯電話番号</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-lg-6 mb10">
|
||||||
|
<h3>
|
||||||
|
{{ $user->user_mobile }}
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
<!-- メールアドレス -->
|
||||||
|
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||||
|
<label for="user_primemail">メールアドレス</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-lg-6 mb10">
|
||||||
|
<h3>{{ $user->user_primemail }}</h3>
|
||||||
|
</div>
|
||||||
|
<!-- 予備メールアドレス -->
|
||||||
|
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||||
|
<label for="user_submail">予備メールアドレス</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-lg-6 mb10">
|
||||||
|
<h3>{{ $user->user_submail }}</h3>
|
||||||
|
</div>
|
||||||
|
<!-- 利用者区分 -->
|
||||||
|
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||||
|
<label for="user_category">利用者区分</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-lg-6 mb10">
|
||||||
|
<h3>{{ $usertype->usertype_subject1 }}</h3>
|
||||||
|
</div>
|
||||||
|
@if ($usertype->usertype_subject1 === '学生')
|
||||||
|
<!-- 学生の場合:学校名・卒業予定のみ表示 -->
|
||||||
|
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||||
|
<label for="user_school">学校名</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-lg-6 mb10">
|
||||||
|
<h3>{{ $user->user_school }}</h3>
|
||||||
|
</div>
|
||||||
|
@else
|
||||||
|
<!-- 一般の場合:勤務先名のみ表示 -->
|
||||||
|
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||||
|
<label for="user_workplace">勤務先名</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-lg-6 mb10">
|
||||||
|
<h3>{{ $user->user_workplace }}</h3>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
<!-- 住所(関連) -->
|
||||||
|
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||||
|
<label for="user_relate">住所</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-lg-6 mb10">
|
||||||
|
<h3>
|
||||||
|
@php
|
||||||
|
$pre = $user->user_relate_pre ?? '';
|
||||||
|
$city = $user->user_relate_city ?? '';
|
||||||
|
$add = $user->user_relate_add ?? '';
|
||||||
|
@endphp
|
||||||
|
{{ $pre }}{{ $city }}{{ $add }}
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-md-5 offset-0 offset-md-1 mt10">
|
||||||
|
<button type="submit" class="btn btn-lg btn-block btn-success">確認して進む</button>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-md-5 mt10">
|
||||||
|
<a href="{{ route('regular_contract.upload_identity_create', ['contract_id' => $contract_id]) }}" class="btn btn-lg btn-block btn-outline-success">戻って修正する</a>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</section>
|
||||||
|
</main>
|
||||||
|
@endsection
|
||||||
@ -0,0 +1,23 @@
|
|||||||
|
@extends('layouts.app')
|
||||||
|
@section('content')
|
||||||
|
<main>
|
||||||
|
<header class="alert alert-success">
|
||||||
|
<h4 class="container">新規定期契約 > 本人確認書類確認中</h4>
|
||||||
|
</header>
|
||||||
|
<section id="" class="container mt30 mb50">
|
||||||
|
<div class="col-12 col-md-8 offset-0 offset-md-2 mb30">
|
||||||
|
<h3 class="text-danger fw-bold text-center">ただいま書類確認中です。</h3>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-md-6 offset-1 offset-md-3 mb30">
|
||||||
|
<p>
|
||||||
|
ご利用者本人確認に最大3営業日お時間を頂戴したく存じます。<br>
|
||||||
|
完了次第、メールにてご連絡いたしますので、しばらくお待ちください。<br><br>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-md-6 offset-1 offset-md-3 mb30">
|
||||||
|
<a href="{{ url('mypage') }}" class="btn btn-lg btn-block btn-outline-success">マイページへ戻る</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
</main>
|
||||||
|
@endsection
|
||||||
@ -0,0 +1,81 @@
|
|||||||
|
@extends('layouts.app')
|
||||||
|
@section('content')
|
||||||
|
<main>
|
||||||
|
<header class="alert alert-success">
|
||||||
|
<h4 class="container">新規定期契約 > 契約期間を選択する</h4>
|
||||||
|
</header>
|
||||||
|
<section id="" class="container mt30 mb50">
|
||||||
|
@if ($errors->has('month'))
|
||||||
|
<div class="alert alert-danger text-center">
|
||||||
|
{{ $errors->first('month') }}
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
<form class="row form" action="{{ url('regular_contract/update_period') }}" method="post">
|
||||||
|
@csrf
|
||||||
|
<input type="hidden" name="contract_id" value="{{ $contract_id }}">
|
||||||
|
<div class="col-12 col-md-8 offset-0 offset-md-2 mb30">
|
||||||
|
<h3 class="alert-success">契約期間を選択してください。</h3>
|
||||||
|
<div class="hcenter">
|
||||||
|
@if ($regular_type->regular_class_1 == 1)
|
||||||
|
<div class="text-center">
|
||||||
|
<input type="radio" name="month" id="m1" value="1">
|
||||||
|
<input type="hidden" name="price_1" value="{{ optional($prices->where('price_month', 1)->first())->price }}">
|
||||||
|
<label for="m1" class="radio mr20 font-weight-bold">1ヶ月</label>
|
||||||
|
<span class="d-block mt-0">
|
||||||
|
{{ optional($prices->where('price_month', 1)->first())->price ? number_format(optional($prices->where('price_month', 1)->first())->price) . '円' : '価格未設定' }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
@if ($regular_type->regular_class_2 == 1)
|
||||||
|
<div class="text-center">
|
||||||
|
<input type="radio" name="month" id="m2" value="2">
|
||||||
|
<input type="hidden" name="price_2" value="{{ optional($prices->where('price_month', 2)->first())->price }}">
|
||||||
|
<label for="m2" class="radio mr20 font-weight-bold">2ヶ月</label>
|
||||||
|
<span class="d-block mt-0">
|
||||||
|
{{ optional($prices->where('price_month', 2)->first())->price ? number_format(optional($prices->where('price_month', 2)->first())->price) . '円' : '価格未設定' }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
@if ($regular_type->regular_class_3 == 1)
|
||||||
|
<div class="text-center">
|
||||||
|
<input type="radio" name="month" id="m3" value="3">
|
||||||
|
<input type="hidden" name="price_3" value="{{ optional($prices->where('price_month', 3)->first())->price }}">
|
||||||
|
<label for="m3" class="radio mr20 font-weight-bold">3ヶ月</label>
|
||||||
|
<span class="d-block mt-0">
|
||||||
|
{{ optional($prices->where('price_month', 3)->first())->price ? number_format(optional($prices->where('price_month', 3)->first())->price) . '円' : '価格未設定' }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
@if ($regular_type->regular_class_6 == 1)
|
||||||
|
<div class="text-center">
|
||||||
|
<input type="radio" name="month" id="m6" value="6">
|
||||||
|
<input type="hidden" name="price_6" value="{{ optional($prices->where('price_month', 6)->first())->price }}">
|
||||||
|
<label for="m6" class="radio mr20 font-weight-bold">6ヶ月</label>
|
||||||
|
<span class="d-block mt-0">
|
||||||
|
{{ optional($prices->where('price_month', 6)->first())->price ? number_format(optional($prices->where('price_month', 6)->first())->price) . '円' : '価格未設定' }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
@if ($regular_type->regular_class_12 == 1)
|
||||||
|
<div class="text-center">
|
||||||
|
<input type="radio" name="month" id="m12" value="12">
|
||||||
|
<input type="hidden" name="price_12" value="{{ optional($prices->where('price_month', 12)->first())->price }}">
|
||||||
|
<label for="m12" class="radio mr20 font-weight-bold">12ヶ月</label>
|
||||||
|
<span class="d-block mt-0">
|
||||||
|
{{ optional($prices->where('price_month', 12)->first())->price ? number_format(optional($prices->where('price_month', 12)->first())->price) . '円' : '価格未設定' }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-md-6 offset-0 offset-md-3">
|
||||||
|
<input type="submit" class="btn btn-lg btn-block btn-success" value="決定" />
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-md-5 offset-0 offset-md-1 mt50 mb50"> <a href="{{ url('regular_contract/info') }}"
|
||||||
|
class="btn btn-lg btn-block btn-outline-success">契約一覧へ戻る</a> </div>
|
||||||
|
<div class="col-12 col-md-5 mt50 mb50"> <a class="btn btn-lg btn-block btn-outline-success"
|
||||||
|
href="{{ url('/mypage') }}">マイページへ戻る</a> </div>
|
||||||
|
</form>
|
||||||
|
</section>
|
||||||
|
</main>
|
||||||
|
@endsection
|
||||||
478
resources/views/regular_contract/input.blade.php
Normal file
478
resources/views/regular_contract/input.blade.php
Normal file
@ -0,0 +1,478 @@
|
|||||||
|
@extends('layouts.app')
|
||||||
|
<style>
|
||||||
|
input.form-control,
|
||||||
|
select.form-control,
|
||||||
|
textarea.form-control {
|
||||||
|
color: #222 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 利用規約モーダル用CSS */
|
||||||
|
.modal-overlay {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100vw;
|
||||||
|
height: 100vh;
|
||||||
|
background: rgba(0, 0, 0, 0.5);
|
||||||
|
display: none;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
z-index: 9999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-content {
|
||||||
|
background: #fff;
|
||||||
|
padding: 30px 30px;
|
||||||
|
border-radius: 8px;
|
||||||
|
max-width: 800px;
|
||||||
|
width: 95vw;
|
||||||
|
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-body {
|
||||||
|
max-height: 60vh;
|
||||||
|
overflow-y: auto;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.close-btn {
|
||||||
|
position: absolute;
|
||||||
|
top: 10px;
|
||||||
|
right: 10px;
|
||||||
|
font-size: 1.5rem;
|
||||||
|
background: none;
|
||||||
|
border: none;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
@section('content')
|
||||||
|
<main>
|
||||||
|
<!-- 利用規約ポップアップ -->
|
||||||
|
<div id="termsModal" class="modal-overlay">
|
||||||
|
<div class="modal-content">
|
||||||
|
<button type="button" class="close-btn" id="closeModalBtn">×</button>
|
||||||
|
<h5 class="modal-title text-center">利用規約</h5>
|
||||||
|
<div class="modal-body">
|
||||||
|
{!! nl2br(e($terms_text)) !!}
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-success btn-lg btn-block" id="okModalBtn">OK</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<header class="alert alert-success">
|
||||||
|
<h4 class="container">新規定期契約 > 情報を入力する</h4>
|
||||||
|
</header>
|
||||||
|
<section class="container mt30 mb50">
|
||||||
|
{{-- サーバーサイドエラー表示 --}}
|
||||||
|
@if ($errors->any())
|
||||||
|
<div class="alert alert-danger alert-dismissible" id="formErrorAreaPhp">
|
||||||
|
<ul>
|
||||||
|
@foreach ($errors->all() as $error)
|
||||||
|
<li>{{ $error }}</li>
|
||||||
|
@endforeach
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
<form class="row form" action="{{ route('regular_contract.input.check') }}" method="post" enctype="multipart/form-data" autocomplete="off">
|
||||||
|
@csrf
|
||||||
|
<input type="hidden" name="park_id" value="{{ request()->query('park_id') }}">
|
||||||
|
<input type="hidden" name="psection_id" value="{{ request()->query('psection_id') }}">
|
||||||
|
<input type="hidden" name="ptype_id" value="{{ request()->query('ptype_id') }}">
|
||||||
|
{{-- お名前(編集不可) --}}
|
||||||
|
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||||
|
<label for="user_name">お名前</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-lg-6 mb10">
|
||||||
|
<span style="font-size:1.5rem; font-weight:bold;">{{ $user->user_name }}</span>
|
||||||
|
</div>
|
||||||
|
{{-- フリガナ --}}
|
||||||
|
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||||
|
<label for="user_phonetic">フリガナ<span style="color:red;">*</span></label>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-lg-6 mb10">
|
||||||
|
<input type="text" class="form-control" id="user_phonetic" name="user_phonetic" value="{{ old('user_phonetic', $user->user_phonetic) }}">
|
||||||
|
</div>
|
||||||
|
{{-- 性別(駐輪場マスタの設定により表示/非表示) --}}
|
||||||
|
@if (!empty($park->gender_display_flag) && $park->gender_display_flag == 1)
|
||||||
|
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||||
|
<label for="user_gender">性別<span style="color:red;">*</span></label>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-lg-6 mb10">
|
||||||
|
<select class="form-control" id="user_gender" name="user_gender">
|
||||||
|
<option value="">選択してください</option>
|
||||||
|
<option value="男性" {{ old('user_gender', $user->user_gender) == '男性' ? 'selected' : '' }}>男性</option>
|
||||||
|
<option value="女性" {{ old('user_gender', $user->user_gender) == '女性' ? 'selected' : '' }}>女性</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
{{-- 居住所 --}}
|
||||||
|
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||||
|
<label for="user_regident_zip">居住所<span style="color:red;">*</span></label>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-lg-6 mb10 h-adr">
|
||||||
|
<input type="text" class="form-control d-inline-block" style="width:120px;" name="user_regident_zip_1" maxlength="3" value="{{ old('user_regident_zip_1', substr($user->user_regident_zip,0,3)) }}"> -
|
||||||
|
<input type="text" class="form-control d-inline-block" style="width:140px;" name="user_regident_zip_2" maxlength="4" value="{{ old('user_regident_zip_2', substr($user->user_regident_zip,3,4)) }}"><br>
|
||||||
|
<select class="form-control d-inline-block" style="margin-top:8px; width:180px;" name="user_regident_pre">
|
||||||
|
<option value="">都道府県</option>
|
||||||
|
<option value="北海道" {{ old('user_regident_pre', $user->user_regident_pre) == '北海道' ? 'selected' : '' }}>北海道</option>
|
||||||
|
<option value="青森県" {{ old('user_regident_pre', $user->user_regident_pre) == '青森県' ? 'selected' : '' }}>青森県</option>
|
||||||
|
<option value="岩手県" {{ old('user_regident_pre', $user->user_regident_pre) == '岩手県' ? 'selected' : '' }}>岩手県</option>
|
||||||
|
<option value="宮城県" {{ old('user_regident_pre', $user->user_regident_pre) == '宮城県' ? 'selected' : '' }}>宮城県</option>
|
||||||
|
<option value="秋田県" {{ old('user_regident_pre', $user->user_regident_pre) == '秋田県' ? 'selected' : '' }}>秋田県</option>
|
||||||
|
<option value="山形県" {{ old('user_regident_pre', $user->user_regident_pre) == '山形県' ? 'selected' : '' }}>山形県</option>
|
||||||
|
<option value="福島県" {{ old('user_regident_pre', $user->user_regident_pre) == '福島県' ? 'selected' : '' }}>福島県</option>
|
||||||
|
<option value="茨城県" {{ old('user_regident_pre', $user->user_regident_pre) == '茨城県' ? 'selected' : '' }}>茨城県</option>
|
||||||
|
<option value="栃木県" {{ old('user_regident_pre', $user->user_regident_pre) == '栃木県' ? 'selected' : '' }}>栃木県</option>
|
||||||
|
<option value="群馬県" {{ old('user_regident_pre', $user->user_regident_pre) == '群馬県' ? 'selected' : '' }}>群馬県</option>
|
||||||
|
<option value="埼玉県" {{ old('user_regident_pre', $user->user_regident_pre) == '埼玉県' ? 'selected' : '' }}>埼玉県</option>
|
||||||
|
<option value="千葉県" {{ old('user_regident_pre', $user->user_regident_pre) == '千葉県' ? 'selected' : '' }}>千葉県</option>
|
||||||
|
<option value="東京都" {{ old('user_regident_pre', $user->user_regident_pre) == '東京都' ? 'selected' : '' }}>東京都</option>
|
||||||
|
<option value="神奈川県" {{ old('user_regident_pre', $user->user_regident_pre) == '神奈川県' ? 'selected' : '' }}>神奈川県</option>
|
||||||
|
<option value="新潟県" {{ old('user_regident_pre', $user->user_regident_pre) == '新潟県' ? 'selected' : '' }}>新潟県</option>
|
||||||
|
<option value="富山県" {{ old('user_regident_pre', $user->user_regident_pre) == '富山県' ? 'selected' : '' }}>富山県</option>
|
||||||
|
<option value="石川県" {{ old('user_regident_pre', $user->user_regident_pre) == '石川県' ? 'selected' : '' }}>石川県</option>
|
||||||
|
<option value="福井県" {{ old('user_regident_pre', $user->user_regident_pre) == '福井県' ? 'selected' : '' }}>福井県</option>
|
||||||
|
<option value="山梨県" {{ old('user_regident_pre', $user->user_regident_pre) == '山梨県' ? 'selected' : '' }}>山梨県</option>
|
||||||
|
<option value="長野県" {{ old('user_regident_pre', $user->user_regident_pre) == '長野県' ? 'selected' : '' }}>長野県</option>
|
||||||
|
<option value="岐阜県" {{ old('user_regident_pre', $user->user_regident_pre) == '岐阜県' ? 'selected' : '' }}>岐阜県</option>
|
||||||
|
<option value="静岡県" {{ old('user_regident_pre', $user->user_regident_pre) == '静岡県' ? 'selected' : '' }}>静岡県</option>
|
||||||
|
<option value="愛知県" {{ old('user_regident_pre', $user->user_regident_pre) == '愛知県' ? 'selected' : '' }}>愛知県</option>
|
||||||
|
<option value="三重県" {{ old('user_regident_pre', $user->user_regident_pre) == '三重県' ? 'selected' : '' }}>三重県</option>
|
||||||
|
<option value="滋賀県" {{ old('user_regident_pre', $user->user_regident_pre) == '滋賀県' ? 'selected' : '' }}>滋賀県</option>
|
||||||
|
<option value="京都府" {{ old('user_regident_pre', $user->user_regident_pre) == '京都府' ? 'selected' : '' }}>京都府</option>
|
||||||
|
<option value="大阪府" {{ old('user_regident_pre', $user->user_regident_pre) == '大阪府' ? 'selected' : '' }}>大阪府</option>
|
||||||
|
<option value="兵庫県" {{ old('user_regident_pre', $user->user_regident_pre) == '兵庫県' ? 'selected' : '' }}>兵庫県</option>
|
||||||
|
<option value="奈良県" {{ old('user_regident_pre', $user->user_regident_pre) == '奈良県' ? 'selected' : '' }}>奈良県</option>
|
||||||
|
<option value="和歌山県" {{ old('user_regident_pre', $user->user_regident_pre) == '和歌山県' ? 'selected' : '' }}>和歌山県</option>
|
||||||
|
<option value="鳥取県" {{ old('user_regident_pre', $user->user_regident_pre) == '鳥取県' ? 'selected' : '' }}>鳥取県</option>
|
||||||
|
<option value="島根県" {{ old('user_regident_pre', $user->user_regident_pre) == '島根県' ? 'selected' : '' }}>島根県</option>
|
||||||
|
<option value="岡山県" {{ old('user_regident_pre', $user->user_regident_pre) == '岡山県' ? 'selected' : '' }}>岡山県</option>
|
||||||
|
<option value="広島県" {{ old('user_regident_pre', $user->user_regident_pre) == '広島県' ? 'selected' : '' }}>広島県</option>
|
||||||
|
<option value="山口県" {{ old('user_regident_pre', $user->user_regident_pre) == '山口県' ? 'selected' : '' }}>山口県</option>
|
||||||
|
<option value="徳島県" {{ old('user_regident_pre', $user->user_regident_pre) == '徳島県' ? 'selected' : '' }}>徳島県</option>
|
||||||
|
<option value="香川県" {{ old('user_regident_pre', $user->user_regident_pre) == '香川県' ? 'selected' : '' }}>香川県</option>
|
||||||
|
<option value="愛媛県" {{ old('user_regident_pre', $user->user_regident_pre) == '愛媛県' ? 'selected' : '' }}>愛媛県</option>
|
||||||
|
<option value="高知県" {{ old('user_regident_pre', $user->user_regident_pre) == '高知県' ? 'selected' : '' }}>高知県</option>
|
||||||
|
<option value="福岡県" {{ old('user_regident_pre', $user->user_regident_pre) == '福岡県' ? 'selected' : '' }}>福岡県</option>
|
||||||
|
<option value="佐賀県" {{ old('user_regident_pre', $user->user_regident_pre) == '佐賀県' ? 'selected' : '' }}>佐賀県</option>
|
||||||
|
<option value="長崎県" {{ old('user_regident_pre', $user->user_regident_pre) == '長崎県' ? 'selected' : '' }}>長崎県</option>
|
||||||
|
<option value="熊本県" {{ old('user_regident_pre', $user->user_regident_pre) == '熊本県' ? 'selected' : '' }}>熊本県</option>
|
||||||
|
<option value="大分県" {{ old('user_regident_pre', $user->user_regident_pre) == '大分県' ? 'selected' : '' }}>大分県</option>
|
||||||
|
<option value="宮崎県" {{ old('user_regident_pre', $user->user_regident_pre) == '宮崎県' ? 'selected' : '' }}>宮崎県</option>
|
||||||
|
<option value="鹿児島県" {{ old('user_regident_pre', $user->user_regident_pre) == '鹿児島県' ? 'selected' : '' }}>鹿児島県</option>
|
||||||
|
<option value="沖縄県" {{ old('user_regident_pre', $user->user_regident_pre) == '沖縄県' ? 'selected' : '' }}>沖縄県</option>
|
||||||
|
</select><br>
|
||||||
|
<input type="text" class="form-control d-inline-block" style="margin-top:8px; " name="user_regident_city" value="{{ old('user_regident_city', $user->user_regident_city) }}" placeholder="足立区"><br>
|
||||||
|
<input type="text" class="form-control d-inline-block" style="margin-top:8px; " name="user_regident_add" value="{{ old('user_regident_add', $user->user_regident_add) }}" placeholder="六町1-1-1">
|
||||||
|
</div>
|
||||||
|
{{-- 生年月日 --}}
|
||||||
|
@if (!empty($park->bd_display_flag) && $park->bd_display_flag == 1)
|
||||||
|
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||||
|
<label for="user_birthdate">生年月日<span style="color:red;">*</span></label>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-lg-6 mb10">
|
||||||
|
<input type="date" class="form-control" id="user_birthdate" name="user_birthdate" value="{{ old('user_birthdate', $user->user_birthdate) }}">
|
||||||
|
</div>
|
||||||
|
{{-- 年齢(自動計算 かつ 表示のみ) --}}
|
||||||
|
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||||
|
<label for="user_age">年齢</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-lg-6 mb10">
|
||||||
|
<input type="number" class="form-control" id="user_age" name="user_age" value="{{ old('user_age', $user->user_age) }}" readonly>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
{{-- 自宅電話番号 --}}
|
||||||
|
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||||
|
<label for="user_homephone">自宅電話番号</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-lg-6 mb10">
|
||||||
|
<input type="text" class="form-control" name="user_homephone[]" value="{{ old('user_homephone.0', $user->user_homephone[0] ?? '') }}" style="width:80px; display:inline-block;">
|
||||||
|
-
|
||||||
|
<input type="text" class="form-control" name="user_homephone[]" value="{{ old('user_homephone.1', $user->user_homephone[1] ?? '') }}" style="width:80px; display:inline-block;">
|
||||||
|
-
|
||||||
|
<input type="text" class="form-control" name="user_homephone[]" value="{{ old('user_homephone.2', $user->user_homephone[2] ?? '') }}" style="width:80px; display:inline-block;">
|
||||||
|
</div>
|
||||||
|
{{-- 携帯電話番号 --}}
|
||||||
|
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||||
|
<label for="user_mobile">携帯電話番号</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-lg-6 mb10">
|
||||||
|
<input type="text" class="form-control" name="user_mobile[]" value="{{ old('user_mobile.0', $user->user_mobile[0] ?? '') }}" style="width:80px; display:inline-block;">
|
||||||
|
-
|
||||||
|
<input type="text" class="form-control" name="user_mobile[]" value="{{ old('user_mobile.1', $user->user_mobile[1] ?? '') }}" style="width:80px; display:inline-block;">
|
||||||
|
-
|
||||||
|
<input type="text" class="form-control" name="user_mobile[]" value="{{ old('user_mobile.2', $user->user_mobile[2] ?? '') }}" style="width:80px; display:inline-block;">
|
||||||
|
</div>
|
||||||
|
{{-- メールアドレス --}}
|
||||||
|
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||||
|
<label for="user_primemail">メールアドレス <span style="color:red;">*</span></label>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-lg-6 mb10">
|
||||||
|
<input type="email" class="form-control" id="user_primemail" name="user_primemail" value="{{ old('user_primemail', $user->user_primemail) }}" placeholder="name@example.com" readonly>
|
||||||
|
</div>
|
||||||
|
{{-- 予備メールアドレス --}}
|
||||||
|
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||||
|
<label for="user_submail">予備メールアドレス</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-lg-6 mb10">
|
||||||
|
<input type="email" class="form-control" id="user_submail" name="user_submail" value="{{ old('user_submail', $user->user_submail) }}" placeholder="name.sub@example.com">
|
||||||
|
</div>
|
||||||
|
{{-- 利用者区分 --}}
|
||||||
|
<div class="col-12 col-md-3 offset-0 offset-md-2 d-flex align-items-center">
|
||||||
|
<label>利用者区分<span style="color:red;">*</span></label>
|
||||||
|
<button type="button" id="userTypeInfoBtn" style="margin-left:2px; border:none; background:none; cursor:pointer; vertical-align:top; position:relative; top:-4px;">
|
||||||
|
<span style="display:inline-block; width:24px; height:24px; border-radius:50%; border:2px solid #007bff; text-align:center; line-height:20px; font-weight:bold; color:#007bff; font-size:16px; background:#fff;">?</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-lg-6 mb10">
|
||||||
|
<div class="form-check form-check-inline">
|
||||||
|
<input class="form-check-input" type="radio" name="user_category" id="user_categoryid_ippan" value="一般" {{ old('user_category', $user_category) == '一般' ? 'checked' : '' }}>
|
||||||
|
<label class="form-check-label" for="user_categoryid_ippan">一般</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check form-check-inline">
|
||||||
|
<input class="form-check-input" type="radio" name="user_category" id="user_categoryid_gakusei" value="学生" {{ old('user_category', $user_category) == '学生' ? 'checked' : '' }}>
|
||||||
|
<label class="form-check-label" for="user_categoryid_gakusei">学生</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{-- 減免 --}}
|
||||||
|
<div class="col-12 col-md-3 offset-0 offset-md-2 d-flex align-items-center">
|
||||||
|
<label>減免<span style="color:red;">*</span></label>
|
||||||
|
<button type="button" id="userTypeInfoBtn2" style="margin-left:2px; border:none; background:none; cursor:pointer; vertical-align:top; position:relative; top:-4px;">
|
||||||
|
<span style="display:inline-block; width:24px; height:24px; border-radius:50%; border:2px solid #007bff; text-align:center; line-height:20px; font-weight:bold; color:#007bff; font-size:16px; background:#fff;">?</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-lg-6 mb10">
|
||||||
|
<div class="form-check form-check-inline">
|
||||||
|
<input class="form-check-input" type="radio" name="contract_reduction" id="contract_reduction_yes" value="はい">
|
||||||
|
<label class="form-check-label" for="contract_reduction_yes">はい</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check form-check-inline">
|
||||||
|
<input class="form-check-input" type="radio" name="contract_reduction" id="contract_reduction_no" value="いいえ">
|
||||||
|
<label class="form-check-label" for="contract_reduction_no">いいえ</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{-- 勤務先名(一般のみ表示) --}}
|
||||||
|
<div class="col-12 col-md-3 offset-0 offset-md-2 user_workplace_area {{ old('user_category', $user_category) == '学生' ? 'd-none' : '' }}">
|
||||||
|
<label for="user_workplace">勤務先名<span style="color:red;">*</span></label>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-lg-6 mb10 user_workplace_area {{ old('user_category', $user_category) == '学生' ? 'd-none' : '' }}">
|
||||||
|
<input type="text" class="form-control" id="user_workplace" name="user_workplace" value="{{ old('user_workplace', $user->user_workplace) }}" placeholder="マルバツ株式会社">
|
||||||
|
</div>
|
||||||
|
{{-- 学校名(学生のみ表示) --}}
|
||||||
|
<div class="col-12 col-md-3 offset-0 offset-md-2 user_school_area {{ old('user_category', $user_category) == '学生' ? '' : 'd-none' }}">
|
||||||
|
<label for="user_school">学校名<span style="color:red;">*</span></label>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-lg-6 mb10 user_school_area {{ old('user_category', $user_category) == '学生' ? '' : 'd-none' }}">
|
||||||
|
<input type="text" class="form-control" id="user_school" name="user_school" value="{{ old('user_school', $user->user_school) }}">
|
||||||
|
</div>
|
||||||
|
{{-- 卒業予定(学生のみ表示) --}}
|
||||||
|
<div class="col-12 col-md-3 offset-0 offset-md-2 user_graduate_area {{ old('user_category', $user_category) == '学生' ? '' : 'd-none' }}">
|
||||||
|
<label for="user_graduate">卒業予定<span style="color:red;">*</span></label>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-lg-6 mb10 user_graduate_area {{ old('user_category', $user_category) == '学生' ? '' : 'd-none' }}">
|
||||||
|
<input type="date" class="form-control" id="user_graduate" name="user_graduate" value="{{ old('user_graduate', $user->user_graduate) }}">
|
||||||
|
</div>
|
||||||
|
{{-- 住所(関連) --}}
|
||||||
|
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||||
|
<label for="user_relate">住所</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-lg-6 mb10 h-adr">
|
||||||
|
<input type="text" class="form-control d-inline-block" style="width:80px;" name="user_relate_zip_1" maxlength="3" value="{{ old('user_relate_zip_1', substr($user->user_relate_zip,0,3)) }}"> -
|
||||||
|
<input type="text" class="form-control d-inline-block" style="width:100px;" name="user_relate_zip_2" maxlength="4" value="{{ old('user_relate_zip_2', substr($user->user_relate_zip,3,4)) }}"><br>
|
||||||
|
<select class="form-control d-inline-block" style="margin-top:8px; width:180px;" name="user_relate_pre">
|
||||||
|
<option value="">都道府県</option>
|
||||||
|
<option value="北海道" {{ old('user_relate_pre', $user->user_relate_pre) == '北海道' ? 'selected' : '' }}>北海道</option>
|
||||||
|
<option value="青森県" {{ old('user_relate_pre', $user->user_relate_pre) == '青森県' ? 'selected' : '' }}>青森県</option>
|
||||||
|
<option value="岩手県" {{ old('user_relate_pre', $user->user_relate_pre) == '岩手県' ? 'selected' : '' }}>岩手県</option>
|
||||||
|
<option value="宮城県" {{ old('user_relate_pre', $user->user_relate_pre) == '宮城県' ? 'selected' : '' }}>宮城県</option>
|
||||||
|
<option value="秋田県" {{ old('user_relate_pre', $user->user_relate_pre) == '秋田県' ? 'selected' : '' }}>秋田県</option>
|
||||||
|
<option value="山形県" {{ old('user_relate_pre', $user->user_relate_pre) == '山形県' ? 'selected' : '' }}>山形県</option>
|
||||||
|
<option value="福島県" {{ old('user_relate_pre', $user->user_relate_pre) == '福島県' ? 'selected' : '' }}>福島県</option>
|
||||||
|
<option value="茨城県" {{ old('user_relate_pre', $user->user_relate_pre) == '茨城県' ? 'selected' : '' }}>茨城県</option>
|
||||||
|
<option value="栃木県" {{ old('user_relate_pre', $user->user_relate_pre) == '栃木県' ? 'selected' : '' }}>栃木県</option>
|
||||||
|
<option value="群馬県" {{ old('user_relate_pre', $user->user_relate_pre) == '群馬県' ? 'selected' : '' }}>群馬県</option>
|
||||||
|
<option value="埼玉県" {{ old('user_relate_pre', $user->user_relate_pre) == '埼玉県' ? 'selected' : '' }}>埼玉県</option>
|
||||||
|
<option value="千葉県" {{ old('user_relate_pre', $user->user_relate_pre) == '千葉県' ? 'selected' : '' }}>千葉県</option>
|
||||||
|
<option value="東京都" {{ old('user_relate_pre', $user->user_relate_pre) == '東京都' ? 'selected' : '' }}>東京都</option>
|
||||||
|
<option value="神奈川県" {{ old('user_relate_pre', $user->user_relate_pre) == '神奈川県' ? 'selected' : '' }}>神奈川県</option>
|
||||||
|
<option value="新潟県" {{ old('user_relate_pre', $user->user_relate_pre) == '新潟県' ? 'selected' : '' }}>新潟県</option>
|
||||||
|
<option value="富山県" {{ old('user_relate_pre', $user->user_relate_pre) == '富山県' ? 'selected' : '' }}>富山県</option>
|
||||||
|
<option value="石川県" {{ old('user_relate_pre', $user->user_relate_pre) == '石川県' ? 'selected' : '' }}>石川県</option>
|
||||||
|
<option value="福井県" {{ old('user_relate_pre', $user->user_relate_pre) == '福井県' ? 'selected' : '' }}>福井県</option>
|
||||||
|
<option value="山梨県" {{ old('user_relate_pre', $user->user_relate_pre) == '山梨県' ? 'selected' : '' }}>山梨県</option>
|
||||||
|
<option value="長野県" {{ old('user_relate_pre', $user->user_relate_pre) == '長野県' ? 'selected' : '' }}>長野県</option>
|
||||||
|
<option value="岐阜県" {{ old('user_relate_pre', $user->user_relate_pre) == '岐阜県' ? 'selected' : '' }}>岐阜県</option>
|
||||||
|
<option value="静岡県" {{ old('user_relate_pre', $user->user_relate_pre) == '静岡県' ? 'selected' : '' }}>静岡県</option>
|
||||||
|
<option value="愛知県" {{ old('user_relate_pre', $user->user_relate_pre) == '愛知県' ? 'selected' : '' }}>愛知県</option>
|
||||||
|
<option value="三重県" {{ old('user_relate_pre', $user->user_relate_pre) == '三重県' ? 'selected' : '' }}>三重県</option>
|
||||||
|
<option value="滋賀県" {{ old('user_relate_pre', $user->user_relate_pre) == '滋賀県' ? 'selected' : '' }}>滋賀県</option>
|
||||||
|
<option value="京都府" {{ old('user_relate_pre', $user->user_relate_pre) == '京都府' ? 'selected' : '' }}>京都府</option>
|
||||||
|
<option value="大阪府" {{ old('user_relate_pre', $user->user_relate_pre) == '大阪府' ? 'selected' : '' }}>大阪府</option>
|
||||||
|
<option value="兵庫県" {{ old('user_relate_pre', $user->user_relate_pre) == '兵庫県' ? 'selected' : '' }}>兵庫県</option>
|
||||||
|
<option value="奈良県" {{ old('user_relate_pre', $user->user_relate_pre) == '奈良県' ? 'selected' : '' }}>奈良県</option>
|
||||||
|
<option value="和歌山県" {{ old('user_relate_pre', $user->user_relate_pre) == '和歌山県' ? 'selected' : '' }}>和歌山県</option>
|
||||||
|
<option value="鳥取県" {{ old('user_relate_pre', $user->user_relate_pre) == '鳥取県' ? 'selected' : '' }}>鳥取県</option>
|
||||||
|
<option value="島根県" {{ old('user_relate_pre', $user->user_relate_pre) == '島根県' ? 'selected' : '' }}>島根県</option>
|
||||||
|
<option value="岡山県" {{ old('user_relate_pre', $user->user_relate_pre) == '岡山県' ? 'selected' : '' }}>岡山県</option>
|
||||||
|
<option value="広島県" {{ old('user_relate_pre', $user->user_relate_pre) == '広島県' ? 'selected' : '' }}>広島県</option>
|
||||||
|
<option value="山口県" {{ old('user_relate_pre', $user->user_relate_pre) == '山口県' ? 'selected' : '' }}>山口県</option>
|
||||||
|
<option value="徳島県" {{ old('user_relate_pre', $user->user_relate_pre) == '徳島県' ? 'selected' : '' }}>徳島県</option>
|
||||||
|
<option value="香川県" {{ old('user_relate_pre', $user->user_relate_pre) == '香川県' ? 'selected' : '' }}>香川県</option>
|
||||||
|
<option value="愛媛県" {{ old('user_relate_pre', $user->user_relate_pre) == '愛媛県' ? 'selected' : '' }}>愛媛県</option>
|
||||||
|
<option value="高知県" {{ old('user_relate_pre', $user->user_relate_pre) == '高知県' ? 'selected' : '' }}>高知県</option>
|
||||||
|
<option value="福岡県" {{ old('user_relate_pre', $user->user_relate_pre) == '福岡県' ? 'selected' : '' }}>福岡県</option>
|
||||||
|
<option value="佐賀県" {{ old('user_relate_pre', $user->user_relate_pre) == '佐賀県' ? 'selected' : '' }}>佐賀県</option>
|
||||||
|
<option value="長崎県" {{ old('user_relate_pre', $user->user_relate_pre) == '長崎県' ? 'selected' : '' }}>長崎県</option>
|
||||||
|
<option value="熊本県" {{ old('user_relate_pre', $user->user_relate_pre) == '熊本県' ? 'selected' : '' }}>熊本県</option>
|
||||||
|
<option value="大分県" {{ old('user_relate_pre', $user->user_relate_pre) == '大分県' ? 'selected' : '' }}>大分県</option>
|
||||||
|
<option value="宮崎県" {{ old('user_relate_pre', $user->user_relate_pre) == '宮崎県' ? 'selected' : '' }}>宮崎県</option>
|
||||||
|
<option value="鹿児島県" {{ old('user_relate_pre', $user->user_relate_pre) == '鹿児島県' ? 'selected' : '' }}>鹿児島県</option>
|
||||||
|
<option value="沖縄県" {{ old('user_relate_pre', $user->user_relate_pre) == '沖縄県' ? 'selected' : '' }}>沖縄県</option>
|
||||||
|
</select>
|
||||||
|
<input type="text" class="form-control d-inline-block" style="margin-top:8px;" name="user_relate_city" value="{{ old('user_relate_city', $user->user_relate_city) }}" placeholder="足立区">
|
||||||
|
<input type="text" class="form-control d-inline-block" style="margin-top:8px;" name="user_relate_add" value="{{ old('user_relate_add', $user->user_relate_add) }}" placeholder="六町1-1-1">
|
||||||
|
</div>
|
||||||
|
{{-- 防犯登録番号 --}}
|
||||||
|
@if (!empty($park->securityreg_display_flag) && $park->securityreg_display_flag == 1)
|
||||||
|
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||||
|
<label for="user_securitynum">防犯登録番号<span style="color:red;">*</span></label>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-lg-6 mb10">
|
||||||
|
<input type="text" class="form-control" id="user_securitynum" name="user_securitynum" value="{{ old('user_securitynum') }}" placeholder="123456789">
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
{{-- 確認ボタン --}}
|
||||||
|
<div class="col-12 col-md-5 offset-0 offset-md-1 mt10">
|
||||||
|
<input type="submit" class="btn btn-lg btn-block btn-success" value="本人確認書類のアップロードへ" />
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-md-5 mt10">
|
||||||
|
<a class="btn btn-lg btn-block btn-outline-success" href="/regular_contract/create">メニューへ戻る</a>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</section>
|
||||||
|
{{-- 利用者区分説明モーダル --}}
|
||||||
|
<div class="modal fade" id="userTypeInfoModal" tabindex="-1" aria-labelledby="userTypeInfoModalLabel" aria-hidden="true">
|
||||||
|
<div class="modal-dialog modal-lg">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-body">
|
||||||
|
<div>
|
||||||
|
【一般】<br>
|
||||||
|
学生以外の利用者の方<br>
|
||||||
|
【学生】<br>
|
||||||
|
学生の利用者の方<br>
|
||||||
|
【減免】<br>
|
||||||
|
以下に該当される利用者の方が、減免の対象になる場合があります。<br>
|
||||||
|
(例)<br>
|
||||||
|
・高齢者の方<br>
|
||||||
|
・障がい者の方<br>
|
||||||
|
・生活保護を受けられている方<br>
|
||||||
|
・中国残留邦人の方<br>
|
||||||
|
・児童扶養手当を受給されている方<br>
|
||||||
|
詳しくはサポートセンターまでお問い合わせください。<br>
|
||||||
|
TEL:03-5856-4720
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-default" data-dismiss="modal">キャンセル</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@php
|
||||||
|
$showTerms = old('show_terms_modal', session('show_terms_modal', $show_terms_modal ?? true));
|
||||||
|
@endphp
|
||||||
|
<script>
|
||||||
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
|
var termsModal = document.getElementById('termsModal');
|
||||||
|
var closeModalBtn = document.getElementById('closeModalBtn');
|
||||||
|
var okModalBtn = document.getElementById('okModalBtn');
|
||||||
|
var showTerms = {!! json_encode($showTerms) !!};
|
||||||
|
if (showTerms) {
|
||||||
|
// 初期表示時のみモーダル表示
|
||||||
|
termsModal.style.display = 'flex';
|
||||||
|
document.body.style.overflow = 'hidden';
|
||||||
|
}
|
||||||
|
|
||||||
|
function closeModal() {
|
||||||
|
termsModal.style.display = 'none';
|
||||||
|
document.body.style.overflow = '';
|
||||||
|
}
|
||||||
|
closeModalBtn.addEventListener('click', closeModal);
|
||||||
|
okModalBtn.addEventListener('click', closeModal);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</main>
|
||||||
|
<script>
|
||||||
|
// 利用者区分による表示切替
|
||||||
|
function toggleUserTypeFields() {
|
||||||
|
var ippan = document.getElementById('user_categoryid_ippan').checked;
|
||||||
|
var gakusei = document.getElementById('user_categoryid_gakusei').checked;
|
||||||
|
var workplaceAreas = document.querySelectorAll('.user_workplace_area');
|
||||||
|
var schoolAreas = document.querySelectorAll('.user_school_area');
|
||||||
|
var graduateAreas = document.querySelectorAll('.user_graduate_area');
|
||||||
|
if (ippan) {
|
||||||
|
workplaceAreas.forEach(function(el) {
|
||||||
|
el.classList.remove('d-none');
|
||||||
|
});
|
||||||
|
schoolAreas.forEach(function(el) {
|
||||||
|
el.classList.add('d-none');
|
||||||
|
});
|
||||||
|
graduateAreas.forEach(function(el) {
|
||||||
|
el.classList.add('d-none');
|
||||||
|
});
|
||||||
|
} else if (gakusei) {
|
||||||
|
workplaceAreas.forEach(function(el) {
|
||||||
|
el.classList.add('d-none');
|
||||||
|
});
|
||||||
|
schoolAreas.forEach(function(el) {
|
||||||
|
el.classList.remove('d-none');
|
||||||
|
});
|
||||||
|
graduateAreas.forEach(function(el) {
|
||||||
|
el.classList.remove('d-none');
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
workplaceAreas.forEach(function(el) {
|
||||||
|
el.classList.remove('d-none');
|
||||||
|
});
|
||||||
|
schoolAreas.forEach(function(el) {
|
||||||
|
el.classList.add('d-none');
|
||||||
|
});
|
||||||
|
graduateAreas.forEach(function(el) {
|
||||||
|
el.classList.add('d-none');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
document.getElementById('user_categoryid_ippan').addEventListener('change', toggleUserTypeFields);
|
||||||
|
document.getElementById('user_categoryid_gakusei').addEventListener('change', toggleUserTypeFields);
|
||||||
|
window.addEventListener('DOMContentLoaded', function() {
|
||||||
|
toggleUserTypeFields();
|
||||||
|
});
|
||||||
|
// 利用者区分説明ポップアップ表示
|
||||||
|
document.getElementById('userTypeInfoBtn').addEventListener('click', function() {
|
||||||
|
$('#userTypeInfoModal').modal('show');
|
||||||
|
});
|
||||||
|
document.getElementById('userTypeInfoBtn2').addEventListener('click', function() {
|
||||||
|
$('#userTypeInfoModal').modal('show');
|
||||||
|
});
|
||||||
|
|
||||||
|
// 生年月日入力時に年齢自動計算
|
||||||
|
document.getElementById('user_birthdate').addEventListener('change', function() {
|
||||||
|
var birth = this.value;
|
||||||
|
var ageInput = document.getElementById('user_age');
|
||||||
|
if (birth) {
|
||||||
|
var today = new Date();
|
||||||
|
var birthDate = new Date(birth);
|
||||||
|
var age = today.getFullYear() - birthDate.getFullYear();
|
||||||
|
var m = today.getMonth() - birthDate.getMonth();
|
||||||
|
if (m < 0 || (m === 0 && today.getDate() < birthDate.getDate())) {
|
||||||
|
age--;
|
||||||
|
}
|
||||||
|
ageInput.value = age;
|
||||||
|
} else {
|
||||||
|
ageInput.value = '';
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
@endsection
|
||||||
109
resources/views/regular_contract/park_detail.blade.php
Normal file
109
resources/views/regular_contract/park_detail.blade.php
Normal file
@ -0,0 +1,109 @@
|
|||||||
|
<!-- Bootstrapモーダル -->
|
||||||
|
<div class="modal fade" id="parkDetailModal" tabindex="-1" aria-labelledby="parkDetailLabel" aria-hidden="true">
|
||||||
|
<div class="modal-dialog modal-lg">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h5 class="modal-title" id="parkDetailLabel">{{ $park->park_name }}</h5>
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="閉じる">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<!-- Googleマップ埋め込み -->
|
||||||
|
<div style="width:100%; height:350px;">
|
||||||
|
<iframe
|
||||||
|
width="100%"
|
||||||
|
height="350"
|
||||||
|
frameborder="0"
|
||||||
|
style="border:0"
|
||||||
|
src="https://www.google.com/maps?q={{ $park->park_latitude }},{{ $park->park_longitude }}&hl=ja&z=16&output=embed"
|
||||||
|
allowfullscreen>
|
||||||
|
</iframe>
|
||||||
|
</div>
|
||||||
|
<!-- 駐輪場情報 -->
|
||||||
|
<div class="mt-3 small">
|
||||||
|
{{ $park->park_adrs }}
|
||||||
|
<span class="d-inline-block" style="margin-top:0.5em;"></span>
|
||||||
|
<span>
|
||||||
|
【標準収容台数】
|
||||||
|
@foreach($zoneStandardSum as $type => $count)
|
||||||
|
{{ $type }}:{{ $count }}台
|
||||||
|
@endforeach
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="mt-3">
|
||||||
|
<span>{{ $park->price_memo }}</span>
|
||||||
|
</div>
|
||||||
|
<!-- 空き台数・契約情報 -->
|
||||||
|
<div class="mt-3">
|
||||||
|
@foreach($zones as $zone)
|
||||||
|
@php
|
||||||
|
$vacant = $vacancyData[$zone->psection_id . '_' . $zone->ptype_subject] ?? 0;
|
||||||
|
$grace = $city_grace_periods[$park->city_id] ?? null;
|
||||||
|
$now = \Carbon\Carbon::now();
|
||||||
|
|
||||||
|
// 猶予期間判定
|
||||||
|
$isGracePeriod = false;
|
||||||
|
if ($grace && $grace->update_grace_period_start_date && $grace->update_grace_period_start_time && $grace->update_grace_period_end_date && $grace->update_grace_period_end_time) {
|
||||||
|
$now = \Carbon\Carbon::now();
|
||||||
|
$year = $now->year;
|
||||||
|
$month = $now->month;
|
||||||
|
$startDay = (int)$grace->update_grace_period_start_date;
|
||||||
|
$endDay = (int)$grace->update_grace_period_end_date;
|
||||||
|
$startTime = $grace->update_grace_period_start_time;
|
||||||
|
$endTime = $grace->update_grace_period_end_time;
|
||||||
|
|
||||||
|
if ($startDay > $endDay) {
|
||||||
|
// 月またぎ
|
||||||
|
$start = \Carbon\Carbon::createFromFormat('Y-m-d H:i', sprintf('%04d-%02d-%02d %s', $year, $month, $startDay, $startTime));
|
||||||
|
$nextMonth = $month == 12 ? 1 : $month + 1;
|
||||||
|
$nextYear = $month == 12 ? $year + 1 : $year;
|
||||||
|
$end = \Carbon\Carbon::createFromFormat('Y-m-d H:i', sprintf('%04d-%02d-%02d %s', $nextYear, $nextMonth, $endDay, $endTime));
|
||||||
|
} else {
|
||||||
|
// 同月
|
||||||
|
$start = \Carbon\Carbon::createFromFormat('Y-m-d H:i', sprintf('%04d-%02d-%02d %s', $year, $month, $startDay, $startTime));
|
||||||
|
$end = \Carbon\Carbon::createFromFormat('Y-m-d H:i', sprintf('%04d-%02d-%02d %s', $year, $month, $endDay, $endTime));
|
||||||
|
}
|
||||||
|
$isGracePeriod = $now->between($start, $end);
|
||||||
|
}
|
||||||
|
@endphp
|
||||||
|
<div class="mb-2">
|
||||||
|
<strong>{{ $zone->ptype_subject }}</strong><br>
|
||||||
|
{{ $zone->psection_subject }}:空き {{ $vacant }}台
|
||||||
|
@if($isGracePeriod)
|
||||||
|
@if($vacant > 0)
|
||||||
|
<button type="button" class="btn btn-success btn-sm btn-contract"
|
||||||
|
data-park-id="{{ $park->park_id }}"
|
||||||
|
data-psection-id="{{ $zone->psection_id }}"
|
||||||
|
data-ptype-id="{{ $zone->ptype_id }}">
|
||||||
|
定期契約
|
||||||
|
</button>
|
||||||
|
@else
|
||||||
|
<button type="button" class="btn btn-danger btn_103 btn-reserve"
|
||||||
|
data-park-id="{{ $park->park_id }}"
|
||||||
|
data-psection-id="{{ $zone->psection_id }}"
|
||||||
|
data-ptype-id="{{ $zone->ptype_id }}">
|
||||||
|
空き待ち申込
|
||||||
|
</button>
|
||||||
|
@endif
|
||||||
|
@else
|
||||||
|
<button type="button" class="btn btn-danger btn_103 btn-reserve"
|
||||||
|
data-park-id="{{ $park->park_id }}"
|
||||||
|
data-psection-id="{{ $zone->psection_id }}"
|
||||||
|
data-ptype-id="{{ $zone->ptype_id }}">
|
||||||
|
販売期間外
|
||||||
|
</button>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
@endforeach
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-secondary" data-dismiss="modal">閉じる</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- jQuery Confirm用CSS/JS(jQuery本体は既に読み込まれていれば不要) -->
|
||||||
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery-confirm/3.3.4/jquery-confirm.min.css">
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-confirm/3.3.4/jquery-confirm.min.js"></script>
|
||||||
62
resources/views/regular_contract/regulation.blade.php
Normal file
62
resources/views/regular_contract/regulation.blade.php
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
@extends('layouts.app')
|
||||||
|
@section('content')
|
||||||
|
<main>
|
||||||
|
<header class="alert alert-success">
|
||||||
|
<h4 class="container">新規定期契約 > 利用可能な車種の確認</h4>
|
||||||
|
</header>
|
||||||
|
<section id="section" class="container mt30 mb50">
|
||||||
|
<form class="row form" action="/regular-contract/insertRegulation" method="POST">
|
||||||
|
@csrf
|
||||||
|
<input type="hidden" name="park_id" value="{{ $park_id }}">
|
||||||
|
<input type="hidden" name="psection_id" value="{{ $psection_id }}">
|
||||||
|
<input type="hidden" name="ptype_id" value="{{ $ptype_id }}">
|
||||||
|
<div class="col-12">
|
||||||
|
<h5>駐輪場名:{{ $park_name }}
|
||||||
|
</h5>
|
||||||
|
<p>
|
||||||
|
<h5>車両区分:{{ $psection_subject }}</h5>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<h5>駐輪分類:{{ $ptype_subject }}</h5>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<br>{{ $regulations_text }}
|
||||||
|
</p>
|
||||||
|
<div class="d-flex justify-content-center align-items-center mt-3"
|
||||||
|
style="margin-top: 1rem; margin-bottom: 1rem;">
|
||||||
|
<input type="checkbox" id="agreeCheck" style="width: 1.5rem; height: 1.5rem;">
|
||||||
|
<label for="agreeCheck" style="font-size: 1.5rem; margin-left: 0.5rem;">利用可能なサイズと重量を確認しました</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-12 col-md-5 offset-0 offset-md-1 mt10">
|
||||||
|
<input type="submit" class="btn btn-lg btn-block btn-success" value="契約情報の入力へ" id="submitBtn" disabled />
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-md-5 mt10">
|
||||||
|
<a href="{{ url('mypage') }}" class="btn btn-lg btn-block btn-outline-success" id="menuBtn" disabled>メニューへ戻る</a>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<script>
|
||||||
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
|
var agreeCheck = document.getElementById('agreeCheck');
|
||||||
|
var submitBtn = document.getElementById('submitBtn');
|
||||||
|
var menuBtn = document.getElementById('menuBtn');
|
||||||
|
agreeCheck.addEventListener('change', function() {
|
||||||
|
var enabled = agreeCheck.checked;
|
||||||
|
submitBtn.disabled = !enabled;
|
||||||
|
if (enabled) {
|
||||||
|
menuBtn.classList.remove('disabled');
|
||||||
|
menuBtn.removeAttribute('disabled');
|
||||||
|
} else {
|
||||||
|
menuBtn.classList.add('disabled');
|
||||||
|
menuBtn.setAttribute('disabled', 'disabled');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// 初期状態でメニューも非活性
|
||||||
|
menuBtn.classList.add('disabled');
|
||||||
|
menuBtn.setAttribute('disabled', 'disabled');
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</section>
|
||||||
|
</main>
|
||||||
|
@endsection
|
||||||
@ -0,0 +1,72 @@
|
|||||||
|
@extends('layouts.app')
|
||||||
|
@section('content')
|
||||||
|
<main>
|
||||||
|
<header class="alert alert-success">
|
||||||
|
<h4 class="container">新規定期契約 >本人確認書類のアップロード</h4>
|
||||||
|
</header>
|
||||||
|
@if ($errors->any())
|
||||||
|
<div class="alert alert-danger">
|
||||||
|
<ul class="mb-0">
|
||||||
|
@foreach ($errors->all() as $error)
|
||||||
|
<li>{{ $error }}</li>
|
||||||
|
@endforeach
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
<section id="" class="container mt30 mb50">
|
||||||
|
<form class="row form" action="{{ route('regular_contract.confirm_upload_identity', ['contract_id' => $contract_id]) }}" method="POST" enctype="multipart/form-data">
|
||||||
|
@csrf
|
||||||
|
<input type="hidden" name="park_id" value="{{ $park_id }}">
|
||||||
|
<input type="hidden" name="psection_id" value="{{ $psection_id }}">
|
||||||
|
<input type="hidden" name="ptype_id" value="{{ $ptype_id }}">
|
||||||
|
<div class="col-12 col-md-8 offset-0 offset-md-2 mb30">
|
||||||
|
<h3 class="alert-success">下記のいずれかの写真をアップロードしてください。</h3>
|
||||||
|
<p>
|
||||||
|
免許証・旅券(パスポート)・在留カード・特別永住者証明書<br>
|
||||||
|
外国人登録証明書(特別永住者のみ)・学生証<br>
|
||||||
|
身体障害者手帳・生活保護受給者証・保険証<br><br>
|
||||||
|
上記いずれかの住所記載のあるもの<br>
|
||||||
|
※特別永住者の方は特別永住者証明書と外国人登録証明書の両方が必要となります。
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-md-8 offset-0 offset-md-2 mb30">
|
||||||
|
<h3 class="alert-success">ご注意ください</h3>
|
||||||
|
<p>
|
||||||
|
ご入力の内容で、本人確認を行います。本人確認書類の内容によってはお時間を頂く場合がございます。<br>
|
||||||
|
その場合は、メールにてご連絡いたしますので、しばらくお待ちください。
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-md-8 offset-0 offset-md-2 mb30">
|
||||||
|
<div class="form-check form-check-inline">
|
||||||
|
<input class="form-check-input" type="radio" name="idcard_type" id="idcard_type_license" value="免許証" required>
|
||||||
|
<label class="form-check-label" for="idcard_type_license">免許証</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check form-check-inline">
|
||||||
|
<input class="form-check-input" type="radio" name="idcard_type" id="idcard_type_student" value="学生証">
|
||||||
|
<label class="form-check-label" for="idcard_type_student">学生証</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check form-check-inline">
|
||||||
|
<input class="form-check-input" type="radio" name="idcard_type" id="idcard_type_other" value="その他">
|
||||||
|
<label class="form-check-label" for="idcard_type_other">その他</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-md-6 offset-1 offset-md-3 mb30">
|
||||||
|
おもて<span style="color: red;">*</span>
|
||||||
|
<input type="file" class="mb10" id="user_idcard" name="user_idcard" accept="image/*" /><br>
|
||||||
|
ウ ラ<span style="color: transparent;">*</span>
|
||||||
|
<input type="file" class="mb10" id="user_idcard2" name="user_idcard2" accept="image/*" />
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-md-4 offset-0 offset-md-2 mt10">
|
||||||
|
<input type="submit" class="btn btn-lg btn-block btn-success" value="入力内容を確認する" />
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-md-4 mt10">
|
||||||
|
<a href="{{ route('regular_contract.input', [
|
||||||
|
'park_id' => $park_id,
|
||||||
|
'psection_id' => $psection_id,
|
||||||
|
'ptype_id' => $ptype_id
|
||||||
|
]) }}" class="btn btn-lg btn-block btn-outline-success">入力画面に戻る</a>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</section>
|
||||||
|
</main>
|
||||||
|
@endsection
|
||||||
@ -21,6 +21,7 @@ use App\Http\Controllers\RegularContractCreateController;
|
|||||||
use App\Http\Controllers\ParkingSearchController;
|
use App\Http\Controllers\ParkingSearchController;
|
||||||
use App\Http\Controllers\ParkWaitlistController;
|
use App\Http\Controllers\ParkWaitlistController;
|
||||||
use App\Http\Controllers\ReceiptController;
|
use App\Http\Controllers\ReceiptController;
|
||||||
|
use App\Http\Controllers\ParkDetailController;
|
||||||
|
|
||||||
// 画面遷移のみ
|
// 画面遷移のみ
|
||||||
Route::get('/', function () { return view('general.swo1_1'); })->name('swo1_1');
|
Route::get('/', function () { return view('general.swo1_1'); })->name('swo1_1');
|
||||||
@ -67,7 +68,7 @@ Route::get('/login', function () {
|
|||||||
// マイページ画面へのリダイレクト
|
// マイページ画面へのリダイレクト
|
||||||
Route::get('/mypage', function () {
|
Route::get('/mypage', function () {
|
||||||
return 'マイページ(仮)';
|
return 'マイページ(仮)';
|
||||||
})->name('mypage');
|
})->name('mypage');
|
||||||
|
|
||||||
// ユーザー情報確認画面
|
// ユーザー情報確認画面
|
||||||
Route::get('/user/info', [UserInfoController::class, 'show'])
|
Route::get('/user/info', [UserInfoController::class, 'show'])
|
||||||
@ -114,7 +115,20 @@ Route::post('receipt/issue/{contract_id}', [ReceiptController::class, 'issue']);
|
|||||||
// 新規定期契約画面
|
// 新規定期契約画面
|
||||||
Route::get('regular_contract/create', [RegularContractCreateController::class, 'show'])
|
Route::get('regular_contract/create', [RegularContractCreateController::class, 'show'])
|
||||||
->name('regular_contract.create');
|
->name('regular_contract.create');
|
||||||
|
Route::get('/api/park-detail/{park_id}', [ParkDetailController::class, 'show']);
|
||||||
|
Route::get('/regular-contract/regulationCheck', [RegularContractCreateController::class, 'regulationCheck']);
|
||||||
|
Route::get('/regular-contract/regulation', [RegularContractCreateController::class, 'showRegulation'])
|
||||||
|
->name('regular_contract.regulation');
|
||||||
|
Route::post('/regular-contract/insertRegulation', [RegularContractCreateController::class, 'insertRegulation']);
|
||||||
|
Route::get('/regular-contract/input', [RegularContractCreateController::class, 'showContractForm'])->name('regular_contract.input');
|
||||||
|
Route::post('/regular_contract/input/check', [RegularContractCreateController::class, 'inputCheck'])->name('regular_contract.input.check');
|
||||||
|
Route::get('/regular-contract/upload_identity_create', [RegularContractCreateController::class, 'showUploadIdentityCreate'])->name('regular_contract.upload_identity_create');
|
||||||
|
|
||||||
|
Route::post('regular_contract/confirm_upload_identity/{contract_id}', [RegularContractCreateController::class, 'confirmUploadIdentity'])->name('regular_contract.confirm_upload_identity');
|
||||||
|
Route::get('regular_contract/create_confirm', [RegularContractCreateController::class, 'createConfirm'])->name('regular_contract.create_confirm');
|
||||||
|
Route::post('/regular_contract/create_confirm_next/{contract_id}', [RegularContractCreateController::class, 'createConfirmNext'])->name('regular_contract.create_confirm_next');
|
||||||
|
Route::post('regular_contract/create_select_period', [RegularContractCreateController::class, 'selectPeriod'])
|
||||||
|
->name('regular_contract.create_select_period');
|
||||||
// 定期契約更新
|
// 定期契約更新
|
||||||
Route::get('regular_contract/update', [RegularContractController::class, 'showInfo'])
|
Route::get('regular_contract/update', [RegularContractController::class, 'showInfo'])
|
||||||
->name('regular_contract.update');
|
->name('regular_contract.update');
|
||||||
@ -133,7 +147,7 @@ Route::post('regular_contract/upload_identity/{contract_id}', [RegularContractCo
|
|||||||
// 利用期間選択
|
// 利用期間選択
|
||||||
Route::get('regular_contract/select_period/{contract_id}', [RegularContractController::class, 'selectPeriod'])
|
Route::get('regular_contract/select_period/{contract_id}', [RegularContractController::class, 'selectPeriod'])
|
||||||
->name('regular_contract.select_period');
|
->name('regular_contract.select_period');
|
||||||
Route::post('regular_contract/update_period', [App\Http\Controllers\RegularContractController::class, 'updatePeriod'])
|
Route::post('regular_contract/update_period', [RegularContractController::class, 'updatePeriod'])
|
||||||
->name('regular_contract.update_period');
|
->name('regular_contract.update_period');
|
||||||
|
|
||||||
// 定期契約履歴
|
// 定期契約履歴
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user