@vite(['resources/css/app.css', 'resources/js/app.js']) @include('admin.partials.nav')
Overview

Admin dashboard

Quick view of programmes, runs, and registrations. Today is {{ $today->format('d M Y') }}.

πŸ“š

Programmes

{{ $totalProgrammes }}

{{ $activeProgrammes }} active on the public page Β· {{ $totalCourses }} total runs.

πŸŽ₯

Upcoming webinars

{{ $upcomingWebinars }}

Active courses with webinar links and future dates.

πŸ’³

Paid registrations today

{{ $paidRegistrationsToday }}

{{ $paidParticipantsToday }} participant{{ $paidParticipantsToday === 1 ? '' : 's' }} Β· RM {{ number_format($revenueToday, 2) }} collected.

⭐

All-time impact

{{ $totalPaidParticipants }}

Paid participants across all programmes Β· RM {{ number_format($totalRevenue, 2) }} total revenue.

Mode: @php $modeOptions = [ '' => 'All', 'online' => 'Online', 'hybrid' => 'Hybrid', 'onsite' => 'On-site', ]; @endphp @foreach ($modeOptions as $value => $label) @php $modeIcon = match ($value) { 'online' => 'πŸŽ₯', 'hybrid' => 'πŸŽ₯🏒', 'onsite' => 'πŸ₯', default => 'β—¦', }; $modeTitle = match ($value) { 'online' => 'Online webinars and fully virtual runs', 'hybrid' => 'Hybrid runs (mix of online and on-site)', 'onsite' => 'On-site training at a physical venue', default => 'All delivery modes', }; @endphp {{ $modeIcon }} {{ $label }} @endforeach
@if ($modeFilter) @endif @if ($applicantsFilter && $applicantsFilter !== 'all') @endif
Applicants: @php $applicantOptions = [ 'all' => 'All', 'paid' => 'Paid only', ]; @endphp @foreach ($applicantOptions as $value => $label) {{ $label }} @endforeach
Upcoming runs

Next few active runs ordered by date.

Quickly see what’s coming up and who has registered.

View all courses β†’
@if ($upcomingCourses->isEmpty())

No upcoming courses are scheduled yet.

@else
    @foreach ($upcomingCourses as $course) @php $programme = $course->programme; $delivery = strtolower($course->delivery_mode ?? ''); $isWebinar = $course->webinar_link || str_contains($delivery, 'online') || str_contains($delivery, 'webinar'); $isHybrid = str_contains($delivery, 'hybrid'); $recentApplicants = $course->registrations ?? collect(); $totalRegistrations = (int) ($course->total_registrations_count ?? 0); $paidRegistrations = (int) ($course->paid_registrations_count ?? 0); $paidParticipants = (int) ($course->paid_participants_sum ?? 0); $seatCapacity = $course->seat_capacity; @endphp
  • @if ($course->start_date) {{ $course->start_date->format('d M Y') }} @else Date TBC @endif

    {{ $programme->name ?? $course->name }}

    @if ($programme && $course->name && $course->name !== $programme->name)

    Run: {{ $course->name }}

    @endif @if ($course->location)

    {{ $course->location }}

    @endif @if ($totalRegistrations > 0)

    {{ $totalRegistrations }} applicant{{ $totalRegistrations === 1 ? '' : 's' }} @if ($paidRegistrations > 0) Β· {{ $paidRegistrations }} paid @endif

    @endif
    @php $modeTitle = $isWebinar ? 'Online webinar or fully virtual run' : ($isHybrid ? 'Hybrid run (mix of online and on-site)' : 'On-site training at a physical venue'); @endphp @if($isWebinar) πŸŽ₯ @elseif($isHybrid) πŸŽ₯🏒 @else πŸ₯ @endif @if($isWebinar) Online @elseif($isHybrid) Hybrid @else On-site @endif @if (! is_null($course->price))

    Fee: RM {{ number_format($course->price, 2) }}

    @endif

    @if ($seatCapacity !== null && $paidParticipants) {{ $paidParticipants }} of {{ $seatCapacity }} seats filled. @elseif ($seatCapacity !== null) Capacity: {{ $seatCapacity }} seats. @endif

    @if ($programme) View all runs @endif Edit run β†’
    @if ($recentApplicants->isNotEmpty())

    Recent applicants

      @foreach ($recentApplicants->take(4) as $registration)
    • {{ $registration->name }}

      @if ($registration->phone) {{ $registration->phone }} @if ($registration->email) Β· {{ $registration->email }} @endif @else {{ $registration->email }} @endif

      {{ $registration->status }}
    • @endforeach
    @endif
  • @endforeach
@endif
Recent registrations

Latest SenangPay-backed registrations across all programmes.

Use this list to quickly follow up with participants and check payment status.

View all registrations β†’
@if ($recentRegistrations->isEmpty())

No registrations recorded yet.

@else
    @foreach ($recentRegistrations as $registration) @php $course = $registration->course; $programme = $course?->programme; $delivery = strtolower($course->delivery_mode ?? ''); $isWebinar = $course && ($course->webinar_link || str_contains($delivery, 'online') || str_contains($delivery, 'webinar')); $isHybrid = $course && str_contains($delivery, 'hybrid'); @endphp
  • {{ $registration->name }}

    {{ $registration->email }} Β· {{ $registration->phone }}

    {{ $programme->name ?? $course->name ?? 'Unknown course' }} @if ($course && $programme && $course->name && $course->name !== $programme->name) Β· Run: {{ $course->name }} @endif @if ($registration->quantity) Β· {{ $registration->quantity }} pax @endif

    {{ $registration->status }}

    RM {{ number_format($registration->amount, 2) }}

    {{ optional($registration->created_at)->format('d M H:i') }}

    @php $modeTitle = $isWebinar ? 'Online webinar or fully virtual run' : ($isHybrid ? 'Hybrid run (mix of online and on-site)' : 'On-site training at a physical venue'); @endphp @if($isWebinar) πŸŽ₯ @elseif($isHybrid) πŸŽ₯🏒 @else πŸ₯ @endif @if($isWebinar) Online @elseif($isHybrid) Hybrid @else On-site @endif View / Print β†’
  • @endforeach
@endif
@if ($topProgrammesByParticipants->isNotEmpty())

Top programmes by paid participants

Based on SenangPay-backed registrations (status = paid).

@foreach ($topProgrammesByParticipants as $programmeRow) @endforeach
Programme Runs with paid regs Paid participants Revenue (RM) Actions
{{ $programmeRow->name }}
@if ($programmeRow->category)
{{ $programmeRow->category }}
@endif
{{ (int) $programmeRow->runs_with_paid_count }} {{ (int) $programmeRow->paid_participants_sum }} RM {{ number_format($programmeRow->revenue_sum ?? 0, 2) }} View programme β†’
@endif

Training calendar

{{ $calendarYear }} training runs at a glance

Each month shows scheduled runs (based on start date). Use this to plan upcoming workshops and webinars.

Year:
@foreach (request()->query() as $key => $value) @if ($key !== 'year') @endif @endforeach
+ New programme
@for ($month = 1; $month <= 12; $month++) @php $monthCourses = $adminCalendarMonths->get($month) ?? collect(); $monthName = \Illuminate\Support\Carbon::createFromDate($calendarYear, $month, 1)->format('F'); $monthWorkshops = $monthCourses->filter(fn ($c) => strtolower($c->category ?? '') === 'workshop'); $monthWebinars = $monthCourses->filter(fn ($c) => strtolower($c->category ?? '') === 'webinar'); // Per‑month variant so each tile looks different $cardBgClasses = 'cl-cal-month-' . $month; if ($monthCourses->isEmpty()) { $cardBgClasses .= ' cl-cal-month-card-empty'; } @endphp

{{ strtoupper($monthName) }} {{ $calendarYear }}

{{ $monthWorkshops->count() }} workshop{{ $monthWorkshops->count() === 1 ? '' : 's' }} Β· {{ $monthWebinars->count() }} webinar{{ $monthWebinars->count() === 1 ? '' : 's' }}

{{ $monthCourses->count() }} run{{ $monthCourses->count() === 1 ? '' : 's' }}
@if ($monthCourses->isEmpty())

No runs scheduled.

@else
@if ($monthWorkshops->isNotEmpty())

Workshops

    @foreach ($monthWorkshops->take(1) as $course) @php /** @var \App\Models\CorelifeCourse $course */ $programme = $course->programme; $dateLabel = $course->start_date ? $course->start_date->format('d M') : 'TBC'; if ($course->end_date && $course->end_date->isAfter($course->start_date)) { $dateLabel .= ' – ' . $course->end_date->format('d M'); } @endphp
  • {{ $dateLabel }}

    {{ $programme->name ?? $course->name }}

    @if ($course->location)

    {{ $course->location }}

    @endif
    @if (! is_null($course->price))

    RM {{ number_format($course->price, 0) }}

    @endif

    {{ $course->delivery_mode ?? 'On-site' }}

    @if ($programme) @endif
  • @endforeach @if ($monthWorkshops->count() > 1)
  • + {{ $monthWorkshops->count() - 1 }} more workshop{{ $monthWorkshops->count() - 1 === 1 ? '' : 's' }}…
  • @endif
@endif @if ($monthWebinars->isNotEmpty())

Online webinars

    @foreach ($monthWebinars->take(1) as $course) @php /** @var \App\Models\CorelifeCourse $course */ $programme = $course->programme; $dateLabel = $course->start_date ? $course->start_date->format('d M') : 'TBC'; if ($course->end_date && $course->end_date->isAfter($course->start_date)) { $dateLabel .= ' – ' . $course->end_date->format('d M'); } @endphp
  • {{ $dateLabel }}

    {{ $programme->name ?? $course->name }}

    @if ($course->location)

    {{ $course->location }}

    @endif
    @if (! is_null($course->price))

    RM {{ number_format($course->price, 0) }}

    @endif

    {{ $course->delivery_mode ?? 'Online' }}

    @if ($programme) @endif
  • @endforeach @if ($monthWebinars->count() > 1)
  • + {{ $monthWebinars->count() - 1 }} more webinar{{ $monthWebinars->count() - 1 === 1 ? '' : 's' }}…
  • @endif
@endif
@endif
@endfor
@include('admin.partials.footer')