diff --git a/app/Http/Controllers/InquiryConfirmController.php b/app/Http/Controllers/InquiryConfirmController.php index 46bec8d..f5dfd14 100644 --- a/app/Http/Controllers/InquiryConfirmController.php +++ b/app/Http/Controllers/InquiryConfirmController.php @@ -11,9 +11,9 @@ class InquiryConfirmController extends Controller { // 初期表示内容 public $form_data = [ - ["name", "text", "氏名*", ""], - ["email", "email", "メールアドレス*", ""], - ["tel", "text", "電話番号*", ""], + ["name", "text", "氏名*", "山田 太郎"], + ["email", "email", "メールアドレス*", "info@so-manager.com"], + ["tel", "text", "電話番号*", "000-0000-0000"], ["subject", "checkbox", "お問い合わせ概要*", ["定期契約について", "操作方法について", "支払方法について", "その他お問合せ"]], ["parking", "text", "お問い合わせ駐輪場名", ""], ["detail", "textarea", "お問い合わせ詳細*", ""], @@ -40,11 +40,11 @@ class InquiryConfirmController extends Controller // エラーメッセージ $message = [ - 'name.required' => '名前を入力してください', - 'email.required' => 'メールアドレスを入力してください', - 'tel.required' => '電話番号を入力してください', - 'subject.required' => 'お問い合わせ概要を選択してください', - 'detail.required' => 'お問い合わせ詳細を入力してください', + 'name.required' => '氏名は必ず入力してください。', + 'email.required' => 'メールアドレスは必ず入力してください。', + 'tel.required' => '電話番号は必ず入力してください。', + 'subject.required' => 'お問い合わせ概要が選択されていません。', + 'detail.required' => 'お問い合わせの詳細が入力されていません。', ]; // バリデーションチェック diff --git a/app/Http/Controllers/MemberRegistrationController.php b/app/Http/Controllers/MemberRegistrationController.php index 960172c..e8fbfd6 100644 --- a/app/Http/Controllers/MemberRegistrationController.php +++ b/app/Http/Controllers/MemberRegistrationController.php @@ -51,7 +51,7 @@ class MemberRegistrationController extends Controller return view('general.swo2_2'); } - // 入力画面表示 + // メールのURLからアクセス public function index() { // 署名付きURLの有効期限チェック @@ -59,32 +59,39 @@ class MemberRegistrationController extends Controller return redirect('error')->withErrors(['error' => '署名の有効期限が切れています']); } - // 初回遷移(GETアクセス)時のリクエストパラメータチェック - if (!session()->has('email')) { + // パラメータ存在チェック + $encryptedEmail = request()->query('email'); + if (!$encryptedEmail) { + return redirect('error')->withErrors(['error' => 'メールアドレスが指定されていません']); + } - // パラメータ存在チェック - $encryptedEmail = request()->query('email'); - if (!$encryptedEmail) { - return redirect('error')->withErrors(['error' => 'メールアドレスが指定されていません']); + // パラメータ整合性チェック + try { + $email = decrypt($encryptedEmail); + } catch (\Exception $e) { + return redirect('error')->withErrors(['error' => 'メールアドレスの情報が不正です']); + } + + // 二重登録防止チェック + $existingMember = User::where('user_primemail', $email)->get(); + foreach ($existingMember as $member) { + if ($member->user_quit_flag != 1) { + return redirect('error')->withErrors(['error' => '既に登録済みです']); } + } - // パラメータ整合性チェック - try { - $email = decrypt($encryptedEmail); - } catch (\Exception $e) { - return redirect('error')->withErrors(['error' => 'メールアドレスの情報が不正です']); - } + // メールアドレスをセッションに保存 + session(['email' => $email]); - // 二重登録防止チェック - $existingMember = User::where('user_primemail', $email)->get(); - foreach ($existingMember as $member) { - if ($member->user_quit_flag != 1) { - return redirect('error')->withErrors(['error' => '既に登録済みです']); - } - } + // 入力画面に遷移 + return view('general.swo2_3'); + } - // メールアドレスをセッションに保存 - session(['email' => $email]); + // リダイレクト用 + public function indexBack(Request $request) + { + if (!session('email')) { + return redirect('error')->withErrors(['error' => '不正なアクセスです']); } // 入力画面に遷移 @@ -119,9 +126,7 @@ class MemberRegistrationController extends Controller // バリデーションチェック $validator = Validator::make($request->all(), $rules, $message); if ($validator->fails()) { - return redirect('swo2_3') - ->withErrors($validator) - ->withInput(); + return redirect('swo2_3B')->withErrors($validator)->withInput(); } // 画面返却値 @@ -142,7 +147,7 @@ class MemberRegistrationController extends Controller { // 前の画面に戻る if($request->input('back') == 'back'){ - return redirect('swo2_3')->withInput(); + return redirect('swo2_3B')->withInput(); } // 登録完了後のブラウザバックによる二重登録対策 diff --git a/app/Http/Controllers/ParkingSearchController.php b/app/Http/Controllers/ParkingSearchController.php index ee886db..c09f153 100644 --- a/app/Http/Controllers/ParkingSearchController.php +++ b/app/Http/Controllers/ParkingSearchController.php @@ -31,14 +31,10 @@ class ParkingSearchController extends Controller // 検索処理 public function getParkData($city_name, $station_neighbor_station, $park_name) { - // 検索仕様 - // 駐輪場マスタの全件(条件を絞った場合はその条件に一致するもの)を取得。 - // 併せて各マスタから追加情報を取得するが、その際のレコードは全て1対1で結びつく想定で暫定実装する - // ※設計書に詳細な記載なし。DBの定義上は1対多の可能性もあるが、その場合現在の画面イメージと矛盾するため、実態として無い想定で進める - // 駐輪場情報検索 $park = \DB::table('park as p') ->select( + 'p.park_id', 'p.park_name', 'p.park_adrs', 'p.price_memo', @@ -49,15 +45,12 @@ class ParkingSearchController extends Controller 'p.update_grace_period_end_date', 'p.update_grace_period_end_time', 'c.city_name', - 's.station_neighbor_station', - 'z.psection_id', - 'z.zone_standard' + 's.station_neighbor_station' ) ->leftJoin('city as c', 'p.city_id', '=', 'c.city_id') ->leftJoin(\DB::raw( '(SELECT park_id, station_neighbor_station FROM station WHERE station_id IN (SELECT MAX(station_id) FROM station GROUP BY park_id)) as s' - ),'p.park_id','=','s.park_id') - ->leftJoin('zone as z', 'p.park_id', '=', 'z.park_id'); + ),'p.park_id','=','s.park_id'); // プルダウン指定の条件でwhere句を付与 if (!empty($city_name)) { @@ -76,42 +69,102 @@ class ParkingSearchController extends Controller $now = date('Y-m-d H:i:s'); foreach ($park as $row) { - // ゾーンマスタの情報から空き台数を取得する - $vacantInfo = \DB::table('zone') - ->selectRaw('SUM(zone_tolerance) - SUM(zone_number) as vacant') - ->where('psection_id', $row->psection_id) - ->groupBy('psection_id') - ->first(); - - // 定期予約マスタから予約中の台数を取得する - $reservedCount = \DB::table('reserve') - ->where('psection_id', $row->psection_id) - ->where('valid_flag', 1) - ->count(); + // ゾーンマスタの情報を取得する + $zoneInfo = \DB::table('zone as z') + ->select( + 'z.psection_id', + 'z.ptype_id', + \DB::raw('SUM(z.zone_standard) as zone_standard'), + \DB::raw('SUM(z.zone_number) as zone_number'), + \DB::raw('SUM(z.zone_tolerance) as zone_tolerance'), + 'ps.psection_subject', + 'pt.ptype_subject' + ) + ->join('ptype as pt', 'z.ptype_id', '=', 'pt.ptype_id') + ->leftJoin('psection as ps', 'z.psection_id', '=', 'ps.psection_id') + ->where('z.park_id', $row->park_id) + ->groupBy('z.park_id', 'z.ptype_id', 'z.psection_id', 'ps.psection_subject', 'pt.ptype_subject') + ->get(); + // ゾーンマスタが0件の場合、次のデータへ + if ($zoneInfo->isEmpty()) { + $form_data[] = [ + 'park_name' => $row->park_name, + 'park_adrs' => $row->park_adrs, + 'price_memo' => $row->price_memo, + 'park_latitude' => $row->park_latitude, + 'park_longitude' => $row->park_longitude, + 'city_name' => $row->city_name, + 'station_neighbor_station' => $row->station_neighbor_station, + 'zone_data' => [] + ]; + continue; + } + // 更新期間内判定 $update_start = $row->update_grace_period_start_date . ' ' . $row->update_grace_period_start_time; $update_end = $row->update_grace_period_end_date . ' ' . $row->update_grace_period_end_time; $is_update_period = ($now >= $update_start && $now <= $update_end); - // ボタン表示有無判定 - $vacant = ($vacantInfo ? $vacantInfo->vacant : 0) - $reservedCount; - if ($vacant > 0 && $is_update_period) { // 定期契約ボタン (空き台数が1台以上かつ更新期間内) - $status = 1; - } elseif ($vacant <= 0 && $is_update_period) { // 空き待ち予約ボタン (空き台数が0台以下かつ更新期間内) - $status = 2; - } elseif ($vacant <= 0 && !$is_update_period) { // 販売期間外ボタン (空き台数が0台以下かつ更新期間外) - $status = 3; - } else { - $status = null; + // ゾーンマスタの件数分だけループする + $zone_data = []; + foreach ($zoneInfo as $zone) { + + // 予約中件数取得 + $reservedCount = \DB::table('reserve') + ->where('park_id', $row->park_id) + ->where('psection_id', $zone->psection_id) + ->where('ptype_id', $zone->ptype_id) + ->where('valid_flag', 1) + ->count(); + + // ステータス(表示ボタン)判定 + $status = 0; // 0:非表示, 1:定期契約, 2:空き待ち予約, 3:販売期間外 + $zone_vacant = $zone->zone_tolerance - $zone->zone_number - $reservedCount; + if ($zone_vacant > 0 && $is_update_period) { // 定期契約ボタン (空き台数が1台以上かつ更新期間内) + $status = 1; + } elseif ($zone_vacant <= 0 && $is_update_period) { // 空き待ち予約ボタン (空き台数が0台以下かつ更新期間内) + $status = 2; + } elseif ($zone_vacant <= 0 && !$is_update_period) { // 販売期間外ボタン (空き台数が0台以下かつ更新期間外) + $status = 3; + } + + // 返却用データに追加 + $zone_data[] = [ + 'psection_subject' => $zone->psection_subject, + 'ptype_subject' => $zone->ptype_subject, + 'zone_standard' => $zone->zone_standard, + 'zone_vacant' => $zone_vacant, + 'status' => $status + ]; } + // $zone_dataを並び替え + usort($zone_data, function($a, $b) { + // 第一優先: ptype_subject昇順 + $ptypeCmp = strcmp($a['ptype_subject'], $b['ptype_subject']); + if ($ptypeCmp !== 0) { + return $ptypeCmp; + } + // 第二優先: psection_subject昇順 + $psectionCmp = strcmp($a['psection_subject'], $b['psection_subject']); + if ($psectionCmp !== 0) { + return $psectionCmp; + } + // 第三優先: status昇順 + return $a['status'] <=> $b['status']; + }); + // 画面返却用データに追加 $form_data[] = [ 'park_name' => $row->park_name, + 'park_adrs' => $row->park_adrs, + 'price_memo' => $row->price_memo, + 'park_latitude' => $row->park_latitude, + 'park_longitude' => $row->park_longitude, 'city_name' => $row->city_name, 'station_neighbor_station' => $row->station_neighbor_station, - 'status' => $status + 'zone_data' => $zone_data ]; } @@ -133,7 +186,10 @@ class ParkingSearchController extends Controller 'わ行'=>'わをんワヲン ' ]; + // 車種区分リスト取得 + $psections = \DB::table('psection')->select('psection_subject')->orderBy('psection_id', 'asc')->limit(4)->get(); + // 情報返却 - return ['form_data' => $form_data, 'cities' => $cities, 'stations' => $stations, 'parks' => $parks, 'conditions' => $conditions]; + return ['form_data' => $form_data, 'conditions' => $conditions, 'cities' => $cities, 'stations' => $stations, 'parks' => $parks, 'psections' => $psections]; } } \ No newline at end of file diff --git a/app/Http/Controllers/RegularContractCreateController.php b/app/Http/Controllers/RegularContractCreateController.php index 77a9f20..26371b9 100644 --- a/app/Http/Controllers/RegularContractCreateController.php +++ b/app/Http/Controllers/RegularContractCreateController.php @@ -100,13 +100,13 @@ class RegularContractCreateController extends Controller // 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') + ->select('zone.zone_id', 'zone.park_id', 'zone.ptype_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') + ->select('reserve_id', 'park_id', 'ptype_id', 'psection_id') ->where('valid_flag', 1) ->get() ->groupBy('park_id'); diff --git a/app/Http/Controllers/SealReissueController.php b/app/Http/Controllers/SealReissueController.php new file mode 100644 index 0000000..66fcca5 --- /dev/null +++ b/app/Http/Controllers/SealReissueController.php @@ -0,0 +1,96 @@ +where('user_id', $user_id)->value('user_name'); + $contract = DB::table('regular_contract') + ->join('park', 'regular_contract.park_id', '=', 'park.park_id') + ->where('contract_id', $contract_id) + ->select('regular_contract.contract_id', 'park.park_name') + ->first(); + + \Log::info('シール再発行確認画面にアクセス', [ + 'user_id' => $user_id, + ]); + + return view('regular_contract.seal_reissue', [ + 'contract' => $contract, + 'active_menu' => 'SWC-3-1', // マイページメニューの選択状態用 + 'user_name' => $user_name ? $user_name : '', // ユーザー名(ヘッダー用) + ]); + } + + public function reason($contract_id) + { + $user_id = session('user_id'); + if (!$user_id) { + return redirect('/login'); + } + $user_name = DB::table('user')->where('user_id', $user_id)->value('user_name'); + + \Log::info('シール再発行理由入力画面にアクセス', [ + 'user_id' => $user_id, + ]); + + return view('regular_contract.seal_reissue_reason', [ + 'contract_id' => $contract_id, + 'active_menu' => 'SWC-3-1', // マイページメニューの選択状態用 + 'user_name' => $user_name ? $user_name : '', // ユーザー名(ヘッダー用) + ]); + } + + public function complete(Request $request, $contract_id) + { + $user_id = session('user_id'); + if (!$user_id) { + return redirect('/login'); + } + $user_name = DB::table('user')->where('user_id', $user_id)->value('user_name'); + + $validated = $request->validate([ + 'reason' => ['required'], + 'other_reason' => [ + 'nullable', + 'string', + 'max:255', + 'regex:/^[\x20-\x7Eぁ-んァ-ヶ一-龠々ーa-zA-Z0-90-9a-zA-Z、。・「」『』()【】[]{}〈〉《》!?:;…ー~\s\r\n]+$/u', + 'required_if:reason,その他' + ], + ], [ + 'reason.required' => '理由を選択してください。', + 'other_reason.max' => 'その他の理由は255文字以内で入力してください。', + 'other_reason.regex' => 'その他の理由に使用できない文字が含まれています。', + 'other_reason.required_if' => 'その他を選択した場合は理由を入力してください。' + ]); + + $contract = DB::table('regular_contract') + ->join('park', 'regular_contract.park_id', '=', 'park.park_id') + ->where('contract_id', $contract_id) + ->select('regular_contract.contract_id', 'park.park_name') + ->first(); + + $reason = $request->input('reason'); + $other_reason = $request->input('other_reason'); + + \Log::info('シール再発行申請完了画面にアクセス', [ + 'user_id' => $user_id, + ]); + + return view('regular_contract.seal_reissue_complete', [ + 'active_menu' => 'SWC-3-1', // マイページメニューの選択状態用 + 'user_name' => $user_name ? $user_name : '', // ユーザー名(ヘッダー用) + 'contract' => $contract + ]); + } +} diff --git a/app/Http/Controllers/UserInformationController.php b/app/Http/Controllers/UserInformationController.php new file mode 100644 index 0000000..3afd9e8 --- /dev/null +++ b/app/Http/Controllers/UserInformationController.php @@ -0,0 +1,60 @@ +where('user_id', $user_id)->value('user_name'); + + // お知らせデータ取得 + $informations = DB::table('user_information_history') + ->where('user_id', $user_id) + ->orderByDesc('user_information_history_id') + ->select('entry_date', 'user_information_history') + ->limit(10) + ->get(); + + \Log::info('お知らせ画面にアクセス', [ + 'user_id' => $user_id, + ]); + + return view('user_information.index', [ + 'user_name' => $user_name, // ユーザー名(ヘッダー用) + 'informations' => $informations + ]); + } + + public function history() + { + $user_id = session('user_id'); + if (!$user_id) { + return redirect('/login'); + } + $user_name = DB::table('user')->where('user_id', $user_id)->value('user_name'); + + // お知らせデータ取得(全件) + $informations = DB::table('user_information_history') + ->where('user_id', $user_id) + ->orderByDesc('user_information_history_id') + ->select('entry_date', 'user_information_history') + ->paginate(10); + + \Log::info('過去のお知らせ画面にアクセス', [ + 'user_id' => $user_id, + ]); + + return view('user_information.history', [ + 'user_name' => $user_name, // ユーザー名(ヘッダー用) + 'informations' => $informations + ]); + } +} diff --git a/app/Http/Controllers/UserTagReissueController.php b/app/Http/Controllers/UserTagReissueController.php new file mode 100644 index 0000000..a2f9f61 --- /dev/null +++ b/app/Http/Controllers/UserTagReissueController.php @@ -0,0 +1,45 @@ +where('user_id', $user_id)->first(); + + \Log::info('タグ再発行申請画面にアクセス', [ + 'user_id' => $user_id, + ]); + + return view('user.tag_reissue', [ + 'user' => $user, + 'active_menu' => 'SWC-1-1', // マイページメニューの選択状態用 + 'user_name' => $user ? $user->user_name : '', // ユーザー名(ヘッダー用) + ]); + } + + public function complete() + { + $user_id = session('user_id'); + if (!$user_id) { + return redirect('/login'); + } + $user = DB::table('user')->where('user_id', $user_id)->first(); + + \Log::info('タグ再発行申請完了画面にアクセス', [ + 'user_id' => $user_id, + ]); + + return view('user.tag_reissue_complete', [ + 'active_menu' => 'SWC-1-1', // マイページメニューの選択状態用 + 'user_name' => $user ? $user->user_name : '', // ユーザー名(ヘッダー用) + ]); + } +} diff --git a/composer.json b/composer.json index 792b992..9047932 100644 --- a/composer.json +++ b/composer.json @@ -8,7 +8,9 @@ "require": { "php": "^8.2", "laravel/framework": "^12.0", - "laravel/tinker": "^2.10.1" + "laravel/tinker": "^2.10.1", + "mpdf/mpdf": "^8.2", + "simplesoftwareio/simple-qrcode": "^4.2" }, "require-dev": { "fakerphp/faker": "^1.23", diff --git a/composer.lock b/composer.lock index fe1a7ca..6381dbb 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,62 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "d8f67b824a1bf31c8999ead558d9b485", + "content-hash": "571741bd63db78c990a3a07320a20496", "packages": [ + { + "name": "bacon/bacon-qr-code", + "version": "2.0.8", + "source": { + "type": "git", + "url": "https://github.com/Bacon/BaconQrCode.git", + "reference": "8674e51bb65af933a5ffaf1c308a660387c35c22" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Bacon/BaconQrCode/zipball/8674e51bb65af933a5ffaf1c308a660387c35c22", + "reference": "8674e51bb65af933a5ffaf1c308a660387c35c22", + "shasum": "" + }, + "require": { + "dasprid/enum": "^1.0.3", + "ext-iconv": "*", + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "phly/keep-a-changelog": "^2.1", + "phpunit/phpunit": "^7 | ^8 | ^9", + "spatie/phpunit-snapshot-assertions": "^4.2.9", + "squizlabs/php_codesniffer": "^3.4" + }, + "suggest": { + "ext-imagick": "to generate QR code images" + }, + "type": "library", + "autoload": { + "psr-4": { + "BaconQrCode\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-2-Clause" + ], + "authors": [ + { + "name": "Ben Scholzen 'DASPRiD'", + "email": "mail@dasprids.de", + "homepage": "https://dasprids.de/", + "role": "Developer" + } + ], + "description": "BaconQrCode is a QR code generator for PHP.", + "homepage": "https://github.com/Bacon/BaconQrCode", + "support": { + "issues": "https://github.com/Bacon/BaconQrCode/issues", + "source": "https://github.com/Bacon/BaconQrCode/tree/2.0.8" + }, + "time": "2022-12-07T17:46:57+00:00" + }, { "name": "brick/math", "version": "0.13.1", @@ -135,6 +189,56 @@ ], "time": "2024-02-09T16:56:22+00:00" }, + { + "name": "dasprid/enum", + "version": "1.0.7", + "source": { + "type": "git", + "url": "https://github.com/DASPRiD/Enum.git", + "reference": "b5874fa9ed0043116c72162ec7f4fb50e02e7cce" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/DASPRiD/Enum/zipball/b5874fa9ed0043116c72162ec7f4fb50e02e7cce", + "reference": "b5874fa9ed0043116c72162ec7f4fb50e02e7cce", + "shasum": "" + }, + "require": { + "php": ">=7.1 <9.0" + }, + "require-dev": { + "phpunit/phpunit": "^7 || ^8 || ^9 || ^10 || ^11", + "squizlabs/php_codesniffer": "*" + }, + "type": "library", + "autoload": { + "psr-4": { + "DASPRiD\\Enum\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-2-Clause" + ], + "authors": [ + { + "name": "Ben Scholzen 'DASPRiD'", + "email": "mail@dasprids.de", + "homepage": "https://dasprids.de/", + "role": "Developer" + } + ], + "description": "PHP 7.1 enum implementation", + "keywords": [ + "enum", + "map" + ], + "support": { + "issues": "https://github.com/DASPRiD/Enum/issues", + "source": "https://github.com/DASPRiD/Enum/tree/1.0.7" + }, + "time": "2025-09-16T12:23:56+00:00" + }, { "name": "dflydev/dot-access-data", "version": "v3.0.3", @@ -2109,6 +2213,239 @@ ], "time": "2025-03-24T10:02:05+00:00" }, + { + "name": "mpdf/mpdf", + "version": "v8.2.6", + "source": { + "type": "git", + "url": "https://github.com/mpdf/mpdf.git", + "reference": "dd30e3b01061cf8dfe65e7041ab4cc46d8ebdd44" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mpdf/mpdf/zipball/dd30e3b01061cf8dfe65e7041ab4cc46d8ebdd44", + "reference": "dd30e3b01061cf8dfe65e7041ab4cc46d8ebdd44", + "shasum": "" + }, + "require": { + "ext-gd": "*", + "ext-mbstring": "*", + "mpdf/psr-http-message-shim": "^1.0 || ^2.0", + "mpdf/psr-log-aware-trait": "^2.0 || ^3.0", + "myclabs/deep-copy": "^1.7", + "paragonie/random_compat": "^1.4|^2.0|^9.99.99", + "php": "^5.6 || ^7.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0", + "psr/http-message": "^1.0 || ^2.0", + "psr/log": "^1.0 || ^2.0 || ^3.0", + "setasign/fpdi": "^2.1" + }, + "require-dev": { + "mockery/mockery": "^1.3.0", + "mpdf/qrcode": "^1.1.0", + "squizlabs/php_codesniffer": "^3.5.0", + "tracy/tracy": "~2.5", + "yoast/phpunit-polyfills": "^1.0" + }, + "suggest": { + "ext-bcmath": "Needed for generation of some types of barcodes", + "ext-xml": "Needed mainly for SVG manipulation", + "ext-zlib": "Needed for compression of embedded resources, such as fonts" + }, + "type": "library", + "autoload": { + "files": [ + "src/functions.php" + ], + "psr-4": { + "Mpdf\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0-only" + ], + "authors": [ + { + "name": "Matěj Humpál", + "role": "Developer, maintainer" + }, + { + "name": "Ian Back", + "role": "Developer (retired)" + } + ], + "description": "PHP library generating PDF files from UTF-8 encoded HTML", + "homepage": "https://mpdf.github.io", + "keywords": [ + "pdf", + "php", + "utf-8" + ], + "support": { + "docs": "https://mpdf.github.io", + "issues": "https://github.com/mpdf/mpdf/issues", + "source": "https://github.com/mpdf/mpdf" + }, + "funding": [ + { + "url": "https://www.paypal.me/mpdf", + "type": "custom" + } + ], + "time": "2025-08-18T08:51:51+00:00" + }, + { + "name": "mpdf/psr-http-message-shim", + "version": "v2.0.1", + "source": { + "type": "git", + "url": "https://github.com/mpdf/psr-http-message-shim.git", + "reference": "f25a0153d645e234f9db42e5433b16d9b113920f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mpdf/psr-http-message-shim/zipball/f25a0153d645e234f9db42e5433b16d9b113920f", + "reference": "f25a0153d645e234f9db42e5433b16d9b113920f", + "shasum": "" + }, + "require": { + "psr/http-message": "^2.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Mpdf\\PsrHttpMessageShim\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mark Dorison", + "email": "mark@chromatichq.com" + }, + { + "name": "Kristofer Widholm", + "email": "kristofer@chromatichq.com" + }, + { + "name": "Nigel Cunningham", + "email": "nigel.cunningham@technocrat.com.au" + } + ], + "description": "Shim to allow support of different psr/message versions.", + "support": { + "issues": "https://github.com/mpdf/psr-http-message-shim/issues", + "source": "https://github.com/mpdf/psr-http-message-shim/tree/v2.0.1" + }, + "time": "2023-10-02T14:34:03+00:00" + }, + { + "name": "mpdf/psr-log-aware-trait", + "version": "v3.0.0", + "source": { + "type": "git", + "url": "https://github.com/mpdf/psr-log-aware-trait.git", + "reference": "a633da6065e946cc491e1c962850344bb0bf3e78" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mpdf/psr-log-aware-trait/zipball/a633da6065e946cc491e1c962850344bb0bf3e78", + "reference": "a633da6065e946cc491e1c962850344bb0bf3e78", + "shasum": "" + }, + "require": { + "psr/log": "^3.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Mpdf\\PsrLogAwareTrait\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mark Dorison", + "email": "mark@chromatichq.com" + }, + { + "name": "Kristofer Widholm", + "email": "kristofer@chromatichq.com" + } + ], + "description": "Trait to allow support of different psr/log versions.", + "support": { + "issues": "https://github.com/mpdf/psr-log-aware-trait/issues", + "source": "https://github.com/mpdf/psr-log-aware-trait/tree/v3.0.0" + }, + "time": "2023-05-03T06:19:36+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.13.3", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "faed855a7b5f4d4637717c2b3863e277116beb36" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/faed855a7b5f4d4637717c2b3863e277116beb36", + "reference": "faed855a7b5f4d4637717c2b3863e277116beb36", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3 <3.2.2" + }, + "require-dev": { + "doctrine/collections": "^1.6.8", + "doctrine/common": "^2.13.3 || ^3.2.2", + "phpspec/prophecy": "^1.10", + "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" + }, + "type": "library", + "autoload": { + "files": [ + "src/DeepCopy/deep_copy.php" + ], + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.13.3" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2025-07-05T12:25:42+00:00" + }, { "name": "nesbot/carbon", "version": "3.10.1", @@ -2507,6 +2844,56 @@ ], "time": "2025-05-08T08:14:37+00:00" }, + { + "name": "paragonie/random_compat", + "version": "v9.99.100", + "source": { + "type": "git", + "url": "https://github.com/paragonie/random_compat.git", + "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/996434e5492cb4c3edcb9168db6fbb1359ef965a", + "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a", + "shasum": "" + }, + "require": { + "php": ">= 7" + }, + "require-dev": { + "phpunit/phpunit": "4.*|5.*", + "vimeo/psalm": "^1" + }, + "suggest": { + "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "keywords": [ + "csprng", + "polyfill", + "pseudorandom", + "random" + ], + "support": { + "email": "info@paragonie.com", + "issues": "https://github.com/paragonie/random_compat/issues", + "source": "https://github.com/paragonie/random_compat" + }, + "time": "2020-10-15T08:29:30+00:00" + }, { "name": "phpoption/phpoption", "version": "1.9.3", @@ -3271,6 +3658,146 @@ }, "time": "2025-06-25T14:20:11+00:00" }, + { + "name": "setasign/fpdi", + "version": "v2.6.4", + "source": { + "type": "git", + "url": "https://github.com/Setasign/FPDI.git", + "reference": "4b53852fde2734ec6a07e458a085db627c60eada" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Setasign/FPDI/zipball/4b53852fde2734ec6a07e458a085db627c60eada", + "reference": "4b53852fde2734ec6a07e458a085db627c60eada", + "shasum": "" + }, + "require": { + "ext-zlib": "*", + "php": "^7.1 || ^8.0" + }, + "conflict": { + "setasign/tfpdf": "<1.31" + }, + "require-dev": { + "phpunit/phpunit": "^7", + "setasign/fpdf": "~1.8.6", + "setasign/tfpdf": "~1.33", + "squizlabs/php_codesniffer": "^3.5", + "tecnickcom/tcpdf": "^6.8" + }, + "suggest": { + "setasign/fpdf": "FPDI will extend this class but as it is also possible to use TCPDF or tFPDF as an alternative. There's no fixed dependency configured." + }, + "type": "library", + "autoload": { + "psr-4": { + "setasign\\Fpdi\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jan Slabon", + "email": "jan.slabon@setasign.com", + "homepage": "https://www.setasign.com" + }, + { + "name": "Maximilian Kresse", + "email": "maximilian.kresse@setasign.com", + "homepage": "https://www.setasign.com" + } + ], + "description": "FPDI is a collection of PHP classes facilitating developers to read pages from existing PDF documents and use them as templates in FPDF. Because it is also possible to use FPDI with TCPDF, there are no fixed dependencies defined. Please see suggestions for packages which evaluates the dependencies automatically.", + "homepage": "https://www.setasign.com/fpdi", + "keywords": [ + "fpdf", + "fpdi", + "pdf" + ], + "support": { + "issues": "https://github.com/Setasign/FPDI/issues", + "source": "https://github.com/Setasign/FPDI/tree/v2.6.4" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/setasign/fpdi", + "type": "tidelift" + } + ], + "time": "2025-08-05T09:57:14+00:00" + }, + { + "name": "simplesoftwareio/simple-qrcode", + "version": "4.2.0", + "source": { + "type": "git", + "url": "https://github.com/SimpleSoftwareIO/simple-qrcode.git", + "reference": "916db7948ca6772d54bb617259c768c9cdc8d537" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/SimpleSoftwareIO/simple-qrcode/zipball/916db7948ca6772d54bb617259c768c9cdc8d537", + "reference": "916db7948ca6772d54bb617259c768c9cdc8d537", + "shasum": "" + }, + "require": { + "bacon/bacon-qr-code": "^2.0", + "ext-gd": "*", + "php": ">=7.2|^8.0" + }, + "require-dev": { + "mockery/mockery": "~1", + "phpunit/phpunit": "~9" + }, + "suggest": { + "ext-imagick": "Allows the generation of PNG QrCodes.", + "illuminate/support": "Allows for use within Laravel." + }, + "type": "library", + "extra": { + "laravel": { + "aliases": { + "QrCode": "SimpleSoftwareIO\\QrCode\\Facades\\QrCode" + }, + "providers": [ + "SimpleSoftwareIO\\QrCode\\QrCodeServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "SimpleSoftwareIO\\QrCode\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Simple Software LLC", + "email": "support@simplesoftware.io" + } + ], + "description": "Simple QrCode is a QR code generator made for Laravel.", + "homepage": "https://www.simplesoftware.io/#/docs/simple-qrcode", + "keywords": [ + "Simple", + "generator", + "laravel", + "qrcode", + "wrapper" + ], + "support": { + "issues": "https://github.com/SimpleSoftwareIO/simple-qrcode/issues", + "source": "https://github.com/SimpleSoftwareIO/simple-qrcode/tree/4.2.0" + }, + "time": "2021-02-08T20:43:55+00:00" + }, { "name": "symfony/clock", "version": "v7.3.0", @@ -6258,66 +6785,6 @@ }, "time": "2024-05-16T03:13:13+00:00" }, - { - "name": "myclabs/deep-copy", - "version": "1.13.3", - "source": { - "type": "git", - "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "faed855a7b5f4d4637717c2b3863e277116beb36" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/faed855a7b5f4d4637717c2b3863e277116beb36", - "reference": "faed855a7b5f4d4637717c2b3863e277116beb36", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "conflict": { - "doctrine/collections": "<1.6.8", - "doctrine/common": "<2.13.3 || >=3 <3.2.2" - }, - "require-dev": { - "doctrine/collections": "^1.6.8", - "doctrine/common": "^2.13.3 || ^3.2.2", - "phpspec/prophecy": "^1.10", - "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" - }, - "type": "library", - "autoload": { - "files": [ - "src/DeepCopy/deep_copy.php" - ], - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Create deep copies (clones) of your objects", - "keywords": [ - "clone", - "copy", - "duplicate", - "object", - "object graph" - ], - "support": { - "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.13.3" - }, - "funding": [ - { - "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", - "type": "tidelift" - } - ], - "time": "2025-07-05T12:25:42+00:00" - }, { "name": "nunomaduro/collision", "version": "v8.8.2", diff --git a/resources/views/general/swo15_1.blade.php b/resources/views/general/swo15_1.blade.php index 3f3e72e..2a2a30a 100644 --- a/resources/views/general/swo15_1.blade.php +++ b/resources/views/general/swo15_1.blade.php @@ -31,7 +31,7 @@

開示等の依頼の手続き、使用する様式

開示等の依頼は、以下の手続き及び様式に則って実施致します。

利用目的の通知:本書面の“開示対象個人情報の利用目的”をご覧下さい。

-

開示、訂正・削除、利用停止:当社の定める様式にて実施致します。該当の受付け窓口にご連絡頂き、所定の様式『個人情報開示等依頼書(PDF:9KB)』を入手のうえ、手続きをお願い致します。

+

開示、訂正・削除、利用停止:当社の定める様式にて実施致します。該当の受付け窓口にご連絡頂き、所定の様式『個人情報開示等依頼書(PDF:9KB)』を入手のうえ、手続きをお願い致します。

回答に関しては、記入済み個人情報開示等依頼書を、ご自宅への郵送のみとさせて頂きます。

開示対象個人情報の取扱いに関する苦情受付け窓口

開示対象個人情報の取扱いに関する苦情、相談に関しましては、以下の窓口宛てにご連絡ください。

diff --git a/resources/views/general/swo5_1.blade.php b/resources/views/general/swo5_1.blade.php index f323344..50faacc 100644 --- a/resources/views/general/swo5_1.blade.php +++ b/resources/views/general/swo5_1.blade.php @@ -65,10 +65,12 @@ - - - - + + + + @foreach($psections as $psection) + + @endforeach @@ -82,18 +84,39 @@ @endphp @foreach($pagedData as $data) - + - + @foreach($psections as $psection) + + @endforeach @endforeach @@ -133,29 +156,86 @@ @endsection \ No newline at end of file diff --git a/resources/views/general/swo7_1.blade.php b/resources/views/general/swo7_1.blade.php index 30afafe..aa856ba 100644 --- a/resources/views/general/swo7_1.blade.php +++ b/resources/views/general/swo7_1.blade.php @@ -5,13 +5,18 @@

お問い合わせ

株式会社ソーリンへのご訪問ありがとうございます。 - お問い合わせいただくお客さまは、当社のホームページにおける個人情報の取り扱いについて、あらかじめご確認いただき、ご同意いただいた上でお問い合わせください。個人情報の開示、訂正、削除、利用停止については、こちらをご覧下さい。
+ お問い合わせいただくお客さまは、当社のホームページにおける個人情報の取り扱いについて、あらかじめご確認いただき、ご同意いただいた上でお問い合わせください。個人情報の開示、訂正、削除、利用停止については、こちらをご覧下さい。
また、メールから送信ができないお客様はお手数ですが、下記電話までご連絡をお願い致します。 ※ 携帯・スマートフォンからメールでのお問い合わせの際に、確実にご返信をさせていただくために、ドメイン (so-manager.com) の受信許可設定をお願い致します。

+ @if($errors->any()) + + @endif
@foreach($form_data as $value) -
{{ $value[2] }}
+
{!! preg_replace('/\*$/', '*', e($value[2])) !!}
@if($value[1] == 'textarea')
@elseif($value[1] == 'checkbox') @@ -25,18 +30,10 @@ @endforeach
@else -
+
@endif @endforeach
-

- @foreach($form_data as $value) - @if($errors->has($value[0])) - {{ $errors->first($value[0]) }} - @break; - @endif - @endforeach -

@csrf diff --git a/resources/views/general/swo8_1.blade.php b/resources/views/general/swo8_1.blade.php index 52e07ad..2e483fc 100644 --- a/resources/views/general/swo8_1.blade.php +++ b/resources/views/general/swo8_1.blade.php @@ -16,7 +16,7 @@
- +
@if ($errors->any()) @foreach ($errors->all() as $error) {{ $error }} @endforeach @endif

diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index 8d2fd2c..ef41f01 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -5,6 +5,7 @@ @yield('title', 'So-Manager') + diff --git a/resources/views/partials/mypagefootermenu.blade.php b/resources/views/partials/mypagefootermenu.blade.php index cea0d0b..6bfb072 100644 --- a/resources/views/partials/mypagefootermenu.blade.php +++ b/resources/views/partials/mypagefootermenu.blade.php @@ -50,7 +50,7 @@
- +

お知らせ一覧

diff --git a/resources/views/regular_contract/create.blade.php b/resources/views/regular_contract/create.blade.php index d04a1d7..9cd56cc 100644 --- a/resources/views/regular_contract/create.blade.php +++ b/resources/views/regular_contract/create.blade.php @@ -89,18 +89,31 @@
@endforeach diff --git a/resources/views/regular_contract/info.blade.php b/resources/views/regular_contract/info.blade.php index 17efdaf..f72020c 100644 --- a/resources/views/regular_contract/info.blade.php +++ b/resources/views/regular_contract/info.blade.php @@ -262,26 +262,35 @@ return null; @endif - @php - $has_receipt = DB::table('inv_publish')->where('contract_id', $contract->contract_id)->exists(); - @endphp - @if($has_receipt) - @if($bg == 'alert-warning') - 領収書再発行 - @elseif($bg == 'alert-danger') - 領収書再発行 - @else - 領収書再発行 - @endif - @else - @if($bg == 'alert-warning') - 領収書発行 - @elseif($bg == 'alert-danger') - 領収書発行 - @else - 領収書発行 - @endif - @endif +
+ @php + $has_receipt = DB::table('inv_publish')->where('contract_id', $contract->contract_id)->exists(); + @endphp + @if($has_receipt) + @if($bg == 'alert-warning') + 領収書再発行 + @elseif($bg == 'alert-danger') + 領収書再発行 + @else + 領収書再発行 + @endif + @else + @if($bg == 'alert-warning') + 領収書発行 + @elseif($bg == 'alert-danger') + 領収書発行 + @else + 領収書発行 + @endif + @endif + @if($bg == 'alert-warning') + シール再発行 + @elseif($bg == 'alert-danger') + シール再発行 + @else + シール再発行 + @endif +
diff --git a/resources/views/regular_contract/park_detail.blade.php b/resources/views/regular_contract/park_detail.blade.php index ac46287..37d5a15 100644 --- a/resources/views/regular_contract/park_detail.blade.php +++ b/resources/views/regular_contract/park_detail.blade.php @@ -36,64 +36,79 @@
- @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); - } + $zonesByPtype = $zones->groupBy('ptype_id'); @endphp -
- {{ $zone->ptype_subject }}
- {{ $zone->psection_subject }}:空き {{ $vacant }}台 - @if($isGracePeriod) - @if($vacant > 0) - - @else - - @endif - @else - - @endif + @foreach($zonesByPtype as $ptypeId => $zonesGroup) +
+ {{ $zonesGroup->first()->ptype_subject }} +
+ @foreach($zonesGroup 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) { + // 月またぎ + // 前月の開始日~今月の終了日 + $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)); + $isGracePeriod = $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)); + $isGracePeriod = $now->between($start, $end); + } + } + @endphp +
+ {{ $zone->psection_subject }}:空き {{ max(0, $vacant) }}台 + @if($isGracePeriod) + @if($vacant > 0) + + @else + + @endif + @else + + @endif +
+ @endforeach +
@endforeach
diff --git a/resources/views/regular_contract/seal_reissue.blade.php b/resources/views/regular_contract/seal_reissue.blade.php new file mode 100644 index 0000000..8faeb3e --- /dev/null +++ b/resources/views/regular_contract/seal_reissue.blade.php @@ -0,0 +1,27 @@ +@extends('layouts.app') +@section('content') +
+
+

定期契約情報確認 > シール再発行

+
+
+
+

選択した駐輪場

+
+
+

+ 定期契約ID: {{ $contract->contract_id }}
{{ $contract->park_name }}
+

+


こちらのシールを再発行します。
よろしいですか?

+
+
+
+ 戻る +
+
+ 進む +
+
+
+
+@endsection \ No newline at end of file diff --git a/resources/views/regular_contract/seal_reissue_complete.blade.php b/resources/views/regular_contract/seal_reissue_complete.blade.php new file mode 100644 index 0000000..a1dc50b --- /dev/null +++ b/resources/views/regular_contract/seal_reissue_complete.blade.php @@ -0,0 +1,20 @@ +@extends('layouts.app') +@section('content') +
+
+

定期契約情報確認 > シール再発行

+
+
+
+

+ 定期契約ID: {{ $contract->contract_id }}
+ {{ $contract->park_name }} +

+


こちらのシールの再発行準備が整いました。
上記駐輪場にてシールをお受け取りください。

+
+ +
+
+@endsection \ No newline at end of file diff --git a/resources/views/regular_contract/seal_reissue_reason.blade.php b/resources/views/regular_contract/seal_reissue_reason.blade.php new file mode 100644 index 0000000..0e6a721 --- /dev/null +++ b/resources/views/regular_contract/seal_reissue_reason.blade.php @@ -0,0 +1,86 @@ +@extends('layouts.app') +@section('content') +
+
+

ユーザー情報確認 > シール再発行理由

+
+ @if ($errors->any()) +
+ @foreach ($errors->all() as $error) +
{{ $error }}
+ @endforeach +
+ @endif +
+
+

再発行手続き

+
+
+ @csrf +
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ +
+ 【再発行に関する注意事項】
+ 2回以上の再発行には別途手続きが必要です。
+ 紛失にはご注意ください。 +
+
+
+
+ 戻る +
+
+ +
+
+ +
+
+ +@endsection \ No newline at end of file diff --git a/resources/views/regular_contract/update.blade.php b/resources/views/regular_contract/update.blade.php index 2b499e1..95cdfca 100644 --- a/resources/views/regular_contract/update.blade.php +++ b/resources/views/regular_contract/update.blade.php @@ -16,7 +16,7 @@ return null; @endphp
-

定期契約情報 > 定期契約情報を確認する

+

契約更新 > 定期契約を更新する

@if(count($contracts) > 0) @@ -294,7 +294,6 @@ return null;
-@endsection
駐輪場名市町村名駅名駐輪場名市町村名駅名{{ $psection->psection_subject }}
{{ $data['park_name'] }} + + {{ $data['park_name'] }} + + {{ $data['city_name'] }} {{ $data['station_neighbor_station'] }} - @if($data['status'] == 1) - 定期契約 - @elseif($data['status'] == 2) - 空き待ち予約 - @elseif($data['status'] == 3) - 販売期間外 - @endif - + @foreach($data['zone_data'] as $zone) + @if($zone['psection_subject'] == $psection->psection_subject) + @if($zone['status'] == 1) + 定期契約 + @elseif($zone['status'] == 2) + 空き待ち予約 + @elseif($zone['status'] == 3) + 販売期間外 + @endif + @break; + @endif + @endforeach +
@php $zonesForType = ($zones[$row->park_id] ?? collect())->where('psection_subject', $vehicle); - @endphp - @forelse ($zonesForType as $zone) - @php + // 空き台数計算 + $hasVacancy = false; + foreach ($zonesForType as $zone) { $reserveCount = ($reserve[$row->park_id] ?? collect()) ->where('psection_id', $zone->psection_id) + ->where('ptype_id', $zone->ptype_id) ->count(); $vacancy = $zone->zone_tolerance - $zone->zone_number - $reserveCount; + if ($vacancy > 0) { + $hasVacancy = true; + break; + } + } // 猶予期間判定 $grace = $city_grace_periods[$row->city_id] ?? null; - $now = \Carbon\Carbon::now(); + $gracePeriodValid = + $grace && + is_numeric($grace->update_grace_period_start_date) && + preg_match('/^\d{1,2}:\d{2}$/', $grace->update_grace_period_start_time) && + is_numeric($grace->update_grace_period_end_date) && + preg_match('/^\d{1,2}:\d{2}$/', $grace->update_grace_period_end_time); + $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) { + if ($gracePeriodValid) { + $now = \Carbon\Carbon::now(); $year = $now->year; $month = $now->month; $startDay = (int)$grace->update_grace_period_start_date; @@ -125,16 +138,17 @@ } } @endphp - @if ($vacancy > 0 && $inGrace) + @if ($zonesForType->isNotEmpty() && $gracePeriodValid) + @if ($hasVacancy && $inGrace) @elseif (!$inGrace) - @elseif ($vacancy <= 0 && $inGrace) - - @endif - @empty - - @endforelse + @elseif (!$hasVacancy && $inGrace) + + @endif + @else + + @endif