<style>
.user-rating {
      direction: rtl;
      font-size: 20px;
      unicode-bidi: bidi-override;
      padding: 10px 30px;
      display: inline-block;
   }
   .user-rating input {
      opacity: 0;
      position: relative;
      left: -15px;
      z-index: 2;
      cursor: pointer;
   }
   .user-rating span.star:before {
      color: #777777;
      content:"ï€†";
      /*padding-right: 5px;*/
   }
   .user-rating span.star {
      display: inline-block;
      font-family: FontAwesome;
      font-style: normal;
      font-weight: normal;
      position: relative;
      z-index: 1;
   }
   .user-rating span {
      margin-left: -15px;
   }
   .user-rating span.star:before {
      color: #777777;
      content:"\f006";
      /*padding-right: 5px;*/
   }
   .user-rating input:hover + span.star:before, .user-rating input:hover + span.star ~ span.star:before, .user-rating input:checked + span.star:before, .user-rating input:checked + span.star ~ span.star:before {
      color: #ffd100;
      content:"\f005";
   }

   .selected-rating{
      color: #ffd100;
      font-weight: bold;
      font-size: 3em;
   }

   label.error{
      color:red;
   }
   .user i:before {
      display: inline-block;
      font: normal normal normal 14px/1 FontAwesome;
      font-size: inherit;
      text-rendering: auto;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
      content: "\f2c0";
   }
    .ap33{
            min-height: 332px !important;
    }
.approving-dealer.ap33 .aproved-imgs2 {
    height: inherit !important;
}
 .quote-btns.th-buttons a button {
    border-radius: 6px;
    font-size: 15px;
}
    .aproved-imgs2 img {
    height: 130px;
}
    .quote-btns.rs-btns.dealer-b a:last-child button {
    margin-right: 0px !important;
}

.quote-btns.rs-btns.dealer-b a button {
    border-radius: 5px;
}
</style>


<?php $__env->startSection('content'); ?>
<div class="common-content">
          <div class="page-content">
                <div class="page-heading">
                    <div class="headings">
                        <h6><?php echo e($title); ?></h6>
                    </div>
                </div>

                <?php if((count($all_dealers)==0) && (count($approved_dealers)==0)): ?>
                <div class="wraper">
                    <div class="product-display">
                        <ul>
                            <li>
                                <div class="details">
                                    <div>
                                        <h6>
                                        No Data available
                                        </h6>
                                    </div>


                                </div>
                            </li>


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

                <?php else: ?>



              
                <div class="dashboard-cnts">  
                    <?php if(count($all_dealers)!=0): ?>    
                    <div class="row">
                        <div class="col-12" style="margin-top: 15px;">
                            <h5 class="box-head">Our Dealers And Manufacturers Requests</h5>
                        </div>
                    </div>

                    <?php endif; ?>




                    <div class="row">
                    <?php $__currentLoopData = $all_dealers; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$alldealers): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
                            <div class="approving-dealer ap33">
                                <?php if(!empty($alldealers->pro_pic)): ?>
                                   <div class="aproved-imgs" style="width: 100%;padding: 10px;margin: 0; height: 135px;text-align: center;overflow: hidden;">
                                        <img class="img-fluid" style="width: auto;margin: 0 auto;" src="<?php echo e(url('user_files')); ?>/<?php echo e($alldealers->pro_pic); ?>">
                                    </div>
                                <?php else: ?>
                                <div class="aproved-imgs2" style="width: 100%;padding: 10px;margin: 0; height: 135px;text-align: center;overflow: hidden;">
                                    <img class="img-fluid" style="width: auto;margin: 0 auto;"  src="<?php echo e(url('assets/images/1200px-No-Image-Placeholder.svg.png')); ?>">
                                 </div>
                                <?php endif; ?>
                                <div class="dealer-details" style="padding: 10px 20px;">
                                    <h3 class="company-name" style="text-align: left;"><?php echo e($alldealers->name); ?>- <?php if($alldealers->dealer_type==3): ?> Manufacturer <?php else: ?> Dealer <?php endif; ?></h3>
                                    <ul style="    margin-bottom: 10px;">
                                        <?php if($alldealers->location!=''): ?>
                                        <li>
                                            <i class="fas fa-map-marker-alt"></i>
                                            <span><?php echo e($alldealers->location); ?></span>
                                        </li>

                                        <?php endif; ?>
                                        <li>
                                            <i class="fas fa-phone-alt"></i>
                                            <span><?php echo e($alldealers->phone_no); ?></span>
                                        </li>
                                        <?php if(!empty($alldealers->company_profile)): ?>
                                        <li>
                                            <a target="_blank"  href="https://www.meddbot.com/product_files/<?php echo e($alldealers->company_profile); ?>">
                                                <i class="far fa-file-alt"></i>
                                                <span class="web"><?php echo e($alldealers->company_profile); ?></span>
                                            </a>
                                        </li> 
                                        <?php endif; ?>

                                        <?php if(!empty($alldealers->mf_doc)): ?>
                                        <li>
                                            <a target="_blank"  href="https://www.meddbot.com/product_files/<?php echo e($alldealers->mf_doc); ?>">
                                                <i class="far fa-file-alt"></i>
                                                <span class="web"><?php echo e($alldealers->mf_doc); ?></span>
                                            </a>
                                        </li> 
                                        <?php endif; ?>

                                    </ul>
                                <div class="quote-btns th-buttons new">
                                    
                                        <a href="<?php echo e(url('manufacturers/acceptdealer')); ?>/<?php echo e($alldealers->dealerId); ?>/<?php echo e($alldealers->id); ?>"><button class="btn common-btn green-btn dealer-btns"><i class="far fa-check-circle" aria-hidden="true"></i> Approve</button></a>
                                   
                                    
                                        <a href="<?php echo e(url('manufacturers/rejectdealer')); ?>/<?php echo e($alldealers->dealerId); ?>"><button class="btn common-btn red-btn dealer-btns"><i class="fas fa-ban" aria-hidden="true"></i> Reject</button></a>
                                   
                                        	<a href="<?php echo e(url('buyers/viewvendordetails/'.$alldealers->vendor_id)); ?>"><button class="btn common-btn blue-btn view"> View</button></a>
                                    
									
									
                              </div>
                                </div>
                            </div>
                        </div>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </div>

                    
                 <?php if(count($approved_dealers)!=0): ?>   
                    
                    <div class="row">
                        <div class="col-12" style="margin-top: 15px;">
                            <h5 class="box-head">OUR APPROVED DEALERS AND MANUFACTURERS</h5>
                        </div>
                    </div>
                    
                    <div class="row">
                    <?php $__currentLoopData = $approved_dealers; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$approveddealers): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>

                       
                    <?php
                    $rating  			= App\Helpers\CustomHelper::ratingdealer($approveddealers->id);
                    ?>




                        <div class="col-lg-4 col-md-6 col-sm-6 col-12">
                            <div class="card card-statistic-1 rs-stat1" style="display:block;flex-direction: inherit;">
                                <div class="w-100" style="flex-direction: column;display:flex;">
                                    <div class="card-icon card-x">
                                        <?php if(!empty($approveddealers->pro_pic)): ?>
                                        <img class="img-fluid" src="<?php echo e(url('user_files')); ?>/<?php echo e($approveddealers->pro_pic); ?>">
                                    <?php else: ?>
                                        <img class="img-fluid"  src="<?php echo e(url('assets/images/1200px-No-Image-Placeholder.svg.png')); ?>">
                                    <?php endif; ?>
                                    </div>
                                    <div class="card-wrap rs-card-wrap">
                                        <div class="dealer-details">
                                            <h3  class="company-name" style="text-align: left;"><?php echo e($approveddealers->name); ?> - <?php if($approveddealers->dealer_type==3): ?> Manufacturer <?php else: ?> Dealer <?php endif; ?></h3>
                                            <ul class="del-features newdelers" >

                                                <?php if($approveddealers->location!=''): ?>
                                                <li>
                                                    <i class="fas fa-map-marker-alt"></i>
                                                    <span><?php echo e($approveddealers->location); ?></span>
                                                </li>
                                                <?php endif; ?>
                                                <li>
                                                    <i class="fas fa-phone-alt"></i>
                                                    <span><?php echo e($approveddealers->phone_no); ?></span>
                                                </li>
                                                <?php if(!empty($approveddealers->company_profile)): ?>
                                                    <li>
                                                        <a target="_blank"  href="https://www.meddbot.com/product_files/<?php echo e($approveddealers->company_profile); ?>">
                                                            <i class="far fa-file-alt"></i>
                                                            <span class="web"><?php echo e($approveddealers->company_profile); ?></span>
                                                        </a>
                                                    </li> 
                                                <?php endif; ?>
                                                <?php if(!empty($approveddealers->mf_doc)): ?>
                                                    <li>
                                                        <a target="_blank"  href="https://www.meddbot.com/product_files/<?php echo e($approveddealers->mf_doc); ?>">
                                                            <i class="far fa-file-alt"></i>
                                                            <span class="web"><?php echo e($approveddealers->mf_doc); ?></span>
                                                        </a>
                                                    </li> 
                                                <?php endif; ?>


                                            </ul>

                                        </div>
                                    </div>
                                </div>    
                                <div class="quote-btns rs-btns dealer-b row approve-itms">
                                                <a href="<?php echo e(url('manufacturers/deapprovedealer')); ?>/<?php echo e($approveddealers->dealerId); ?>" class=""><button class="btn common-btn red-btn dealer-btns"><i class="fas fa-ban" aria-hidden="true"></i> Remove Dealership</button></a>
                                            
												<a class="" href="<?php echo e(url('buyers/viewvendordetails/'.$approveddealers->vendor_id)); ?>"><button class="btn common-btn blue-btn rsd"> View</button></a>
											
                                        </div>

                                        <div class="options-main-sub row">

                                        <div class="col-md-12">
                                            <p class="Product-id wraper rating-m">
                                                <span class="quote-status-hd">Professionalism</span> 
												<span class="user-rating" disabled>
													<input type="radio" name="rating1" <?php if($rating['total_professionalism']==5){echo"checked";}?>  value="5" disabled><span class="star"></span>
													<input type="radio" name="rating1" <?php if($rating['total_professionalism']==4){echo"checked";}?> value="4" disabled><span class="star"></span>
													<input type="radio" name="rating1" <?php if($rating['total_professionalism']==3){echo"checked";}?> value="3" disabled><span class="star"></span>
													<input type="radio" name="rating1" <?php if($rating['total_professionalism']==2){echo"checked";}?> value="2" disabled><span class="star"></span>
													<input type="radio" name="rating1" <?php if($rating['total_professionalism']==1){echo"checked";}?>  value="1" disabled><span class="star"></span>
												</span>
                                                  
                                            </p>
                                        </div>
										
										<div class="col-md-12">
                                            <p class="Product-id wraper rating-m">
                                                <span class="quote-status-hd">Knowledge of product</span> 
												<span class="user-rating" disabled>
													<input type="radio" name="rating2" <?php if($rating['total_knowledge']==5){echo"checked";}?>  value="5" disabled><span class="star"></span>
													<input type="radio" name="rating2" <?php if($rating['total_knowledge']==4){echo"checked";}?> value="4" disabled><span class="star"></span>
													<input type="radio" name="rating2" <?php if($rating['total_knowledge']==3){echo"checked";}?>  value="3" disabled><span class="star"></span>
													<input type="radio" name="rating2" <?php if($rating['total_knowledge']==2){echo"checked";}?> value="2" disabled><span class="star"></span>
													<input type="radio" name="rating2" <?php if($rating['total_knowledge']==1){echo"checked";}?>  value="1" disabled><span class="star"></span>
												</span>
                                                  
                                            </p>
                                        </div>
										
										<div class="col-md-12">
                                            <p class="Product-id wraper rating-m">
                                                <span class="quote-status-hd">Timely attending complaint</span> 
												<span class="user-rating" disabled>
													<input type="radio" name="rating3" <?php if($rating['total_overall']==5){echo"checked";}?>  value="5" disabled><span class="star"></span>
													<input type="radio" name="rating3"  <?php if($rating['total_overall']==4){echo"checked";}?> value="4" disabled><span class="star"></span>
													<input type="radio" name="rating3"  <?php if($rating['total_overall']==3){echo"checked";}?> value="3" disabled><span class="star"></span>
													<input type="radio" name="rating3"  <?php if($rating['total_overall']==2){echo"checked";}?> value="2" disabled><span class="star"></span>
													<input type="radio" name="rating3"  <?php if($rating['total_overall']==1){echo"checked";}?> value="1" disabled><span class="star"></span>
												</span>
                                                  
                                            </p>
                                        </div>
										<div class="col-md-12">
                                            <p class="Product-id wraper rating-m">
                                                <span class="quote-status-hd">Overall satisfaction</span>
												<span class="user-rating" disabled>
													<input type="radio" name="rating4" <?php if($rating['total_timely']==5){echo"checked";}?>  value="5" disabled><span class="star"></span>
													<input type="radio" name="rating4" <?php if($rating['total_timely']==4){echo"checked";}?> value="4" disabled><span class="star"></span>
													<input type="radio" name="rating4" <?php if($rating['total_timely']==3){echo"checked";}?> value="3" disabled><span class="star"></span>
													<input type="radio" name="rating4" <?php if($rating['total_timely']==2){echo"checked";}?> value="2" disabled><span class="star"></span>
													<input type="radio" name="rating4" <?php if($rating['total_timely']==1){echo"checked";}?> value="1" disabled><span class="star"></span>
												</span>
                                                  
                                            </p>
                              </div>
                            </div>
                                       





                            </div>
                        </div>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </div>
                <?php endif; ?>


                </div>

                <?php endif; ?>
          </div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('scripts'); ?>
<script>
<?php if(Session::has('message')): ?>
      swal({
        title: "",
        text: "<?php echo e(Session::get('message')); ?>",
        type: "success",
        showCancelButton: false,
        dangerMode: false,
        confirmButtonText: 'OK',

    });
<?php endif; ?>
<?php if(Session::has('errormessage')): ?>
      swal({
        title: "",
        text: "<?php echo e(Session::get('errormessage')); ?>",
        type: "error",
        showCancelButton: false,
        dangerMode: true,
        confirmButtonText: 'OK',

    });
<?php endif; ?>
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.main', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/meddbot/public_html/resources/views/manufacturers/approved_dealers.blade.php ENDPATH**/ ?>