@php $canSale = ($course->canSale() and !$hasBought); $authUserJoinedWaitlist = false; if (!empty($authUser)) { $authUserWaitlist = $course->waitlists()->where('user_id', $authUser->id)->first(); $authUserJoinedWaitlist = !empty($authUserWaitlist); } @endphp
@if(!$canSale and $course->canJoinToWaitlist()) @elseif($hasBought or !empty($course->getInstallmentOrder())) {{ trans('update.go_to_learning_page') }} @elseif(!isFreeModeEnabled() and !empty($course->price) and $course->price > 0) @if($canSale and !empty($course->points)) {!! trans('update.buy_with_n_points',['points' => $course->points]) !!} @endif @if(!isFreeModeEnabled() and $canSale and !empty(getFeaturesSettings('direct_classes_payment_button_status'))) @endif @if(!isFreeModeEnabled() and !empty($installments) and count($installments) and getInstallmentsSettings('display_installment_button')) {{ trans('update.pay_with_installments') }} @endif @else @if(!$canSale) @if($course->checkCapacityReached()) {{ trans('update.capacity_reached') }} @else {{ trans('public.disabled') }} @endif @else {{ trans('public.enroll_on_webinar') }} @endif @endif @if(!isFreeModeEnabled() and $canSale and $course->canUseSubscribe()) {{ trans('public.subscribe') }} @endif