@extends('admin.layout.master')

@section('content')

<div class="app-content  my-3 my-md-5">
				<div class="side-app">
					<div class="page-header">
						<ol class="breadcrumb">
							<li class="breadcrumb-item" aria-current="page">Package Management</li>
							<li class="breadcrumb-item active" aria-current="page">Practice Sets Manager</li>
						</ol>
					</div>
					<!-- MAIN BODY CONTENT -->
		            <h1>Practice Sets Manager</h1>
		           <form class="search_filter_frm" method="post">
		            	{{csrf_field()}}
		            
		            <div class="row ">
		              <div class="col-xl-4 col-lg-6 col-md-12">
		                <div class="card">
		                  <div class="card-body small-card">
		                    <h5 class="font-medium">Total No of Practice Sets</h5>
		                    <div class="counter">
		                      <svg
		                        id="small-card-icon"
		                        class="red"
		                        xmlns="http://www.w3.org/2000/svg"
		                        width="24"
		                        height="24"
		                        viewBox="0 0 24 24"
		                      >
		                        <g transform="translate(21090 -1397)">
		                          <rect
		                            width="24"
		                            height="24"
		                            transform="translate(-21090 1397)"
		                            fill="none"
		                          />
		                          <path
		                            d="M14.222,18H1.778A1.791,1.791,0,0,1,0,16.2V3.6A1.792,1.792,0,0,1,1.778,1.8H5.494a2.646,2.646,0,0,1,5.014,0h3.715A1.791,1.791,0,0,1,16,3.6V16.2A1.791,1.791,0,0,1,14.222,18ZM4.445,12.6a.9.9,0,0,0,0,1.8H8.89a.9.9,0,0,0,0-1.8Zm0-3.6a.9.9,0,0,0,0,1.8h7.111a.9.9,0,0,0,0-1.8Zm0-3.6a.9.9,0,0,0,0,1.8h7.111a.9.9,0,0,0,0-1.8ZM8,1.8a.9.9,0,1,0,.889.9A.9.9,0,0,0,8,1.8Z"
		                            transform="translate(-21086 1400)"
		                            fill=""
		                          />
		                        </g>
		                      </svg>
		                      <span class="maintotalSet">{{$totalSets}}</span>
		                    </div>
		                    <svg
		                      id="small-card-bg-icon"
		                      class="red"
		                      xmlns="http://www.w3.org/2000/svg"
		                      width="24"
		                      height="24"
		                      viewBox="0 0 24 24"
		                    >
		                      <g transform="translate(21090 -1397)">
		                        <rect
		                          width="24"
		                          height="24"
		                          transform="translate(-21090 1397)"
		                          fill="none"
		                        />
		                        <path
		                          d="M14.222,18H1.778A1.791,1.791,0,0,1,0,16.2V3.6A1.792,1.792,0,0,1,1.778,1.8H5.494a2.646,2.646,0,0,1,5.014,0h3.715A1.791,1.791,0,0,1,16,3.6V16.2A1.791,1.791,0,0,1,14.222,18ZM4.445,12.6a.9.9,0,0,0,0,1.8H8.89a.9.9,0,0,0,0-1.8Zm0-3.6a.9.9,0,0,0,0,1.8h7.111a.9.9,0,0,0,0-1.8Zm0-3.6a.9.9,0,0,0,0,1.8h7.111a.9.9,0,0,0,0-1.8ZM8,1.8a.9.9,0,1,0,.889.9A.9.9,0,0,0,8,1.8Z"
		                          transform="translate(-21086 1400)"
		                          fill=""
		                        />
		                      </g>
		                    </svg>
		                  </div>
		                </div>
		              </div>

		              <div class="col-xl-4 col-lg-6 col-md-12">
		                <div class="card">
		                  <div class="card-body small-card">
		                    <h5 class="font-medium">
		                      Total No. Of Chapters in all Practice Sets
		                    </h5>
		                    <div class="counter">
		                      <svg
		                        id="small-card-icon"
		                        class="orange"
		                        xmlns="http://www.w3.org/2000/svg"
		                        width="24"
		                        height="24"
		                        viewBox="0 0 24 24"
		                      >
		                        <g transform="translate(21090 -1397)">
		                          <rect
		                            width="24"
		                            height="24"
		                            transform="translate(-21090 1397)"
		                            fill="none"
		                          />
		                          <path
		                            d="M14.222,18H1.778A1.791,1.791,0,0,1,0,16.2V3.6A1.792,1.792,0,0,1,1.778,1.8H5.494a2.646,2.646,0,0,1,5.014,0h3.715A1.791,1.791,0,0,1,16,3.6V16.2A1.791,1.791,0,0,1,14.222,18ZM4.445,12.6a.9.9,0,0,0,0,1.8H8.89a.9.9,0,0,0,0-1.8Zm0-3.6a.9.9,0,0,0,0,1.8h7.111a.9.9,0,0,0,0-1.8Zm0-3.6a.9.9,0,0,0,0,1.8h7.111a.9.9,0,0,0,0-1.8ZM8,1.8a.9.9,0,1,0,.889.9A.9.9,0,0,0,8,1.8Z"
		                            transform="translate(-21086 1400)"
		                            fill=""
		                          />
		                        </g>
		                      </svg>
		                      <span>{{$totalChapters}}</span>
		                    </div>
		                    <svg
		                      id="small-card-bg-icon"
		                      class="orange"
		                      xmlns="http://www.w3.org/2000/svg"
		                      width="24"
		                      height="24"
		                      viewBox="0 0 24 24"
		                    >
		                      <g transform="translate(21090 -1397)">
		                        <rect
		                          width="24"
		                          height="24"
		                          transform="translate(-21090 1397)"
		                          fill="none"
		                        />
		                        <path
		                          d="M14.222,18H1.778A1.791,1.791,0,0,1,0,16.2V3.6A1.792,1.792,0,0,1,1.778,1.8H5.494a2.646,2.646,0,0,1,5.014,0h3.715A1.791,1.791,0,0,1,16,3.6V16.2A1.791,1.791,0,0,1,14.222,18ZM4.445,12.6a.9.9,0,0,0,0,1.8H8.89a.9.9,0,0,0,0-1.8Zm0-3.6a.9.9,0,0,0,0,1.8h7.111a.9.9,0,0,0,0-1.8Zm0-3.6a.9.9,0,0,0,0,1.8h7.111a.9.9,0,0,0,0-1.8ZM8,1.8a.9.9,0,1,0,.889.9A.9.9,0,0,0,8,1.8Z"
		                          transform="translate(-21086 1400)"
		                          fill=""
		                        />
		                      </g>
		                    </svg>
		                  </div>
		                </div>
		              </div>

		              <div class="col-xl-4 col-lg-6 col-md-12">
		                <div class="card">
		                  <div class="card-body small-card">
		                    <h5 class="font-medium">
		                      Total No. Of Questions in all Practice Sets
		                    </h5>
		                    <div class="counter">
		                      <svg
		                        id="small-card-icon"
		                        class="blue"
		                        xmlns="http://www.w3.org/2000/svg"
		                        width="24"
		                        height="24"
		                        viewBox="0 0 24 24"
		                      >
		                        <g transform="translate(21090 -1397)">
		                          <rect
		                            width="24"
		                            height="24"
		                            transform="translate(-21090 1397)"
		                            fill="none"
		                          />
		                          <path
		                            d="M14.222,18H1.778A1.791,1.791,0,0,1,0,16.2V3.6A1.792,1.792,0,0,1,1.778,1.8H5.494a2.646,2.646,0,0,1,5.014,0h3.715A1.791,1.791,0,0,1,16,3.6V16.2A1.791,1.791,0,0,1,14.222,18ZM4.445,12.6a.9.9,0,0,0,0,1.8H8.89a.9.9,0,0,0,0-1.8Zm0-3.6a.9.9,0,0,0,0,1.8h7.111a.9.9,0,0,0,0-1.8Zm0-3.6a.9.9,0,0,0,0,1.8h7.111a.9.9,0,0,0,0-1.8ZM8,1.8a.9.9,0,1,0,.889.9A.9.9,0,0,0,8,1.8Z"
		                            transform="translate(-21086 1400)"
		                            fill=""
		                          />
		                        </g>
		                      </svg>
		                      <span>{{$totalQuestions}}</span>
		                    </div>
		                    <svg
		                      id="small-card-bg-icon"
		                      class="blue"
		                      xmlns="http://www.w3.org/2000/svg"
		                      width="24"
		                      height="24"
		                      viewBox="0 0 24 24"
		                    >
		                      <g transform="translate(21090 -1397)">
		                        <rect
		                          width="24"
		                          height="24"
		                          transform="translate(-21090 1397)"
		                          fill="none"
		                        />
		                        <path
		                          d="M14.222,18H1.778A1.791,1.791,0,0,1,0,16.2V3.6A1.792,1.792,0,0,1,1.778,1.8H5.494a2.646,2.646,0,0,1,5.014,0h3.715A1.791,1.791,0,0,1,16,3.6V16.2A1.791,1.791,0,0,1,14.222,18ZM4.445,12.6a.9.9,0,0,0,0,1.8H8.89a.9.9,0,0,0,0-1.8Zm0-3.6a.9.9,0,0,0,0,1.8h7.111a.9.9,0,0,0,0-1.8Zm0-3.6a.9.9,0,0,0,0,1.8h7.111a.9.9,0,0,0,0-1.8ZM8,1.8a.9.9,0,1,0,.889.9A.9.9,0,0,0,8,1.8Z"
		                          transform="translate(-21086 1400)"
		                          fill=""
		                        />
		                      </g>
		                    </svg>
		                  </div>
		                </div>
		              </div>
		            </div>
		           
		            <!-- Table -->
		            <div class="card">
		              <div class="card-header pt-5">
		                <h2>Practice Sets</h2>
		                <div class="filter-group">
		                  <a href="{{route('admin.practice_set.add')}}" class="btn btn-primary add-btn add-btn-sm">
		                    <i class="fa fa-plus-circle"></i>Add Practice Set
		                  </a>
		                  <select class="form-control search_filter" id="status_filter" name="status_filter">
		                    <option value="" >Select Status</option>
		                    <option value="1"  @if(request()->post('status_filter') == 1){{'selected'}}@endif>Under Progress</option>
		                    <option value="2" @if(request()->post('status_filter') == 2){{'selected'}}@endif>Completed</option>
		                    <option value="3"  @if(request()->post('status_filter') == 3){{'selected'}}@endif>In Review</option>
		                    <option value="4"  @if(request()->post('status_filter') == 4){{'selected'}}@endif>Declined</option>
		                  </select>
		                  <select class="form-control search_filter" id="examtype_filter" name="examtype_filter">
		                    <option value="" >Exam Type</option>
		                    @if($examTypes)
	                    		@foreach($examTypes as $types)
	                    		    <option value="{{$types->id}}"  @if(request()->post('examtype_filter') == $types->id){{'selected'}}@endif>{{$types->exam_type}}</option>
	                    		@endforeach
		                    @endif
		                  </select>
		                  <select class="form-control search_filter" id="diff_filter" name="diff_filter">
		                    <option value="" >Difficulty Level</option>
		                    <option value="1"  @if(request()->post('diff_filter') == 1){{'selected'}}@endif>Easy</option>
		                    <option value="2"  @if(request()->post('diff_filter') == 2){{'selected'}}@endif>Mediium</option>
		                    <option value="3" @if(request()->post('diff_filter') == 3){{'selected'}}@endif >Hard</option>
		                  </select>
		              	
		                </div>
		              </div>
		              <div class="card-body pt-0">
		                <p class="text-right font-bold total_test">Total No. Of Test(s): {{($totalSets)}}</p>
		                <div class="table-responsive">
		                  <table
		                    id="practice-set-manager"
		                    class="table card-table dataTable table-hover table-vcenter text-nowrap"
		                  >
		                    <thead>
		                      <tr>
		                        <th width="25">Practice Sets</th>
		                        <th>Exam Type</th>
		                        <th>Total Subject(s)</th>
		                        <th>Total Chapter(s)</th>
		                        <th>Total Question(s)</th>
		                        <th>Status</th>
		                        <th>Action</th>
		                      </tr>
		                    </thead>
		                  </table>
		                </div>
		              </div>
		            </div>
		            </form>
		            <!-- //Table -->
		            <!--// MAIN BODY CONTENT -->
				</div>
			</div>
@endsection
@section('scripts')
<script type="text/javascript" src="{{asset('js/practice_set.js?v='.time())}}"></script>
<script type="text/javascript">
	@if(Session::has('error'))
  alertify.error("{{ Session::get('error') }}");
  @endif
</script>
@endsection
