@extends('layouts.master')

@section('content')
@if (session()->has('message'))
<div class="row">
        <!-- left column -->
        <div class="col-md-2"></div>
<div class="col-md-4 alert alert-success alert-dismissible" style="font-size:18px;font-weight:bold;width:400px;margin-left:15px">
                <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
                {!! session('message') !!}
              </div>
              </div> 
@endif

<div class="row">
        <!-- left column -->
        <div class="col-md-2"></div>
        <div class="col-md-8">
          <!-- general form elements -->
          <div class="box box-primary">
            <div class="box-header with-border">
              <h3 class="box-title">Edit Main Waste  </h3>
            </div>
            <!-- /.box-header -->
            <!-- form start -->
            <form   role="form" method="POST" action="{{ url('/report/create') }}">
                        {{ csrf_field() }}
              <div class="box-body">
                
            
              <div class="form-group">
                <label>Choose Transporters - جهة النقل </label>
                <select class="form-control select2"   style="width: 100%;" name="transporter_id" id="transporter_id" required>
                  @foreach( $transporters as $transporter ) 
                  <option value="{{ $transporter->id }}"  >{{$transporter->waste_transporter}}</option>
                  @endforeach
                </select>
                </div>


              <div class="form-group">
                <label>Choose Supplier - اسم المورد</label>
                <select class="form-control select2" onchange="showClasses_(this.value)" style="width: 100%;" name="supplier_id" id="supplier_id" required>
                <option  >choose Supplier </option>
                  @foreach( $suppliers as $supplier ) 
                  <option value="{{ $supplier->id }}"  >{{$supplier->name}}</option>
                  @endforeach
                </select>
                </div>

                <div class="form-group">
                <label>Choose Classes - فـئة المخلف </label>
                <select class="form-control select2"  onchange="showGroups(this.value)" style="width: 100%;" name="class_id" id="class_id" required>
                <option  >choose Class </option>
                </select>
                </div>

                <div class="form-group">
                <label>Choose Group - المجموعة </label>
                <select class="form-control select2"  onchange="showClassification(this.value)" style="width: 100%;" name="group_id" id="group_id" required>
                <option  >choose Group </option>
                </select>
                </div>

                <div class="form-group">
                <label>Choose Classifications - التصنيف</label>
                <select class="form-control select2"  style="width: 100%;" name="classification_id" id="classification_id" required>
                <option  >choose Classifications </option>
                </select>
                </div>


                <div class="form-group">
                <label>Choose Transporters - شركة التدوير  </label>
                <select class="form-control select2"   style="width: 100%;" name="customer_id" id="customer_id" required>
                  @foreach( $customers as $customer ) 
                  <option value="{{ $customer->id }}"  >{{$customer->name}}</option>
                  @endforeach
                </select>
                </div>


                <div class="form-group col-md-6" >
                  <label for="exampleInputPassword1">Date from  </label>
                  <input type="date" name="from" class="form-control"  placeholder="Date from " required>
                </div>



                <div class="form-group col-md-6">
                  <label for="exampleInputPassword1">Date to</label>
                  <input type="date" name="to" class="form-control"  placeholder="Date to " required>
                </div>


                <div class="form-group">
                <label>LOGO  </label>
                <select class="form-control select2"   style="width: 100%;" name="logo" id="logo" required>
                  
                  <option value="yes"  > With Logo</option>
                  <option value="no"  >  Without Logo</option>
                  
                </select>
                </div>


              </div>
              <!-- /.box-body -->

              <div class="box-footer">
                <button type="submit" class="btn btn-warning">Create</button>
              </div>
            </form>

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



@endsection