<?php $__env->startSection('content'); ?>
<section class="content-header"  >
      <h1>
      Customers Show  
     <small>عرض العملاء</small>
      </h1>
      <img   src="<?php echo e(asset('dist/img/customer.png')); ?>"  alt="User Image" style="width: 200px;height: 150px;position: absolute;top: -9px;z-index: 1;right: 150px;">

    </section>
    <br/>
    <?php if( auth()->user()->is_superadmin ): ?>
    <a href="<?php echo e(url('/customer/create')); ?>"  class="btn btn-success">Create New Customer </a>
    <?php else: ?>
	    <span>&nbsp;&nbsp;</span>
    <?php endif; ?>
    <br/><br/>
<div class="box" >
            <div class="box-header">
            </div>
            <!-- /.box-header -->
            <div class="box-body">
              <table id="example1"  class="table table-bordered table-striped">
                <thead>
                <tr>

                  <th style="text-align:center;vertical-align: middle;">  الاسم  </th>
                  <th style="text-align:center;vertical-align: middle;">  العنوان   </th>
                  <th style="text-align:center;vertical-align: middle;">  رقم الهاتف  </th>
                  
        				  
                  <th style="text-align:center;vertical-align: middle;">  الايميل   </th>
                  <th style="text-align:center;vertical-align: middle;">  اسم المسؤل  </th>

                  <th style="text-align:center;vertical-align: middle;">  دور المسؤل  </th>
                  <th style="text-align:center;vertical-align: middle;">  رقم الهاتف المسؤل   </th>
                  <th style="text-align:center;vertical-align: middle;">  ايميل المسؤل  </th>

                  <th style="text-align:center;vertical-align: middle;">  رقم الموافقة البيئية  </th>

                  <th style="text-align:center;vertical-align: middle;">  رقم التسجيل التجاري  </th>
                  <th style="text-align:center;vertical-align: middle;"> رقم الضريبي   </th>
                  <th style="text-align:center;vertical-align: middle;">  رخصة التشغيل  </th>

                  <th style="text-align:center;vertical-align: middle;">  رقم التسجيل الصناعي  </th>
                  <th style="text-align:center;vertical-align: middle;">  المدينة الصناعية   </th>
                  <th style="text-align:center;vertical-align: middle;">  النشاط   </th>

                  <th style="text-align:center;vertical-align: middle;"> Actions  </th>
                </tr>
                </thead>
                <tbody>
                 <?php foreach( $customers as $customer ): ?>   
                
                 
                
                 <tr>
                  
                  <td style="text-align:center; width:50px;word-break: break-word;" >  <?php echo e($customer->name); ?> </td>
                  <td style="text-align:center; width:50px;word-break: break-word;"><?php echo e($customer->address); ?> </td>
                  <td style="text-align:center; width:50px;word-break: break-word;"> <?php echo e($customer->phone); ?>  </td>


                  <td style="text-align:center; width:50px;word-break: break-word;"><?php echo e($customer->email); ?> </td>
                  <td style="text-align:center; width:50px;word-break: break-word;"> <?php echo e($customer->responsable_name); ?>  </td>

                  <td style="text-align:center; width:50px;word-break: break-word;" >  <?php echo e($customer->responsable_position); ?> </td>
                  <td style="text-align:center; width:50px;word-break: break-word;"><?php echo e($customer->responsable_phone); ?> </td>
                  <td style="text-align:center; width:50px;word-break: break-word;"> <?php echo e($customer->responsable_email); ?>  </td>
                  <td style="text-align:center; width:50px;word-break: break-word;" >  <?php echo e($customer->env_approve_nom); ?> </td>

                  <td style="text-align:center; width:50px;word-break: break-word;" >  <?php echo e($customer->commertial_registration_no); ?> </td>
                  <td style="text-align:center; width:50px;word-break: break-word;"><?php echo e($customer->tax_card_no); ?> </td>
                  <td style="text-align:center; width:50px;word-break: break-word;"> <?php echo e($customer->operating_licence_no); ?>  </td>


                  <td style="text-align:center; width:50px;word-break: break-word;" >  <?php echo e($customer->industrial_registration_no); ?> </td>
                  <td style="text-align:center; width:50px;word-break: break-word;"><?php echo e($customer->city->name); ?> </td>
                  <td style="text-align:center; width:50px;word-break: break-word;"><?php echo e($customer->activity); ?> </td>


                  <td style="text-align:center; width:50px;word-break: break-word;" > 
                  <?php if( auth()->user()->is_superadmin ): ?>
                  <a   href='<?php echo e(url("/customer/edit/$customer->id")); ?>'  > <i class="fa fa-edit" style="font-size:18px"></i>  </a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                  <?php else: ?>
	                  <span>&nbsp;&nbsp;</span>
                  <?php endif; ?>
                  <?php if( auth()->user()->is_superadmin ): ?>
                  <a   href='<?php echo e(url("/customer/delete/$customer->id")); ?>' onclick="return confirm('Are you sure you want to delete this item?');" > <i class="fa fa-trash" style="font-size:18px; color:red"></i>  </a>
                  <?php else: ?>
	                  <span>&nbsp;&nbsp;</span>
                  <?php endif; ?>
                </td>
                </tr>
                <?php endforeach; ?>
                </tbody>
                
              </table>
            </div>
            <!-- /.box-body -->
          </div>

<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.master', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>