Merge pull request 'main_higashide' (#3) from main_higashide into main
Reviewed-on: #3
2
.env
@ -2,7 +2,7 @@ APP_NAME=so-manager
|
||||
APP_ENV=local
|
||||
APP_KEY=base64:ejLwJbt2bEXY9emPUmsurG+X1hzkjTxQQvq2/FO14RY=
|
||||
APP_DEBUG=true
|
||||
APP_URL=https://so-manager-dev.com/
|
||||
APP_URL=https://main-higashide.so-manager-dev.com/
|
||||
|
||||
APP_LOCALE=ja
|
||||
APP_FALLBACK_LOCALE=ja
|
||||
|
||||
20
.gitea/workflows/deploy-preview.yml
Normal file
@ -0,0 +1,20 @@
|
||||
name: Deploy preview (main_higashide)
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["main_higashide"]
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: deploy-main_higashide
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ["native"]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Deploy to preview (main_higashide)
|
||||
env:
|
||||
BRANCH: main_higashide
|
||||
run: /usr/local/bin/deploy_branch_simple.sh
|
||||
@ -1,14 +0,0 @@
|
||||
name: Deploy so-manager (auto)
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: [ "native" ]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Deploy to server
|
||||
run: /usr/local/bin/deploy_so.sh
|
||||
117
app/Http/Controllers/ReceiptController.php
Normal file
@ -0,0 +1,117 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Mpdf\Mpdf;
|
||||
use function base_path;
|
||||
|
||||
class ReceiptController extends Controller
|
||||
{
|
||||
// 宛名入力画面表示
|
||||
public function input($contract_id)
|
||||
{
|
||||
$user_id = session('user_id');
|
||||
if (!$user_id) {
|
||||
return redirect('/login');
|
||||
}
|
||||
$user = DB::table('user')->where('user_id', $user_id)->first();
|
||||
|
||||
return view('receipt.input', [
|
||||
'user_name' => $user ? $user->user_name : '', // ユーザー名(ヘッダー用)
|
||||
'contract_id' => $contract_id
|
||||
]);
|
||||
}
|
||||
|
||||
// 領収書発行(入力内容の保存)
|
||||
public function issue(Request $request, $contract_id)
|
||||
{
|
||||
$user_id = session('user_id');
|
||||
if (!$user_id) {
|
||||
return redirect('/login');
|
||||
}
|
||||
|
||||
$receipt_name = $request->input('receipt_name');
|
||||
$keisho = $request->input('keisho');
|
||||
|
||||
// 既存レコードチェック
|
||||
$exists = DB::table('inv_publish')->where('contract_id', $contract_id)->exists();
|
||||
if ($exists) {
|
||||
// エラー時はinput画面に戻し、メッセージ表示
|
||||
return redirect()->back()->withInput()->withErrors(['contract_id' => 'この契約の領収書は既に発行されています。契約履歴から再発行を行ってください。']);
|
||||
}
|
||||
|
||||
// inv_publishテーブルに新規登録(insert)
|
||||
$inv_name = $receipt_name . $keisho;
|
||||
$now = date('Y-m-d H:i:s');
|
||||
$seq = DB::table('inv_publish')->max('seq') ?? 0;
|
||||
$seq = $seq + 1;
|
||||
DB::table('inv_publish')->insert([
|
||||
'seq' => $seq,
|
||||
'user_id' => $user_id,
|
||||
'contract_id' => $contract_id,
|
||||
'inv_name' => $inv_name,
|
||||
'published_at' => date('Y-m-d'),
|
||||
'type' => 0,
|
||||
'count' => 1,
|
||||
'created_at' => $now,
|
||||
'updated_at' => null,
|
||||
]);
|
||||
|
||||
// 完了後はdownloadメソッドを直接呼び出し(再発行フラグfalseで渡す)
|
||||
$is_reissue = false;
|
||||
return $this->download($contract_id, $is_reissue);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function download($contract_id, $is_reissue = true)
|
||||
{
|
||||
// 必要なデータを取得
|
||||
$contract = DB::table('regular_contract')->where('contract_id', $contract_id)->first();
|
||||
$inv = DB::table('inv_publish')->where('contract_id', $contract_id)->first();
|
||||
$t_number = DB::table('inv_setting')->value('t_number');
|
||||
|
||||
// park_name取得(regular_contract.park_id=park.park_id)
|
||||
$park_name = '';
|
||||
if ($contract && $contract->park_id) {
|
||||
$park = DB::table('park')->where('park_id', $contract->park_id)->first();
|
||||
if ($park && $park->park_name) {
|
||||
$park_name = $park->park_name;
|
||||
}
|
||||
}
|
||||
|
||||
// BladeテンプレートをHTMLにレンダリング
|
||||
$html = view('receipt.pdf', [
|
||||
'contract' => $contract,
|
||||
'inv' => $inv,
|
||||
't_number' => $t_number,
|
||||
'park_name' => $park_name,
|
||||
'is_reissue' => $is_reissue,
|
||||
])->render();
|
||||
|
||||
// mPDF最新版(autoload対応)
|
||||
$mpdf = new \Mpdf\Mpdf([
|
||||
'mode' => 'ja',
|
||||
'format' => 'A4',
|
||||
'custom_font_dir' => resource_path('fonts'),
|
||||
'custom_font_data' => [
|
||||
'noto_sans_jp' => [
|
||||
'R' => 'NotoSansJP-Regular.ttf', // 通常フォント
|
||||
'B' => 'NotoSansJP-Bold.ttf', // 太字フォント
|
||||
]
|
||||
],
|
||||
'default_font' => 'noto_sans_jp',
|
||||
]);
|
||||
|
||||
|
||||
$mpdf->WriteHTML($html);
|
||||
|
||||
// PDFダウンロード
|
||||
return response($mpdf->Output('receipt_' . $contract_id . '.pdf', 'S'))
|
||||
->header('Content-Type', 'application/pdf')
|
||||
->header('Content-Disposition', 'attachment; filename="receipt_' . $contract_id . '.pdf"');
|
||||
}
|
||||
}
|
||||
209
app/Http/Controllers/RegularContractController.php
Normal file
@ -0,0 +1,209 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class RegularContractController extends Controller
|
||||
{
|
||||
public function showInfo()
|
||||
{
|
||||
$user_id = session('user_id');
|
||||
if (!$user_id) {
|
||||
return redirect('/login');
|
||||
}
|
||||
$user_name = DB::table('user')->where('user_id', $user_id)->value('user_name');
|
||||
|
||||
$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();
|
||||
|
||||
return view('regular_contract.info', [
|
||||
'active_menu' => 'SWC-3-1', // マイページメニューの選択状態用
|
||||
'user_name' => $user_name, // ユーザー名(ヘッダー用)
|
||||
'contracts' => $contracts,
|
||||
]);
|
||||
}
|
||||
|
||||
public function update($contract_id)
|
||||
{
|
||||
$user_id = session('user_id');
|
||||
if (!$user_id) {
|
||||
return redirect('/login');
|
||||
}
|
||||
|
||||
// 元契約データ取得
|
||||
$old_contract = DB::table('regular_contract')->where('contract_id', $contract_id)->first();
|
||||
|
||||
// 新規レコード作成(必要な項目を元契約データから引き継ぐ)
|
||||
$new_contract_id = DB::table('regular_contract')->insertGetId([
|
||||
'old_contract_id' => $old_contract->contract_id,
|
||||
'user_id' => $old_contract->user_id,
|
||||
'user_categoryid' => $old_contract->user_categoryid,
|
||||
'created_at' => now(),
|
||||
'updated_at' => now(),
|
||||
'park_id' => $old_contract->park_id,
|
||||
'price_parkplaceid' => $old_contract->price_parkplaceid,
|
||||
'user_securitynum' => $old_contract->user_securitynum,
|
||||
'contract_created_at' => now(),
|
||||
'contract_reduction' => $old_contract->contract_reduction,
|
||||
'update_flag' => 1,
|
||||
'contract_cancel_flag' => 0,
|
||||
'800m_flag' => 0,
|
||||
'psection_id' => $old_contract->psection_id,
|
||||
'zone_id' => $old_contract->zone_id,
|
||||
'pplace_no' => $old_contract->pplace_no
|
||||
]);
|
||||
|
||||
// contract_qr_id生成(AES-256-CBC暗号化)
|
||||
$key = "LJLASR4FAS34SAADFA72ASDFALLSDRGT";
|
||||
$iv = substr(hash('sha256', $key), 0, 16); // IVは16バイト
|
||||
$encrypted = openssl_encrypt($new_contract_id, 'AES-256-CBC', $key, 0, $iv);
|
||||
|
||||
// contract_qr_idを更新
|
||||
DB::table('regular_contract')->where('contract_id', $new_contract_id)->update([
|
||||
'contract_qr_id' => $encrypted
|
||||
]);
|
||||
|
||||
// 完了後の遷移
|
||||
return redirect()->route('regular_contract.confirm_category', ['contract_id' => $new_contract_id]);
|
||||
}
|
||||
|
||||
public function confirmCategory($contract_id)
|
||||
{
|
||||
$user_id = session('user_id');
|
||||
if (!$user_id) {
|
||||
return redirect('/login');
|
||||
}
|
||||
$user = DB::table('user')->where('user_id', $user_id)->first();
|
||||
|
||||
// regular_contractとparkをJOINしてsecurityreg_display_flagを取得
|
||||
$contract = DB::table('regular_contract')
|
||||
->join('park', 'regular_contract.park_id', '=', 'park.park_id')
|
||||
->where('regular_contract.contract_id', $contract_id)
|
||||
->select('regular_contract.*', 'park.securityreg_display_flag')
|
||||
->first();
|
||||
|
||||
return view('regular_contract.confirm_category', [
|
||||
'active_menu' => 'SWC-4-3', // マイページメニューの選択状態用
|
||||
'user_name' => $user ? $user->user_name : '', // ユーザー名(ヘッダー用)
|
||||
'user' => $user,
|
||||
'contract' => $contract
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 契約区分確認画面の「確認して進む」ボタン押下時の分岐処理
|
||||
* 本人確認書類アップロード画面 or 利用期間選択画面へ遷移
|
||||
*
|
||||
* 分岐条件は下記の通り:
|
||||
* 1. 利用者分類(一般/学生):user.user_categoryid=usertype.user_categoryidのusertype_subject1で判別
|
||||
* 2. 利用者分類(減免/減免でない):regular_contract.contract_reduction=1なら減免
|
||||
* 3. 駐輪場マスタの設定(減免確認種別):reduction_confirm.reduction_confirm_type(0=確認しない,1=年1回,2=毎更新時)
|
||||
* 4. 駐輪場マスタの設定(年度跨ぎ):park.overyear_flag(0/NULL=年跨ぎなし,1=年跨ぎあり)
|
||||
* 5. 駐輪場マスタの設定(学生証確認種別):park.student_id_confirm_type(0=確認しない,1=年1回,2=毎更新時)
|
||||
* 6. 契約期間に4/1が含まれる場合は年度跨ぎ判定に利用
|
||||
* 7. ユーザー区分が「学生」の場合のみ、契約終了日が卒業年月日を超える場合も本人確認書類アップロード画面へ
|
||||
*/
|
||||
public function confirmCategoryNext($contract_id)
|
||||
{
|
||||
$user_id = session('user_id');
|
||||
if (!$user_id) {
|
||||
return redirect('/login');
|
||||
}
|
||||
// 契約情報取得
|
||||
$contract = DB::table('regular_contract')->where('contract_id', $contract_id)->first();
|
||||
if (!$contract) {
|
||||
return redirect()->back()->with('error', '契約情報が見つかりません');
|
||||
}
|
||||
// ユーザー情報取得
|
||||
$user = DB::table('user')->where('user_id', $user_id)->first();
|
||||
// ユーザー区分取得
|
||||
$usertype = DB::table('usertype')->where('user_categoryid', $user->user_categoryid)->first();
|
||||
// 駐輪場情報取得
|
||||
$park = DB::table('park')->where('park_id', $contract->park_id)->first();
|
||||
// 減免確認種別取得
|
||||
$reduction_confirm = DB::table('reduction_confirm')
|
||||
->where('park_id', $contract->park_id)
|
||||
->where('user_categoryid', $contract->user_categoryid)
|
||||
->first();
|
||||
|
||||
// 分岐条件
|
||||
$reduction_confirm_type = isset($reduction_confirm) ? $reduction_confirm->reduction_confirm_type : 0;
|
||||
$student_id_confirm_type = isset($park) ? $park->student_id_confirm_type : 0;
|
||||
$overyear_flag = isset($park) ? $park->overyear_flag : 0;
|
||||
|
||||
// 契約期間に4/1が含まれるか判定
|
||||
$contract_start = new \DateTime($contract->contract_periods);
|
||||
$contract_end = new \DateTime($contract->contract_periode);
|
||||
// 4/1の年は契約開始年
|
||||
$april_first = new \DateTime($contract_start->format('Y') . '-04-01');
|
||||
// 契約終了日が4/1より前なら翌年の4/1も考慮
|
||||
if ($contract_end < $april_first) {
|
||||
$april_first->modify('+1 year');
|
||||
}
|
||||
$includes_april_first = ($contract_start <= $april_first && $contract_end >= $april_first);
|
||||
|
||||
// ユーザー区分が「学生」の場合のみ卒業年月日判定
|
||||
$exceeds_graduation = false;
|
||||
if (isset($usertype) && $usertype->usertype_subject1 === '学生') {
|
||||
$graduation_date = isset($user) ? $user->user_graduate : null;
|
||||
if ($graduation_date) {
|
||||
$graduation_dt = new \DateTime($graduation_date);
|
||||
$exceeds_graduation = ($contract_end > $graduation_dt);
|
||||
}
|
||||
}
|
||||
|
||||
// 本人確認書類アップロード画面へ遷移する条件
|
||||
// 1. reduction_confirm_typeが1(年1回)または2(毎更新時)
|
||||
// 2. student_id_confirm_typeが1(年1回)または2(毎更新時)
|
||||
// 3. 年度跨ぎ(overyear_flag=1以外)かつ契約期間に4/1が含まれる場合
|
||||
if (
|
||||
in_array($reduction_confirm_type, [1, 2]) ||
|
||||
in_array($student_id_confirm_type, [1, 2]) ||
|
||||
($overyear_flag != 1 && $includes_april_first) ||
|
||||
$exceeds_graduation
|
||||
) {
|
||||
// 本人確認書類アップロード画面へ
|
||||
return redirect()->route('regular_contract.upload_identity', ['contract_id' => $contract_id]);
|
||||
} else {
|
||||
// 利用期間選択画面へ
|
||||
return redirect()->route('regular_contract.select_period', ['contract_id' => $contract_id]);
|
||||
}
|
||||
}
|
||||
}
|
||||
217
app/Http/Controllers/UserEditConfirmController.php
Normal file
@ -0,0 +1,217 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
use App\Mail\UserEditVerifyMail;
|
||||
|
||||
use Illuminate\Foundation\Validation\ValidatesRequests;
|
||||
use App\Http\Controllers\Controller;
|
||||
|
||||
class UserEditConfirmController extends Controller
|
||||
{
|
||||
use ValidatesRequests;
|
||||
public function show(Request $request)
|
||||
{
|
||||
$user_id = session('user_id');
|
||||
if (!$user_id) {
|
||||
return redirect('/login');
|
||||
}
|
||||
$user = DB::table('user')->where('user_id', $user_id)->first();
|
||||
if (!$user) {
|
||||
return redirect('/login');
|
||||
}
|
||||
|
||||
// 直前のPOST値をold()やsession()->get('_old_input')で取得
|
||||
$input = session()->get('_old_input', []);
|
||||
|
||||
return view('user.confirm', [
|
||||
'user' => $user,
|
||||
'input' => $input,
|
||||
'active_menu' => 'SWC-1-1', // マイページメニューの選択状態用
|
||||
'user_name' => $user ? $user->user_name : '', // ユーザー名(ヘッダー用)
|
||||
]);
|
||||
}
|
||||
|
||||
public function confirm(Request $request)
|
||||
{
|
||||
$user_id = session('user_id');
|
||||
if (!$user_id) {
|
||||
return redirect('/login');
|
||||
}
|
||||
$user = DB::table('user')->where('user_id', $user_id)->first();
|
||||
if (!$user) {
|
||||
return redirect('/login');
|
||||
}
|
||||
|
||||
// 本人確認書類画像が画像ファイルかチェック
|
||||
$rules = [
|
||||
'photo_filename1' => 'nullable|file|image',
|
||||
'photo_filename2' => 'nullable|file|image',
|
||||
];
|
||||
$messages = [
|
||||
'photo_filename1.image' => '本人確認書類(おもて)は画像ファイルを選択してください。',
|
||||
'photo_filename2.image' => '本人確認書類(ウラ)は画像ファイルを選択してください。',
|
||||
];
|
||||
$this->validate($request, $rules, $messages);
|
||||
|
||||
$input = $request->all();
|
||||
|
||||
// ファイル保存処理(編集画面→確認画面POST時のみ)
|
||||
if ($request->hasFile('photo_filename1') && $request->file('photo_filename1')->isValid()) {
|
||||
$file1 = $request->file('photo_filename1');
|
||||
$filename1 = uniqid('photo1_') . '.' . $file1->getClientOriginalExtension();
|
||||
$file1->storeAs('photo', $filename1, 'public');
|
||||
$input['photo_filename1'] = $filename1;
|
||||
}
|
||||
if ($request->hasFile('photo_filename2') && $request->file('photo_filename2')->isValid()) {
|
||||
$file2 = $request->file('photo_filename2');
|
||||
$filename2 = uniqid('photo2_') . '.' . $file2->getClientOriginalExtension();
|
||||
$file2->storeAs('photo', $filename2, 'public');
|
||||
$input['photo_filename2'] = $filename2;
|
||||
}
|
||||
|
||||
\Log::info('ユーザー情報編集確認画面にアクセス', [
|
||||
'user_id' => $user_id,
|
||||
]);
|
||||
|
||||
return view('user.confirm', [
|
||||
'user' => $user,
|
||||
'input' => $input,
|
||||
'active_menu' => 'SWC-1-1', // マイページメニューの選択状態用
|
||||
'user_name' => $user ? $user->user_name : '', // ユーザー名(ヘッダー用)
|
||||
]);
|
||||
}
|
||||
|
||||
// 入力内容確認画面から「変更を確定する」ボタン押下時
|
||||
public function submit(Request $request)
|
||||
{
|
||||
$user_id = session('user_id');
|
||||
if (!$user_id) {
|
||||
return redirect('/login');
|
||||
}
|
||||
$user = DB::table('user')->where('user_id', $user_id)->first();
|
||||
if (!$user) {
|
||||
return redirect('/login');
|
||||
}
|
||||
|
||||
$token = Str::random(64);
|
||||
$changeData = $request->except(['_token']);
|
||||
$changeData['user_id'] = $user_id;
|
||||
|
||||
// 本人確認書類画像アップロード処理
|
||||
if ($request->hasFile('photo_filename1') && $request->file('photo_filename1')->isValid()) {
|
||||
$file1 = $request->file('photo_filename1');
|
||||
$filename1 = uniqid('photo1_') . '.' . $file1->getClientOriginalExtension();
|
||||
$file1->storeAs('photo', $filename1, 'public');
|
||||
$changeData['photo_filename1'] = $filename1;
|
||||
}
|
||||
if ($request->hasFile('photo_filename2') && $request->file('photo_filename2')->isValid()) {
|
||||
$file2 = $request->file('photo_filename2');
|
||||
$filename2 = uniqid('photo2_') . '.' . $file2->getClientOriginalExtension();
|
||||
$file2->storeAs('photo', $filename2, 'public');
|
||||
$changeData['photo_filename2'] = $filename2;
|
||||
}
|
||||
|
||||
Cache::put('change_request_' . $token, $changeData, now()->addDay());
|
||||
|
||||
$verifyUrl = route('user.edit.verify', ['token' => $token]);
|
||||
|
||||
// Mailableでメール送信
|
||||
Mail::to($changeData['user_primemail'])->send(new UserEditVerifyMail($verifyUrl, $user));
|
||||
|
||||
\Log::info('ユーザー情報変更メール送信完了画面にアクセス', [
|
||||
'user_id' => $user_id,
|
||||
]);
|
||||
|
||||
return view('user.mail_sent', [
|
||||
'active_menu' => 'SWC-1-1', // マイページメニューの選択状態用
|
||||
'user_name' => $user ? $user->user_name : '', // ユーザー名(ヘッダー用)
|
||||
]);
|
||||
}
|
||||
|
||||
// 認証URLクリック時(変更確定処理)
|
||||
public function verify(Request $request)
|
||||
{
|
||||
$token = $request->query('token');
|
||||
$changeData = Cache::get('change_request_' . $token);
|
||||
|
||||
if (!$changeData) {
|
||||
return redirect()->route('user.edit')->withErrors(['register_expired' => '登録期間が過ぎています。もう一度登録してください。']);
|
||||
}
|
||||
|
||||
// 変更内容をDBに保存(userテーブル更新)
|
||||
// 更新データ生成(photo_filename1, photo_filename2, user_passは入力時のみ追加)
|
||||
$updateData = [
|
||||
'user_gender' => $changeData['user_gender'] ?? null,
|
||||
'user_regident_zip' => $changeData['user_regident_zip_1'] . $changeData['user_regident_zip_2'],
|
||||
'user_regident_pre' => $changeData['user_regident_pre'],
|
||||
'user_regident_city' => $changeData['user_regident_city'],
|
||||
'user_regident_add' => $changeData['user_regident_add'],
|
||||
'user_birthdate' => $changeData['user_birthdate'],
|
||||
'user_age' => $changeData['user_age'],
|
||||
'user_homephone' => implode('-', $changeData['user_homephone'] ?? []),
|
||||
'user_mobile' => implode('-', $changeData['user_mobile'] ?? []),
|
||||
'user_primemail' => $changeData['user_primemail'],
|
||||
'user_submail' => $changeData['user_submail'],
|
||||
// 利用者区分(user_categoryid)をusertypeテーブルから取得して登録
|
||||
// 画面からはuser_category(一般/学生)が渡ってくる
|
||||
'user_categoryid' => self::getUserCategoryId($changeData['user_category'] ?? null),
|
||||
'user_workplace' => $changeData['user_workplace'] ?? null,
|
||||
'user_school' => $changeData['user_school'] ?? null,
|
||||
'user_graduate' => $changeData['user_graduate'] ?? null,
|
||||
'user_relate_zip' => $changeData['user_relate_zip_1'] . $changeData['user_relate_zip_2'],
|
||||
'user_relate_pre' => $changeData['user_relate_pre'],
|
||||
'user_relate_city' => $changeData['user_relate_city'],
|
||||
'user_relate_add' => $changeData['user_relate_add'],
|
||||
'updated_at' => now(), //
|
||||
];
|
||||
if (!empty($changeData['photo_filename1'])) {
|
||||
$updateData['photo_filename1'] = $changeData['photo_filename1'];
|
||||
}
|
||||
if (!empty($changeData['photo_filename2'])) {
|
||||
$updateData['photo_filename2'] = $changeData['photo_filename2'];
|
||||
}
|
||||
if (!empty($changeData['user_pass'])) {
|
||||
$updateData['user_pass'] = self::customPasswordHash($changeData['user_pass'], $changeData['user_id']);
|
||||
}
|
||||
DB::table('user')
|
||||
->where('user_id', $changeData['user_id'])
|
||||
->update($updateData);
|
||||
|
||||
// キャッシュ削除
|
||||
Cache::forget('change_request_' . $token);
|
||||
|
||||
// 完了画面へ(ユーザー情報確認画面にリダイレクトし、成功メッセージ表示)
|
||||
return redirect()->route('user.info')->with('success', '更新に成功しました。');
|
||||
}
|
||||
|
||||
/**
|
||||
* 利用者区分の文言(一般/学生)からuser_categoryidを取得
|
||||
*/
|
||||
private static function getUserCategoryId($categoryName)
|
||||
{
|
||||
if (!$categoryName) return null;
|
||||
$row = DB::table('usertype')->where('usertype_subject1', $categoryName)->first();
|
||||
return $row ? $row->user_categoryid : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* パスワードをSHA256→SALT連結→25回ストレッチでハッシュ化
|
||||
*/
|
||||
private static function customPasswordHash($password, $user_id)
|
||||
{
|
||||
$salt = $user_id . 'SOMSALT';
|
||||
$hash = hash('sha256', $password);
|
||||
$hash .= $salt;
|
||||
for ($i = 0; $i < 25; $i++) {
|
||||
$hash = hash('sha256', $hash);
|
||||
}
|
||||
return $hash;
|
||||
}
|
||||
}
|
||||
383
app/Http/Controllers/UserEditController.php
Normal file
@ -0,0 +1,383 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
class UserEditController extends Controller
|
||||
{
|
||||
// 編集画面表示
|
||||
public function show(Request $request)
|
||||
{
|
||||
|
||||
$user_id = session('user_id');
|
||||
if (!$user_id) {
|
||||
return redirect('/login');
|
||||
}
|
||||
|
||||
$user = DB::table('user')->where('user_id', $user_id)->first();
|
||||
|
||||
// 利用者区分をusertypeテーブルから取得
|
||||
$user_category = '';
|
||||
if (isset($user->user_categoryid)) {
|
||||
$usertype = DB::table('usertype')
|
||||
->where('user_categoryid', $user->user_categoryid)
|
||||
->first();
|
||||
if ($usertype && isset($usertype->usertype_subject1)) {
|
||||
$user_category = $usertype->usertype_subject1;
|
||||
}
|
||||
}
|
||||
|
||||
// 契約・更新期間判定
|
||||
$contract = DB::table('regular_contract')
|
||||
->join('park', 'regular_contract.park_id', '=', 'park.park_id')
|
||||
->where('regular_contract.user_id', $user->user_id)
|
||||
->where('regular_contract.contract_flag', 1)
|
||||
->first();
|
||||
|
||||
$today = date('Y-m-d');
|
||||
$current_time = date('H:i');
|
||||
$is_update_period = true; // デフォルトは編集可能
|
||||
$in_contract_period = false;
|
||||
|
||||
if ($contract) {
|
||||
$contract_periods = str_replace('/', '-', $contract->contract_periods);
|
||||
$contract_periode = str_replace('/', '-', $contract->contract_periode);
|
||||
$contract_periods_month = date('Y-m', strtotime($contract_periods));
|
||||
$contract_periode_month = date('Y-m', strtotime($contract_periode));
|
||||
$current_month = date('Y-m');
|
||||
// 契約月が今月の場合
|
||||
if ($contract_periods_month === $current_month && $contract_periode_month === $current_month && $contract->contract_flag == 1) {
|
||||
$in_contract_period = true;
|
||||
$is_update_period = false; // 編集不可
|
||||
} else if (strtotime($today) >= strtotime($contract_periods) && strtotime($today) <= strtotime($contract_periode)) {
|
||||
$in_contract_period = true;
|
||||
$is_update_period = false; // 編集不可
|
||||
}
|
||||
}
|
||||
if ($contract && !$in_contract_period) {
|
||||
$city = DB::table('city')->where('city_id', $contract->city_id)->first();
|
||||
if ($city) {
|
||||
$contract_year = date('Y', strtotime($contract_periode));
|
||||
$contract_month = date('m', strtotime($contract_periode));
|
||||
$today_year = date('Y');
|
||||
$today_month = date('m');
|
||||
$today_day = date('d');
|
||||
$start_day = (int)$city->update_grace_period_start_date;
|
||||
$end_day = (int)$city->update_grace_period_end_date;
|
||||
$start_time = $city->update_grace_period_start_time ?? '00:00';
|
||||
$end_time = $city->update_grace_period_end_time ?? '23:59';
|
||||
$today_time = date('H:i');
|
||||
$in_grace = false;
|
||||
|
||||
// 契約終了月のみ猶予期間判定
|
||||
if ((int)$today_year === (int)$contract_year) {
|
||||
// 開始日 < 終了日:契約終了月の開始日~終了日
|
||||
if ($start_day < $end_day && (int)$today_month === (int)$contract_month) {
|
||||
$start_datetime = $contract_year . '-' . $contract_month . '-' . sprintf('%02d', $start_day) . ' ' . $start_time;
|
||||
$end_datetime = $contract_year . '-' . $contract_month . '-' . sprintf('%02d', $end_day) . ' ' . $end_time;
|
||||
$today_datetime = date('Y-m-d') . ' ' . $today_time;
|
||||
if (strtotime($today_datetime) >= strtotime($start_datetime) && strtotime($today_datetime) <= strtotime($end_datetime)) {
|
||||
$in_grace = true;
|
||||
}
|
||||
}
|
||||
// 開始日 > 終了日:契約終了月の開始日~翌月の終了日
|
||||
if ($start_day > $end_day && (int)$today_month === (int)$contract_month) {
|
||||
$start_datetime = $contract_year . '-' . $contract_month . '-' . sprintf('%02d', $start_day) . ' ' . $start_time;
|
||||
$end_year = date('Y', strtotime($contract_periode . ' +1 month'));
|
||||
$end_month = date('m', strtotime($contract_periode . ' +1 month'));
|
||||
$end_datetime = $end_year . '-' . $end_month . '-' . sprintf('%02d', $end_day) . ' ' . $end_time;
|
||||
$today_datetime = date('Y-m-d') . ' ' . $today_time;
|
||||
if (strtotime($today_datetime) >= strtotime($start_datetime) && strtotime($today_datetime) <= strtotime($end_datetime)) {
|
||||
$in_grace = true;
|
||||
}
|
||||
}
|
||||
// 開始日 > 終了日:契約終了月の翌月の終了日(翌月分)
|
||||
if ($start_day > $end_day && (int)$today_month === (int)date('m', strtotime($contract_periode . ' +1 month'))) {
|
||||
$end_year = date('Y', strtotime($contract_periode . ' +1 month'));
|
||||
$end_month = date('m', strtotime($contract_periode . ' +1 month'));
|
||||
$end_datetime = $end_year . '-' . $end_month . '-' . sprintf('%02d', $end_day) . ' ' . $end_time;
|
||||
$today_datetime = date('Y-m-d') . ' ' . $today_time;
|
||||
if (strtotime($today_datetime) <= strtotime($end_datetime)) {
|
||||
$in_grace = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($in_grace) {
|
||||
$is_update_period = false; // 猶予期間も編集不可
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 必要なら値分解(電話番号・住所等)
|
||||
$user->user_homephone = explode('-', $user->user_homephone ?? '');
|
||||
$user->user_mobile = explode('-', $user->user_mobile ?? '');
|
||||
$user->user_regident_zip_1 = substr($user->user_regident_zip ?? '', 0, 3);
|
||||
$user->user_regident_zip_2 = substr($user->user_regident_zip ?? '', 3, 4);
|
||||
$user->user_relate_zip_1 = substr($user->user_relate_zip ?? '', 0, 3);
|
||||
$user->user_relate_zip_2 = substr($user->user_relate_zip ?? '', 3, 4);
|
||||
|
||||
\Log::info('ユーザー情報編集画面にアクセス', [
|
||||
'user_id' => $user_id,
|
||||
]);
|
||||
|
||||
return view('user.edit', [
|
||||
'user' => $user,
|
||||
'user_category' => $user_category,
|
||||
'is_update_period' => $is_update_period,
|
||||
'in_contract_period' => $in_contract_period,
|
||||
'active_menu' => 'SWC-1-1', // マイページメニューの選択状態用
|
||||
'user_name' => $user ? $user->user_name : '', // ユーザー名(ヘッダー用)
|
||||
]);
|
||||
}
|
||||
|
||||
// 編集内容保存
|
||||
public function update(Request $request)
|
||||
{
|
||||
|
||||
$user_id = session('user_id');
|
||||
if (!$user_id) {
|
||||
return redirect('/login');
|
||||
}
|
||||
$user = DB::table('user')->where('user_id', $user_id)->first();
|
||||
|
||||
// バリデーションルール
|
||||
$rules = [
|
||||
'user_gender' => ['nullable', Rule::in(['男性', '女性'])],
|
||||
'user_regident_zip_1' => 'nullable|digits:3',
|
||||
'user_regident_zip_2' => 'nullable|digits:4',
|
||||
'user_regident_pre' => 'nullable|string|max:5',
|
||||
'user_regident_city' => 'nullable|string|max:20',
|
||||
'user_regident_add' => 'nullable|string|max:50',
|
||||
'user_birthdate' => 'nullable|date',
|
||||
'user_homephone.*' => 'nullable|digits_between:1,5',
|
||||
'user_mobile.*' => 'nullable|digits_between:1,5',
|
||||
'user_primemail' => 'required|email',
|
||||
'user_primemail_confirmation' => 'required|same:user_primemail',
|
||||
'user_submail' => 'nullable|email|different:user_primemail',
|
||||
'user_category' => ['required', Rule::in(['一般', '学生'])],
|
||||
'user_workplace' => 'nullable|string|max:50',
|
||||
'user_school' => 'nullable|string|max:50',
|
||||
'user_graduate' => 'nullable|date',
|
||||
'user_relate_zip_1' => 'nullable|digits:3',
|
||||
'user_relate_zip_2' => 'nullable|digits:4',
|
||||
'user_relate_pre' => 'nullable|string|max:5',
|
||||
'user_relate_city' => 'nullable|string|max:20',
|
||||
'user_relate_add' => 'nullable|string|max:50',
|
||||
'photo_filename1' => 'nullable|image|max:4096',
|
||||
'photo_filename2' => 'nullable|image|max:4096',
|
||||
'user_pass_new' => [
|
||||
'nullable',
|
||||
'string',
|
||||
'min:8',
|
||||
'regex:/^[a-zA-Z0-9]+$/', // 半角英数字のみ
|
||||
],
|
||||
'user_pass_confirm' => 'nullable|same:user_pass_new',
|
||||
];
|
||||
|
||||
// 利用者区分による必須項目
|
||||
if ($request->user_category == '学生') {
|
||||
$rules['user_school'] = 'required|string|max:50';
|
||||
$rules['user_graduate'] = 'required|date';
|
||||
}
|
||||
|
||||
$messages = [
|
||||
'user_gender.in' => '性別は「男性」または「女性」を選択してください。',
|
||||
'user_regident_zip_1.digits' => '居住地の郵便番号(前半3桁)は3桁の数字で入力してください。',
|
||||
'user_regident_zip_2.digits' => '居住地の郵便番号(後半4桁)は4桁の数字で入力してください。',
|
||||
'user_regident_pre.max' => '居住地の都道府県は5文字以内で入力してください。',
|
||||
'user_regident_city.max' => '居住地の市区町村は20文字以内で入力してください。',
|
||||
'user_regident_add.max' => '居住地の住所は50文字以内で入力してください。',
|
||||
'user_birthdate.date' => '生年月日は正しい日付で入力してください。',
|
||||
'user_homephone.*.digits_between' => '自宅電話番号はそれぞれ1~5桁の数字で入力してください。',
|
||||
'user_mobile.*.digits_between' => '携帯電話番号はそれぞれ1~5桁の数字で入力してください。',
|
||||
'user_primemail.required' => 'メールアドレスは必須です。',
|
||||
'user_primemail.email' => 'メールアドレスは正しい形式で入力してください。',
|
||||
'user_primemail_confirmation.required' => 'メールアドレスの確認は必須です。',
|
||||
'user_primemail_confirmation.same' => '「メールアドレス」と「メールアドレスの確認」が一致しません。',
|
||||
'user_submail.email' => '予備メールアドレスは正しい形式で入力してください。',
|
||||
'user_submail.different' => 'メールアドレスと予備メールアドレスに同じアドレスを入力できません。',
|
||||
'user_category.required' => '利用者区分は必須です。',
|
||||
'user_category.in' => '利用者区分の値が不正です。',
|
||||
'user_workplace.max' => '勤務先は50文字以内で入力してください。',
|
||||
'user_school.max' => '学校名は50文字以内で入力してください。',
|
||||
'user_school.required' => '学校名は必須です。',
|
||||
'user_graduate.required' => '卒業年月日は必須です。',
|
||||
'user_graduate.date' => '卒業年月日は正しい日付で入力してください。',
|
||||
'user_relate_zip_1.digits' => '関連先の郵便番号(前半3桁)は3桁の数字で入力してください。',
|
||||
'user_relate_zip_2.digits' => '関連先の郵便番号(後半4桁)は4桁の数字で入力してください。',
|
||||
'user_relate_pre.max' => '関連先の都道府県は5文字以内で入力してください。',
|
||||
'user_relate_city.max' => '関連先の市区町村は20文字以内で入力してください。',
|
||||
'user_relate_add.max' => '関連先の住所は50文字以内で入力してください。',
|
||||
'photo_filename1.image' => '本人確認書類画像1は画像ファイルを選択してください。',
|
||||
'photo_filename1.max' => '本人確認書類画像1は4MB以内でアップロードしてください。',
|
||||
'photo_filename2.image' => '本人確認書類画像2は画像ファイルを選択してください。',
|
||||
'photo_filename2.max' => '本人確認書類画像2は4MB以内でアップロードしてください。',
|
||||
'user_pass_new.min' => '新しいパスワードは8文字以上で入力してください。',
|
||||
'user_pass_new.regex' => '新しいパスワードは半角英数字のみで入力してください。',
|
||||
'user_pass_confirm.same' => '「新しいパスワード」と「パスワードの確認」が一致しません。',
|
||||
];
|
||||
|
||||
$validated = $request->validate($rules, $messages);
|
||||
|
||||
// 編集不可項目はDB値を優先
|
||||
// 契約・更新期間判定(showと同じロジックを利用)
|
||||
$contract = DB::table('regular_contract')
|
||||
->join('park', 'regular_contract.park_id', '=', 'park.park_id')
|
||||
->where('regular_contract.user_id', $user->user_id)
|
||||
->where('regular_contract.contract_flag', 1)
|
||||
->first();
|
||||
|
||||
$today = date('Y-m-d');
|
||||
$current_time = date('H:i');
|
||||
$is_update_period = true; // デフォルトは編集可能
|
||||
$in_contract_period = false;
|
||||
|
||||
if ($contract) {
|
||||
$contract_periods = str_replace('/', '-', $contract->contract_periods);
|
||||
$contract_periode = str_replace('/', '-', $contract->contract_periode);
|
||||
$contract_periods_month = date('Y-m', strtotime($contract_periods));
|
||||
$contract_periode_month = date('Y-m', strtotime($contract_periode));
|
||||
$current_month = date('Y-m');
|
||||
// 契約月が今月の場合
|
||||
if ($contract_periods_month === $current_month && $contract_periode_month === $current_month && $contract->contract_flag == 1) {
|
||||
$in_contract_period = true;
|
||||
$is_update_period = false; // 編集不可
|
||||
} else if (strtotime($today) >= strtotime($contract_periods) && strtotime($today) <= strtotime($contract_periode)) {
|
||||
$in_contract_period = true;
|
||||
$is_update_period = false; // 編集不可
|
||||
}
|
||||
}
|
||||
if ($contract && !$in_contract_period) {
|
||||
$city = DB::table('city')->where('city_id', $contract->city_id)->first();
|
||||
if ($city) {
|
||||
$contract_year = date('Y', strtotime($contract_periode));
|
||||
$contract_month = date('m', strtotime($contract_periode));
|
||||
$today_year = date('Y');
|
||||
$today_month = date('m');
|
||||
$today_day = date('d');
|
||||
$start_day = (int)$city->update_grace_period_start_date;
|
||||
$end_day = (int)$city->update_grace_period_end_date;
|
||||
$start_time = $city->update_grace_period_start_time ?? '00:00';
|
||||
$end_time = $city->update_grace_period_end_time ?? '23:59';
|
||||
$today_time = date('H:i');
|
||||
$in_grace = false;
|
||||
|
||||
// 契約終了月のみ猶予期間判定
|
||||
if ((int)$today_year === (int)$contract_year) {
|
||||
// 開始日 < 終了日:契約終了月の開始日~終了日
|
||||
if ($start_day < $end_day && (int)$today_month === (int)$contract_month) {
|
||||
$start_datetime = $contract_year . '-' . $contract_month . '-' . sprintf('%02d', $start_day) . ' ' . $start_time;
|
||||
$end_datetime = $contract_year . '-' . $contract_month . '-' . sprintf('%02d', $end_day) . ' ' . $end_time;
|
||||
$today_datetime = date('Y-m-d') . ' ' . $today_time;
|
||||
if (strtotime($today_datetime) >= strtotime($start_datetime) && strtotime($today_datetime) <= strtotime($end_datetime)) {
|
||||
$in_grace = true;
|
||||
}
|
||||
}
|
||||
// 開始日 > 終了日:契約終了月の開始日~翌月の終了日
|
||||
if ($start_day > $end_day && (int)$today_month === (int)$contract_month) {
|
||||
$start_datetime = $contract_year . '-' . $contract_month . '-' . sprintf('%02d', $start_day) . ' ' . $start_time;
|
||||
$end_year = date('Y', strtotime($contract_periode . ' +1 month'));
|
||||
$end_month = date('m', strtotime($contract_periode . ' +1 month'));
|
||||
$end_datetime = $end_year . '-' . $end_month . '-' . sprintf('%02d', $end_day) . ' ' . $end_time;
|
||||
$today_datetime = date('Y-m-d') . ' ' . $today_time;
|
||||
if (strtotime($today_datetime) >= strtotime($start_datetime) && strtotime($today_datetime) <= strtotime($end_datetime)) {
|
||||
$in_grace = true;
|
||||
}
|
||||
}
|
||||
// 開始日 > 終了日:契約終了月の翌月の終了日(翌月分)
|
||||
if ($start_day > $end_day && (int)$today_month === (int)date('m', strtotime($contract_periode . ' +1 month'))) {
|
||||
$end_year = date('Y', strtotime($contract_periode . ' +1 month'));
|
||||
$end_month = date('m', strtotime($contract_periode . ' +1 month'));
|
||||
$end_datetime = $end_year . '-' . $end_month . '-' . sprintf('%02d', $end_day) . ' ' . $end_time;
|
||||
$today_datetime = date('Y-m-d') . ' ' . $today_time;
|
||||
if (strtotime($today_datetime) <= strtotime($end_datetime)) {
|
||||
$in_grace = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($in_grace) {
|
||||
$is_update_period = false; // 猶予期間も編集不可
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 編集不可項目リスト
|
||||
$readonly_fields = [
|
||||
'user_regident_zip_1',
|
||||
'user_regident_zip_2',
|
||||
'user_regident_pre',
|
||||
'user_regident_city',
|
||||
'user_regident_add',
|
||||
'user_birthdate',
|
||||
'user_workplace',
|
||||
'user_school',
|
||||
'user_graduate',
|
||||
'user_category'
|
||||
];
|
||||
|
||||
if (!$is_update_period) {
|
||||
// 編集不可項目はDB値を優先し、確認画面にも必ず渡す
|
||||
foreach ($readonly_fields as $field) {
|
||||
if (property_exists($user, $field)) {
|
||||
$request->merge([$field => $user->$field]);
|
||||
}
|
||||
}
|
||||
}
|
||||
// 編集不可・可能どちらでも、セッションには最終的な値を保存
|
||||
$request->flash();
|
||||
|
||||
// 電話番号結合
|
||||
$user->user_homephone = implode('-', $request->input('user_homephone', []));
|
||||
$user->user_mobile = implode('-', $request->input('user_mobile', []));
|
||||
|
||||
// 性別
|
||||
$user->user_gender = $request->user_gender;
|
||||
|
||||
// 住所結合
|
||||
$user->user_regident_zip = $request->user_regident_zip_1 . $request->user_regident_zip_2;
|
||||
$user->user_regident_pre = $request->user_regident_pre;
|
||||
$user->user_regident_city = $request->user_regident_city;
|
||||
$user->user_regident_add = $request->user_regident_add;
|
||||
$user->user_relate_zip = $request->user_relate_zip_1 . $request->user_relate_zip_2;
|
||||
$user->user_relate_pre = $request->user_relate_pre;
|
||||
$user->user_relate_city = $request->user_relate_city;
|
||||
$user->user_relate_add = $request->user_relate_add;
|
||||
|
||||
// メール
|
||||
$user->user_primemail = $request->user_primemail;
|
||||
$user->user_submail = $request->user_submail;
|
||||
|
||||
// 利用者区分
|
||||
$user->user_category = $request->user_category;
|
||||
$user->user_workplace = $request->user_workplace;
|
||||
$user->user_school = $request->user_school;
|
||||
$user->user_graduate = $request->user_graduate;
|
||||
|
||||
// 本人確認書類画像
|
||||
if ($request->hasFile('photo_filename1')) {
|
||||
$file1 = $request->file('photo_filename1');
|
||||
$filename1 = uniqid('photo1_') . '.' . $file1->getClientOriginalExtension();
|
||||
$file1->storeAs('public/photo', $filename1);
|
||||
$user->photo_filename1 = $filename1;
|
||||
}
|
||||
if ($request->hasFile('photo_filename2')) {
|
||||
$file2 = $request->file('photo_filename2');
|
||||
$filename2 = uniqid('photo2_') . '.' . $file2->getClientOriginalExtension();
|
||||
$file2->storeAs('public/photo', $filename2);
|
||||
$user->photo_filename2 = $filename2;
|
||||
}
|
||||
|
||||
// パスワード(ハッシュ化せず次画面に渡す)
|
||||
if ($request->user_pass_new && $request->user_pass_confirm && $request->user_pass_new === $request->user_pass_confirm) {
|
||||
$user->password = $request->user_pass_new;
|
||||
}
|
||||
|
||||
return redirect()->route('user.confirm')->withInput();
|
||||
}
|
||||
}
|
||||
40
app/Http/Controllers/UserInfoController.php
Normal file
@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class UserInfoController extends Controller
|
||||
{
|
||||
public function show()
|
||||
{
|
||||
$user_id = session('user_id');
|
||||
if (!$user_id) {
|
||||
return redirect('/login');
|
||||
}
|
||||
$user = DB::table('user')->where('user_id', $user_id)->first();
|
||||
|
||||
// 利用者区分をusertypeテーブルから取得
|
||||
$user_category = '';
|
||||
if (isset($user->user_categoryid)) {
|
||||
$usertype = DB::table('usertype')
|
||||
->where('user_categoryid', $user->user_categoryid)
|
||||
->first();
|
||||
if ($usertype && isset($usertype->usertype_subject1)) {
|
||||
$user_category = $usertype->usertype_subject1;
|
||||
}
|
||||
}
|
||||
|
||||
\Log::info('ユーザー情報確認画面にアクセス', [
|
||||
'user_id' => $user_id,
|
||||
]);
|
||||
|
||||
return view('user.info', [
|
||||
'user' => $user,
|
||||
'user_category' => $user_category,
|
||||
'active_menu' => 'SWC-1-1', // マイページメニューの選択状態用
|
||||
'user_name' => $user ? $user->user_name : '', // ユーザー名(ヘッダー用)
|
||||
]);
|
||||
}
|
||||
}
|
||||
139
app/Http/Controllers/UserWithdrawController.php
Normal file
@ -0,0 +1,139 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use App\Models\User;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
use App\Mail\WithdrawCompleteMail;
|
||||
|
||||
class UserWithdrawController extends Controller
|
||||
{
|
||||
// 退会確認画面表示
|
||||
public function showConfirm(Request $request)
|
||||
{
|
||||
$user_id = session('user_id');
|
||||
if (!$user_id) {
|
||||
return redirect('/login');
|
||||
}
|
||||
$user_name = DB::table('user')->where('user_id', $user_id)->value('user_name');
|
||||
|
||||
return view('user.withdraw_confirm')
|
||||
->with([
|
||||
'active_menu' => 'SWC-1-1',
|
||||
'user_name' => $user_name ?: '',
|
||||
]);
|
||||
}
|
||||
|
||||
// 退会処理
|
||||
public function withdraw(Request $request)
|
||||
{
|
||||
$user_id = session('user_id');
|
||||
if (!$user_id) {
|
||||
return redirect('/login');
|
||||
}
|
||||
|
||||
$user = DB::table('user')->where('user_id', $user_id)->first();
|
||||
|
||||
$now = now();
|
||||
DB::table('user')
|
||||
->where('user_id', $user_id)
|
||||
->update([
|
||||
'user_quit_flag' => 1,
|
||||
'user_quitday' => $now->format('Y-m-d'),
|
||||
'updated_at' => $now,
|
||||
]);
|
||||
|
||||
// 定期空き予約マスタ(reserve)の該当ユーザーのupdated_atを退会日時で更新
|
||||
DB::table('reserve')
|
||||
->where('user_id', $user_id)
|
||||
->update([
|
||||
'updated_at' => $now,
|
||||
'reserve_cancelday' => $now->format('Y-m-d'),
|
||||
'valid_flag' => 0,
|
||||
]);
|
||||
|
||||
// 退会完了メール送信
|
||||
try {
|
||||
Mail::to($user->user_primemail)->send(
|
||||
new WithdrawCompleteMail(
|
||||
$user->user_name,
|
||||
$user->user_primemail,
|
||||
$now->format('Y-m-d')
|
||||
)
|
||||
);
|
||||
} catch (\Exception $e) {
|
||||
\Log::error('退会完了メール送信失敗: ' . $e->getMessage());
|
||||
}
|
||||
|
||||
// 退会契約チェック
|
||||
$contract = DB::table('regular_contract')
|
||||
->where('user_id', $user_id)
|
||||
->orderByDesc('contract_id')
|
||||
->first();
|
||||
|
||||
if (!$contract) {
|
||||
// 契約なし→退会完了画面
|
||||
session()->forget('user_id');
|
||||
return view('user.withdraw_complete')->with([
|
||||
'active_menu' => 'SWC-1-1', // この画面のID
|
||||
'user_name' => $user ? $user->user_name : '', // ユーザー名(ヘッダー用)
|
||||
]);
|
||||
}
|
||||
|
||||
// 有効性判定
|
||||
if ($contract->contract_cancel_flag == 1 || $contract->contract_cancel_flag == 2) {
|
||||
session()->forget('user_id');
|
||||
return view('user.withdraw_complete')->with([
|
||||
'active_menu' => 'SWC-1-1', // この画面のID
|
||||
'user_name' => $user ? $user->user_name : '', // ユーザー名(ヘッダー用)
|
||||
]);
|
||||
}
|
||||
|
||||
// 契約期間のyear/month取得
|
||||
$contract_year = date('Y', strtotime($contract->contract_periode));
|
||||
$contract_month = date('m', strtotime($contract->contract_periode));
|
||||
$today_year = $now->year;
|
||||
$today_month = $now->month;
|
||||
|
||||
// 今月までなら退会完了
|
||||
if ($contract_year == $today_year && $contract_month == $today_month) {
|
||||
session()->forget('user_id');
|
||||
return view('user.withdraw_complete')->with([
|
||||
'active_menu' => 'SWC-1-1', // この画面のID
|
||||
'user_name' => $user ? $user->user_name : '', // ユーザー名(ヘッダー用)
|
||||
]);
|
||||
}
|
||||
|
||||
// 翌月以降なら返金処理キュー登録
|
||||
if ($contract_year > $today_year || ($contract_year == $today_year && $contract_month > $today_month)) {
|
||||
DB::table('operator_que')->insert([
|
||||
'que_class' => 13,
|
||||
'user_id' => $user_id,
|
||||
'contract_id' => $contract->contract_id,
|
||||
'park_id' => $contract->park_id,
|
||||
'que_comment' => null,
|
||||
'que_status' => 1,
|
||||
'que_status_comment' => '返金処理が必要な契約があります',
|
||||
'work_instructions' => 'お客様にの契約を確認し、退会後の返金処理をおこなってください。',
|
||||
'created_at' => $now,
|
||||
'updated_at' => $now,
|
||||
'operator_id' => null,
|
||||
]);
|
||||
session()->forget('user_id');
|
||||
return view('user.withdraw_complete')->with([
|
||||
'active_menu' => 'SWC-1-1', // この画面のID
|
||||
'user_name' => $user ? $user->user_name : '', // ユーザー名(ヘッダー用)
|
||||
]);
|
||||
}
|
||||
// どのifにも該当しない場合は退会完了画面にエラーメッセージを表示
|
||||
return view('user.withdraw_confirm')->with([
|
||||
'active_menu' => 'SWC-1-1',
|
||||
'user_name' => $user ? $user->user_name : '',
|
||||
'error_message' => '退会処理に失敗しました。申し訳ございませんが、So-Managerコールセンター(03-5856-4720)にご連絡をお願いいたします。',
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
||||
28
app/Mail/UserEditVerifyMail.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Mail;
|
||||
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Mail\Mailable;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
class UserEditVerifyMail extends Mailable
|
||||
{
|
||||
use Queueable, SerializesModels;
|
||||
|
||||
public $verifyUrl;
|
||||
public $user;
|
||||
|
||||
public function __construct($verifyUrl, $user)
|
||||
{
|
||||
$this->verifyUrl = $verifyUrl;
|
||||
$this->user = $user;
|
||||
}
|
||||
|
||||
public function build()
|
||||
{
|
||||
return $this
|
||||
->subject('【So-Manager】ユーザー情報変更のご確認')
|
||||
->view('emails.user_edit_verify');
|
||||
}
|
||||
}
|
||||
34
app/Mail/WithdrawCompleteMail.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace App\Mail;
|
||||
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Mail\Mailable;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
class WithdrawCompleteMail extends Mailable
|
||||
{
|
||||
use Queueable, SerializesModels;
|
||||
|
||||
public $user_name;
|
||||
public $user_primemail;
|
||||
public $user_quitday;
|
||||
|
||||
public function __construct($user_name, $user_primemail, $user_quitday)
|
||||
{
|
||||
$this->user_name = $user_name;
|
||||
$this->user_primemail = $user_primemail;
|
||||
$this->user_quitday = $user_quitday;
|
||||
}
|
||||
|
||||
public function build()
|
||||
{
|
||||
return $this->subject('退会完了のお知らせ')
|
||||
->view('emails.withdraw_complete')
|
||||
->with([
|
||||
'user_name' => $this->user_name,
|
||||
'user_primemail' => $this->user_primemail,
|
||||
'user_quitday' => $this->user_quitday,
|
||||
]);
|
||||
}
|
||||
}
|
||||
@ -65,7 +65,7 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'timezone' => 'UTC',
|
||||
'timezone' => 'Asia/Tokyo',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
||||
61
public/assets/css/mypage/all.css
Normal file
@ -0,0 +1,61 @@
|
||||
/* 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");
|
||||
1374
public/assets/css/mypage/app.css
Normal file
10003
public/assets/css/mypage/bootstrap.min.css
vendored
Normal file
3045
public/assets/css/mypage/font-awesome.min.css
vendored
Normal file
1177
public/assets/css/mypage/jquery-confirm.min.css
vendored
Normal file
315
public/assets/css/mypage/picker.min.css
vendored
Normal file
@ -0,0 +1,315 @@
|
||||
/*!
|
||||
* Picker.js v1.2.1
|
||||
* https://fengyuanchen.github.io/pickerjs
|
||||
*
|
||||
* Copyright 2016-present Chen Fengyuan
|
||||
* Released under the MIT license
|
||||
*
|
||||
* Date: 2019-02-18T13:08:09.658Z
|
||||
*/
|
||||
:root {
|
||||
--gray: #999;
|
||||
--blue: #0074d9;
|
||||
--color: #333;
|
||||
--background-color: #fff;
|
||||
--border: 1px solid #eee
|
||||
}
|
||||
|
||||
.picker {
|
||||
background-color: rgba(0, 0, 0, .5);
|
||||
color: #333;
|
||||
color: var(--color);
|
||||
direction: ltr;
|
||||
display: none;
|
||||
font-size: 1rem;
|
||||
line-height: 1.5;
|
||||
overflow: hidden;
|
||||
-ms-touch-action: none;
|
||||
touch-action: none;
|
||||
-webkit-transition: opacity .15s;
|
||||
transition: opacity .15s;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none
|
||||
}
|
||||
|
||||
.picker-fixed {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
position: fixed;
|
||||
right: 0;
|
||||
top: 0;
|
||||
z-index: 1986
|
||||
}
|
||||
|
||||
.picker-fixed>.picker-dialog {
|
||||
bottom: -100%;
|
||||
left: 0;
|
||||
max-height: 100%;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
-webkit-transition: bottom .3s;
|
||||
transition: bottom .3s
|
||||
}
|
||||
|
||||
.picker-fixed .picker-header {
|
||||
display: block
|
||||
}
|
||||
|
||||
.picker-fixed .picker-footer {
|
||||
display: table
|
||||
}
|
||||
|
||||
.picker-open {
|
||||
display: block;
|
||||
opacity: 0
|
||||
}
|
||||
|
||||
.picker-opened {
|
||||
opacity: 1
|
||||
}
|
||||
|
||||
.picker-opened>.picker-dialog {
|
||||
bottom: 0
|
||||
}
|
||||
|
||||
.picker-dialog {
|
||||
background-color: #fff;
|
||||
background-color: var(--background-color);
|
||||
border: 1px solid #eee;
|
||||
border: var(--border)
|
||||
}
|
||||
|
||||
.picker-header {
|
||||
border-bottom: 1px solid #eee;
|
||||
border-bottom: var(--border);
|
||||
display: none;
|
||||
padding: .875rem 1.25rem;
|
||||
position: relative
|
||||
}
|
||||
|
||||
.picker-title {
|
||||
font-size: 1.125rem;
|
||||
font-weight: 500;
|
||||
line-height: 1.25rem;
|
||||
margin: 0
|
||||
}
|
||||
|
||||
.picker-close {
|
||||
background-color: rgba(0, 0, 0, 0);
|
||||
border-width: 0;
|
||||
color: #999;
|
||||
color: var(--gray);
|
||||
cursor: pointer;
|
||||
font-size: 1.75rem;
|
||||
height: 3rem;
|
||||
opacity: .75;
|
||||
padding: 0;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
width: 3rem
|
||||
}
|
||||
|
||||
.picker-close:focus,
|
||||
.picker-close:hover {
|
||||
opacity: 1;
|
||||
outline: none
|
||||
}
|
||||
|
||||
.picker-body {
|
||||
overflow: hidden
|
||||
}
|
||||
|
||||
.picker-grid {
|
||||
display: table;
|
||||
table-layout: fixed;
|
||||
width: 100%
|
||||
}
|
||||
|
||||
.picker-cell {
|
||||
display: table-cell;
|
||||
position: relative
|
||||
}
|
||||
|
||||
.picker-cell:after,
|
||||
.picker-cell:before {
|
||||
content: "";
|
||||
display: block;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
z-index: 3
|
||||
}
|
||||
|
||||
.picker-cell:before {
|
||||
background-image: -webkit-gradient(linear, left bottom, left top, from(rgba(0, 0, 0, 0)), to(rgba(0, 0, 0, .05)));
|
||||
background-image: linear-gradient(0deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, .05));
|
||||
bottom: 50%;
|
||||
margin-bottom: 1rem;
|
||||
top: 0
|
||||
}
|
||||
|
||||
.picker-cell:after {
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0)), to(rgba(0, 0, 0, .05)));
|
||||
background-image: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, .05));
|
||||
bottom: 0;
|
||||
margin-top: 1rem;
|
||||
top: 50%
|
||||
}
|
||||
|
||||
.picker-cell+.picker-cell {
|
||||
border-left: 1px solid #eee;
|
||||
border-left: var(--border)
|
||||
}
|
||||
|
||||
.picker-headers .picker-cell:before {
|
||||
margin-bottom: 0
|
||||
}
|
||||
|
||||
.picker-headers .picker-cell:after {
|
||||
margin-top: 2rem
|
||||
}
|
||||
|
||||
.picker-single:not(.picker-controls):not(.picker-headers) .picker-cell:after,
|
||||
.picker-single:not(.picker-controls):not(.picker-headers) .picker-cell:before {
|
||||
display: none
|
||||
}
|
||||
|
||||
.picker-cell__header {
|
||||
color: #999;
|
||||
color: var(--gray);
|
||||
font-size: .875rem;
|
||||
font-weight: 500;
|
||||
line-height: 1.5rem;
|
||||
margin: 0;
|
||||
overflow: hidden;
|
||||
padding: .25rem .5rem;
|
||||
text-align: center;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap
|
||||
}
|
||||
|
||||
.picker-cell__control {
|
||||
cursor: pointer;
|
||||
height: 2rem;
|
||||
padding: .25rem .5rem;
|
||||
position: relative;
|
||||
z-index: 4
|
||||
}
|
||||
|
||||
.picker-cell__control:before {
|
||||
border: 0 solid #ccc;
|
||||
content: "";
|
||||
display: block;
|
||||
height: .5rem;
|
||||
left: 50%;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
-webkit-transform: translate(-50%, -50%) rotate(-45deg);
|
||||
-ms-transform: translate(-50%, -50%) rotate(-45deg);
|
||||
transform: translate(-50%, -50%) rotate(-45deg);
|
||||
width: .5rem
|
||||
}
|
||||
|
||||
.picker-cell__control:hover:before {
|
||||
border-color: var(--primary)
|
||||
}
|
||||
|
||||
.picker-cell__control--prev:before {
|
||||
border-right-width: 1px;
|
||||
border-top-width: 1px;
|
||||
margin-top: 2px
|
||||
}
|
||||
|
||||
.picker-cell__control--next:before {
|
||||
border-bottom-width: 1px;
|
||||
border-left-width: 1px;
|
||||
margin-bottom: 2px
|
||||
}
|
||||
|
||||
.picker-cell__body {
|
||||
overflow: hidden;
|
||||
position: relative
|
||||
}
|
||||
|
||||
.picker-cell__body:after,
|
||||
.picker-cell__body:before {
|
||||
content: "";
|
||||
height: 2rem;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
z-index: 1
|
||||
}
|
||||
|
||||
.picker-cell__body:before {
|
||||
background-image: -webkit-gradient(linear, left bottom, left top, from(hsla(0, 0%, 100%, 0)), to(#fff));
|
||||
background-image: linear-gradient(0deg, hsla(0, 0%, 100%, 0), #fff);
|
||||
top: 0
|
||||
}
|
||||
|
||||
.picker-cell__body:after {
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(hsla(0, 0%, 100%, 0)), to(#fff));
|
||||
background-image: linear-gradient(180deg, hsla(0, 0%, 100%, 0), #fff);
|
||||
bottom: 0
|
||||
}
|
||||
|
||||
.picker-single .picker-cell__body:after,
|
||||
.picker-single .picker-cell__body:before {
|
||||
display: none
|
||||
}
|
||||
|
||||
.picker-list {
|
||||
list-style: none;
|
||||
margin: -2rem 0;
|
||||
padding: 0;
|
||||
position: relative
|
||||
}
|
||||
|
||||
.picker-item {
|
||||
color: #999;
|
||||
color: var(--gray);
|
||||
padding: .25rem .5rem;
|
||||
text-align: center;
|
||||
white-space: nowrap
|
||||
}
|
||||
|
||||
.picker-picked {
|
||||
color: #0074d9;
|
||||
color: var(--blue);
|
||||
font-size: 1.125em;
|
||||
line-height: 1.5rem
|
||||
}
|
||||
|
||||
.picker-footer {
|
||||
border-top: 1px solid #eee;
|
||||
border-top: var(--border);
|
||||
display: none;
|
||||
width: 100%
|
||||
}
|
||||
|
||||
.picker-cancel,
|
||||
.picker-confirm {
|
||||
background-color: rgba(0, 0, 0, 0);
|
||||
border-width: 0;
|
||||
cursor: pointer;
|
||||
display: table-cell;
|
||||
font-size: 1rem;
|
||||
padding: .75rem 1rem;
|
||||
width: 50%
|
||||
}
|
||||
|
||||
.picker-cancel:focus,
|
||||
.picker-cancel:hover,
|
||||
.picker-confirm:focus,
|
||||
.picker-confirm:hover {
|
||||
background-color: #fcfcfc;
|
||||
outline: none
|
||||
}
|
||||
|
||||
.picker-confirm {
|
||||
color: #0074d9;
|
||||
color: var(--blue)
|
||||
}
|
||||
198
public/assets/css/mypage/slick-theme.css
Normal file
@ -0,0 +1,198 @@
|
||||
@charset 'UTF-8';
|
||||
|
||||
/* Slider */
|
||||
.slick-loading .slick-list {
|
||||
background: #fff url('./ajax-loader.gif') center center no-repeat;
|
||||
}
|
||||
|
||||
/* Icons */
|
||||
@font-face {
|
||||
font-family: 'slick';
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
|
||||
src: url('./fonts/slick.eot');
|
||||
src: url('./fonts/slick.eot?#iefix') format('embedded-opentype'), url('./fonts/slick.woff') format('woff'), url('./fonts/slick.ttf') format('truetype'), url('./fonts/slick.svg#slick') format('svg');
|
||||
}
|
||||
|
||||
/* Arrows */
|
||||
.slick-prev,
|
||||
.slick-next {
|
||||
font-size: 0;
|
||||
line-height: 0;
|
||||
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
|
||||
display: block;
|
||||
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
padding: 0;
|
||||
-webkit-transform: translate(0, -50%);
|
||||
-ms-transform: translate(0, -50%);
|
||||
transform: translate(0, -50%);
|
||||
|
||||
cursor: pointer;
|
||||
|
||||
color: transparent;
|
||||
border: none;
|
||||
outline: none;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.slick-prev:hover,
|
||||
.slick-prev:focus,
|
||||
.slick-next:hover,
|
||||
.slick-next:focus {
|
||||
color: transparent;
|
||||
outline: none;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.slick-prev:hover:before,
|
||||
.slick-prev:focus:before,
|
||||
.slick-next:hover:before,
|
||||
.slick-next:focus:before {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.slick-prev.slick-disabled:before,
|
||||
.slick-next.slick-disabled:before {
|
||||
opacity: .25;
|
||||
}
|
||||
|
||||
.slick-prev:before,
|
||||
.slick-next:before {
|
||||
font-family: 'slick';
|
||||
font-size: 20px;
|
||||
line-height: 1;
|
||||
|
||||
opacity: .75;
|
||||
color: white;
|
||||
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.slick-prev {
|
||||
left: -25px;
|
||||
}
|
||||
|
||||
[dir='rtl'] .slick-prev {
|
||||
right: -25px;
|
||||
left: auto;
|
||||
}
|
||||
|
||||
.slick-prev:before {
|
||||
content: '竊<>';
|
||||
}
|
||||
|
||||
[dir='rtl'] .slick-prev:before {
|
||||
content: '竊<>';
|
||||
}
|
||||
|
||||
.slick-next {
|
||||
right: -25px;
|
||||
}
|
||||
|
||||
[dir='rtl'] .slick-next {
|
||||
right: auto;
|
||||
left: -25px;
|
||||
}
|
||||
|
||||
.slick-next:before {
|
||||
content: '竊<>';
|
||||
}
|
||||
|
||||
[dir='rtl'] .slick-next:before {
|
||||
content: '竊<>';
|
||||
}
|
||||
|
||||
/* Dots */
|
||||
.slick-dotted.slick-slider {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.slick-dots {
|
||||
position: absolute;
|
||||
bottom: -25px;
|
||||
|
||||
display: block;
|
||||
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
|
||||
list-style: none;
|
||||
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.slick-dots li {
|
||||
position: relative;
|
||||
|
||||
display: inline-block;
|
||||
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
margin: 0 5px;
|
||||
padding: 0;
|
||||
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.slick-dots li button {
|
||||
font-size: 0;
|
||||
line-height: 0;
|
||||
|
||||
display: block;
|
||||
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
padding: 5px;
|
||||
|
||||
cursor: pointer;
|
||||
|
||||
color: transparent;
|
||||
border: 0;
|
||||
outline: none;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.slick-dots li button:hover,
|
||||
.slick-dots li button:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.slick-dots li button:hover:before,
|
||||
.slick-dots li button:focus:before {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.slick-dots li button:before {
|
||||
font-family: 'slick';
|
||||
font-size: 6px;
|
||||
line-height: 20px;
|
||||
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
|
||||
content: '窶「';
|
||||
text-align: center;
|
||||
|
||||
opacity: .25;
|
||||
color: black;
|
||||
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.slick-dots li.slick-active button:before {
|
||||
opacity: .75;
|
||||
color: black;
|
||||
}
|
||||
115
public/assets/css/mypage/slick.css
Normal file
@ -0,0 +1,115 @@
|
||||
/* Slider */
|
||||
.slick-slider {
|
||||
position: relative;
|
||||
|
||||
display: block;
|
||||
box-sizing: border-box;
|
||||
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
|
||||
-webkit-touch-callout: none;
|
||||
-khtml-user-select: none;
|
||||
-ms-touch-action: pan-y;
|
||||
touch-action: pan-y;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
|
||||
.slick-list {
|
||||
position: relative;
|
||||
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.slick-list:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.slick-list.dragging {
|
||||
cursor: pointer;
|
||||
cursor: hand;
|
||||
}
|
||||
|
||||
.slick-slider .slick-track,
|
||||
.slick-slider .slick-list {
|
||||
-webkit-transform: translate3d(0, 0, 0);
|
||||
-moz-transform: translate3d(0, 0, 0);
|
||||
-ms-transform: translate3d(0, 0, 0);
|
||||
-o-transform: translate3d(0, 0, 0);
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
||||
|
||||
.slick-track {
|
||||
position: relative;
|
||||
top: 0;
|
||||
left: 0;
|
||||
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.slick-track:before,
|
||||
.slick-track:after {
|
||||
display: table;
|
||||
|
||||
content: '';
|
||||
}
|
||||
|
||||
.slick-track:after {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.slick-loading .slick-track {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.slick-slide {
|
||||
display: none;
|
||||
float: left;
|
||||
|
||||
height: 100%;
|
||||
min-height: 1px;
|
||||
}
|
||||
|
||||
[dir='rtl'] .slick-slide {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.slick-slide img {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.slick-slide.slick-loading img {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.slick-slide.dragging img {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.slick-initialized .slick-slide {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.slick-loading .slick-slide {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.slick-vertical .slick-slide {
|
||||
display: block;
|
||||
|
||||
height: auto;
|
||||
|
||||
border: 1px solid transparent;
|
||||
}
|
||||
|
||||
.slick-arrow.slick-hidden {
|
||||
display: none;
|
||||
}
|
||||
1043
public/assets/css/mypage/style.css
Normal file
48
public/assets/css/mypage/tablesorter-blue.css
Normal file
@ -0,0 +1,48 @@
|
||||
/* tables */
|
||||
table.tablesorter {
|
||||
font-family: arial;
|
||||
background-color: #CDCDCD;
|
||||
margin: 10px 0pt 15px;
|
||||
font-size: 8pt;
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
table.tablesorter thead tr th,
|
||||
table.tablesorter tfoot tr th {
|
||||
background-color: #e6EEEE;
|
||||
border: 1px solid #FFF;
|
||||
font-size: 8pt;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
table.tablesorter thead tr .header {
|
||||
background-image: url(bg.gif);
|
||||
background-repeat: no-repeat;
|
||||
background-position: center right;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
table.tablesorter tbody td {
|
||||
color: #3D3D3D;
|
||||
padding: 4px;
|
||||
background-color: #FFF;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
table.tablesorter tbody tr.odd td {
|
||||
background-color: #F0F0F6;
|
||||
}
|
||||
|
||||
table.tablesorter thead tr .headerSortUp {
|
||||
background-image: url(asc.gif);
|
||||
}
|
||||
|
||||
table.tablesorter thead tr .headerSortDown {
|
||||
background-image: url(desc.gif);
|
||||
}
|
||||
|
||||
table.tablesorter thead tr .headerSortDown,
|
||||
table.tablesorter thead tr .headerSortUp {
|
||||
background-color: #8dbdd8;
|
||||
}
|
||||
BIN
public/assets/img/10740034_06_75_JP.gif
Normal file
|
After Width: | Height: | Size: 158 KiB |
BIN
public/assets/img/menu-aki.png
Normal file
|
After Width: | Height: | Size: 5.7 KiB |
BIN
public/assets/img/menu-help.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
public/assets/img/menu-kakunin.png
Normal file
|
After Width: | Height: | Size: 6.9 KiB |
BIN
public/assets/img/menu-koshin.png
Normal file
|
After Width: | Height: | Size: 5.9 KiB |
BIN
public/assets/img/menu-logout.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
public/assets/img/menu-loguin.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
public/assets/img/menu-rireki.png
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
public/assets/img/menu-sagasu.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
public/assets/img/menu-shinki.png
Normal file
|
After Width: | Height: | Size: 6.2 KiB |
BIN
public/assets/img/menu-teiki.png
Normal file
|
After Width: | Height: | Size: 5.0 KiB |
BIN
public/assets/img/menu-toroku.png
Normal file
|
After Width: | Height: | Size: 7.7 KiB |
BIN
public/assets/img/menu-tuuchi.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
public/assets/img/menu-user.png
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
BIN
public/assets/img/menu-yoyaku.png
Normal file
|
After Width: | Height: | Size: 6.8 KiB |
BIN
public/assets/img/so-rin_logo.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
72
public/footer.html
Normal file
@ -0,0 +1,72 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ja">
|
||||
|
||||
<head>
|
||||
<title>header</title>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="keywords" content="">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
<meta property="og:title" content="so-manager">
|
||||
<meta property="og:url" content="./index.html">
|
||||
<meta property="og:image" content="./assets/img/so-rin_logo.png">
|
||||
<meta property="og:site_name" content="so-manager">
|
||||
<meta property="og:description" content="">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<link rel="alternate" media="handheld" href="./index.html">
|
||||
<link rel="alternate" media="only screen and (max-width: 768px)" href="./index.html">
|
||||
<link rel="icon" href="./favicon.ico">
|
||||
<link href="assets/css/mypage/app.css" rel="stylesheet">
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/typicons/2.0.9/typicons.css" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/earlyaccess/roundedmplus1c.css" rel="stylesheet">
|
||||
<link href="assets/css/mypage/slick.css" rel="stylesheet">
|
||||
<link href="assets/css/mypage/slick-theme.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="assets/css/mypage/font-awesome.min.css">
|
||||
<link href="assets/css/mypage/bootstrap.min.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="assets/css/mypage/all.css">
|
||||
<link rel="stylesheet" href="assets/css/mypage/picker.min.css">
|
||||
<link rel="stylesheet" href="assets/css/mypage/tablesorter-blue.css" type="text/css"
|
||||
media="print, projection, screen">
|
||||
<link href="assets/css/mypage/style.css" rel="stylesheet">
|
||||
<link href="assets/css/mypage/jquery-confirm.min.css" rel="stylesheet">
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/typicons/2.0.9/typicons.css" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/earlyaccess/roundedmplus1c.css" rel="stylesheet" />
|
||||
<link href="./bootstrap/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="./assets/css/style.css" rel="stylesheet">
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com/">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com/" crossorigin="">
|
||||
<script src="./assets/js/ie-emulation-modes-warning.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<footer class="jumbotron">
|
||||
<section class="container">
|
||||
<div class="row">
|
||||
<div class="col-12 text-center">
|
||||
<ul class="footer-nav-menu">
|
||||
<li><a href="./summary.html" target="_parent">運営会社</a></li>
|
||||
<li><a href="./privacy.html" target="_parent">個人情報保護方針</a></li>
|
||||
<li class="pc"><a href="./tokusyo.html" target="_parent">特定商取引法に基づく表示</a></li>
|
||||
<li class="w-100 sp"><a href="./tokusyo.html" target="_parent">特定商取引法に基づく表示</a></li>
|
||||
<li><a href="./riyokiyaku.html" target="_parent">ウェブサイト利用規約</a></li>
|
||||
<li><a href="./sitemap.html" target="_parent">サイトマップ</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-12 col-md-10 offset-0 offset-md-1 text-lg-center">
|
||||
<p class="small text-secondary mt20">
|
||||
株式会社ソーリン <br class="sp">
|
||||
〒121-0073 東京都足立区六町4-12-25 <br class="sp">
|
||||
tel:03-5856-4720(毎日12時~22時)<br>
|
||||
</p>
|
||||
<p class="small text-secondary">
|
||||
Copyright© so-rin Co.,Ltd. All Rights Reserved.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<figure class="p-mark"><img width="75" src="./assets/img/10740034_06_75_JP.gif" alt="Pマーク" /></figure>
|
||||
</footer>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
BIN
public/images/hanko.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
public/images/reissue.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
87
public/news.html
Normal file
@ -0,0 +1,87 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ja">
|
||||
|
||||
<head>
|
||||
<title>header</title>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="keywords" content="">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
<meta property="og:title" content="so-manager">
|
||||
<meta property="og:url" content="./index.html">
|
||||
<meta property="og:image" content="./assets/img/so-rin_logo.png">
|
||||
<meta property="og:site_name" content="so-manager">
|
||||
<meta property="og:description" content="">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<link rel="alternate" media="handheld" href="../index.html">
|
||||
<link rel="alternate" media="only screen and (max-width: 768px)" href="../index.html">
|
||||
<link rel="icon" href="../favicon.ico">
|
||||
<link href="assets/css/mypage/app.css" rel="stylesheet">
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/typicons/2.0.9/typicons.css" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/earlyaccess/roundedmplus1c.css" rel="stylesheet">
|
||||
<link href="assets/css/mypage/slick.css" rel="stylesheet">
|
||||
<link href="assets/css/mypage/slick-theme.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="assets/css/mypage/font-awesome.min.css">
|
||||
<link href="assets/css/mypage/bootstrap.min.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="assets/css/mypage/all.css">
|
||||
<link rel="stylesheet" href="assets/css/mypage/picker.min.css">
|
||||
<link rel="stylesheet" href="assets/css/mypage/tablesorter-blue.css" type="text/css"
|
||||
media="print, projection, screen">
|
||||
<link href="assets/css/mypage/style.css" rel="stylesheet">
|
||||
<link href="assets/css/mypage/jquery-confirm.min.css" rel="stylesheet">
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/typicons/2.0.9/typicons.css" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/earlyaccess/roundedmplus1c.css" rel="stylesheet" />
|
||||
<link href="../bootstrap/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="../assets/css/style.css" rel="stylesheet">
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com/">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com/" crossorigin="">
|
||||
<script src="../assets/js/ie-emulation-modes-warning.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- ▼ 新着情報 ▼ -->
|
||||
<section id="main-news" class="jumbotron">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<h2 class="col-12 text-center">新着情報</h2>
|
||||
<div class="col-12 col-md-10 offset-0 offset-md-1">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>2025.07.16</th>
|
||||
<th><span class="small alert alert-success">NEWS</span></th>
|
||||
<td><a href="../news/1.html" target="_parent">【センターまちや駐輪場をご利用のお客様へ】</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>2025.04.17</th>
|
||||
<th><span class="small alert alert-success">NEWS</span></th>
|
||||
<td><a href="../news/2.html" target="_parent">※重要※【サーバーメンテナンスによるシステム停止時間について】</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>2025.02.10</th>
|
||||
<th><span class="small alert alert-success">NEWS</span></th>
|
||||
<td><a href="../news/3.html"
|
||||
target="_parent">4月より料金区分が変わる契約者様は手続きが必要です。新しい区分が確認出来る身分証明書をご用意の上サポートセンターまでお問い合わせをお願い致します。So-Managerサポートセンター</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>2024.12.25</th>
|
||||
<th><span class="small alert alert-success">NEWS</span></th>
|
||||
<td><a href="../news/4.html" target="_parent">十条駅西口自転車駐車場新設のお知らせ</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>2024.12.20</th>
|
||||
<th><span class="small alert alert-success">NEWS</span></th>
|
||||
<td><a href="../news/5.html" target="_parent">亀有西、亀有東自転車駐車場終了のお知らせ</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- ▲ 新着情報 ▲ -->
|
||||
</body>
|
||||
|
||||
</html>
|
||||
BIN
resources/fonts/NotoSansJP-Bold.ttf
Normal file
BIN
resources/fonts/NotoSansJP-Regular.ttf
Normal file
10
resources/views/emails/user_edit_verify.blade.php
Normal file
@ -0,0 +1,10 @@
|
||||
{!! nl2br(e(
|
||||
$user->user_name . ' 様
|
||||
|
||||
ユーザー情報変更を変更する
|
||||
|
||||
' . $verifyUrl . '
|
||||
→URLをクリックすると変更が完了します。
|
||||
|
||||
※このURLの有効期限は、24時間です。'
|
||||
)) !!}
|
||||
22
resources/views/emails/withdraw_complete.blade.php
Normal file
@ -0,0 +1,22 @@
|
||||
{!! nl2br(e(
|
||||
$user_name . ' 様
|
||||
|
||||
「So-Manager」をご利用いただきましてありがとうございます。
|
||||
お客様の退会手続きを受付けました。
|
||||
ご利用ありがとうございました。
|
||||
|
||||
■ユーザー名
|
||||
' . $user_primemail . '
|
||||
|
||||
退会日:' . $user_quitday . '
|
||||
|
||||
今度ともSo-Managerを宜しくお願い致します。
|
||||
|
||||
■お問合せ先■
|
||||
So-Managerコールセンター(ソーマネージャーコールセンター)
|
||||
●電話:03-5856-4720
|
||||
●メールでのお問合せ(専用フォームよりお問合わせください)
|
||||
|
||||
※本メールアドレスは送信専用です。ご返信には回答致しかねますのでご了承ください。
|
||||
※本メールにお心あたりのない場合には、コールセンターまでご連絡くださいますようお願い致します。'
|
||||
)) !!}
|
||||
54
resources/views/layouts/app.blade.php
Normal file
@ -0,0 +1,54 @@
|
||||
<!doctype html>
|
||||
<html lang="ja">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<title>@yield('title', 'So-Manager')</title>
|
||||
<link href="{{ asset('assets/css/mypage/app.css') }}" rel="stylesheet">
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/typicons/2.0.9/typicons.css" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/earlyaccess/roundedmplus1c.css" rel="stylesheet">
|
||||
<link href="{{ asset('assets/css/mypage/slick.css') }}" rel="stylesheet">
|
||||
<link href="{{ asset('assets/css/mypage/slick-theme.css') }}" rel="stylesheet">
|
||||
<link rel="stylesheet" href="{{ asset('assets/css/mypage/font-awesome.min.css') }}">
|
||||
<link href="{{ asset('assets/css/mypage/bootstrap.min.css') }}" rel="stylesheet">
|
||||
<link rel="stylesheet" href="{{ asset('assets/css/mypage/all.css') }}">
|
||||
<link rel="stylesheet" href="{{ asset('assets/css/mypage/picker.min.css') }}">
|
||||
<link rel="stylesheet" href="{{ asset('assets/css/mypage/tablesorter-blue.css') }}" type="text/css" media="print, projection, screen">
|
||||
<link href="{{ asset('assets/css/mypage/style.css') }}" rel="stylesheet">
|
||||
<link href="{{ asset('assets/css/mypage/jquery-confirm.min.css') }}" rel="stylesheet">
|
||||
@yield('head')
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="font-scale" class="my-page">
|
||||
{{-- ヘッダー --}}
|
||||
@include('partials.mypage_header')
|
||||
{{-- メニュー(active_menuを渡す) --}}
|
||||
@include('partials.mypage_menu', ['active_menu' => $active_menu ?? ''])
|
||||
<main>
|
||||
@yield('content')
|
||||
</main>
|
||||
{{-- フッターメニュー --}}
|
||||
@include('partials.mypagefootermenu')
|
||||
{{-- ニュース・フッターiframe --}}
|
||||
<iframe src="{{ asset('news.html') }}" width="100%" height="450" scrolling="no" style="border:none; display:block; margin:0; padding:0;"></iframe>
|
||||
<iframe src="{{ asset('footer.html') }}" width="100%" height="200" style="border:none; display:block; margin:0; padding:0;"></iframe>
|
||||
</div>
|
||||
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" crossorigin="anonymous"></script>
|
||||
<script>
|
||||
window.jQuery || document.write('<script src="{{ asset('
|
||||
assets / js / vendor / jquery.min.js ') }}"><\/script>')
|
||||
</script>
|
||||
<script src="{{ asset('assets/js/vendor/popper.min.js') }}"></script>
|
||||
<script src="{{ asset('bootstrap/js/bootstrap.min.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/ie10-viewport-bug-workaround.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/commons.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/vendor/slick/slick.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/vendor/jquery.tablesorter/jquery.tablesorter.min.js') }}" type="text/javascript"></script>
|
||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js"></script>
|
||||
@yield('scripts')
|
||||
</body>
|
||||
|
||||
</html>
|
||||
28
resources/views/partials/mypage_header.blade.php
Normal file
@ -0,0 +1,28 @@
|
||||
@php
|
||||
// コントローラーから $user_name を渡してください
|
||||
if (!isset($user_name)) $user_name = '';
|
||||
@endphp
|
||||
<header id="top" class="bg-light">
|
||||
<div class="container pt10">
|
||||
<div class="row mt10 mb10">
|
||||
<div class="col-5 col-lg-4">
|
||||
<a id="site-logo" class="navbar-brand" href="{{ url('../index.html') }}">
|
||||
<img src="{{ asset('assets/img/so-rin_logo.png') }}" alt="logo" />
|
||||
<h1>
|
||||
<span class="small pc">駐車場・駐輪場総合サポートの株式会社ソーリン<br></span>
|
||||
So-Manager
|
||||
</h1>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-6 col-lg-4 ml-auto tl-btn-area">
|
||||
<a href="{{ url('SWO-4-1.html') }}" class="" id="login-btn">
|
||||
<span class="small d-none d-xl-inline">ようこそ</span>{{ $user_name }}さん
|
||||
</a>
|
||||
<a href="{{ url('../index.html') }}" class="btn btn-outline-secondary badge-pill pc" id="sub-btn">ログアウト</a>
|
||||
<a class="d-lg-none h2" data-toggle="collapse" data-target="#collapseExample" aria-expanded="false" aria-controls="collapseExample" href="#collapseExample" id="nav-menu-btn">
|
||||
<span class="typcn typcn-th-menu"></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
23
resources/views/partials/mypage_menu.blade.php
Normal file
@ -0,0 +1,23 @@
|
||||
@php
|
||||
if (!isset($active_menu)) $active_menu = '';
|
||||
@endphp
|
||||
<section id="my-menu" class="bg-success">
|
||||
<div class="container-fluid">
|
||||
<nav class="navbar navbar-expand-lg navbar-dark">
|
||||
<a id="my-menu-btn" class="navbar-toggler text-center" href="#navbarSupportedContent" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"> マイメニューを開く </a>
|
||||
<div class="collapse navbar-collapse justify-content-around" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav">
|
||||
<li class="nav-item {{ $active_menu == 'SWO-4-1' ? 'active' : '' }}"><a class="nav-link" href="{{ url('SWO-4-1.html') }}">マイページトップ<span class="sr-only">(current)</span></a></li>
|
||||
<li class="nav-item {{ $active_menu == 'SWC-1-1' ? 'active' : '' }}"><a class="nav-link" href="{{ url('/user/info') }}">ユーザー情報確認</a></li>
|
||||
<li class="nav-item {{ $active_menu == 'SWC-3-1' ? 'active' : '' }}"><a class="nav-link" href="{{ url('/regular_contract/info') }}">定期契約情報</a></li>
|
||||
<li class="nav-item {{ $active_menu == 'SWC-4-1' ? 'active' : '' }}"><a class="nav-link" href="{{ url('SWC-4-1.html') }}">契約更新</a></li>
|
||||
<li class="nav-item {{ $active_menu == 'SWC-6-1' ? 'active' : '' }}"><a class="nav-link" href="{{ url('SWC-6-1.html') }}">契約履歴</a></li>
|
||||
<li class="nav-item {{ $active_menu == 'SWC-8-1' ? 'active' : '' }}"><a class="nav-link" href="{{ url('SWC-8-1.html') }}">新規定期契約</a></li>
|
||||
<li class="nav-item {{ $active_menu == 'SWC-11-1' ? 'active' : '' }}"><a class="nav-link" href="{{ url('SWC-11-1.html') }}">空き待ち状況確認</a></li>
|
||||
<li class="nav-item {{ $active_menu == 'SWC-10-1' ? 'active' : '' }}"><a class="nav-link" href="{{ url('SWC-10-1.html') }}">駐輪場検索</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="{{ url('../howto.html') }}" target="_blank">このページの使い方</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
</section>
|
||||
85
resources/views/partials/mypagefootermenu.blade.php
Normal file
@ -0,0 +1,85 @@
|
||||
<section id="" class="container">
|
||||
<nav class="row d-flex">
|
||||
<div class="col-6 col-md-2 mb20">
|
||||
<div class="card text-center border-success">
|
||||
<a href="{{ url('user/info') }}" target="_top">
|
||||
<figure><img src="{{ asset('assets/img/menu-user.png') }}" alt="" class="w-75 mt10"></figure>
|
||||
<p class="text-success">ユーザー情報の<br>確認</p>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 col-md-2 mb20">
|
||||
<div class="card text-center border-success">
|
||||
<a href="{{ url('regular_contract/info') }}" target="_top">
|
||||
<figure><img src="{{ asset('assets/img/menu-teiki.png') }}" alt="" class="w-75 mt10"></figure>
|
||||
<p class="text-success">定期契約情報を<br>確認する</p>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 col-md-2 mb20">
|
||||
<div class="card text-center border-success">
|
||||
<a href="{{ url('SWC-4-1.html') }}" target="_top">
|
||||
<figure><img src="{{ asset('assets/img/menu-koshin.png') }}" alt="" class="w-75 mt10"></figure>
|
||||
<p class="text-success">定期契約を<br>更新する</p>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 col-md-2 mb20">
|
||||
<div class="card text-center border-success">
|
||||
<a href="{{ url('SWC-6-1.html') }}" target="_top">
|
||||
<figure><img src="{{ asset('assets/img/menu-rireki.png') }}" alt="" class="w-75 mt10"></figure>
|
||||
<p class="text-success">定期契約履歴を<br>見る</p>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 col-md-2 mb20">
|
||||
<div class="card text-center border-success">
|
||||
<a href="{{ url('SWC-8-1.html') }}" target="_top">
|
||||
<figure><img src="{{ asset('assets/img/menu-shinki.png') }}" alt="" class="w-75 mt10"></figure>
|
||||
<p class="text-success">新規定期契約<br>申し込み</p>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 col-md-2 mb20">
|
||||
<div class="card text-center border-success">
|
||||
<a href="{{ url('SWC-10-1.html') }}" target="_top">
|
||||
<figure><img src="{{ asset('assets/img/menu-aki.png') }}" alt="" class="w-75 mt10"></figure>
|
||||
<p class="text-success">駐輪場検索</p><br>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 col-md-2 mb20">
|
||||
<div class="card text-center border-success">
|
||||
<a href="{{ url('SWC-15-1.html') }}" target="_top">
|
||||
<figure><img src="{{ asset('assets/img/menu-tuuchi.png') }}" alt="" class="w-75 mt10"></figure>
|
||||
<p class="text-success">お知らせ一覧</p>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 col-md-2 mb20">
|
||||
<div class="card text-center border-success">
|
||||
<a href="{{ url('SWC-11-1.html') }}" target="_top">
|
||||
<figure><img src="{{ asset('assets/img/menu-yoyaku.png') }}" alt="" class="w-75 mt10"></figure>
|
||||
<p class="text-success">空き待ち状況の確認</p>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 col-md-2 mb20">
|
||||
<div class="card text-center border-success">
|
||||
<a href="{{ url('../index.html') }}" target="_top">
|
||||
<figure><img src="{{ asset('assets/img/menu-logout.png') }}" alt="" class="w-75 mt10"></figure>
|
||||
<p class="text-success">ログアウト</p>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 col-md-2 mb20">
|
||||
<div class="card text-center border-success">
|
||||
<a href="{{ url('../howto.html') }}" target="_blank">
|
||||
<figure><img src="{{ asset('assets/img/menu-help.png') }}" alt="" class="w-75 mt10"></figure>
|
||||
<p class="text-success">このページの使い方</p>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</section>
|
||||
<!-- ▲ マイページフッターメニュー:マイページの時のみ表示 ▲ -->
|
||||
35
resources/views/receipt/input.blade.php
Normal file
@ -0,0 +1,35 @@
|
||||
@extends('layouts.app')
|
||||
@section('content')
|
||||
<main>
|
||||
<header class="alert alert-success">
|
||||
<h4 class="container">領収書の発行</h4>
|
||||
</header>
|
||||
@if($errors->has('contract_id'))
|
||||
<div class="alert alert-danger text-center">
|
||||
{{ $errors->first('contract_id') }}
|
||||
</div>
|
||||
@endif
|
||||
<form method="POST" action="{{ url('receipt/issue/' . $contract_id) }}">
|
||||
@csrf
|
||||
<div class="col-12 col-md-5 offset-0 offset-md-1 mt10 mb50">
|
||||
<p class="text-left font-weight-bold">領収書内容の入力</p>
|
||||
<p class="text-left">領収書の宛名を入力してください。</p>
|
||||
<input type="text" class="form-control" id="receipt_name" name="receipt_name" required>
|
||||
<div class="mt-2">
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="radio" name="keisho" id="keisho_sama" value="様" checked>
|
||||
<label class="form-check-label" for="keisho_sama">様</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="radio" name="keisho" id="keisho_onchu" value="御中">
|
||||
<label class="form-check-label" for="keisho_onchu">御中</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 offset-3 text-left">
|
||||
<button type="submit" class="btn btn-success">発行する</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</main>
|
||||
@endsection
|
||||
132
resources/views/receipt/pdf.blade.php
Normal file
@ -0,0 +1,132 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ja">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<style>
|
||||
body {
|
||||
font-family: 'noto_sans_jp';
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.border {
|
||||
border: 2px solid #222;
|
||||
margin: 0;
|
||||
padding: 24px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.title {
|
||||
text-align: center;
|
||||
margin: 24px 0 12px 0;
|
||||
}
|
||||
|
||||
.right {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin: 16px 0;
|
||||
}
|
||||
|
||||
.table th,
|
||||
.table td {
|
||||
border: 1px solid #222;
|
||||
padding: 6px 8px;
|
||||
}
|
||||
|
||||
.table td.left {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.table td.right {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.stamp {
|
||||
float: right;
|
||||
margin-top: 8px;
|
||||
width: 80px;
|
||||
}
|
||||
|
||||
.company {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.reissue {
|
||||
position: absolute;
|
||||
top: 16px;
|
||||
left: 16px;
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="border">
|
||||
@if($is_reissue)
|
||||
<img src="{{ str_replace('\\', '/', public_path('images/reissue.png')) }}" class="reissue" alt="再発行">
|
||||
@endif
|
||||
<div class="right">
|
||||
No. {{ $inv->seq ?? '' }}<br>
|
||||
発行日: {{ !empty($inv->published_at) ? \Carbon\Carbon::parse($inv->published_at)->format('Y年m月d日') : '' }}
|
||||
</div>
|
||||
<div class="title" style="font-size:20px; font-weight:bold;">領収証</div>
|
||||
<div>ID: {{ $contract->contract_id ?? '' }}</div>
|
||||
<div><span style="border-bottom:1px solid #222;">{{ $inv->inv_name ?? '' }}</span></div>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<td class="left">契約駐輪場名</td>
|
||||
<td class="right">{{ $park_name ?? '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="left">小計(10%対象)</td>
|
||||
<td class="right">
|
||||
{{ isset($contract->contract_money) ? number_format(floor($contract->contract_money / 1.1)) : '' }} 円
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="left">消費税額(10%)</td>
|
||||
<td class="right">
|
||||
{{ isset($contract->contract_money) ? number_format($contract->contract_money - floor($contract->contract_money / 1.1)) : '' }} 円
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="left">合計</td>
|
||||
<td class="right">{{ number_format($contract->contract_money ?? 0) }} 円</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div>
|
||||
但し、<span style="border-bottom:1px solid #222;">駐輪場利用料(
|
||||
{{ !empty($contract->contract_periods) ? \Carbon\Carbon::parse($contract->contract_periods)->format('Y年m月d日') : '' }}
|
||||
~
|
||||
{{ !empty($contract->contract_periode) ? \Carbon\Carbon::parse($contract->contract_periode)->format('Y年m月d日') : '' }}
|
||||
)</span>として<br>
|
||||
上記金額を正に領収いたしました。
|
||||
</div>
|
||||
<table style="width:100%; margin-top:40px;">
|
||||
<tr>
|
||||
<td style="width:55%"></td>
|
||||
<td>
|
||||
<div class="company">
|
||||
<span style="font-size:20px; font-weight:bold;">株式会社ソーリン</span><br>
|
||||
〒121-0073<br>
|
||||
東京都足立区六町四丁目12-25<br>
|
||||
適格事業者番号:{{ $t_number }}<br>
|
||||
TEL:03-5856-4647<br>
|
||||
FAX:03-5856-4648<br>
|
||||
</div>
|
||||
</td>
|
||||
<td><img src="{{ str_replace('\\', '/', public_path('images/hanko.png')) }}" class="stamp"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
290
resources/views/regular_contract/info.blade.php
Normal file
@ -0,0 +1,290 @@
|
||||
@extends('layouts.app')
|
||||
@section('content')
|
||||
@php
|
||||
function safeCarbonFromDDHM($dd, $hm = '00:00') {
|
||||
$now = \Carbon\Carbon::now();
|
||||
if (!$dd || !preg_match('/^\d{1,2}$/', $dd)) return null;
|
||||
if (!$hm || !preg_match('/^\d{2}:\d{2}$/', $hm)) $hm = '00:00';
|
||||
$date = $now->format('Y-m-') . str_pad($dd, 2, '0', STR_PAD_LEFT);
|
||||
$time = $hm . ':00';
|
||||
try {
|
||||
return \Carbon\Carbon::createFromFormat('Y-m-d H:i:s', $date . ' ' . $time);
|
||||
} catch (Exception $e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@endphp
|
||||
<main>
|
||||
<header class="alert alert-success">
|
||||
<h4 class="container">定期契約情報 > 定期契約情報を確認する</h4>
|
||||
</header>
|
||||
<section class="container mt30 mb50">
|
||||
@if(count($contracts) > 0)
|
||||
@foreach($contracts as $i => $contract)
|
||||
@if($i % 2 == 0)
|
||||
<div class="row">
|
||||
@endif
|
||||
<article class="col-12 col-lg-6 mb20">
|
||||
@php
|
||||
$now = \Carbon\Carbon::now();
|
||||
$update_flag = $contract->contract_renewal;
|
||||
$start_dd = $contract->update_grace_period_start_date;
|
||||
$start_hm = $contract->update_grace_period_start_time;
|
||||
$end_dd = $contract->update_grace_period_end_date;
|
||||
$end_hm = $contract->update_grace_period_end_time;
|
||||
$contract_end_dt = $contract->contract_periode ? \Carbon\Carbon::parse($contract->contract_periode) : null;
|
||||
$periode_month = $contract_end_dt ? $contract_end_dt->month : null;
|
||||
$periode_year = $contract_end_dt ? $contract_end_dt->year : null;
|
||||
$bg = 'alert-warning';
|
||||
$btn_text = '更新する';
|
||||
$btn_active = true;
|
||||
|
||||
// 契約終了月以外は「ご契約中」
|
||||
if ($periode_month && $periode_year && ($now->month != $periode_month || $now->year != $periode_year)) {
|
||||
$bg = 'bg-white';
|
||||
$btn_text = 'ご契約中';
|
||||
$btn_active = false;
|
||||
} else {
|
||||
// 猶予期間のCarbon生成
|
||||
if (is_numeric($start_dd) && is_numeric($end_dd)) {
|
||||
// 開始日
|
||||
$start_date = $contract_end_dt->format('Y-m-') . str_pad($start_dd, 2, '0', STR_PAD_LEFT);
|
||||
$start_time = ($start_hm && preg_match('/^\d{2}:\d{2}$/', $start_hm)) ? $start_hm : '00:00';
|
||||
$start_dt = \Carbon\Carbon::createFromFormat('Y-m-d H:i:s', $start_date . ' ' . $start_time . ':00');
|
||||
// 終了日
|
||||
if ($start_dd < $end_dd) {
|
||||
// 終了月も契約終了月
|
||||
$end_date=$contract_end_dt->format('Y-m-') . str_pad($end_dd, 2, '0', STR_PAD_LEFT);
|
||||
$end_time = ($end_hm && preg_match('/^\d{2}:\d{2}$/', $end_hm)) ? $end_hm : '23:59';
|
||||
$end_dt = \Carbon\Carbon::createFromFormat('Y-m-d H:i:s', $end_date . ' ' . $end_time . ':00');
|
||||
} else {
|
||||
// 終了日は契約終了月の翌月
|
||||
$next_month_dt = $contract_end_dt->copy()->addMonth();
|
||||
$end_date = $next_month_dt->format('Y-m-') . str_pad($end_dd, 2, '0', STR_PAD_LEFT);
|
||||
$end_time = ($end_hm && preg_match('/^\d{2}:\d{2}$/', $end_hm)) ? $end_hm : '23:59';
|
||||
$end_dt = \Carbon\Carbon::createFromFormat('Y-m-d H:i:s', $end_date . ' ' . $end_time . ':00');
|
||||
}
|
||||
} else {
|
||||
$start_dt = null;
|
||||
$end_dt = null;
|
||||
}
|
||||
// 以降は既存のボタン・背景色判定ロジック
|
||||
if ($update_flag===0) {
|
||||
$bg='bg-white';
|
||||
$btn_text='手続き中';
|
||||
$btn_active=false;
|
||||
}
|
||||
elseif ($update_flag===1) {
|
||||
$bg='bg-white';
|
||||
$btn_text='更新済';
|
||||
$btn_active=false;
|
||||
}
|
||||
elseif (!is_null($end_dt) && $end_dt->gt($start_dt)) {
|
||||
if ($start_dt && $now->lt($start_dt)) {
|
||||
$bg = 'bg-white';
|
||||
$btn_text = 'ご契約中';
|
||||
$btn_active = false;
|
||||
} else {
|
||||
// 契約終了日を過ぎていて、更新可能期間内は赤背景
|
||||
if ($contract_end_dt && $now->gt($contract_end_dt) && $start_dt && $end_dt && $now->between($start_dt, $end_dt)) {
|
||||
$bg = 'alert-danger';
|
||||
$btn_text = '更新する';
|
||||
$btn_active = true;
|
||||
} else {
|
||||
$bg = 'alert-warning';
|
||||
$btn_text = '更新する';
|
||||
$btn_active = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif ($start_dt && $start_dt->gt($end_dt)) {
|
||||
if ($now->lt($start_dt)) {
|
||||
$bg = 'bg-white';
|
||||
$btn_text = 'ご契約中';
|
||||
$btn_active = false;
|
||||
} elseif ($now->gte($start_dt) && $now->lte($contract_end_dt->copy()->endOfMonth())) {
|
||||
$bg = 'alert-warning';
|
||||
$btn_text = '更新する';
|
||||
$btn_active = true;
|
||||
} else {
|
||||
$bg = 'alert-danger';
|
||||
$btn_text = '更新する';
|
||||
$btn_active = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@endphp
|
||||
@endphp
|
||||
@if($bg == 'bg-white')
|
||||
<div class="card border-success">
|
||||
@elseif($bg == 'alert-warning')
|
||||
<div class="card alert-warning">
|
||||
@elseif($bg == 'alert-danger')
|
||||
<div class="card alert-danger">
|
||||
@else
|
||||
<div class="card">
|
||||
@endif
|
||||
<style>
|
||||
.table.text-center {
|
||||
border-radius: 0.25rem !important;
|
||||
border-collapse: separate !important;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.btn-outline-secondary.badge-pill.custom-rounded-btn[disabled],
|
||||
.btn-outline-secondary.badge-pill.custom-rounded-btn.disabled {
|
||||
pointer-events: none;
|
||||
cursor: default !important;
|
||||
background: #fff !important;
|
||||
color: #6c757d !important;
|
||||
border-color: #6c757d !important;
|
||||
opacity: 1 !important;
|
||||
}
|
||||
|
||||
.btn-outline-secondary.badge-pill.custom-rounded-btn:not([disabled]):hover,
|
||||
.btn-outline-secondary.badge-pill.custom-rounded-btn:not(.disabled):hover {
|
||||
color: #212529 !important;
|
||||
}
|
||||
|
||||
.border-warning {
|
||||
border: 1px solid #ffc107 !important;
|
||||
}
|
||||
|
||||
.border-white {
|
||||
border: 1px solid #fff !important;
|
||||
}
|
||||
|
||||
.border-danger {
|
||||
border: 1px solid #dc3545 !important;
|
||||
}
|
||||
|
||||
.table-no-margin {
|
||||
margin-bottom: 0 !important;
|
||||
padding-bottom: 0 !important;
|
||||
}
|
||||
</style>
|
||||
<table class="table text-center table-no-margin {{ $bg }}
|
||||
@if($bg == 'alert-warning') border-warning
|
||||
@elseif($bg == 'bg-white') border-white
|
||||
@elseif($bg == 'alert-danger') border-danger
|
||||
@endif">
|
||||
<tr>
|
||||
<th>定期契約ID</th>
|
||||
<td>{{ $contract->contract_id }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>駐輪場名</th>
|
||||
<td>{{ $contract->park_name }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>利用者区分</th>
|
||||
<td>{{ $contract->usertype_subject1 }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>車種</th>
|
||||
<td>{{ $contract->psection_subject ?? '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>階数</th>
|
||||
<td>{{ $contract->ptype_subject ?? '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>車室番号</th>
|
||||
<td>{{ $contract->pplace_no ?? '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>利用開始日</th>
|
||||
<td>{{ \Carbon\Carbon::parse($contract->contract_periods)->format('Y/m/d') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>契約月数</th>
|
||||
<td>{{ $contract->enable_months }}ヶ月</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="text-center">
|
||||
<div style="display: flex; flex-direction: column; align-items: center;">
|
||||
<div style="display: flex; gap: 6px; margin-bottom: 12px;">
|
||||
@if($bg == 'alert-warning' && $btn_active)
|
||||
<a href="{{ url('regular_contract/update/' . $contract->contract_id) }}" class="btn btn-warning badge-pill custom-rounded-btn">{{ $btn_text }}</a>
|
||||
@elseif($bg == 'alert-danger' && $btn_active)
|
||||
<a href="{{ url('regular_contract/update/' . $contract->contract_id) }}" class="btn btn-danger badge-pill custom-rounded-btn">{{ $btn_text }}</a>
|
||||
@else
|
||||
<button type="button" class="btn btn-outline-secondary badge-pill custom-rounded-btn" disabled>{{ $btn_text }}</button>
|
||||
@endif
|
||||
@if($bg == 'alert-warning')
|
||||
<button type="button" id="cancelModalBtn" class="btn btn-outline-warning badge-pill custom-rounded-btn" style="background: transparent;" data-bs-toggle="modal" data-bs-target="#cancelModal">解約について</button>
|
||||
@elseif($bg == 'alert-danger')
|
||||
<button type="button" id="cancelModalBtn" class="btn btn-outline-danger badge-pill custom-rounded-btn" style="background: transparent;" data-bs-toggle="modal" data-bs-target="#cancelModal">解約について</button>
|
||||
@else
|
||||
<button type="button" id="cancelModalBtn" class="btn btn-outline-secondary badge-pill custom-rounded-btn" style="background: transparent;" data-bs-toggle="modal" data-bs-target="#cancelModal">解約について</button>
|
||||
@endif
|
||||
</div>
|
||||
@php
|
||||
$has_receipt = DB::table('inv_publish')->where('contract_id', $contract->contract_id)->exists();
|
||||
@endphp
|
||||
@if($has_receipt)
|
||||
@if($bg == 'alert-warning')
|
||||
<a href="{{ url('receipt/download/' . $contract->contract_id) }}" class="btn btn-outline-warning badge-pill custom-rounded-btn" style="background: transparent;">領収書再発行</a>
|
||||
@elseif($bg == 'alert-danger')
|
||||
<a href="{{ url('receipt/download/' . $contract->contract_id) }}" class="btn btn-outline-danger badge-pill custom-rounded-btn" style="background: transparent;">領収書再発行</a>
|
||||
@else
|
||||
<a href="{{ url('receipt/download/' . $contract->contract_id) }}" class="btn btn-outline-secondary badge-pill custom-rounded-btn" style="background: transparent;">領収書再発行</a>
|
||||
@endif
|
||||
@else
|
||||
@if($bg == 'alert-warning')
|
||||
<a href="{{ url('receipt/input/' . $contract->contract_id) }}" class="btn btn-outline-warning badge-pill custom-rounded-btn" style="background: transparent;">領収書発行</a>
|
||||
@elseif($bg == 'alert-danger')
|
||||
<a href="{{ url('receipt/input/' . $contract->contract_id) }}" class="btn btn-outline-danger badge-pill custom-rounded-btn" style="background: transparent;">領収書発行</a>
|
||||
@else
|
||||
<a href="{{ url('receipt/input/' . $contract->contract_id) }}" class="btn btn-outline-secondary badge-pill custom-rounded-btn" style="background: transparent;">領収書発行</a>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</article>
|
||||
@if($i % 2 == 1 || $i == count($contracts) - 1)
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
@else
|
||||
<div class="col-12 col-lg-12 mb20">
|
||||
<p>定期契約情報はありません。</p>
|
||||
</div>
|
||||
@endif
|
||||
{{-- modal moved to end of file to avoid clipping issues --}}
|
||||
<form class="row form">
|
||||
<div class="col-12 col-md-4 offset-0 offset-md-4 mt50 mb50">
|
||||
<a href="{{ url('mypage') }}" class="btn btn-lg btn-block btn-outline-success">マイページへ戻る</a>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
@endsection
|
||||
<!-- 解約についてモーダル -->
|
||||
<div class="modal fade" id="cancelModal" tabindex="-1" aria-labelledby="cancelModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-body">
|
||||
解約の手続きにつきましては、下記コールセンターへお問い合わせください。<br>So-Managerコールセンター<br>03-5856-4720
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">閉じる</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<style>
|
||||
.custom-rounded-btn {
|
||||
border-radius: 2rem !important;
|
||||
padding-left: 2rem !important;
|
||||
padding-right: 2rem !important;
|
||||
font-weight: 500;
|
||||
min-width: 140px;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
</style>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
|
||||
224
resources/views/user/confirm.blade.php
Normal file
@ -0,0 +1,224 @@
|
||||
@extends('layouts.app')
|
||||
@section('content')
|
||||
<main>
|
||||
<header class="alert alert-success">
|
||||
<h4 class="container">ユーザー情報確認 > 入力内容確認</h4>
|
||||
</header>
|
||||
<section class="container mt30 mb50">
|
||||
<h5 class="mb30 offset-md-1">下記の内容で変更します。</h5>
|
||||
<form class="row form" action="{{ route('user.edit.submit') }}" method="post">
|
||||
@csrf
|
||||
<!-- お名前 -->
|
||||
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||
<label for="user_name">お名前</label>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 mb10">
|
||||
<h3>{{ $user->user_name }}</h3>
|
||||
<input type="hidden" name="user_name" value="{{ $user->user_name }}">
|
||||
</div>
|
||||
<!-- フリガナ -->
|
||||
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||
<label for="user_phonetic">フリガナ</label>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 mb10">
|
||||
<h3>{{ $user->user_phonetic }}</h3>
|
||||
<input type="hidden" name="user_phonetic" value="{{ $user->user_phonetic }}">
|
||||
</div>
|
||||
<!-- 性別 -->
|
||||
@if (!empty($input['user_gender']))
|
||||
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||
<label for="user_gender">性別</label>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 mb10">
|
||||
<h3>{{ $input['user_gender'] }}</h3>
|
||||
<input type="hidden" name="user_gender" value="{{ $input['user_gender'] }}">
|
||||
</div>
|
||||
@endif
|
||||
<!-- 居住所 -->
|
||||
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||
<label for="user_regident_zip">居住所</label>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 mb10">
|
||||
<h3>
|
||||
@php
|
||||
$zip1 = $input['user_regident_zip_1'] ?? $user->user_regident_zip_1 ?? '';
|
||||
$zip2 = $input['user_regident_zip_2'] ?? $user->user_regident_zip_2 ?? '';
|
||||
$pre = $input['user_regident_pre'] ?? $user->user_regident_pre ?? '';
|
||||
$city = $input['user_regident_city'] ?? $user->user_regident_city ?? '';
|
||||
$add = $input['user_regident_add'] ?? $user->user_regident_add ?? '';
|
||||
$zip = ($zip1 && $zip2) ? $zip1.'-'.$zip2 : (($zip1 || $zip2) ? $zip1.$zip2 : '');
|
||||
@endphp
|
||||
{{ $zip }}{{ $pre }}{{ $city }}{{ $add }}
|
||||
</h3>
|
||||
<input type="hidden" name="user_regident_zip_1" value="{{ $input['user_regident_zip_1'] ?? $user->user_regident_zip_1 ?? '' }}">
|
||||
<input type="hidden" name="user_regident_zip_2" value="{{ $input['user_regident_zip_2'] ?? $user->user_regident_zip_2 ?? '' }}">
|
||||
<input type="hidden" name="user_regident_pre" value="{{ $input['user_regident_pre'] ?? $user->user_regident_pre ?? '' }}">
|
||||
<input type="hidden" name="user_regident_city" value="{{ $input['user_regident_city'] ?? $user->user_regident_city ?? '' }}">
|
||||
<input type="hidden" name="user_regident_add" value="{{ $input['user_regident_add'] ?? $user->user_regident_add ?? '' }}">
|
||||
</div>
|
||||
<!-- 生年月日 -->
|
||||
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||
<label for="user_birthdate">生年月日</label>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 mb10">
|
||||
<h3>{{ $input['user_birthdate'] }}</h3>
|
||||
<input type="hidden" name="user_birthdate" value="{{ $input['user_birthdate'] }}">
|
||||
</div>
|
||||
<!-- 年齢 -->
|
||||
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||
<label for="user_age">年齢</label>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 mb10">
|
||||
<h3>{{ $input['user_age'] }}</h3>
|
||||
<input type="hidden" name="user_age" value="{{ $input['user_age'] }}">
|
||||
</div>
|
||||
<!-- 自宅電話番号 -->
|
||||
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||
<label for="user_homephone">自宅電話番号</label>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 mb10">
|
||||
<h3>
|
||||
@php
|
||||
$home = array_filter($input['user_homephone'] ?? []);
|
||||
@endphp
|
||||
{{ $home ? implode('-', $home) : '' }}
|
||||
</h3>
|
||||
@foreach ($input['user_homephone'] as $val)
|
||||
<input type="hidden" name="user_homephone[]" value="{{ $val }}">
|
||||
@endforeach
|
||||
</div>
|
||||
<!-- 携帯電話番号 -->
|
||||
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||
<label for="user_mobile">携帯電話番号</label>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 mb10">
|
||||
<h3>
|
||||
@php
|
||||
$mobile = array_filter($input['user_mobile'] ?? []);
|
||||
@endphp
|
||||
{{ $mobile ? implode('-', $mobile) : '' }}
|
||||
</h3>
|
||||
@foreach ($input['user_mobile'] as $val)
|
||||
<input type="hidden" name="user_mobile[]" value="{{ $val }}">
|
||||
@endforeach
|
||||
</div>
|
||||
<!-- メールアドレス -->
|
||||
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||
<label for="user_primemail">メールアドレス</label>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 mb10">
|
||||
<h3>{{ $input['user_primemail'] }}</h3>
|
||||
<input type="hidden" name="user_primemail" value="{{ $input['user_primemail'] }}">
|
||||
</div>
|
||||
<!-- メールアドレス確認 -->
|
||||
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||
<label for="user_primemail_confirmation">メールアドレスの確認</label>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 mb10">
|
||||
<h3>{{ $input['user_primemail_confirmation'] }}</h3>
|
||||
<input type="hidden" name="user_primemail_confirmation" value="{{ $input['user_primemail_confirmation'] }}">
|
||||
</div>
|
||||
<!-- 予備メールアドレス -->
|
||||
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||
<label for="user_submail">予備メールアドレス</label>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 mb10">
|
||||
<h3>{{ $input['user_submail'] }}</h3>
|
||||
<input type="hidden" name="user_submail" value="{{ $input['user_submail'] }}">
|
||||
</div>
|
||||
<!-- 利用者区分 -->
|
||||
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||
<label for="user_category">利用者区分</label>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 mb10">
|
||||
<h3>{{ $input['user_category'] }}</h3>
|
||||
<input type="hidden" name="user_category" value="{{ $input['user_category'] }}">
|
||||
</div>
|
||||
@if ($input['user_category'] === '学生')
|
||||
<!-- 学生の場合:学校名・卒業予定のみ表示 -->
|
||||
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||
<label for="user_school">学校名</label>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 mb10">
|
||||
<h3>{{ $input['user_school'] }}</h3>
|
||||
<input type="hidden" name="user_school" value="{{ $input['user_school'] }}">
|
||||
</div>
|
||||
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||
<label for="user_graduate">卒業予定</label>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 mb10">
|
||||
<h3>{{ $input['user_graduate'] }}</h3>
|
||||
<input type="hidden" name="user_graduate" value="{{ $input['user_graduate'] }}">
|
||||
</div>
|
||||
@else
|
||||
<!-- 一般の場合:勤務先名のみ表示 -->
|
||||
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||
<label for="user_workplace">勤務先名</label>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 mb10">
|
||||
<h3>{{ $input['user_workplace'] }}</h3>
|
||||
<input type="hidden" name="user_workplace" value="{{ $input['user_workplace'] }}">
|
||||
</div>
|
||||
@endif
|
||||
<!-- 住所(関連) -->
|
||||
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||
<label for="user_relate">住所</label>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 mb10">
|
||||
<h3>
|
||||
@php
|
||||
$zip1 = $input['user_relate_zip_1'] ?? $user->user_relate_zip_1 ?? '';
|
||||
$zip2 = $input['user_relate_zip_2'] ?? $user->user_relate_zip_2 ?? '';
|
||||
$pre = $input['user_relate_pre'] ?? $user->user_relate_pre ?? '';
|
||||
$city = $input['user_relate_city'] ?? $user->user_relate_city ?? '';
|
||||
$add = $input['user_relate_add'] ?? $user->user_relate_add ?? '';
|
||||
$zip = ($zip1 && $zip2) ? $zip1.'-'.$zip2 : (($zip1 || $zip2) ? $zip1.$zip2 : '');
|
||||
@endphp
|
||||
{{ $zip }}{{ $pre }}{{ $city }}{{ $add }}
|
||||
</h3>
|
||||
<input type="hidden" name="user_relate_zip_1" value="{{ $input['user_relate_zip_1'] ?? $user->user_relate_zip_1 ?? '' }}">
|
||||
<input type="hidden" name="user_relate_zip_2" value="{{ $input['user_relate_zip_2'] ?? $user->user_relate_zip_2 ?? '' }}">
|
||||
<input type="hidden" name="user_relate_pre" value="{{ $input['user_relate_pre'] ?? $user->user_relate_pre ?? '' }}">
|
||||
<input type="hidden" name="user_relate_city" value="{{ $input['user_relate_city'] ?? $user->user_relate_city ?? '' }}">
|
||||
<input type="hidden" name="user_relate_add" value="{{ $input['user_relate_add'] ?? $user->user_relate_add ?? '' }}">
|
||||
</div>
|
||||
<!-- 本人確認書類1 -->
|
||||
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||
<label for="photo_filename1">本人確認書類1</label>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 mb10">
|
||||
@if(isset($input['photo_filename1']) && $input['photo_filename1'] !== '')
|
||||
<input type="hidden" name="photo_filename1" value="{{ $input['photo_filename1'] }}">
|
||||
<img src="{{ asset('storage/photo/' . $input['photo_filename1']) }}" style="max-width:200px; margin-top:8px;">
|
||||
@endif
|
||||
</div>
|
||||
<!-- 本人確認書類2 -->
|
||||
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||
<label for="photo_filename2">本人確認書類2</label>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 mb10">
|
||||
@if(isset($input['photo_filename2']) && $input['photo_filename2'] !== '')
|
||||
<input type="hidden" name="photo_filename2" value="{{ $input['photo_filename2'] }}">
|
||||
<img src="{{ asset('storage/photo/' . $input['photo_filename2']) }}" style="max-width:200px; margin-top:8px;">
|
||||
@endif
|
||||
</div>
|
||||
<!-- パスワード -->
|
||||
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||
<label for="user_pass">パスワード</label>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 mb10">
|
||||
@if(isset($input['user_pass']) && $input['user_pass'] !== '')
|
||||
<h3>********</h3>
|
||||
<input type="hidden" name="user_pass" value="{{ $input['user_pass'] }}">
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-12 col-md-5 offset-0 offset-md-1 mt10">
|
||||
<button type="submit" class="btn btn-lg btn-block btn-success">変更を確定する</button>
|
||||
</div>
|
||||
<div class="col-12 col-md-5 mt10">
|
||||
<a href="{{ route('user.edit') }}" class="btn btn-lg btn-block btn-outline-success">戻って修正する</a>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
</main>
|
||||
@endsection
|
||||
515
resources/views/user/edit.blade.php
Normal file
@ -0,0 +1,515 @@
|
||||
@extends('layouts.app')
|
||||
<style>
|
||||
input.form-control,
|
||||
select.form-control,
|
||||
textarea.form-control {
|
||||
color: #222 !important;
|
||||
}
|
||||
</style>
|
||||
@section('content')
|
||||
<main>
|
||||
<header class="alert alert-success">
|
||||
<h4 class="container">ユーザー情報確認 > ユーザー情報を変更する</h4>
|
||||
</header>
|
||||
<section class="container mt30 mb50">
|
||||
{{-- サーバーサイドエラー表示 --}}
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger alert-dismissible" id="formErrorAreaPhp">
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
{{-- クライアントサイド用エラー表示領域 --}}
|
||||
<div class="alert alert-danger alert-dismissible" id="formErrorAreaJs" style="display:none;">
|
||||
<button type="button" class="close" onclick="this.parentNode.style.display='none';" aria-hidden="true">×</button>
|
||||
<h4 style="left: 0">入力内容に不備があります。</h4>
|
||||
<div id="formErrorMessagesJs"></div>
|
||||
</div>
|
||||
<form class="row form" action="{{ route('user.edit.post') }}" method="post" enctype="multipart/form-data" autocomplete="off">
|
||||
@csrf
|
||||
{{-- お名前(編集不可) --}}
|
||||
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||
<label for="user_name">お名前</label>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 mb10">
|
||||
<input type="text" class="form-control" id="user_name" name="user_name" value="{{ old('user_name', $user->user_name) }}" readonly>
|
||||
</div>
|
||||
{{-- フリガナ(編集不可) --}}
|
||||
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||
<label for="user_phonetic">フリガナ</label>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 mb10">
|
||||
<input type="text" class="form-control" id="user_phonetic" name="user_phonetic" value="{{ old('user_phonetic', $user->user_phonetic) }}" readonly>
|
||||
</div>
|
||||
{{-- 性別(値が空またはnullの場合は非表示) --}}
|
||||
@if (!empty($user->user_gender))
|
||||
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||
<label for="user_gender">性別</label>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 mb10">
|
||||
<select class="form-control" id="user_gender" name="user_gender">
|
||||
<option value="">選択してください</option>
|
||||
<option value="男性" {{ old('user_gender', $user->user_gender) == '男性' ? 'selected' : '' }}>男性</option>
|
||||
<option value="女性" {{ old('user_gender', $user->user_gender) == '女性' ? 'selected' : '' }}>女性</option>
|
||||
</select>
|
||||
</div>
|
||||
@endif
|
||||
{{-- 居住所 --}}
|
||||
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||
<label for="user_regident_zip">居住所</label>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 mb10 h-adr">
|
||||
<input type="text" class="form-control d-inline-block" style="width:120px; @if(!$is_update_period)background:#eee;@endif" name="user_regident_zip_1" maxlength="3" value="{{ old('user_regident_zip_1', substr($user->user_regident_zip,0,3)) }}" @if(!$is_update_period)readonly @endif> -
|
||||
<input type="text" class="form-control d-inline-block" style="width:140px; @if(!$is_update_period)background:#eee;@endif" name="user_regident_zip_2" maxlength="4" value="{{ old('user_regident_zip_2', substr($user->user_regident_zip,3,4)) }}" @if(!$is_update_period)readonly @endif><br>
|
||||
<select class="form-control d-inline-block" style="margin-top:8px; width:180px; @if(!$is_update_period)background:#eee;@endif" name="user_regident_pre" @if(!$is_update_period)disabled @endif>
|
||||
<option value="">都道府県</option>
|
||||
<option value="北海道" {{ old('user_regident_pre', $user->user_regident_pre) == '北海道' ? 'selected' : '' }}>北海道</option>
|
||||
<option value="青森県" {{ old('user_regident_pre', $user->user_regident_pre) == '青森県' ? 'selected' : '' }}>青森県</option>
|
||||
<option value="岩手県" {{ old('user_regident_pre', $user->user_regident_pre) == '岩手県' ? 'selected' : '' }}>岩手県</option>
|
||||
<option value="宮城県" {{ old('user_regident_pre', $user->user_regident_pre) == '宮城県' ? 'selected' : '' }}>宮城県</option>
|
||||
<option value="秋田県" {{ old('user_regident_pre', $user->user_regident_pre) == '秋田県' ? 'selected' : '' }}>秋田県</option>
|
||||
<option value="山形県" {{ old('user_regident_pre', $user->user_regident_pre) == '山形県' ? 'selected' : '' }}>山形県</option>
|
||||
<option value="福島県" {{ old('user_regident_pre', $user->user_regident_pre) == '福島県' ? 'selected' : '' }}>福島県</option>
|
||||
<option value="茨城県" {{ old('user_regident_pre', $user->user_regident_pre) == '茨城県' ? 'selected' : '' }}>茨城県</option>
|
||||
<option value="栃木県" {{ old('user_regident_pre', $user->user_regident_pre) == '栃木県' ? 'selected' : '' }}>栃木県</option>
|
||||
<option value="群馬県" {{ old('user_regident_pre', $user->user_regident_pre) == '群馬県' ? 'selected' : '' }}>群馬県</option>
|
||||
<option value="埼玉県" {{ old('user_regident_pre', $user->user_regident_pre) == '埼玉県' ? 'selected' : '' }}>埼玉県</option>
|
||||
<option value="千葉県" {{ old('user_regident_pre', $user->user_regident_pre) == '千葉県' ? 'selected' : '' }}>千葉県</option>
|
||||
<option value="東京都" {{ old('user_regident_pre', $user->user_regident_pre) == '東京都' ? 'selected' : '' }}>東京都</option>
|
||||
<option value="神奈川県" {{ old('user_regident_pre', $user->user_regident_pre) == '神奈川県' ? 'selected' : '' }}>神奈川県</option>
|
||||
<option value="新潟県" {{ old('user_regident_pre', $user->user_regident_pre) == '新潟県' ? 'selected' : '' }}>新潟県</option>
|
||||
<option value="富山県" {{ old('user_regident_pre', $user->user_regident_pre) == '富山県' ? 'selected' : '' }}>富山県</option>
|
||||
<option value="石川県" {{ old('user_regident_pre', $user->user_regident_pre) == '石川県' ? 'selected' : '' }}>石川県</option>
|
||||
<option value="福井県" {{ old('user_regident_pre', $user->user_regident_pre) == '福井県' ? 'selected' : '' }}>福井県</option>
|
||||
<option value="山梨県" {{ old('user_regident_pre', $user->user_regident_pre) == '山梨県' ? 'selected' : '' }}>山梨県</option>
|
||||
<option value="長野県" {{ old('user_regident_pre', $user->user_regident_pre) == '長野県' ? 'selected' : '' }}>長野県</option>
|
||||
<option value="岐阜県" {{ old('user_regident_pre', $user->user_regident_pre) == '岐阜県' ? 'selected' : '' }}>岐阜県</option>
|
||||
<option value="静岡県" {{ old('user_regident_pre', $user->user_regident_pre) == '静岡県' ? 'selected' : '' }}>静岡県</option>
|
||||
<option value="愛知県" {{ old('user_regident_pre', $user->user_regident_pre) == '愛知県' ? 'selected' : '' }}>愛知県</option>
|
||||
<option value="三重県" {{ old('user_regident_pre', $user->user_regident_pre) == '三重県' ? 'selected' : '' }}>三重県</option>
|
||||
<option value="滋賀県" {{ old('user_regident_pre', $user->user_regident_pre) == '滋賀県' ? 'selected' : '' }}>滋賀県</option>
|
||||
<option value="京都府" {{ old('user_regident_pre', $user->user_regident_pre) == '京都府' ? 'selected' : '' }}>京都府</option>
|
||||
<option value="大阪府" {{ old('user_regident_pre', $user->user_regident_pre) == '大阪府' ? 'selected' : '' }}>大阪府</option>
|
||||
<option value="兵庫県" {{ old('user_regident_pre', $user->user_regident_pre) == '兵庫県' ? 'selected' : '' }}>兵庫県</option>
|
||||
<option value="奈良県" {{ old('user_regident_pre', $user->user_regident_pre) == '奈良県' ? 'selected' : '' }}>奈良県</option>
|
||||
<option value="和歌山県" {{ old('user_regident_pre', $user->user_regident_pre) == '和歌山県' ? 'selected' : '' }}>和歌山県</option>
|
||||
<option value="鳥取県" {{ old('user_regident_pre', $user->user_regident_pre) == '鳥取県' ? 'selected' : '' }}>鳥取県</option>
|
||||
<option value="島根県" {{ old('user_regident_pre', $user->user_regident_pre) == '島根県' ? 'selected' : '' }}>島根県</option>
|
||||
<option value="岡山県" {{ old('user_regident_pre', $user->user_regident_pre) == '岡山県' ? 'selected' : '' }}>岡山県</option>
|
||||
<option value="広島県" {{ old('user_regident_pre', $user->user_regident_pre) == '広島県' ? 'selected' : '' }}>広島県</option>
|
||||
<option value="山口県" {{ old('user_regident_pre', $user->user_regident_pre) == '山口県' ? 'selected' : '' }}>山口県</option>
|
||||
<option value="徳島県" {{ old('user_regident_pre', $user->user_regident_pre) == '徳島県' ? 'selected' : '' }}>徳島県</option>
|
||||
<option value="香川県" {{ old('user_regident_pre', $user->user_regident_pre) == '香川県' ? 'selected' : '' }}>香川県</option>
|
||||
<option value="愛媛県" {{ old('user_regident_pre', $user->user_regident_pre) == '愛媛県' ? 'selected' : '' }}>愛媛県</option>
|
||||
<option value="高知県" {{ old('user_regident_pre', $user->user_regident_pre) == '高知県' ? 'selected' : '' }}>高知県</option>
|
||||
<option value="福岡県" {{ old('user_regident_pre', $user->user_regident_pre) == '福岡県' ? 'selected' : '' }}>福岡県</option>
|
||||
<option value="佐賀県" {{ old('user_regident_pre', $user->user_regident_pre) == '佐賀県' ? 'selected' : '' }}>佐賀県</option>
|
||||
<option value="長崎県" {{ old('user_regident_pre', $user->user_regident_pre) == '長崎県' ? 'selected' : '' }}>長崎県</option>
|
||||
<option value="熊本県" {{ old('user_regident_pre', $user->user_regident_pre) == '熊本県' ? 'selected' : '' }}>熊本県</option>
|
||||
<option value="大分県" {{ old('user_regident_pre', $user->user_regident_pre) == '大分県' ? 'selected' : '' }}>大分県</option>
|
||||
<option value="宮崎県" {{ old('user_regident_pre', $user->user_regident_pre) == '宮崎県' ? 'selected' : '' }}>宮崎県</option>
|
||||
<option value="鹿児島県" {{ old('user_regident_pre', $user->user_regident_pre) == '鹿児島県' ? 'selected' : '' }}>鹿児島県</option>
|
||||
<option value="沖縄県" {{ old('user_regident_pre', $user->user_regident_pre) == '沖縄県' ? 'selected' : '' }}>沖縄県</option>
|
||||
</select><br>
|
||||
<input type="text" class="form-control d-inline-block" style="margin-top:8px; @if(!$is_update_period)background:#eee;@endif" name="user_regident_city" value="{{ old('user_regident_city', $user->user_regident_city) }}" placeholder="足立区" @if(!$is_update_period)readonly @endif><br>
|
||||
<input type="text" class="form-control d-inline-block" style="margin-top:8px; @if(!$is_update_period)background:#eee;@endif" name="user_regident_add" value="{{ old('user_regident_add', $user->user_regident_add) }}" placeholder="六町1-1-1" @if(!$is_update_period)readonly @endif>
|
||||
</div>
|
||||
{{-- 生年月日 --}}
|
||||
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||
<label for="user_birthdate">生年月日</label>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 mb10">
|
||||
<input type="date" class="form-control" id="user_birthdate" name="user_birthdate" value="{{ old('user_birthdate', $user->user_birthdate) }}" @if(!$is_update_period)readonly style="background:#eee;" @endif>
|
||||
</div>
|
||||
{{-- 年齢(自動計算 かつ 表示のみ) --}}
|
||||
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||
<label for="user_age">年齢</label>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 mb10">
|
||||
<input type="number" class="form-control" id="user_age" name="user_age" value="{{ old('user_age', $user->user_age) }}" readonly>
|
||||
</div>
|
||||
{{-- 自宅電話番号 --}}
|
||||
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||
<label for="user_homephone">自宅電話番号</label>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 mb10">
|
||||
<input type="text" class="form-control" name="user_homephone[]" value="{{ old('user_homephone.0', $user->user_homephone[0] ?? '') }}" style="width:80px; display:inline-block;">
|
||||
-
|
||||
<input type="text" class="form-control" name="user_homephone[]" value="{{ old('user_homephone.1', $user->user_homephone[1] ?? '') }}" style="width:80px; display:inline-block;">
|
||||
-
|
||||
<input type="text" class="form-control" name="user_homephone[]" value="{{ old('user_homephone.2', $user->user_homephone[2] ?? '') }}" style="width:80px; display:inline-block;">
|
||||
</div>
|
||||
{{-- 携帯電話番号 --}}
|
||||
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||
<label for="user_mobile">携帯電話番号</label>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 mb10">
|
||||
<input type="text" class="form-control" name="user_mobile[]" value="{{ old('user_mobile.0', $user->user_mobile[0] ?? '') }}" style="width:80px; display:inline-block;">
|
||||
-
|
||||
<input type="text" class="form-control" name="user_mobile[]" value="{{ old('user_mobile.1', $user->user_mobile[1] ?? '') }}" style="width:80px; display:inline-block;">
|
||||
-
|
||||
<input type="text" class="form-control" name="user_mobile[]" value="{{ old('user_mobile.2', $user->user_mobile[2] ?? '') }}" style="width:80px; display:inline-block;">
|
||||
</div>
|
||||
{{-- メールアドレス --}}
|
||||
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||
<label for="user_primemail">メールアドレス <span style="color:red;">*</span></label>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 mb10">
|
||||
<input type="email" class="form-control" id="user_primemail" name="user_primemail" value="{{ old('user_primemail', $user->user_primemail) }}" placeholder="name@example.com">
|
||||
</div>
|
||||
{{-- メールアドレス確認 --}}
|
||||
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||
<label for="user_primemail_confirmation">メールアドレスの確認 <span style="color:red;">*</span></label>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 mb10">
|
||||
<input type="email" class="form-control" id="user_primemail2" name="user_primemail_confirmation" value="{{ old('user_primemail_confirmation') }}" placeholder="name@example.com">
|
||||
</div>
|
||||
{{-- 予備メールアドレス --}}
|
||||
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||
<label for="user_submail">予備メールアドレス</label>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 mb10">
|
||||
<input type="email" class="form-control" id="user_submail" name="user_submail" value="{{ old('user_submail', $user->user_submail) }}" placeholder="name.sub@example.com">
|
||||
</div>
|
||||
{{-- 利用者区分 --}}
|
||||
<div class="col-12 col-md-3 offset-0 offset-md-2 d-flex align-items-center">
|
||||
<label>利用者区分</label>
|
||||
<button type="button" id="userTypeInfoBtn" style="margin-left:2px; border:none; background:none; cursor:pointer; vertical-align:top; position:relative; top:-4px;">
|
||||
<span style="display:inline-block; width:24px; height:24px; border-radius:50%; border:2px solid #007bff; text-align:center; line-height:20px; font-weight:bold; color:#007bff; font-size:16px; background:#fff;">?</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 mb10">
|
||||
<div class="form-check form-check-inline">
|
||||
<input class="form-check-input" type="radio" name="user_category" id="user_categoryid_ippan" value="一般" {{ old('user_category', $user_category) == '一般' ? 'checked' : '' }} @if(!$is_update_period)disabled @endif>
|
||||
<label class="form-check-label" for="user_categoryid_ippan">一般</label>
|
||||
</div>
|
||||
<div class="form-check form-check-inline">
|
||||
<input class="form-check-input" type="radio" name="user_category" id="user_categoryid_gakusei" value="学生" {{ old('user_category', $user_category) == '学生' ? 'checked' : '' }} @if(!$is_update_period)disabled @endif>
|
||||
<label class="form-check-label" for="user_categoryid_gakusei">学生</label>
|
||||
</div>
|
||||
</div>
|
||||
{{-- 勤務先名(一般のみ表示) --}}
|
||||
<div class="col-12 col-md-3 offset-0 offset-md-2 user_workplace_area {{ old('user_category', $user_category) == '学生' ? 'd-none' : '' }}">
|
||||
<label for="user_workplace">勤務先名</label>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 mb10 user_workplace_area {{ old('user_category', $user_category) == '学生' ? 'd-none' : '' }}">
|
||||
<input type="text" class="form-control" id="user_workplace" name="user_workplace" value="{{ old('user_workplace', $user->user_workplace) }}" @if(!$is_update_period)readonly style="background:#eee;" @endif placeholder="マルバツ株式会社">
|
||||
</div>
|
||||
{{-- 学校名(学生のみ表示) --}}
|
||||
<div class="col-12 col-md-3 offset-0 offset-md-2 user_school_area {{ old('user_category', $user_category) == '学生' ? '' : 'd-none' }}">
|
||||
<label for="user_school">学校名<span style="color:red;">*</span></label>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 mb10 user_school_area {{ old('user_category', $user_category) == '学生' ? '' : 'd-none' }}">
|
||||
<input type="text" class="form-control" id="user_school" name="user_school" value="{{ old('user_school', $user->user_school) }}" @if(!$is_update_period)readonly style="background:#eee;" @endif>
|
||||
</div>
|
||||
{{-- 卒業予定(学生のみ表示) --}}
|
||||
<div class="col-12 col-md-3 offset-0 offset-md-2 user_graduate_area {{ old('user_category', $user_category) == '学生' ? '' : 'd-none' }}">
|
||||
<label for="user_graduate">卒業予定<span style="color:red;">*</span></label>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 mb10 user_graduate_area {{ old('user_category', $user_category) == '学生' ? '' : 'd-none' }}">
|
||||
<input type="date" class="form-control" id="user_graduate" name="user_graduate" value="{{ old('user_graduate', $user->user_graduate) }}" @if(!$is_update_period)readonly style="background:#eee;" @endif>
|
||||
</div>
|
||||
{{-- 住所(関連) --}}
|
||||
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||
<label for="user_relate">住所</label>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 mb10 h-adr">
|
||||
<input type="text" class="form-control d-inline-block" style="width:80px; @if(!$is_update_period)background:#eee;@endif" name="user_relate_zip_1" maxlength="3" value="{{ old('user_relate_zip_1', substr($user->user_relate_zip,0,3)) }}" @if(!$is_update_period)readonly @endif> -
|
||||
<input type="text" class="form-control d-inline-block" style="width:100px; @if(!$is_update_period)background:#eee;@endif" name="user_relate_zip_2" maxlength="4" value="{{ old('user_relate_zip_2', substr($user->user_relate_zip,3,4)) }}" @if(!$is_update_period)readonly @endif><br>
|
||||
<select class="form-control d-inline-block" style="margin-top:8px; width:180px; @if(!$is_update_period)background:#eee;@endif" name="user_relate_pre" @if(!$is_update_period)disabled @endif>
|
||||
<option value="">都道府県</option>
|
||||
<option value="北海道" {{ old('user_relate_pre', $user->user_relate_pre) == '北海道' ? 'selected' : '' }}>北海道</option>
|
||||
<option value="青森県" {{ old('user_relate_pre', $user->user_relate_pre) == '青森県' ? 'selected' : '' }}>青森県</option>
|
||||
<option value="岩手県" {{ old('user_relate_pre', $user->user_relate_pre) == '岩手県' ? 'selected' : '' }}>岩手県</option>
|
||||
<option value="宮城県" {{ old('user_relate_pre', $user->user_relate_pre) == '宮城県' ? 'selected' : '' }}>宮城県</option>
|
||||
<option value="秋田県" {{ old('user_relate_pre', $user->user_relate_pre) == '秋田県' ? 'selected' : '' }}>秋田県</option>
|
||||
<option value="山形県" {{ old('user_relate_pre', $user->user_relate_pre) == '山形県' ? 'selected' : '' }}>山形県</option>
|
||||
<option value="福島県" {{ old('user_relate_pre', $user->user_relate_pre) == '福島県' ? 'selected' : '' }}>福島県</option>
|
||||
<option value="茨城県" {{ old('user_relate_pre', $user->user_relate_pre) == '茨城県' ? 'selected' : '' }}>茨城県</option>
|
||||
<option value="栃木県" {{ old('user_relate_pre', $user->user_relate_pre) == '栃木県' ? 'selected' : '' }}>栃木県</option>
|
||||
<option value="群馬県" {{ old('user_relate_pre', $user->user_relate_pre) == '群馬県' ? 'selected' : '' }}>群馬県</option>
|
||||
<option value="埼玉県" {{ old('user_relate_pre', $user->user_relate_pre) == '埼玉県' ? 'selected' : '' }}>埼玉県</option>
|
||||
<option value="千葉県" {{ old('user_relate_pre', $user->user_relate_pre) == '千葉県' ? 'selected' : '' }}>千葉県</option>
|
||||
<option value="東京都" {{ old('user_relate_pre', $user->user_relate_pre) == '東京都' ? 'selected' : '' }}>東京都</option>
|
||||
<option value="神奈川県" {{ old('user_relate_pre', $user->user_relate_pre) == '神奈川県' ? 'selected' : '' }}>神奈川県</option>
|
||||
<option value="新潟県" {{ old('user_relate_pre', $user->user_relate_pre) == '新潟県' ? 'selected' : '' }}>新潟県</option>
|
||||
<option value="富山県" {{ old('user_relate_pre', $user->user_relate_pre) == '富山県' ? 'selected' : '' }}>富山県</option>
|
||||
<option value="石川県" {{ old('user_relate_pre', $user->user_relate_pre) == '石川県' ? 'selected' : '' }}>石川県</option>
|
||||
<option value="福井県" {{ old('user_relate_pre', $user->user_relate_pre) == '福井県' ? 'selected' : '' }}>福井県</option>
|
||||
<option value="山梨県" {{ old('user_relate_pre', $user->user_relate_pre) == '山梨県' ? 'selected' : '' }}>山梨県</option>
|
||||
<option value="長野県" {{ old('user_relate_pre', $user->user_relate_pre) == '長野県' ? 'selected' : '' }}>長野県</option>
|
||||
<option value="岐阜県" {{ old('user_relate_pre', $user->user_relate_pre) == '岐阜県' ? 'selected' : '' }}>岐阜県</option>
|
||||
<option value="静岡県" {{ old('user_relate_pre', $user->user_relate_pre) == '静岡県' ? 'selected' : '' }}>静岡県</option>
|
||||
<option value="愛知県" {{ old('user_relate_pre', $user->user_relate_pre) == '愛知県' ? 'selected' : '' }}>愛知県</option>
|
||||
<option value="三重県" {{ old('user_relate_pre', $user->user_relate_pre) == '三重県' ? 'selected' : '' }}>三重県</option>
|
||||
<option value="滋賀県" {{ old('user_relate_pre', $user->user_relate_pre) == '滋賀県' ? 'selected' : '' }}>滋賀県</option>
|
||||
<option value="京都府" {{ old('user_relate_pre', $user->user_relate_pre) == '京都府' ? 'selected' : '' }}>京都府</option>
|
||||
<option value="大阪府" {{ old('user_relate_pre', $user->user_relate_pre) == '大阪府' ? 'selected' : '' }}>大阪府</option>
|
||||
<option value="兵庫県" {{ old('user_relate_pre', $user->user_relate_pre) == '兵庫県' ? 'selected' : '' }}>兵庫県</option>
|
||||
<option value="奈良県" {{ old('user_relate_pre', $user->user_relate_pre) == '奈良県' ? 'selected' : '' }}>奈良県</option>
|
||||
<option value="和歌山県" {{ old('user_relate_pre', $user->user_relate_pre) == '和歌山県' ? 'selected' : '' }}>和歌山県</option>
|
||||
<option value="鳥取県" {{ old('user_relate_pre', $user->user_relate_pre) == '鳥取県' ? 'selected' : '' }}>鳥取県</option>
|
||||
<option value="島根県" {{ old('user_relate_pre', $user->user_relate_pre) == '島根県' ? 'selected' : '' }}>島根県</option>
|
||||
<option value="岡山県" {{ old('user_relate_pre', $user->user_relate_pre) == '岡山県' ? 'selected' : '' }}>岡山県</option>
|
||||
<option value="広島県" {{ old('user_relate_pre', $user->user_relate_pre) == '広島県' ? 'selected' : '' }}>広島県</option>
|
||||
<option value="山口県" {{ old('user_relate_pre', $user->user_relate_pre) == '山口県' ? 'selected' : '' }}>山口県</option>
|
||||
<option value="徳島県" {{ old('user_relate_pre', $user->user_relate_pre) == '徳島県' ? 'selected' : '' }}>徳島県</option>
|
||||
<option value="香川県" {{ old('user_relate_pre', $user->user_relate_pre) == '香川県' ? 'selected' : '' }}>香川県</option>
|
||||
<option value="愛媛県" {{ old('user_relate_pre', $user->user_relate_pre) == '愛媛県' ? 'selected' : '' }}>愛媛県</option>
|
||||
<option value="高知県" {{ old('user_relate_pre', $user->user_relate_pre) == '高知県' ? 'selected' : '' }}>高知県</option>
|
||||
<option value="福岡県" {{ old('user_relate_pre', $user->user_relate_pre) == '福岡県' ? 'selected' : '' }}>福岡県</option>
|
||||
<option value="佐賀県" {{ old('user_relate_pre', $user->user_relate_pre) == '佐賀県' ? 'selected' : '' }}>佐賀県</option>
|
||||
<option value="長崎県" {{ old('user_relate_pre', $user->user_relate_pre) == '長崎県' ? 'selected' : '' }}>長崎県</option>
|
||||
<option value="熊本県" {{ old('user_relate_pre', $user->user_relate_pre) == '熊本県' ? 'selected' : '' }}>熊本県</option>
|
||||
<option value="大分県" {{ old('user_relate_pre', $user->user_relate_pre) == '大分県' ? 'selected' : '' }}>大分県</option>
|
||||
<option value="宮崎県" {{ old('user_relate_pre', $user->user_relate_pre) == '宮崎県' ? 'selected' : '' }}>宮崎県</option>
|
||||
<option value="鹿児島県" {{ old('user_relate_pre', $user->user_relate_pre) == '鹿児島県' ? 'selected' : '' }}>鹿児島県</option>
|
||||
<option value="沖縄県" {{ old('user_relate_pre', $user->user_relate_pre) == '沖縄県' ? 'selected' : '' }}>沖縄県</option>
|
||||
</select>
|
||||
<input type="text" class="form-control d-inline-block" style="margin-top:8px; @if(!$is_update_period)background:#eee;@endif" name="user_relate_city" value="{{ old('user_relate_city', $user->user_relate_city) }}" @if(!$is_update_period)readonly @endif placeholder="足立区">
|
||||
<input type="text" class="form-control d-inline-block" style="margin-top:8px; @if(!$is_update_period)background:#eee;@endif" name="user_relate_add" value="{{ old('user_relate_add', $user->user_relate_add) }}" @if(!$is_update_period)readonly @endif placeholder="六町1-1-1">
|
||||
</div>
|
||||
{{-- 本人確認書類 --}}
|
||||
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||
<a href="#" id="docDetailLink" style="color:#007bff; text-decoration:underline;">本人確認書類の詳細はこちら</a>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 mb10">
|
||||
<span>おもて</span>
|
||||
<input type="file" id="photo_filename1" name="photo_filename1" accept="image/*" style="width:auto; display:inline-block;">
|
||||
</div>
|
||||
<div class="col-12 col-md-3 offset-0 offset-md-2"></div>
|
||||
<div class="col-12 col-lg-6 mb10">
|
||||
<span>ウ ラ</span>
|
||||
<input type="file" id="photo_filename2" name="photo_filename2" accept="image/*" style="width:auto; display:inline-block;">
|
||||
</div>
|
||||
{{-- パスワード変更 --}}
|
||||
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||
<label for="user_pass_new">新しいパスワード</label>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 mb10">
|
||||
<input type="password" class="form-control" id="user_pass_new" name="user_pass_new" placeholder="8文字以上の半角英数字">
|
||||
</div>
|
||||
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||
<label for="user_pass_confirm">パスワードの確認</label>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 mb10">
|
||||
<input type="password" class="form-control" id="user_pass_confirm" name="user_pass_confirm" placeholder="8文字以上の半角英数字">
|
||||
</div>
|
||||
{{-- 確認ボタン --}}
|
||||
<div class="col-12 col-md-5 offset-0 offset-md-1 mt10">
|
||||
<input type="submit" class="btn btn-lg btn-block btn-success" value="入力内容を確認する" />
|
||||
</div>
|
||||
<div class="col-12 col-md-5 mt10">
|
||||
<a class="btn btn-lg btn-block btn-outline-success" href="{{ url('/user/withdraw') }}">メニューへ戻る</a>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
{{-- 本人確認書類説明モーダル --}}
|
||||
<div class="modal fade" id="docDetailModal" tabindex="-1" aria-labelledby="docDetailModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="docDetailModalLabel">下記のいずれかの写真をアップロードしてください。</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<ul>
|
||||
<li>免許証・旅券(パスポート)・在留カード・特別永住者証明書</li>
|
||||
<li>外国人登録証明書(特別永住者のみ)・学生証</li>
|
||||
<li>身体障害者手帳・生活保護受給証・保険証</li>
|
||||
<li>上記いずれかの住所記載のあるもの</li>
|
||||
</ul>
|
||||
<p style="font-size:14px; color:#555;">※特別永住者の方は特別永住者証明書と外国人登録証明書の両方が必要となります。</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
document.getElementById('docDetailLink').addEventListener('click', function(e) {
|
||||
e.preventDefault();
|
||||
$('#docDetailModal').modal('show');
|
||||
});
|
||||
</script>
|
||||
{{-- 利用者区分説明モーダル --}}
|
||||
<div class="modal fade" id="userTypeInfoModal" tabindex="-1" aria-labelledby="userTypeInfoModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-body">
|
||||
<div>
|
||||
【一般】<br>
|
||||
学生以外の利用者の方<br>
|
||||
【学生】<br>
|
||||
学生の利用者の方<br>
|
||||
【減免】<br>
|
||||
以下に該当される利用者の方が、減免の対象になる場合があります。<br>
|
||||
(例)<br>
|
||||
・高齢者の方<br>
|
||||
・障がい者の方<br>
|
||||
・生活保護を受けられている方<br>
|
||||
・中国残留邦人の方<br>
|
||||
・児童扶養手当を受給されている方<br>
|
||||
詳しくはサポートセンターまでお問い合わせください。<br>
|
||||
TEL:03-5856-4720
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">キャンセル</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
{{-- JSバリデーション(info.blade.phpの内容を参考に) --}}
|
||||
<script>
|
||||
document.querySelector('form').addEventListener('submit', function(e) {
|
||||
var errors = [];
|
||||
// メールアドレスチェック
|
||||
var email = document.getElementById('user_primemail').value.trim();
|
||||
var email2 = document.getElementById('user_primemail2').value.trim();
|
||||
var submail = document.getElementById('user_submail').value.trim();
|
||||
if (!email) {
|
||||
errors.push('「メールアドレス」は必須です。');
|
||||
}
|
||||
if (!email2) {
|
||||
errors.push('「メールアドレスの確認」は必須です。');
|
||||
}
|
||||
if (email && email2 && email !== email2) {
|
||||
errors.push('「メールアドレス」と「メールアドレスの確認」が一致しません。');
|
||||
}
|
||||
if (email && submail && email === submail) {
|
||||
errors.push('メールアドレスと予備メールアドレスに同じアドレスを入力できません。');
|
||||
}
|
||||
// 電話番号
|
||||
var homePhones = document.getElementsByName('user_homephone[]');
|
||||
var mobilePhones = document.getElementsByName('user_mobile[]');
|
||||
var homeFilled = false,
|
||||
mobileFilled = false;
|
||||
for (var i = 0; i < homePhones.length; i++) {
|
||||
if (homePhones[i].value.trim() !== '') homeFilled = true;
|
||||
}
|
||||
for (var i = 0; i < mobilePhones.length; i++) {
|
||||
if (mobilePhones[i].value.trim() !== '') mobileFilled = true;
|
||||
}
|
||||
if (!homeFilled && !mobileFilled) {
|
||||
errors.push('「自宅電話番号」と「携帯電話番号」のいずれかは入力してください。');
|
||||
}
|
||||
// 利用者区分が学生の場合のみ、学校名と卒業予定が必須
|
||||
var isStudent = document.getElementById('user_categoryid_gakusei').checked;
|
||||
if (isStudent) {
|
||||
var school = document.getElementById('user_school').value.trim();
|
||||
var graduate = document.getElementById('user_graduate').value.trim();
|
||||
if (!school) {
|
||||
errors.push('「学校名」は必須です。(学生の場合)');
|
||||
}
|
||||
if (!graduate) {
|
||||
errors.push('「卒業予定」は必須です。(学生の場合)');
|
||||
}
|
||||
}
|
||||
// パスワードバリデーション(8文字以上の半角英数字)
|
||||
var passNew = document.getElementById('user_pass_new').value;
|
||||
var passConfirm = document.getElementById('user_pass_confirm').value;
|
||||
if (passNew !== '') {
|
||||
if (!/^([a-zA-Z0-9]{8,})$/.test(passNew)) {
|
||||
errors.push('「新しいパスワード」は8文字以上の半角英数字で入力してください。');
|
||||
}
|
||||
}
|
||||
if (passNew !== '' && passConfirm !== '') {
|
||||
if (passNew !== passConfirm) {
|
||||
errors.push('「新しいパスワード」と「パスワードの確認」が一致しません。');
|
||||
}
|
||||
}
|
||||
if (errors.length > 0) {
|
||||
e.preventDefault();
|
||||
var areaJs = document.getElementById('formErrorAreaJs');
|
||||
var msgsJs = document.getElementById('formErrorMessagesJs');
|
||||
msgsJs.innerHTML = errors.join('<br>');
|
||||
areaJs.style.display = '';
|
||||
window.scrollTo({
|
||||
top: 0,
|
||||
behavior: 'smooth'
|
||||
});
|
||||
} else {
|
||||
// パスワード両方入力かつ一致時のみuser_passとして送信
|
||||
if (passNew !== '' && passConfirm !== '' && passNew === passConfirm) {
|
||||
var form = this;
|
||||
var hidden = document.createElement('input');
|
||||
hidden.type = 'hidden';
|
||||
hidden.name = 'user_pass';
|
||||
hidden.value = passNew;
|
||||
form.appendChild(hidden);
|
||||
}
|
||||
}
|
||||
});
|
||||
// 利用者区分による表示切替
|
||||
function toggleUserTypeFields() {
|
||||
var ippan = document.getElementById('user_categoryid_ippan').checked;
|
||||
var gakusei = document.getElementById('user_categoryid_gakusei').checked;
|
||||
var workplaceAreas = document.querySelectorAll('.user_workplace_area');
|
||||
var schoolAreas = document.querySelectorAll('.user_school_area');
|
||||
var graduateAreas = document.querySelectorAll('.user_graduate_area');
|
||||
if (ippan) {
|
||||
workplaceAreas.forEach(function(el) {
|
||||
el.classList.remove('d-none');
|
||||
});
|
||||
schoolAreas.forEach(function(el) {
|
||||
el.classList.add('d-none');
|
||||
});
|
||||
graduateAreas.forEach(function(el) {
|
||||
el.classList.add('d-none');
|
||||
});
|
||||
} else if (gakusei) {
|
||||
workplaceAreas.forEach(function(el) {
|
||||
el.classList.add('d-none');
|
||||
});
|
||||
schoolAreas.forEach(function(el) {
|
||||
el.classList.remove('d-none');
|
||||
});
|
||||
graduateAreas.forEach(function(el) {
|
||||
el.classList.remove('d-none');
|
||||
});
|
||||
} else {
|
||||
workplaceAreas.forEach(function(el) {
|
||||
el.classList.remove('d-none');
|
||||
});
|
||||
schoolAreas.forEach(function(el) {
|
||||
el.classList.add('d-none');
|
||||
});
|
||||
graduateAreas.forEach(function(el) {
|
||||
el.classList.add('d-none');
|
||||
});
|
||||
}
|
||||
}
|
||||
document.getElementById('user_categoryid_ippan').addEventListener('change', toggleUserTypeFields);
|
||||
document.getElementById('user_categoryid_gakusei').addEventListener('change', toggleUserTypeFields);
|
||||
window.addEventListener('DOMContentLoaded', function() {
|
||||
toggleUserTypeFields();
|
||||
});
|
||||
// 利用者区分説明ポップアップ表示
|
||||
document.getElementById('userTypeInfoBtn').addEventListener('click', function() {
|
||||
$('#userTypeInfoModal').modal('show');
|
||||
});
|
||||
|
||||
// 生年月日入力時に年齢自動計算
|
||||
document.getElementById('user_birthdate').addEventListener('change', function() {
|
||||
var birth = this.value;
|
||||
var ageInput = document.getElementById('user_age');
|
||||
if (birth) {
|
||||
var today = new Date();
|
||||
var birthDate = new Date(birth);
|
||||
var age = today.getFullYear() - birthDate.getFullYear();
|
||||
var m = today.getMonth() - birthDate.getMonth();
|
||||
if (m < 0 || (m === 0 && today.getDate() < birthDate.getDate())) {
|
||||
age--;
|
||||
}
|
||||
ageInput.value = age;
|
||||
} else {
|
||||
ageInput.value = '';
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
120
resources/views/user/info.blade.php
Normal file
@ -0,0 +1,120 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<main>
|
||||
@if (session('success'))
|
||||
<div class="alert alert-success">
|
||||
{{ session('success') }}
|
||||
</div>
|
||||
@endif
|
||||
<header class="alert alert-success">
|
||||
<h4 class="container">ユーザー情報確認 > ユーザー情報</h4>
|
||||
</header>
|
||||
<section class="container mt30 mb50">
|
||||
<form class="row form" action="{{ url('/user/edit') }}">
|
||||
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||
<label for="user_name">お名前</label>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 mb10">
|
||||
<h3>{{ $user->user_name }}</h3>
|
||||
</div>
|
||||
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||
<label for="user_phonetic">フリガナ</label>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 mb10">
|
||||
<h3>{{ $user->user_phonetic }}</h3>
|
||||
</div>
|
||||
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||
<label for="user_regident">居住所</label>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 mb10">
|
||||
<h3>{{ $user->user_regident_zip }}{{ $user->user_regident_pre }}{{ $user->user_regident_city }}{{ $user->user_regident_add }}</h3>
|
||||
</div>
|
||||
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||
<label for="user_homephone">自宅電話番号</label>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 mb10">
|
||||
<h3>{{ $user->user_homephone }}</h3>
|
||||
</div>
|
||||
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||
<label for="user_mobile">携帯電話番号</label>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 mb10">
|
||||
<h3>{{ $user->user_mobile }}</h3>
|
||||
</div>
|
||||
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||
<label for="user_primemail">メールアドレス</label>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 mb10">
|
||||
<h3>{{ $user->user_primemail }}</h3>
|
||||
</div>
|
||||
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||
<label for="user_submail">予備メールアドレス</label>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 mb10">
|
||||
<h3>{{ $user->user_submail }}</h3>
|
||||
</div>
|
||||
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||
<label for="user_category">利用者区分</label>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 mb10">
|
||||
<h3>{{ $user_category }}</h3>
|
||||
</div>
|
||||
@if ($user->ward_residents == 0 || $user->ward_residents == 2)
|
||||
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||
<label for="user_workplace">勤務先名</label>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 mb10">
|
||||
<h3>{{ $user->user_workplace }}</h3>
|
||||
</div>
|
||||
@endif
|
||||
@if ($user->ward_residents == 1)
|
||||
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||
<label for="user_school">学校名</label>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 mb10">
|
||||
<h3>{{ $user->user_school }}</h3>
|
||||
</div>
|
||||
@endif
|
||||
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||
<label for="user_relate">住所</label>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 mb10">
|
||||
<h3>{{ $user->user_relate_zip }}{{ $user->user_relate_pre }}{{ $user->user_relate_city }}{{ $user->user_relate_add }}</h3>
|
||||
</div>
|
||||
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||
<label for="photo_filename1">本人確認書類1</label>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 mb10">
|
||||
@if(!empty($user->photo_filename1))
|
||||
<h3><img src="{{ asset('storage/photo/' . $user->photo_filename1) }}"></h3>
|
||||
@else
|
||||
<h3></h3>
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||
<label for="photo_filename2">本人確認書類2</label>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 mb10">
|
||||
@if(!empty($user->photo_filename2))
|
||||
<h3><img src="{{ asset('storage/photo/' . $user->photo_filename2) }}"></h3>
|
||||
@else
|
||||
<h3></h3>
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
||||
<label for="user_pass">パスワード</label>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 mb10">
|
||||
<h3>********</h3>
|
||||
</div>
|
||||
<div class="col-12 col-md-5 offset-0 offset-md-1 mt10">
|
||||
<input type="submit" class="btn btn-lg btn-block btn-success" value="ユーザー情報を変更する" />
|
||||
</div>
|
||||
<div class="col-12 col-md-5 mt10">
|
||||
<a class="btn btn-lg btn-block btn-outline-success" href="{{ url('/user/withdraw') }}">退会する</a>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
</main>
|
||||
@endsection
|
||||
19
resources/views/user/mail_sent.blade.php
Normal file
@ -0,0 +1,19 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<header class="alert alert-success">
|
||||
<h4 class="container">ユーザー情報確認 > ユーザー情報</h4>
|
||||
</header>
|
||||
<div class="container mt-5 mb-5">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-12 col-md-8 text-center">
|
||||
<p>変更後のメールアドレスに確認メールを送信しました。<br>
|
||||
ご確認ください。</p>
|
||||
<p><u>確認メールのURLをクリックすると変更が完了します。</u></p>
|
||||
<div class="mt-4 mb-4 text-center">
|
||||
<a href="{{ route('user.info') }}" class="btn btn-lg btn-block btn-outline-success">マイページへ戻る</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
20
resources/views/user/withdraw_complete.blade.php
Normal file
@ -0,0 +1,20 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<main>
|
||||
<header class="alert alert-success">
|
||||
<h4 class="container">ユーザー情報確認 > 退会する</h4>
|
||||
</header>
|
||||
<section class="container mt30 mb50">
|
||||
<div class="row">
|
||||
<div class="col-12 mb20">
|
||||
<h3>退会処理が完了しました。</h3>
|
||||
<p>ご利用ありがとうございました。</p>
|
||||
</div>
|
||||
<div class="col-12 col-md-6 offset-0 offset-md-3 mt10">
|
||||
<a href="{{ url('/logout') }}" class="btn btn-lg btn-block btn-outline-success">ログアウト</a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
@endsection
|
||||
58
resources/views/user/withdraw_confirm.blade.php
Normal file
@ -0,0 +1,58 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<main>
|
||||
<header class="alert alert-success">
|
||||
<h4 class="container">ユーザー情報確認 > 退会する</h4>
|
||||
</header>
|
||||
<section class="container mt30 mb50">
|
||||
<div class="row">
|
||||
<div class="col-12 mb20">
|
||||
@if (!empty($error_message))
|
||||
<div class="alert alert-danger" style="font-size:1.1em;">
|
||||
{{ $error_message }}
|
||||
</div>
|
||||
@endif
|
||||
<h3>退会しますか?</h3>
|
||||
<ul style="margin-bottom:32px;">
|
||||
<li>退会されますと、マイページでご覧いただけるすべての情報が消去されます。</li>
|
||||
<li>また再度入会をご希望の場合には、新規ユーザーとして登録をお願いいたします。</li>
|
||||
<li>再度入会していただいても、過去の契約情報等ご確認いただくことはできなくなります。</li>
|
||||
<li>空き待ち登録されている駐輪場はすべてキャンセル扱いとなります。</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-12 col-md-5 offset-0 offset-md-1 mt10">
|
||||
<form method="POST" action="{{ url('/user/withdraw/confirm') }}" id="withdrawForm">
|
||||
@csrf
|
||||
<button type="button" class="btn btn-lg btn-block btn-success" onclick="showWithdrawModal()">退会する</button>
|
||||
</form>
|
||||
<!-- カスタム確認ダイアログ -->
|
||||
<div id="withdrawModal" style="display:none;position:fixed;top:0;left:0;width:100vw;height:100vh;background:rgba(0,0,0,0.2);z-index:9999;">
|
||||
<div style="background:#fff;padding:32px 24px;border-radius:8px;max-width:340px;margin:120px auto;box-shadow:0 2px 8px rgba(0,0,0,0.15);text-align:center;">
|
||||
<div style="font-size:1.2em;margin-bottom:8px;">確認ダイアログ</div>
|
||||
<div style="margin-bottom:24px;">本当に退会しますか。</div>
|
||||
<button type="button" style="background:#2962ff;color:#fff;border:none;padding:8px 32px;border-radius:4px;margin-right:8px;font-weight:bold;" onclick="submitWithdraw()">はい</button>
|
||||
<button type="button" style="background:#f5f5f5;color:#333;border:none;padding:8px 32px;border-radius:4px;font-weight:bold;" onclick="closeWithdrawModal()">いいえ</button>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
function showWithdrawModal() {
|
||||
document.getElementById('withdrawModal').style.display = 'block';
|
||||
}
|
||||
|
||||
function closeWithdrawModal() {
|
||||
document.getElementById('withdrawModal').style.display = 'none';
|
||||
}
|
||||
|
||||
function submitWithdraw() {
|
||||
document.getElementById('withdrawForm').submit();
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
<div class="col-12 col-md-5 mt10">
|
||||
<a class="btn btn-lg btn-block btn-outline-success" href="{{ url('/user/info') }}">キャンセル</a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
@endsection
|
||||
102
routes/web.php
@ -1,7 +1,107 @@
|
||||
|
||||
<?php
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Session;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use App\Models\User;
|
||||
use App\Http\Controllers\UserInfoController;
|
||||
use App\Http\Controllers\UserEditController;
|
||||
use App\Http\Controllers\UserEditConfirmController;
|
||||
use App\Http\Controllers\UserWithdrawController;
|
||||
use App\Http\Controllers\RegularContractController;
|
||||
use App\Http\Controllers\RegularContractCreateController;
|
||||
use App\Http\Controllers\ParkWaitlistController;
|
||||
use App\Http\Controllers\ReceiptController;
|
||||
|
||||
Route::get('/', function () {
|
||||
return view('welcome');
|
||||
return redirect()->route('login');
|
||||
});
|
||||
|
||||
// ユーザー情報確認画面
|
||||
Route::get('/user/info', [UserInfoController::class, 'show'])
|
||||
->name('user.info');
|
||||
|
||||
|
||||
// ユーザー情報編集画面(GET: 編集フォーム表示)
|
||||
Route::get('/user/edit', [UserEditController::class, 'show'])
|
||||
->name('user.edit');
|
||||
|
||||
// ユーザー情報編集(POST: 編集内容保存)
|
||||
Route::post('/user/edit', [UserEditController::class, 'update'])
|
||||
->name('user.edit.post');
|
||||
|
||||
// ユーザー情報編集確認(GET: 確認画面表示)
|
||||
Route::get('/user/edit/confirm', [UserEditConfirmController::class, 'show'])
|
||||
->name('user.confirm');
|
||||
// ユーザー情報編集確認(POST: 確認画面表示)
|
||||
Route::post('/user/edit/confirm', [UserEditConfirmController::class, 'confirm'])
|
||||
->name('user.edit.confirm');
|
||||
|
||||
// 入力内容確認画面から「変更を確定する」ボタン押下時(認証メール送信)
|
||||
Route::post('/user/edit/submit', [UserEditConfirmController::class, 'submit'])
|
||||
->name('user.edit.submit');
|
||||
|
||||
// 認証メール内URLクリック時(変更確定処理)
|
||||
Route::get('/user/edit/verify', [UserEditConfirmController::class, 'verify'])
|
||||
->name('user.edit.verify');
|
||||
|
||||
// 退会画面(GET: 退会確認)
|
||||
Route::get('/user/withdraw', [UserWithdrawController::class, 'showConfirm'])
|
||||
->name('user.withdraw');
|
||||
// 退会処理(POST: 退会確定)
|
||||
Route::post('/user/withdraw/confirm', [UserWithdrawController::class, 'withdraw'])
|
||||
->name('user.withdraw.confirm');
|
||||
|
||||
|
||||
// 定期契約情報確認
|
||||
Route::get('regular_contract/info', [RegularContractController::class, 'showInfo'])
|
||||
->name('regular_contract.info');
|
||||
|
||||
// 領収書宛名入力画面
|
||||
Route::get('receipt/input/{contract_id}', [ReceiptController::class, 'input'])
|
||||
->name('receipt.input');
|
||||
Route::get('receipt/download/{contract_id}', [ReceiptController::class, 'download'])
|
||||
->name('receipt.download');
|
||||
Route::post('receipt/issue/{contract_id}', [ReceiptController::class, 'issue']);
|
||||
|
||||
// 新規定期契約画面
|
||||
Route::get('regular_contract/create', [RegularContractCreateController::class, 'show'])
|
||||
->name('regular_contract.create');
|
||||
|
||||
// 定期契約更新
|
||||
Route::get('regular_contract/update/{contract_id}', [RegularContractController::class, 'update']);
|
||||
// 契約区分確認
|
||||
Route::get('regular_contract/confirm_category/{contract_id}', [RegularContractController::class, 'confirmCategory'])
|
||||
->name('regular_contract.confirm_category');
|
||||
Route::get('regular_contract/confirm_category_next/{contract_id}', [RegularContractController::class, 'confirmCategoryNext'])
|
||||
->name('regular_contract.confirm_category_next');
|
||||
// 本人確認書類アップロード
|
||||
Route::get('regular_contract/upload_identity/{contract_id}', [RegularContractController::class, 'uploadIdentity'])
|
||||
->name('regular_contract.upload_identity');
|
||||
// 利用期間選択
|
||||
Route::get('regular_contract/select_period/{contract_id}', [RegularContractController::class, 'selectPeriod'])
|
||||
->name('regular_contract.select_period');
|
||||
|
||||
// 空き待ち状況確認画面
|
||||
Route::get('park_waitlist', [ParkWaitlistController::class, 'index'])
|
||||
->name('park_waitlist.index');
|
||||
|
||||
Route::get('/login', function () {
|
||||
return '
|
||||
<form method="POST" action="/login">
|
||||
<input type="hidden" name="_token" value="' . csrf_token() . '">
|
||||
<input type="text" name="user_id" placeholder="ユーザーID">
|
||||
<button type="submit">ログイン</button>
|
||||
</form>
|
||||
';
|
||||
})->name('login');
|
||||
|
||||
|
||||
Route::post('/login', function (Request $request) {
|
||||
$user_id = $request->input('user_id');
|
||||
Session::put('user_id', $user_id); // 入力されたIDをそのまま保存
|
||||
return redirect('/user/info'); // 認証なしでリダイレクト
|
||||
});
|
||||
|
||||