@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">Add Waste To Supplier -  ربط المخلف ب المورد </h3>
            </div>
            <!-- /.box-header -->
            <!-- form start -->
            <form   role="form" method="POST" action="{{ url('/waste_supplier/create') }}">
                        {{ csrf_field() }}
              <div class="box-body">
                
                <div class="form-group">
                <label>Select Waste</label>
                <select class="form-control select2" style="width: 100%;" name="waste_id" id="waste_id" required>
                  @foreach( $wastes as $waste ) 
                  <option value="{{ $waste->id }}">{{$waste->name}}</option>
                  @endforeach
                </select>
                </div>
                

                <div class="form-group">
                <label>Select Supplier</label>
                <select class="form-control select2" style="width: 100%;" name="supplier_id" id="supplier_id" required>
                  @foreach( $suppliers as $supplier ) 
                  <option value="{{ $supplier->id }}">{{$supplier->name}}</option>
                  @endforeach
                </select>
                </div>

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

              <div class="box-footer">
                <button type="submit" class="btn btn-primary">Save</button>
              </div>
            </form>
          </div>    
</div>
         
      </div>

@endsection