@extends('layouts.dashboard') @section('title', __('Instructor Dashboard')) @section('page_title', __('Dashboard')) @section('content') @if(! auth()->user()->canTeach()) @php($appStatus = auth()->user()->instructorApplicationStatus())
{{ $appStatus === 'rejected' ? __('Your instructor application was not approved') : __('Your instructor application is under review') }}
@if($appStatus === 'rejected') {{ __('Course creation is disabled.') }} @if(auth()->user()->instructorProfile?->review_note) {{ __('Reviewer note:') }} {{ auth()->user()->instructorProfile->review_note }}@endif @else {{ __('You can set up your profile now; course creation unlocks as soon as the academy approves you. You will be notified by e-mail.') }} @endif
@endif
{{ __('Instructor studio') }}

{{ __('Welcome back, :name', ['name' => explode(' ', auth()->user()->name)[0]]) }} ๐Ÿ‘‹

{{ __('Keep creating โ€” your students are waiting for the next lesson.') }}

{{ $stats['rating'] ?: 'โ€”' }}
{{ __('Avg rating') }}
{{ $stats['pending_submissions'] }}
{{ __('To grade') }}
{{ money($stats['pending_payouts']) }}
{{ __('Payout pending') }}
@include('partials.dashboard.stat-card', ['label' => __('My Courses'), 'value' => $stats['courses'], 'icon' => 'bi-easel', 'color' => 'primary', 'url' => route('instructor.courses.index')])
@include('partials.dashboard.stat-card', ['label' => __('Students'), 'value' => number_format($stats['students']), 'icon' => 'bi-people', 'color' => 'info', 'trend' => $stats['students_trend'], 'hint' => __('vs last month')])
@include('partials.dashboard.stat-card', ['label' => __('Reviews'), 'value' => $stats['reviews'], 'icon' => 'bi-star', 'color' => 'warning', 'hint' => $stats['rating'] ? $stats['rating'] . ' โ˜… ' . __('average') : __('No ratings yet')])
@include('partials.dashboard.stat-card', ['label' => __('Earnings'), 'value' => money($stats['earnings']), 'icon' => 'bi-wallet2', 'color' => 'success', 'trend' => $stats['earnings_trend'], 'hint' => __('vs last month'), 'url' => route('instructor.earnings')])
{{ __('Earnings & New Students') }}{{ __('Last 6 months') }}
{{ __('Upcoming Live Classes') }}
@forelse($upcomingClasses as $lc)
{{ $lc->start_time->format('d') }}
{{ $lc->start_time->format('M') }}
{{ $lc->title }}
{{ $lc->course->title ?? '' }} ยท {{ $lc->start_time->format('h:i A') }}
@empty
{{ module_enabled('liveclass') ? __('No upcoming classes.') : __('Live classes module is disabled.') }}
@endforelse
{{ __('My Courses') }}{{ __('View all') }}
@forelse($courses as $course) @empty @endforelse
{{ __('Course') }}{{ __('Status') }}{{ __('Students') }}{{ __('Price') }}
{{ $course->title }}
{{ $course->updated_at->diffForHumans() }}
{{ status_label($course->approval_status) }} {{ $course->enrollments_count }} {{ $course->isFree() ? __('Free') : money($course->currentPrice()) }} {{ __('Curriculum') }}
{{ __("You haven't created any courses yet.") }}
{{ __('Latest Reviews') }}
@forelse($recentReviews as $r)
{{ $r->student->name ?? 'โ€”' }}
{{ $r->course->title ?? '' }}
@for($i = 1; $i <= 5; $i++)@endfor
@if($r->review)
{{ $r->review }}
@endif
@empty
{{ __('No reviews yet.') }}
@endforelse
{{ __('Recent Enrollments') }}
@forelse($recentEnrollments as $e)
{{ $e->student->name ?? 'โ€”' }} {{ __('joined') }} {{ \Illuminate\Support\Str::limit($e->course->title ?? 'โ€”', 36) }}
{{ $e->created_at->diffForHumans() }}
@empty
{{ __('No enrollments yet.') }}
@endforelse
@endsection @push('scripts') @endpush