@extends('layouts.admin')

@section('content')
  <div class="card-header">
    <h4>Students With No Competition Activity Yet</h4>
  </div>
  <div class="card-body">
    <div class="activity-summary-grid">
      <a href="{{ route('admin.loginstatus') }}" class="activity-summary-card is-active">
        <span>Active Students</span>
        <strong>{{ number_format(count($loginuserdetails)) }}</strong>
      </a>
      <a href="{{ route('admin.unloginstatus') }}" class="activity-summary-card is-idle">
        <span>No Activity Yet</span>
        <strong>{{ number_format(count($usersdata)) }}</strong>
      </a>
    </div>

    <div class="table-responsive">
      <table class="table table-striped table-hover" id="tableExport" style="width:100%;">
        <thead>
          <tr>
            <th>Student</th>
            <th>Class</th>
            <th>Email</th>
            <th>Mobile Number</th>
            <th>Address</th>
          </tr>
        </thead>
        <tbody>
          @foreach($usersdata as $student)
            <tr>
              <td><strong>{{ $student->name }}</strong></td>
              <td>{{ $student->studentProfile?->classname ?? '-' }}</td>
              <td>{{ $student->email ?: '-' }}</td>
              <td>
                @if($student->mobileno)
                  <a href="tel:{{ $student->mobileno }}">{{ $student->mobileno }}</a>
                @else
                  -
                @endif
              </td>
              <td>{{ $student->address ?: '-' }}</td>
            </tr>
          @endforeach
        </tbody>
      </table>
    </div>
  </div>

@endsection
