@extends('super_admin.layouts.master') @section('title', $school->name) @section('page_title', 'School Details') @section('content')

{{ $school->name }}

{{ $school->slug }}.schoolerp.com

@if($school->logo && \Illuminate\Support\Facades\Storage::disk('public')->exists($school->logo))
{{ $school->name }} Logo
@else
{{ substr($school->name, 0, 1) }}
@endif

Email

{{ $school->email }}

Phone

{{ $school->phone }}

Address

{{ $school->address }}

Plan

{{ ucfirst($school->plan) }}

Status

{{ ucfirst($school->status) }}

Subscription

Plan {{ ucfirst($school->plan) }}
Started {{ $school->subscription_start->format('M d, Y') }}
Expires {{ $school->subscription_end->format('M d, Y') }}
Days Left {{ max(0, $school->daysUntilExpiry()) }} days
@if($school->daysUntilExpiry() <= 30)
Expiring soon!
@endif

Total Users

{{ $stats['total_users'] }}

Students

{{ $stats['students'] }}

Teachers

{{ $stats['teachers'] }}

Active Modules

{{ $stats['active_modules'] }}

Active Modules & Features

Manage
@forelse($school->subscriptionsWithFeatures as $subscription)

{{ $subscription->module->name }}

{{ ucfirst($subscription->module->category) }}

{{ count($subscription->enabled_features ?? []) }} features
@empty

No modules assigned

Assign modules now
@endforelse

Recent Users

Last 5 added
@forelse($recent_users as $user)
{{ substr($user->name, 0, 1) }}

{{ $user->name }}

{{ $user->email }}

{{ ucfirst(str_replace('_', ' ', $user->user_type)) }}

{{ $user->created_at->diffForHumans() }}

@empty

No users yet

@endforelse

Quick Actions

Edit School Info Manage Modules {{ $school->subscriptions()->where('status', 'active')->count() }} active Modify Subscription

Danger Zone

System Info

School ID {{ $school->id }}
Created {{ $school->created_at->format('M d, Y') }}
Last Updated {{ $school->updated_at->diffForHumans() }}
Database Connected
{{-- Reset Password Modal --}} {{-- Subscription History Modal --}} {{-- Renewal Success Alert --}} @if(session('renewal_success')) @php $r = session('renewal_success'); @endphp
{{ $r['action'] === 'upgraded' ? 'Plan Upgraded!' : 'Renewed Successfully!' }}
School {{ $r['name'] }}
Plan {{ $r['plan'] }}
Extended by {{ $r['months'] }} month(s)
New Expiry {{ $r['end_date'] }}
@endif {{-- Delete Confirmation Modal --}} @endsection @push('scripts') @endpush