From eed5d8574192e0baa4a9ff6cecd2ecfd31659e62 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Fri, 26 Sep 2025 17:27:15 +0900 Subject: [PATCH 01/16] =?UTF-8?q?9/26=20=E3=83=9E=E3=83=BC=E3=82=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/ParkingSearchController.php | 124 ++++++++++----- resources/views/general/swo15_1.blade.php | 2 +- resources/views/general/swo5_1.blade.php | 142 ++++++++++++++---- 3 files changed, 202 insertions(+), 66 deletions(-) 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/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..98002ca 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 From b6bbb605dd0ae7c62444922e21260efb7fdff468 Mon Sep 17 00:00:00 2001 From: Yuka Higashide Date: Fri, 26 Sep 2025 18:33:19 +0900 Subject: [PATCH 02/16] =?UTF-8?q?=E4=BC=9A=E5=93=A1=E3=81=B8=E3=81=AE?= =?UTF-8?q?=E3=81=8A=E7=9F=A5=E3=82=89=E3=81=9B=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/UserInformationController.php | 52 +++++++++++++++++++ .../views/user_information/history.blade.php | 37 +++++++++++++ .../views/user_information/index.blade.php | 38 ++++++++++++++ routes/web.php | 5 ++ 4 files changed, 132 insertions(+) create mode 100644 app/Http/Controllers/UserInformationController.php create mode 100644 resources/views/user_information/history.blade.php create mode 100644 resources/views/user_information/index.blade.php diff --git a/app/Http/Controllers/UserInformationController.php b/app/Http/Controllers/UserInformationController.php new file mode 100644 index 0000000..3f71d32 --- /dev/null +++ b/app/Http/Controllers/UserInformationController.php @@ -0,0 +1,52 @@ +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(); + + 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); + + return view('user_information.history', [ + 'user_name' => $user_name, // ユーザー名(ヘッダー用) + 'informations' => $informations + ]); + } +} diff --git a/resources/views/user_information/history.blade.php b/resources/views/user_information/history.blade.php new file mode 100644 index 0000000..8dcf3d3 --- /dev/null +++ b/resources/views/user_information/history.blade.php @@ -0,0 +1,37 @@ +@extends('layouts.app') +@section('content') +
+
+

お知らせ > 過去のお知らせ

+
+
+
+

お知らせ一覧

+
+
+ @forelse($informations as $information) +
+
+ {{ \Carbon\Carbon::parse($information->entry_date)->format('Y年n月j日') }} +
+
+
+

+ {{ $information->user_information_history }} +

+
+ @empty +
+

過去のお知らせはありません。

+
+ @endforelse +
+
+ {{ $informations->links('partials.paging') }} +
+ +
+
+@endsection \ No newline at end of file diff --git a/resources/views/user_information/index.blade.php b/resources/views/user_information/index.blade.php new file mode 100644 index 0000000..06784b9 --- /dev/null +++ b/resources/views/user_information/index.blade.php @@ -0,0 +1,38 @@ +@extends('layouts.app') +@section('content') +
+
+

お知らせ > お知らせ一覧

+
+
+
+

お知らせ一覧

+
+
+ @forelse($informations as $information) +
+
+ {{ \Carbon\Carbon::parse($information->entry_date)->format('Y年n月j日') }} +
+
+
+

+ {{ $information->user_information_history }} +

+
+ @empty +
+

お知らせはありません。

+
+ @endforelse + + + +
+
+
+@endsection \ No newline at end of file diff --git a/routes/web.php b/routes/web.php index 9d94e6f..2b79e5a 100644 --- a/routes/web.php +++ b/routes/web.php @@ -22,6 +22,7 @@ use App\Http\Controllers\ParkingSearchController; use App\Http\Controllers\ParkWaitlistController; use App\Http\Controllers\ReceiptController; use App\Http\Controllers\ParkDetailController; +use App\Http\Controllers\UserInformationController; // 画面遷移のみ Route::get('/', function () { return view('general.swo1_1'); })->name('swo1_1'); @@ -133,6 +134,10 @@ Route::get('park_search', [RegularContractCreateController::class, 'show'])->nam // 空き待ち状況確認 Route::get('park_waitlist', [ParkWaitlistController::class, 'index'])->name('park_waitlist.index'); +// 会員へのお知らせ +Route::get('/user_information', [UserInformationController::class, 'index'])->name('user_information.index'); +Route::get('/user_information/history', [UserInformationController::class, 'history'])->name('user_information.history'); + // ウェルネット決済画面(仮) Route::get('/wellnet/payment', function (): mixed { $html = << Date: Fri, 26 Sep 2025 19:10:28 +0900 Subject: [PATCH 03/16] =?UTF-8?q?composer.json=20=E3=82=92=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/composer.json b/composer.json index 792b992..05779c5 100644 --- a/composer.json +++ b/composer.json @@ -9,6 +9,7 @@ "php": "^8.2", "laravel/framework": "^12.0", "laravel/tinker": "^2.10.1" + "simplesoftwareio/simple-qrcode": "^4.2" }, "require-dev": { "fakerphp/faker": "^1.23", From b2b359028b28d3777d77a45a2da2608d82463642 Mon Sep 17 00:00:00 2001 From: "y.higashide" Date: Fri, 26 Sep 2025 19:18:58 +0900 Subject: [PATCH 04/16] =?UTF-8?q?composer.json=20=E3=82=92=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 05779c5..71e39e1 100644 --- a/composer.json +++ b/composer.json @@ -8,7 +8,7 @@ "require": { "php": "^8.2", "laravel/framework": "^12.0", - "laravel/tinker": "^2.10.1" + "laravel/tinker": "^2.10.1", "simplesoftwareio/simple-qrcode": "^4.2" }, "require-dev": { From bf7e6c901ac13515573a544b3ef733fb766a4ffb Mon Sep 17 00:00:00 2001 From: "y.higashide" Date: Fri, 26 Sep 2025 19:46:33 +0900 Subject: [PATCH 05/16] =?UTF-8?q?composer.lock=20=E3=82=92=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- composer.lock | 174 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 173 insertions(+), 1 deletion(-) diff --git a/composer.lock b/composer.lock index fe1a7ca..262641c 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": "2c302bf3eb129a3df792a2c53a938458", "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", @@ -3271,6 +3375,74 @@ }, "time": "2025-06-25T14:20:11+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", From 926562d135a1859b45616ffcc687a8da0982f162 Mon Sep 17 00:00:00 2001 From: Yuka Higashide Date: Fri, 26 Sep 2025 20:08:22 +0900 Subject: [PATCH 06/16] =?UTF-8?q?composer=E9=96=A2=E9=80=A3=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- composer.json | 3 +- composer.lock | 174 +++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 175 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 792b992..71e39e1 100644 --- a/composer.json +++ b/composer.json @@ -8,7 +8,8 @@ "require": { "php": "^8.2", "laravel/framework": "^12.0", - "laravel/tinker": "^2.10.1" + "laravel/tinker": "^2.10.1", + "simplesoftwareio/simple-qrcode": "^4.2" }, "require-dev": { "fakerphp/faker": "^1.23", diff --git a/composer.lock b/composer.lock index fe1a7ca..262641c 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": "2c302bf3eb129a3df792a2c53a938458", "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", @@ -3271,6 +3375,74 @@ }, "time": "2025-06-25T14:20:11+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", From facc01dca6a56672844b9ceb1dd1420005eecf8e Mon Sep 17 00:00:00 2001 From: Yuka Higashide Date: Fri, 26 Sep 2025 20:12:19 +0900 Subject: [PATCH 07/16] =?UTF-8?q?=E3=83=95=E3=83=83=E3=82=BF=E3=83=BC?= =?UTF-8?q?=E3=83=A1=E3=83=8B=E3=83=A5=E3=83=BC=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/views/partials/mypagefootermenu.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 @@
- +

お知らせ一覧

From ecc70958181a06586dc68c30970b6f2e7f29ed73 Mon Sep 17 00:00:00 2001 From: Yuka Higashide Date: Mon, 29 Sep 2025 15:50:17 +0900 Subject: [PATCH 08/16] =?UTF-8?q?=E3=81=8A=E7=9F=A5=E3=82=89=E3=81=9B?= =?UTF-8?q?=E7=94=BB=E9=9D=A2=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/UserInformationController.php | 8 ++++++++ resources/views/user_information/history.blade.php | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/UserInformationController.php b/app/Http/Controllers/UserInformationController.php index 3f71d32..3afd9e8 100644 --- a/app/Http/Controllers/UserInformationController.php +++ b/app/Http/Controllers/UserInformationController.php @@ -23,6 +23,10 @@ class UserInformationController extends Controller ->limit(10) ->get(); + \Log::info('お知らせ画面にアクセス', [ + 'user_id' => $user_id, + ]); + return view('user_information.index', [ 'user_name' => $user_name, // ユーザー名(ヘッダー用) 'informations' => $informations @@ -44,6 +48,10 @@ class UserInformationController extends Controller ->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/resources/views/user_information/history.blade.php b/resources/views/user_information/history.blade.php index 8dcf3d3..ff10e7c 100644 --- a/resources/views/user_information/history.blade.php +++ b/resources/views/user_information/history.blade.php @@ -6,7 +6,7 @@
-

お知らせ一覧

+

過去のお知らせ

@forelse($informations as $information) From d677aa232d13839ec93ac7b781c5711b5fee3349 Mon Sep 17 00:00:00 2001 From: Yuka Higashide Date: Tue, 30 Sep 2025 13:45:36 +0900 Subject: [PATCH 09/16] =?UTF-8?q?=E3=82=B7=E3=83=BC=E3=83=AB=E5=86=8D?= =?UTF-8?q?=E7=99=BA=E8=A1=8C=E3=80=81=E3=82=BF=E3=82=B0=E5=86=8D=E7=99=BA?= =?UTF-8?q?=E8=A1=8C=E6=A9=9F=E8=83=BD=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/SealReissueController.php | 96 +++++++++++++++++++ .../Controllers/UserTagReissueController.php | 45 +++++++++ .../views/regular_contract/info.blade.php | 49 ++++++---- .../regular_contract/seal_reissue.blade.php | 27 ++++++ .../seal_reissue_complete.blade.php | 20 ++++ .../seal_reissue_reason.blade.php | 86 +++++++++++++++++ resources/views/user/info.blade.php | 17 ++-- resources/views/user/tag_reissue.blade.php | 83 ++++++++++++++++ .../views/user/tag_reissue_complete.blade.php | 17 ++++ routes/web.php | 11 +++ 10 files changed, 424 insertions(+), 27 deletions(-) create mode 100644 app/Http/Controllers/SealReissueController.php create mode 100644 app/Http/Controllers/UserTagReissueController.php create mode 100644 resources/views/regular_contract/seal_reissue.blade.php create mode 100644 resources/views/regular_contract/seal_reissue_complete.blade.php create mode 100644 resources/views/regular_contract/seal_reissue_reason.blade.php create mode 100644 resources/views/user/tag_reissue.blade.php create mode 100644 resources/views/user/tag_reissue_complete.blade.php diff --git a/app/Http/Controllers/SealReissueController.php b/app/Http/Controllers/SealReissueController.php new file mode 100644 index 0000000..afe5c84 --- /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-1-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-1-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-4-1', // マイページメニューの選択状態用 + 'user_name' => $user_name ? $user_name : '', // ユーザー名(ヘッダー用) + 'contract' => $contract + ]); + } +} 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/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/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..8882dc6 --- /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/user/info.blade.php b/resources/views/user/info.blade.php index 5358ad0..ef04855 100644 --- a/resources/views/user/info.blade.php +++ b/resources/views/user/info.blade.php @@ -3,9 +3,9 @@ @section('content')
@if (session('success')) -
- {{ session('success') }} -
+
+ {{ session('success') }} +
@endif

ユーザー情報確認 > ユーザー情報

@@ -87,9 +87,9 @@
@if(!empty($user->photo_filename1)) -

+

@else -

+

@endif
@@ -97,9 +97,9 @@
@if(!empty($user->photo_filename2)) -

+

@else -

+

@endif
@@ -114,6 +114,9 @@ + diff --git a/resources/views/user/tag_reissue.blade.php b/resources/views/user/tag_reissue.blade.php new file mode 100644 index 0000000..7caa885 --- /dev/null +++ b/resources/views/user/tag_reissue.blade.php @@ -0,0 +1,83 @@ +@extends('layouts.app') +@section('content') +
+
+

ユーザー情報確認 > タグ再発行申請

+
+
+
+
タグ再発行を行うお客様の情報をご確認ください。
+

住所、電話番号、メールアドレス等に変更がある場合、再発行を申請する前にユーザー情報確認から
お客様の情報を最新状態へ更新をお願いいたします。

+
+
+
+ +
+
+

{{ $user->user_name }}

+
+
+ +
+
+

{{ $user->user_phonetic }}

+
+
+ +
+
+

{{ $user->user_gender ?? '未入力' }}

+
+
+ +
+
+

{{ $user->user_regident_zip }}{{ $user->user_regident_pre }}{{ $user->user_regident_city }}{{ $user->user_regident_add }}

+
+ +
+ +
+
+

{{ $user->user_homephone ?? '未入力' }}

+
+ +
+ +
+
+

{{ $user->user_mobile ?? '未入力' }}

+
+ +
+ +
+
+

{{ $user->user_primemail }}

+
+
+ +
+
+

{{ $user->user_submail ?? '未入力' }}

+
+
+ +
+
+

********

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

ユーザー情報確認 > タグ再発行申請完了

+
+
+
+

タグの再発行申請が完了しました。

+

現在オペレーターが確認中です。
タグの再発行までいましばらくお待ちください。

+ +
+
+
+@endsection \ No newline at end of file diff --git a/routes/web.php b/routes/web.php index 2b79e5a..a1dc54b 100644 --- a/routes/web.php +++ b/routes/web.php @@ -16,11 +16,13 @@ use App\Http\Controllers\UserInfoController; use App\Http\Controllers\UserEditController; use App\Http\Controllers\UserEditConfirmController; use App\Http\Controllers\UserWithdrawController; +use App\Http\Controllers\UserTagReissueController; use App\Http\Controllers\RegularContractController; use App\Http\Controllers\RegularContractCreateController; use App\Http\Controllers\ParkingSearchController; use App\Http\Controllers\ParkWaitlistController; use App\Http\Controllers\ReceiptController; +use App\Http\Controllers\SealReissueController; use App\Http\Controllers\ParkDetailController; use App\Http\Controllers\UserInformationController; @@ -89,6 +91,10 @@ Route::get('/user/edit/verify', [UserEditConfirmController::class, 'verify'])->n Route::get('/user/withdraw', [UserWithdrawController::class, 'showConfirm'])->name('user.withdraw'); Route::post('/user/withdraw/confirm', [UserWithdrawController::class, 'withdraw'])->name('user.withdraw.confirm'); +// タグ再発行 +Route::get('/user/tag_reissue', [UserTagReissueController::class, 'index'])->name('user.tag_reissue'); +Route::get('/user/tag_reissue/complete', [UserTagReissueController::class, 'complete'])->name('user.tag_reissue.complete'); + // 定期契約情報確認 Route::get('regular_contract/info', [RegularContractController::class, 'showInfo'])->name('regular_contract.info'); @@ -97,6 +103,11 @@ Route::get('receipt/input/{contract_id}', [ReceiptController::class, 'input'])-> Route::get('receipt/download/{contract_id}', [ReceiptController::class, 'download'])->name('receipt.download'); Route::post('receipt/issue/{contract_id}', [ReceiptController::class, 'issue']); +// シール再発行 +Route::get('/seal/reissue/{contract_id}', [SealReissueController::class, 'index'])->name('seal.reissue'); +Route::get('/seal/reissue/reason/{contract_id}', [SealReissueController::class, 'reason'])->name('seal.reissue.reason'); +Route::post('/seal/reissue/complete/{contract_id}', [SealReissueController::class, 'complete'])->name('seal.reissue.complete'); + // 新規定期契約 Route::get('regular_contract/create', [RegularContractCreateController::class, 'show'])->name('regular_contract.create'); Route::get('/api/park-detail/{park_id}', [ParkDetailController::class, 'show']); From f389f1482a5c62590d8b82f926595255ab15efb0 Mon Sep 17 00:00:00 2001 From: Yuka Higashide Date: Wed, 1 Oct 2025 16:47:13 +0900 Subject: [PATCH 10/16] =?UTF-8?q?=E3=82=B7=E3=83=BC=E3=83=AB=E5=86=8D?= =?UTF-8?q?=E7=99=BA=E8=A1=8C=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/SealReissueController.php | 6 +++--- .../views/regular_contract/seal_reissue_reason.blade.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Http/Controllers/SealReissueController.php b/app/Http/Controllers/SealReissueController.php index afe5c84..66fcca5 100644 --- a/app/Http/Controllers/SealReissueController.php +++ b/app/Http/Controllers/SealReissueController.php @@ -26,7 +26,7 @@ class SealReissueController extends Controller return view('regular_contract.seal_reissue', [ 'contract' => $contract, - 'active_menu' => 'SWC-1-1', // マイページメニューの選択状態用 + 'active_menu' => 'SWC-3-1', // マイページメニューの選択状態用 'user_name' => $user_name ? $user_name : '', // ユーザー名(ヘッダー用) ]); } @@ -45,7 +45,7 @@ class SealReissueController extends Controller return view('regular_contract.seal_reissue_reason', [ 'contract_id' => $contract_id, - 'active_menu' => 'SWC-1-1', // マイページメニューの選択状態用 + 'active_menu' => 'SWC-3-1', // マイページメニューの選択状態用 'user_name' => $user_name ? $user_name : '', // ユーザー名(ヘッダー用) ]); } @@ -88,7 +88,7 @@ class SealReissueController extends Controller ]); return view('regular_contract.seal_reissue_complete', [ - 'active_menu' => 'SWC-4-1', // マイページメニューの選択状態用 + 'active_menu' => 'SWC-3-1', // マイページメニューの選択状態用 'user_name' => $user_name ? $user_name : '', // ユーザー名(ヘッダー用) 'contract' => $contract ]); diff --git a/resources/views/regular_contract/seal_reissue_reason.blade.php b/resources/views/regular_contract/seal_reissue_reason.blade.php index 8882dc6..0e6a721 100644 --- a/resources/views/regular_contract/seal_reissue_reason.blade.php +++ b/resources/views/regular_contract/seal_reissue_reason.blade.php @@ -49,7 +49,7 @@
From 609faf58a4fd3bc731baeba9b82a4f65a103545b Mon Sep 17 00:00:00 2001 From: Yuka Higashide Date: Wed, 1 Oct 2025 18:34:26 +0900 Subject: [PATCH 11/16] =?UTF-8?q?mpdf=E3=82=A4=E3=83=B3=E3=82=B9=E3=83=88?= =?UTF-8?q?=E3=83=BC=E3=83=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- composer.json | 1 + composer.lock | 417 ++++++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 357 insertions(+), 61 deletions(-) diff --git a/composer.json b/composer.json index 71e39e1..9047932 100644 --- a/composer.json +++ b/composer.json @@ -9,6 +9,7 @@ "php": "^8.2", "laravel/framework": "^12.0", "laravel/tinker": "^2.10.1", + "mpdf/mpdf": "^8.2", "simplesoftwareio/simple-qrcode": "^4.2" }, "require-dev": { diff --git a/composer.lock b/composer.lock index 262641c..6381dbb 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "2c302bf3eb129a3df792a2c53a938458", + "content-hash": "571741bd63db78c990a3a07320a20496", "packages": [ { "name": "bacon/bacon-qr-code", @@ -2213,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", @@ -2611,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", @@ -3375,6 +3658,78 @@ }, "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", @@ -6430,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", From 8dc41b211cad2ec638f38b789217b3415f385cb1 Mon Sep 17 00:00:00 2001 From: Yuka Higashide Date: Thu, 2 Oct 2025 16:28:17 +0900 Subject: [PATCH 12/16] =?UTF-8?q?=E9=A7=90=E8=BC=AA=E5=A0=B4=E7=A9=BA?= =?UTF-8?q?=E3=81=8D=E5=8F=B0=E6=95=B0=E8=A8=88=E7=AE=97=E5=87=A6=E7=90=86?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../RegularContractCreateController.php | 4 +- .../views/regular_contract/create.blade.php | 38 ++++-- .../regular_contract/park_detail.blade.php | 127 ++++++++++-------- 3 files changed, 99 insertions(+), 70 deletions(-) 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/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/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
From 467ae8d0553d90f20e99c0e80292dd1a6ee8806b Mon Sep 17 00:00:00 2001 From: Yuka Higashide Date: Thu, 2 Oct 2025 16:44:09 +0900 Subject: [PATCH 13/16] =?UTF-8?q?=E3=83=95=E3=82=A1=E3=83=93=E3=82=B3?= =?UTF-8?q?=E3=83=B3=E8=A8=AD=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/views/layouts/app.blade.php | 1 + 1 file changed, 1 insertion(+) 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') + From 23327a4ca3219ad080d5c62c977d4958195e1825 Mon Sep 17 00:00:00 2001 From: "y.higashide" Date: Thu, 2 Oct 2025 17:21:01 +0900 Subject: [PATCH 14/16] =?UTF-8?q?resources/views/regular=5Fcontract/update?= =?UTF-8?q?.blade.php=20=E3=82=92=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/views/regular_contract/update.blade.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/views/regular_contract/update.blade.php b/resources/views/regular_contract/update.blade.php index 2b499e1..c22688b 100644 --- a/resources/views/regular_contract/update.blade.php +++ b/resources/views/regular_contract/update.blade.php @@ -294,7 +294,6 @@ return null; -@endsection
- - + + @foreach($psections as $psection) - + @endforeach @@ -207,7 +207,7 @@ html += '
'; html += '' + zone.psection_subject + ':空き' + zone.zone_vacant + '台'; if (zone.status == 1) { - html += '定期契約'; + html += '定期契約'; } else if (zone.status == 2) { html += '空き待ち予約'; } else if (zone.status == 3) { 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/routes/web.php b/routes/web.php index 2b79e5a..f54a471 100644 --- a/routes/web.php +++ b/routes/web.php @@ -52,6 +52,7 @@ Route::get('/error', function () { return view('general.error'); })->name('error // コントローラー経由 Route::post('/swo2_2', [MemberRegistrationController::class, 'sendMail'])->name('swo2_2'); Route::get('/swo2_3', [MemberRegistrationController::class, 'index'])->name('swo2_3')->middleware('signed'); +Route::get('/swo2_3B', [MemberRegistrationController::class, 'indexBack'])->name('swo2_3B'); Route::post('/swo2_4', [MemberRegistrationController::class, 'confirm'])->name('swo2_4'); Route::post('/swo2_5', [MemberRegistrationController::class, 'complete'])->name('swo2_5'); Route::get('/swo4_1', [LoginController::class, 'login'])->name('swo4_1');
駐輪場名市町村名駅名駐輪場名市町村名駅名{{ $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
駐輪場名市町村名駅名市町村名駅名{{ $psection->psection_subject }}{{ $psection->psection_subject }}