@extends('layouts.admin')

@section('content')
<div class="card mb-3">
  <div class="card-header d-flex justify-content-between">
    <h5 class="mb-0">Members in {{ $group->name }}</h5>
    <a href="{{ url('/allgroups') }}" class="btn btn-sm btn-falcon-default">Back</a>
  </div>

  <div class="card-body">
    <div class="table-responsive scrollbar">
      <table id="basic-btn"  class="table table-striped fs--1">
        <thead class="bg-200">
          <tr>
            <th>Name</th>
            <th>National ID</th>
            <th>Phone</th>
            <th>Status</th>
          </tr>
        </thead>
        <tbody>
          @foreach($members as $member)
          <tr>
            <td>{{ $member->name }} {{ $member->surname }}</td>
            <td>{{ $member->national_id }}</td>
            <td>{{ $member->cell_number }}</td>
            <td>
              <span class="badge
                @if($member->status1 == 'Active') badge-soft-success
                @elseif($member->status1 == 'Pending') badge-soft-info
                @elseif($member->status1 == 'Lapsed') badge-soft-warning
                @elseif($member->status1 == 'Restart') badge-soft-danger
                @endif">
                {{ $member->status1 }}
              </span>
            </td>
          </tr>
          @endforeach
        </tbody>
      </table>
    </div>
  </div>
</div>
@endsection
