@php if (request()->has('popup')) $layout = "common.layout-popup"; else $layout = "common.layout"; @endphp @extends($layout) @section("page-title", "회원 관리: ".$user->name) @section("header") {!! resource('css/form.css') !!} {!! resource('js/common/kakaoPost.js') !!} {!! resource('js/modal.js') !!} {!! setResources([ 'toast-calendar']) !!} {{-- {!! resource('js/components/calendar.js') !!} --}} {!! resource('js/schedule/schedule.js') !!} @endsection @section("content") @if (!request()->has('popup'))

회원 관리: {{ $user->name }}

@endif
@csrf
회원 정보({{ $user->id }})
@if($User->role->name == 'root')
role->name))> @foreach ($roles as $role) role->name) and $user->role->name == $role->name)> @endforeach
@endif
@if (!empty($user->photo)) @endif Selected Image
role)> @error('name') {{ $message }} @enderror
@if ( $user->role ) {{ $user->edm_id }} @else @if ( $user->register_type == 'default') {{ $user->edm_id }} ({{ $user->email }}) @else @foreach (['google', 'naver', 'kakao'] as $social) @php $isExist = $user->userProviders()->where("provider", $social)->where("activated", 1)->count() > 0; @endphp @if ($isExist) @endif @endforeach {{ $user->email }} @endif @endif
@if($User->role->name == 'root')
activated)>
@else
@if ($user->activated == 0) 탈퇴 ({{date("Y.m.d", strtotime($user->deactivated_at)) }}) @else 활성 {{ $user->activated == 2 ? "(정책위반)" : '' }} @endif
@endif @if ($user->role)
@else
({{date("Y.m.d", strtotime($user->created_at)) }})
@endif
role)>
@error('phone') {{ $message }} @enderror
@if($user->is_accepted_email) @endif @if($user->is_accepted_phone) @endif
{{ $user->country?->name ?? "-"}}
@if ( $user->zip_code ) ({{ $user->zip_code }}) {{ $user->address }} {{ $user->region }} {{ $user->address_detail }} @else - @endif
어학원 강좌 지급
@if ($academyEnrollments->isNotEmpty()) @foreach($academyEnrollments as $enrollment) @php $startDate = \Carbon\Carbon::parse($enrollment->started_at); $endDate = \Carbon\Carbon::parse($enrollment->ended_at); $currentDate = $startDate->copy()->startOfMonth(); $monthlyPeriods = []; $courseIndex = 0; // 강좌 순서를 추적할 변수 $totalCourses = $enrollment->enrollmentCourses->count(); // 총 강좌 수 while ($currentDate->lte($endDate)) { $startOfMonth = $currentDate->copy()->startOfMonth(); $endOfMonth = $currentDate->copy()->endOfMonth(); $periodStart = $startDate->greaterThan($startOfMonth) ? $startDate : $startOfMonth; $periodEnd = $endDate->lessThan($endOfMonth) ? $endDate : $endOfMonth; $monthlyPeriods[] = [ 'start' => $periodStart->format('Y-m-d'), 'end' => $periodEnd->format('Y-m-d'), ]; $currentDate->addMonth(); } $thisUsePeriods = $endDate->diff($startDate)->days; @endphp
@csrf
{{ $enrollment->payment?->payment_no ?? "[지급]"}}
[{{ ucfirst($enrollment->module) }}] {{ $enrollment->product->name }} ({{ $enrollment->productOption->name }})
{{ config('system.enrollment_status')[$enrollment->status] }}
@php $children = $enrollment->getEnrollmentChangeHistories(); $totalPeriods = $enrollment->getEnrollmentTotalPeriod(); @endphp
$children->isNotEmpty() ])>
수강기간
@if ( $children->isNotEmpty() )
[반변경] @if ($children[0]->top_enrollment_id == $enrollment->id ) {{ $children->count() }} 회 @endif
    @foreach ( $children as $child )
  • {{ $child->depth }}회. {{ $child->childEnrollment->getEnrollmentName() }} ({{ date('Y-m-d H:i', strtotime($child->childEnrollment->created_at)) }})
  • @endforeach
@else @php $usePeriods = $totalPeriods[0] > 0 ? $totalPeriods[0] : $thisUsePeriods; @endphp 상품정보
@endif
@foreach($monthlyPeriods as $period) @php $periodStartDate = \Carbon\Carbon::parse($period['start']); $periodMonth = $periodStartDate->format('ym'); // YYMM 형식으로 월을 추출 $todayDate = \Carbon\Carbon::now(); $isPastOrStarted = $periodStartDate->lte($todayDate); // 현재 날짜가 시작일보다 이후인지 확인 // 현재 월에 해당하는 강좌 찾기 $monthCourse = $enrollment->enrollmentCourses->firstWhere('month', $periodMonth); @endphp @endforeach @if ($totalCourses > count($monthlyPeriods)) @php // month가 null인 강좌들 (미할당 강좌) $unassignedCourses = $enrollment->enrollmentCourses->filter(function($course) { return $course->month === null; }); @endphp @if ($unassignedCourses->count() > 0) @foreach($unassignedCourses as $index => $unassignedCourse) @endforeach @endif @endif
수강월 수강기간 강좌
{{ $periodStartDate->format('n') }}월 {{ $period['start'] }} ~ {{ $period['end'] }} {{-- 250516 테스트를 위해 강좌 제한 조건 주석처리 --}} {{-- @if (!$isPastOrStarted) --}} {{-- @else {{ $monthCourse ? $monthCourse->name : '미등록' }} @endif --}} {{-- @if (!$isPastOrStarted && $monthCourse) --}} @if ($monthCourse) @endif
@endforeach @endif
@include("user.popups.user-memo", ['userId' => $user->id])
@endsection @push("script") @endpush