@include('admin/include/header')
<!-- Main Content -->
<div class="main-content">
    <section class="section">
      <div class="section-header">
        <h1>Review</h1>
        <div class="section-header-breadcrumb">
          <div class="breadcrumb-item active"><a href="{{ url('admin/') }}">Dashboard</a></div>
          <div class="breadcrumb-item"><a href="javascript:void (0)">Review</a></div>
          <div class="breadcrumb-item">Add Review</div>
        </div>
      </div>

      <div class="section-body">
        <div class="row">

          <!-- Add Review Form -->
          <div class="col-8 col-md-8 col-lg-8">
            <div class="card">
              <form id="addReviewForm">
                <div class="card-header">
                  <h4>Add Review</h4>
                </div>
                <div class="card-body">
                    <div class="row">
                      <div class="form-group col-md-3">
                        <label>User Fullname</label>
                        <input type="text" name="fullname" id="fullname"  class="form-control">
                      </div>

                      <div class="form-group col-md-3">
                        <label>Mobile</label>
                        <input type="text" name="mobile" id="mobile" class="form-control">
                      </div>

                      <div class="form-group col-md-3">
                        <label>Email</label>
                        <input type="text" name="email" id="email" class="form-control">
                      </div>

                      
                      <div class="form-group col-md-3">
                      <label>Select Product</label>
                      <select name="products" class="form-control" id="p_code">
                          @if(count($products) > 0)
                              @foreach($products as $singleProduct)
                                  <option value="{{ $singleProduct['p_code'] }}">{{ $singleProduct['title'] }}</option>
                              @endforeach
                          @endif
                      </select>
                    </div>
                  </div>

                  <div class="row">
                    <div class="form-group col-md-5">
                      <label>Review</label>
                      <textarea name="review" id="review" class="form-control"></textarea>
                    </div>

                    <div class="form-group col-md-3">
                      <label>Star Ratings</label>
                      <input type="text" name="stars" id="rating" class="form-control" />
                    </div>
                  </div>

                </div>
                <div class="card-footer text-left">
                  <button type="submit" class="btn btn-primary insertReview">Submit</button>
                </div>
              </form>
            </div>
          </div>

          
          <!-- upload excel -->
          <div class="col-4 col-md-4 col-lg-4">
            <div class="card">
              <form id="addSubCategory">
                <div class="card-header">
                  <h4>Add Review With Excel</h4>
                </div>
                <div class="card-body">
                  <div class="form-group">
                    <label>Select Excel File</label>
                    <input type="file" name="excel" class="form-control" />
                  </div>
                </div>
                <div class="card-footer text-right">
                  <button type="submit" class="btn btn-primary">Upload Reviews</button>
                </div>
              </form>
            </div>
          </div>


        </div>
      </div>

    </section>
  </div>

@include('admin/include/footer')
