@extends('layouts.admin') @section('content')
<div class="card mb-3">
  <div class="card-header">
    <div class="row flex-between-end">
      <div class="col-auto align-self-center">
        <h5 class="mb-0" data-anchor="data-anchor">List of Covers</h5>
      </div>
    </div>
  </div>
  <div class="card-body pt-0">

    <div id="tableExample2" data-list='{"valueNames":["name","sum_assured","monthly_pay","underwritter_name","waiting_period","member_spouse_amount","15_to_21_amount","6_to_14_amount","1_to_6_amount","stillborn_to_11_amount","min_age_entry","max_age_entry"],"page":10,"pagination":true}'>
      <div class="table-responsive scrollbar">
        <table class="table table-bordered table-striped fs--1 mb-0">
          <thead class="bg-200 text-900">
            <tr>
              <th class="sort" data-sort="name">Name</th>
              <th class="sort" data-sort="sum_assured">Sum Assured</th>
              <th class="sort" data-sort="monthly_pay">Monthly Pay</th>
              <th class="sort" data-sort="underwritter_name">Underwritter</th>
              <th class="sort" data-sort="waiting_period">Waiting Period</th>
              <th class="sort" data-sort="member_spouse_amount">Member & Spouse</th>
              <th class="sort" data-sort="15_to_21_amount">15 to 21</th>
              <th class="sort" data-sort="6_to_14_amount">6 to 14</th>
              <th class="sort" data-sort="1_to_6_amount">1 to 6</th>
              <th class="sort" data-sort="stillborn_to_11_amount">Stillborn to 11 Months</th>
              <th class="sort" data-sort="min_age_entry">Min Age</th>
              <th class="sort" data-sort="max_age_entry">Max Age</th>
              <th>Action</th>
            </tr>
          </thead>
          <tbody class="list">
            @foreach ($covers as $cover)
            <tr>
              <td class="name">{{$cover->name}}</td>
              <td class="sum_assured">{{$cover->sum_assured}}</td>
              <td class="monthly_pay">{{$cover->monthly_pay}}</td>
              <td class="underwritter_name">{{$cover->underwritter_name}}</td>
              <td class="waiting_period">{{$cover->waiting_period}}</td>
              <td class="member_spouse_amount">{{$cover->member_spouse_amount}}</td>
              <td class="15_to_21_amount">{{$cover->_15_to_21_amount}}</td>
              <td class="6_to_14_amount">{{$cover->_6_to_14_amount}}</td>
              <td class="1_to_6_amount">{{$cover->_1_to_6_amount}}</td>
              <td class="stillborn_to_11_amount">{{$cover->stillborn_to_11_amount}}</td>
              <td class="min_age_entry">{{$cover->min_age_entry}}</td>
              <td class="max_age_entry">{{$cover->max_age_entry}}</td>
              <td>
                <a href='{{ url("/cover", $cover->id)}}' class="btn btn-primary btn-sm"> View</a>&nbsp;
                <a href='{{ url("/delete_cover", $cover->id)}}' class="btn btn-danger btn-sm"> Delete </a>
              </td>
            </tr>
            @endforeach
          </tbody>
        </table>
      </div>
      <div class="d-flex justify-content-center mt-3"><button class="btn btn-sm btn-falcon-default me-1" type="button" title="Previous" data-list-pagination="prev"><span class="fas fa-chevron-left"></span></button>
        <ul class="pagination mb-0"></ul><button class="btn btn-sm btn-falcon-default ms-1" type="button" title="Next" data-list-pagination="next"><span class="fas fa-chevron-right"> </span></button>
      </div>
    </div>
  </div>

</div>
@endsection