@extends('layouts.masterHome2')

@section('content')

<div class="card">
<div class="card-header">
                <h3 class="card-title" style="text-align: center;float: none;">
                  أظهار جميع المخلفات الخاصة بـ
               <span style="color:blue"> {{ Auth::user()->supplier->name}} </span>
              في سيستم ايجي ويست    
              </h3>
              </div>
               <!-- /.card-header -->
               <div class="card-body">
                 <table id="example1" class="table table-bordered table-striped">
                   <thead>
                   
                   <tr>
                  <th style="text-align:center;vertical-align: middle;"> Name  </th>
                  <th style="text-align:center;vertical-align: middle;"> Unit   </th>
                  <th style="text-align:center;vertical-align: middle;"> Class  </th>
                  <th style="text-align:center;vertical-align: middle;"> Group  </th>
                  <th style="text-align:center;vertical-align: middle;"> Classification  </th>
                 </tr>
                  </thead>
                  <tbody>
                  @foreach( $wastes as $waste )   
                
                 
                
                <tr>
                 
                 <td style="text-align:center; width:50px;word-break: break-word;" >  {{$waste->name}} </td>
                 <td style="text-align:center; width:50px;word-break: break-word;">{{$waste->unit}} </td>
                 <td style="text-align:center; width:50px;word-break: break-word;"> {{$waste->class_->name}}  </td>
                 <td style="text-align:center; width:50px;word-break: break-word;"> {{$waste->group->name}}  </td>
                 <td style="text-align:center; width:50px;word-break: break-word;"> {{$waste->classification->name}}  </td>
                  
               </tr>
               @endforeach
                  </tbody>
                 </table>
               </div>
               <!-- /.card-body -->
             </div>




             <div class="row">
            


             <div class="col-md-4">
            <div class="card">
              <div class="card-header">
                <h3 class="card-title" style="text-align:center;float:none">أظهار التصنيفات الخاصة بـ

                {{ Auth::user()->supplier->name}}
                </h3>

                 
              </div>
              <!-- /.card-header -->
              <div class="card-body p-0">
                <table class="table" style="text-align: right;">
                  <thead>
                    <tr> 
                      
                      <th>أسـم التصنيف</th>
                      <th style="width: 10px">#</th>
                      
                    </tr>
                  </thead>
                  <tbody>
                     
                    @foreach ( $classifications as $key => $classification  )
                    <tr>
                      
                      <td>{{$classification->name}}</td>
                      <td>{{$key+1}}.</td>
                       
                    </tr>
                    @endforeach
                  </tbody>
                </table>
              </div>
              <!-- /.card-body -->
            </div>
            <!-- /.card -->
          </div>
          <!-- /.col -->
          <div class="col-md-4">
            <div class="card">
              <div class="card-header">
                <h3 class="card-title" style="text-align:center;float:none">أظهار الفئات الخاصة بـ

                {{ Auth::user()->supplier->name}}
                </h3>

                 
              </div>
              <!-- /.card-header -->
              <div class="card-body p-0">
                <table class="table" style="text-align: right;">
                  <thead>
                    <tr> 
                      
                      <th>أسـم الفئـة</th>
                      <th style="width: 10px">#</th>
                      
                    </tr>
                  </thead>
                  <tbody>
                     
                    @foreach ( $classes as $key => $class  )
                    <tr>
                      
                      <td>{{$class->name}}</td>
                      <td>{{$key+1}}.</td>
                       
                    </tr>
                    @endforeach
                  </tbody>
                </table>
              </div>
              <!-- /.card-body -->
            </div>
            <!-- /.card -->
          </div>

        
          <div class="col-md-4">
            <div class="card">
              <div class="card-header">
                <h3 class="card-title" style="text-align:center;float:none">أظهار المجموعات الخاصة بـ

                {{ Auth::user()->supplier->name}}
                </h3>

                 
              </div>
              <!-- /.card-header -->
              <div class="card-body p-0">
                <table class="table" style="text-align: right;">
                  <thead>
                    <tr> 
                      
                      <th>أسـم المجموعة</th>
                      <th style="width: 10px">#</th>
                      
                    </tr>
                  </thead>
                  <tbody>
                     
                    @foreach ( $groups as $key => $group  )
                    <tr>
                      
                      <td>{{$group->name}}</td>
                      <td>{{$key+1}}.</td>
                       
                    </tr>
                    @endforeach
                  </tbody>
                </table>
              </div>
              <!-- /.card-body -->
            </div>
            <!-- /.card -->
          </div>

        </div>
          @endsection
