@extends('layouts.app-sub') @section('title', '마이페이지 - GLOBEAU') @section('header-title', '마이페이지') @section('content') @php $unreadCount = $unreadCount ?? (Auth::check() ? Auth::user()->unreadNotifications()->count() : 0); $latestShop = $latestShop ?? (Auth::check() ? \App\Models\Shop::where('user_id', Auth::id()) ->orWhere(function($query) { if (!empty(Auth::user()->phone)) { $query->where('ceo_phone', Auth::user()->phone); } }) ->latest('id') ->first() : null); @endphp
@if (!empty($user->profile_photo_path)) {{ $user->name }} @else {{ mb_substr($user->name, 0, 1) }} @endif
{{ $user->membership_level ?? 'PREMIUM MEMBER' }}

{{ $user->name }} 님

{{ $user->email }}
@if($latestShop)
비즈니스 파트너
{{ $latestShop->name }}
@if($latestShop->status === 'pending') 현재 본사 입점 적격 심사가 진행 중입니다. @elseif($latestShop->status === 'rejected') 입점 서류 또는 정보 보완이 필요합니다. @elseif($latestShop->status === 'approved') 글로뷰 공식 제휴 뷰티샵 인증 매장 @endif
@if($latestShop->status === 'pending') 심사 현황 확인 @elseif($latestShop->status === 'rejected') 반려 사유 확인 @elseif($latestShop->status === 'approved') 뷰티샵 관리자 센터 @endif
@else
뷰티샵 원장님이신가요?

글로뷰의 엄선된 고객들과 만나고 디지털 예약 관리를 시작해 보세요.

입점 신청하기
@endif @if(isset($upcomingReservation) && $upcomingReservation) @php $ticketItem = $upcomingReservation->userTicketItem; $ticket = $ticketItem?->userTicket; $program = $ticketItem?->program ?? ($ticket?->orderItem?->program ?? null); $programName = $program?->name ?? ($ticketItem?->program_name ?? '프리미엄 뷰티 프로그램'); $rawReservedAt = $upcomingReservation->getAttributes()['reserved_at']; $carbonDate = \Carbon\Carbon::parse($rawReservedAt); $displayMonth = $carbonDate->translatedFormat('M'); $displayDay = $carbonDate->format('d'); $displayTime = date('H:i', strtotime($rawReservedAt)); $diffDays = (int) now()->startOfDay()->diffInDays($carbonDate->startOfDay(), false); $rawCode = str_replace('-', '', $upcomingReservation->reservation_code); $formattedReservationCode = implode('-', str_split($rawCode, 4)); @endphp
{{ $upcomingReservation->status_label }} @if($upcomingReservation->status === \App\Models\Reservation::STATUS_PENDING) @endif
@if($diffDays === 0) 오늘 방문 @elseif($diffDays === 1) 내일 방문 (D-1) @elseif($diffDays > 1) D-{{ $diffDays }} @else 방문 임박 @endif
{{ $displayMonth }} {{ $displayDay }} {{ $displayTime }}
{{ $programName }}
{{ $upcomingReservation->shop->name ?? '지정 제휴 뷰티샵' }}
@if(!empty($upcomingReservation->shop?->address1))
{{ $upcomingReservation->shop->address1 }}
@endif
예약번호: {{ $formattedReservationCode }}
예약 상세 · 일정 취소 @if(!empty($upcomingReservation->shop?->tel)) 매장 통화 @endif
@endif

{{ number_format($wallet['pay_balance'] ?? 0) }}원

@endsection @push('styles') @endpush