<!-- Modal ADD Branch -->

<div class="modal fade" id="md_list_subcategory" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">

  <div class="modal-dialog modal-lg" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="exampleModalLabel">Sub-Category List &nbsp;&nbsp;
          <button  class="float-right btn btn-sm btn-outline-primary" data-toggle="modal" data-target="#md_add_subcategory" ><i class="fa fa-plus"></i></button> &nbsp;&nbsp;
          <h3 class="card-title">Add Sub-Category</h3>
        </h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true"></span>
        </button>
      </div>
      <div class="modal-body ">
        <div class ="card">
          <div class = "card-body form-fieldset">
          <div class="row">
            @foreach($curr_subategory as $subcat)
            <div class="col-md-3 col-sm-4">
              <div class="card box" >
                    <div class="card-status card-status-left bg-blue"></div>
                <div class="card-body report-card text-center">
                  <div class ="col-md-12">
                      <h4> {{$subcat->name}}</h4>
                       </div>
                </div>
              </div>

            </div>
            @endforeach
        </div>
          </div>
        </div>
      </div>
    </div>
  </div>

</div>

<!-- END MODAL ADD BRANCH -->

<!-- Modal ADD subcategory -->

<div class="modal fade" id="md_add_subcategory" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  {{ Form::open(array('route' => 'commit_subcategory', 'id' => 'form_commit_subcategory', 'class' => 'cls_form' , 'method' => 'POST' , 'enctype'=>'multipart/form-data'
)) }}
  <div class="modal-dialog modal-lg" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="exampleModalLabel">Create Sub-Category</h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true"></span>
        </button>
      </div>
      <div class="modal-body ">
        <div class ="card">
          <div class = "card-body form-fieldset">
          <div class="row">


            <div class="col-sm-12">
            <label class="label-color"> Name: <i style = "color:red;">*</i></label>
            <div class="input-group mb-3">
              <input type="text" name="name" class="form-control " required id="name" />
            </div>
            </div>
            <input type="hidden" name="category_id" value="{{Crypt::encrypt($category_id)}}">

        </div>
          </div>
        </div>
      </div>

      <div class="modal-footer">

        <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>

        <button type="submit" onClick="storeSubCategory(event,this)" class="btn btn-primary"   content="create sub-category">Create Sub Category </button>

      </div>
      {{ Form::close() }}
    </div>
  </div>

</div>

<!-- END MODAL ADD BRANCH -->
