<div class="table-responsive">
  <div class="d-flex justify-content-between">
		<h5 class="mb-0">Consultant Doctors</h5>

		<button type="button" class="btn btn-primary" id="addConsultant" data-bs-toggle="modal" data-bs-target="#commonModal"><i class="bx bx-plus-circle"></i> Add New</button>
  </div>
  <hr class="mb-2">
  <table id="consultants_table" class="table table-bordered align-middle" style="width:100%">
  	<thead class="table-light">
      <tr>
    		<!-- <th class="thbutton">Sl No</th> -->
    		<th>Consultant</th>
    		<!-- <th>Applied Date</th> -->
    		<th class="thbutton">Remove</th>
      </tr>
		</thead>
  	<tbody>
    	@foreach ($consultants as $key => $consultant)
    	<tr>
      	<!-- <td class="text-center">{{ $key+1 }}</td> -->
      	<td>{{ ($consultant->consultants->account_title->name ?? '') .' '. $consultant->consultants->name }} <br>( {{ $consultant->consultants->code . ')' }}<br>{{-- {!! $consultant->applied_date_time ? formatedDateTime($consultant->applied_date_time) : 'N/A' !!} --}}</td>
      	<!-- <td>{!! $consultant->applied_date_time ? formatedDateTime($consultant->applied_date_time) : 'N/A' !!}</td> -->
      	<td class="text-center">
        @if ($consultant->is_main_dr == '0')
          <a data-url="{{route('ipd-admission-consultants.destroy')}}" data-id="{{$consultant->id}}" class="btn btn-sm btn-danger deleteDataCustom" href="#" class="text-danger" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Delete">
            <i class="bi bi-trash text-white"></i>
          </a>
        @else
          <button disabled class="btn btn-sm btn-danger" href="#" class="text-danger">
            <i class="bi bi-trash text-white"></i>
          </button>
        </td>
        @endif
    	</tr>
    	@endforeach
  	</tbody>
  </table>
</div>