@extends('layouts.dashboard')
@section('page_title')
	Manage Qoutations
@endsection
@section('page_header_title')
	Manage Qoutations
@endsection
@section('page_body')
{{ Breadcrumbs::render('qoutation') }}

<div class="row row-cards row-deck" style="background: white; ">
	<div class="col-12">
	<div class="card-header">
													     <button  class="float-right btn btn-sm btn-outline-primary" data-toggle="modal" data-target="#md_add_qoutation" ><i class="fa fa-plus"></i></button> &nbsp;&nbsp;
											 <h3 class="card-title">Add Qoutation</h3>
										</div>
													<div class="card-status card-status-left bg-blue"></div>
													<div class="table-responsive table-height">
														<table class="table table-hover table-outline table-vcenter text-nowrap card-table cls_datatable">
				                      <thead>
				                        <tr>
				                          <th>#</th>
				                          <th>Remakrs</th>
				                          <th>File</th>
				                          <th>Created At</th>
				                        </tr>
				                      </thead>
				                      <tbody>
				                       @foreach($qoutations as $rows)
				                    <tr>
				                      <td>{{$loop->iteration}}</td>
				                      <td>{{$rows->remarks}}</td>
				                      <td><a href="{{EF::getFile($rows->file)}}" target="_blank"><i class="fa fa-file"></i></a></td>
				                      <td>{{$rows->created_at}}</td>
				                               </tr>
				                        @endforeach
				                      </tbody>
				                    </table>
													</div>

									</div>

</div>

@endsection

@section('page_modal')

    <div class="modal fade" id="md_add_qoutation" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  {{ Form::open(array('route' => 'qoutation.store' , 'id' => 'form_add_vendor_qoutation', '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">Add New Qoutation</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"> Remarks: <i style = "color:red;">*</i></label>
            <div class="input-group mb-3">
              <textarea type="text" name="remarks" class="form-control cls_required " required id="remarks" ></textarea>
            </div>
            </div>


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

        <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
        <button type="submit" class="btn btn-primary"   content="add category">Add Qoutation</button>

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

</div>
@endsection

@section('page_script')
 @include('inventory_module.scripts.users')

@endsection
