未発行
| {{ $seal->psection_subject ?? '' }} | +{{ $seal->usertype_subject1 ?? '' }} | +
|---|---|
| {{ $seal->ptype_subject ?? '' }} | +{{ $seal->pplace_no ?? '' }} | +
| 定期契約ID | +{{ $seal->contract_id }} | +
| + {{ $seal->enable_months }}ヶ月 + | +|
diff --git a/app/Http/Controllers/MypageController.php b/app/Http/Controllers/MypageController.php
new file mode 100644
index 0000000..2fb59c6
--- /dev/null
+++ b/app/Http/Controllers/MypageController.php
@@ -0,0 +1,100 @@
+where('user_id', $user_id)->first();
+
+ $today = date('Y-m-d');
+ // 定期契約情報を取得(park/usertype/psection/ptypeテーブルもJOIN)
+ $contracts = DB::table('regular_contract')
+ ->join('park', 'regular_contract.park_id', '=', 'park.park_id')
+ ->join('usertype', 'regular_contract.user_categoryid', '=', 'usertype.user_categoryid')
+ ->leftJoin('city', 'park.city_id', '=', 'city.city_id')
+ ->leftJoin('psection', 'regular_contract.psection_id', '=', 'psection.psection_id')
+ ->leftJoin('ptype', 'regular_contract.ptype_id', '=', 'ptype.ptype_id')
+ ->where('regular_contract.user_id', $user_id)
+ ->where('regular_contract.contract_flag', 1)
+ ->where('regular_contract.contract_cancel_flag', 0)
+ ->where(function ($query) use ($today) {
+ $query->where('regular_contract.contract_periode', '>', $today)
+ ->orWhere(function ($q) use ($today) {
+ $q->where('regular_contract.contract_periode', '<=', $today)
+ ->whereRaw('DATEDIFF(?, regular_contract.contract_periode) <= 5', [$today]);
+ });
+ })
+ ->select(
+ 'regular_contract.contract_id',
+ 'park.park_name',
+ 'usertype.usertype_subject1',
+ 'regular_contract.contract_periods',
+ 'regular_contract.contract_periode',
+ 'regular_contract.enable_months',
+ 'regular_contract.contract_renewal',
+ 'regular_contract.park_id',
+ 'city.update_grace_period_start_date',
+ 'city.update_grace_period_start_time',
+ 'city.update_grace_period_end_date',
+ 'city.update_grace_period_end_time',
+ 'psection.psection_subject',
+ 'ptype.ptype_subject',
+ 'regular_contract.pplace_no'
+ )
+ ->get();
+
+ // シール情報を取得
+ $seals = DB::table('regular_contract')
+ ->join('usertype', 'regular_contract.user_categoryid', '=', 'usertype.user_categoryid')
+ ->leftJoin('psection', 'regular_contract.psection_id', '=', 'psection.psection_id')
+ ->leftJoin('ptype', 'regular_contract.ptype_id', '=', 'ptype.ptype_id')
+ ->where('regular_contract.user_id', $user_id)
+ ->where('regular_contract.contract_flag', 1)
+ ->where('regular_contract.contract_cancel_flag', 0)
+ ->where('regular_contract.contract_periode', '>=', $today)
+ ->where('regular_contract.contract_permission', 1)
+ ->select(
+ 'regular_contract.contract_id',
+ 'regular_contract.contract_qr_id',
+ 'usertype.usertype_subject1',
+ 'regular_contract.contract_periods',
+ 'regular_contract.contract_periode',
+ 'regular_contract.enable_months',
+ 'regular_contract.contract_renewal',
+ 'regular_contract.park_id',
+ 'psection.psection_subject',
+ 'ptype.ptype_subject',
+ 'regular_contract.pplace_no'
+ )
+ ->get();
+
+ // お知らせ情報を取得
+ $informations= DB::table('user_information_history')
+ ->where('user_id', $user_id)
+ ->orderBy('user_information_history_id', 'desc')
+ ->limit(3)
+ ->get();
+
+ \Log::info('マイページにアクセス', [
+ 'user_id' => $user_id,
+ ]);
+
+ return view('mypage.index', [
+ 'active_menu' => 'SWO-4-1', // マイページメニューの選択状態用
+ 'user_name' => $user->user_name, // ユーザー名(ヘッダー用)
+ 'contracts' => $contracts,
+ 'seals' => $seals,
+ 'informations' => $informations
+ ]);
+ }
+}
diff --git a/public/assets/css/mypage/all.css b/public/assets/css/mypage/all.css
deleted file mode 100644
index 6439b74..0000000
--- a/public/assets/css/mypage/all.css
+++ /dev/null
@@ -1,61 +0,0 @@
-/* iCheck plugin skins
------------------------------------ */
-@import url("minimal/_all.css");
-/*
-@import url("minimal/minimal.css");
-@import url("minimal/red.css");
-@import url("minimal/green.css");
-@import url("minimal/blue.css");
-@import url("minimal/aero.css");
-@import url("minimal/grey.css");
-@import url("minimal/orange.css");
-@import url("minimal/yellow.css");
-@import url("minimal/pink.css");
-@import url("minimal/purple.css");
-*/
-
-@import url("square/_all.css");
-/*
-@import url("square/square.css");
-@import url("square/red.css");
-@import url("square/green.css");
-@import url("square/blue.css");
-@import url("square/aero.css");
-@import url("square/grey.css");
-@import url("square/orange.css");
-@import url("square/yellow.css");
-@import url("square/pink.css");
-@import url("square/purple.css");
-*/
-
-@import url("flat/_all.css");
-/*
-@import url("flat/flat.css");
-@import url("flat/red.css");
-@import url("flat/green.css");
-@import url("flat/blue.css");
-@import url("flat/aero.css");
-@import url("flat/grey.css");
-@import url("flat/orange.css");
-@import url("flat/yellow.css");
-@import url("flat/pink.css");
-@import url("flat/purple.css");
-*/
-
-@import url("line/_all.css");
-/*
-@import url("line/line.css");
-@import url("line/red.css");
-@import url("line/green.css");
-@import url("line/blue.css");
-@import url("line/aero.css");
-@import url("line/grey.css");
-@import url("line/orange.css");
-@import url("line/yellow.css");
-@import url("line/pink.css");
-@import url("line/purple.css");
-*/
-
-@import url("polaris/polaris.css");
-
-@import url("futurico/futurico.css");
\ No newline at end of file
diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php
index 7a4c2a0..8d2fd2c 100644
--- a/resources/views/layouts/app.blade.php
+++ b/resources/views/layouts/app.blade.php
@@ -12,7 +12,6 @@
-
diff --git a/resources/views/mypage/index.blade.php b/resources/views/mypage/index.blade.php
new file mode 100644
index 0000000..2269f75
--- /dev/null
+++ b/resources/views/mypage/index.blade.php
@@ -0,0 +1,255 @@
+@extends('layouts.app')
+@section('content')
+定期契約情報
+ シール発行
+ {{ $user_name }}さんへのお知らせ
+ お知らせ一覧を見る
+
+