<style>
    .quote-flex > div:last-child {
    padding-left: 20px;
    width: 100%;
}
    
   p.quoteee {
    margin-bottom: 13px;
} 
 .quote-btns > div:nth-child(2) a button {
    background: #02bcb1;
}  
 .partner-details i, .dates i {
    color: #0398d5 !important;
}   
p.quoteee {
    margin-bottom: 12px !important;
}  
 .quote-img-rs {
    height: 120px !important;
    display: flex;
    align-items: center;
    width: 120px !important;
}   
    
    
    
    
</style>


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

                <?php if(Auth::user()->user_type == '3'): ?>

                 <div class="dashboard-cnts">
                  
                    <div class="row">
                      <div class="col-12 new_request">
                    <?php if(count($all_requests) > '0'){ ?>
                       <?php $__currentLoopData = $all_requests; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$allrequests): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> 
                        <?php  if(date('Y-m-d') == date('Y-m-d',strtotime($allrequests->quotesCreated))) {?>
                            <div class="bid-stats boxings recently-add">
                                <?php }else{ ?>
				                <div class="bid-stats boxings">
				            <?php } ?>
                                  <div class="w-100 d-flex justify-content-end">
                                        <p style="font-weight: bold;"><span style="    color: #1f2348;" >Request Id : <?php echo e($allrequests->quoteId); ?></span><p>
                                    </p></div>  
                                <div class="product-order quote-order" style="padding: 0;">
                                    <div><?php //print_r($allrequests->bidUser); ?>
                                        <div class="quote-flex">
                                            <div>
                                                <div class="quote-img quote-img-rs">
                                                    <?php if(!empty($allrequests->pro_pic)): ?>
                                                    <img src="<?php echo e(url('user_files')); ?>/<?php echo e($allrequests->pro_pic); ?>">
                                                    <?php else: ?>
                                                    <img class="place-image" src="<?php echo e(url('assets/images/1200px-No-Image-Placeholder.svg.png')); ?>">
                                                    <?php endif; ?>
                                                </div>
                                            </div>
                                            <div>
                                                <div class="partner-details">
                                                    <h6><?php echo e($allrequests->name); ?></h6>
                                                    <p class="quoteee" style="float: left;width: 100%;">
                                                        <i  style="float:left;    margin-top: 5px;"  class="fas fa-map-marker-alt" aria-hidden="true"></i>
                                                        <span class="alignTxt">
                                                        <?php echo e($allrequests->address); ?>,
                                                        <?php $__currentLoopData = $states; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $state): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                        <?php if($state->id == $allrequests->city): ?>
                                                        <?php echo e($state->name); ?>

                                                        <?php endif; ?>
                                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                        </span>    
                                                    </p>
                                                    <div class="call"><i class="fas fa-phone-alt"></i> <?php echo e($allrequests->phone_no); ?></div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                     <div>
                                        <div class="pro-des">
										    
                                            <h6 class="bgtitle"><span class="ip-qwe" >Product :<?php echo e($allrequests->product_name); ?></span></h6>
                                           <!-- <p>ID : <span><?php echo e($allrequests->product_code); ?></span></p>-->
                                            <div class="dates">
                                                <p class="row"> <span class="col-lg-4 on-date ip-qwe w-50"><i class="fas fa-calendar-alt"></i> Posted On </span>
                                                    <span class="col-lg-1">:</span>
                                                    <span class="col-lg-7" ><?php echo e(date('d-m-Y',strtotime($allrequests->quotesCreated))); ?></span></p>
                                            </div>
                                            <div class="dates">
                                                <p class="row" > <span class="col-lg-4 on-date ip-qwe w-50"><i class="fas fa-calendar-alt"></i>Closing Date </span>
                                                    <span class="col-lg-1">:</span>
                                                    <span class="col-lg-7"  ><?php echo e(date('d-m-Y',strtotime($allrequests->closing_date))); ?></span></p>
                                            </div>
                                         </div>
                                    </div>
                                </div>
                                <div class="specifications" style="padding: 10px 0px 0;">
                                    <h6>Specifications</h6>
                                    <p><?php echo e($allrequests->product_information); ?></p>
                                    <div class="quote-new">
                                        <div class="quote-amt">
                                            <p>Urgency : <span ><?php if($allrequests->quote_urgency == '1'): ?> Urgent <?php elseif($allrequests->quote_urgency == '2'): ?> Not Urgent <?php elseif($allrequests->quote_urgency == '3'): ?> Ready stock <?php endif; ?></span></p>
                                        </div>
                                        <div>
                                            <div class="quote-btns">
                                              <div>

                                                <?php if(Auth::user()->user_type == '3'): ?>
                                                <a href="<?php echo e(url('manufacturers/acceptbid')); ?>/<?php echo e($allrequests->quoteId); ?>/<?php echo e($allrequests->buyer_id); ?>" class="btn common-btn green-btn">Place your bid</a>
                                                <?php endif; ?>
                                                <?php if(Auth::user()->user_type == '2'): ?>
                
                                                <a href="<?php echo e(url('vendors/acceptbid')); ?>/<?php echo e($allrequests->quoteId); ?>/<?php echo e($allrequests->buyer_id); ?>" class="btn common-btn green-btn">Place your bid</a>
                
                                                <?php endif; ?>




                                                   
                                                </div>
                                              <div>
                                                    <a href="<?php echo e(url('vendors/rejectbid')); ?>/<?php echo e($allrequests->quoteId); ?>/<?php echo e($allrequests->buyer_id); ?>/<?php echo e($allrequests->product_id); ?>" onclick="return confirm('Are you sure?')"><button class="btn common-btn green-btn">Not Interested</button></a>
                                                </div>
                                          </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> 
                    <?php } ?>


                        </div>
                    </div>
                    <?php if(count($all_requests) == '0'){ ?>
                        <div class="col-lg-12 col-md-6 col-sm-12 col-xs-12">
                            <div class="product-display">
                                <ul>
                                    <li>
                                        <div class="details">
                                            <div>
                                                <h6>
                                                No Data available
                                                </h6>
                                            </div>


                                        </div>
                                    </li>


                                </ul>
                            </div>
                        </div>
                    <?php } ?>
            
                </div>
            <?php endif; ?>





         <?php if(Auth::user()->user_type == '2'): ?>


              
                <div class="dashboard-cnts">
                    <?php if(count($dealers) > '0'){ ?> 
                    <div class="row">
                      <div class="col-12 new_request">
                        <?php if(count($all_requests) > '0'){ ?>
                       <?php $__currentLoopData = $all_requests; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$allrequests): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> 
                        <?php  if(date('Y-m-d') == date('Y-m-d',strtotime($allrequests->quotesCreated))) {?>
                            <div class="bid-stats boxings recently-add">
                                <?php }else{ ?>
				                <div class="bid-stats boxings">
				            <?php } ?>
                                  <div class="w-100 d-flex justify-content-end">
                                        <p style="font-weight: bold;"><span style="    color: #1f2348;" >Request Id : <?php echo e($allrequests->quoteId); ?></span><p>
                                    </p></div>  
                                <div class="product-order quote-order" style="padding: 0;">
                                    <div><?php //print_r($allrequests->bidUser); ?>
                                        <div class="quote-flex">
                                            <div>
                                                <div class="quote-img quote-img-rs">
                                                    <?php if(!empty($allrequests->pro_pic)): ?>
                                                    <img src="<?php echo e(url('user_files')); ?>/<?php echo e($allrequests->pro_pic); ?>">
                                                    <?php else: ?>
                                                    <img class="place-image" src="<?php echo e(url('assets/images/1200px-No-Image-Placeholder.svg.png')); ?>">
                                                    <?php endif; ?>
                                                </div>
                                            </div>
                                            <div>
                                                <div class="partner-details">
                                                    <h6><?php echo e($allrequests->name); ?></h6>
                                                    <p class="quoteee" style="float: left;width: 100%;">
                                                        <i  style="float:left;    margin-top: 5px;"  class="fas fa-map-marker-alt" aria-hidden="true"></i>
                                                        <span class="alignTxt">
                                                        <?php echo e($allrequests->address); ?>,
                                                        <?php $__currentLoopData = $states; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $state): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                        <?php if($state->id == $allrequests->city): ?>
                                                        <?php echo e($state->name); ?>

                                                        <?php endif; ?>
                                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                        </span>    
                                                    </p>
                                                    <div class="call"><i class="fas fa-phone-alt"></i> <?php echo e($allrequests->phone_no); ?></div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                     <div>
                                        <div class="pro-des">
										    
                                            <h6 class="bgtitle"><span class="ip-qwe" >Product :<?php echo e($allrequests->product_name); ?></span></h6>
                                           <!-- <p>ID : <span><?php echo e($allrequests->product_code); ?></span></p>-->
                                            <div class="dates">
                                                <p class="row"> <span class="col-lg-4 on-date ip-qwe w-50"><i class="fas fa-calendar-alt"></i> Posted On </span>
                                                    <span class="col-lg-1">:</span>
                                                    <span class="col-lg-7" ><?php echo e(date('d-m-Y',strtotime($allrequests->quotesCreated))); ?></span></p>
                                            </div>
                                            <div class="dates">
                                                <p class="row" > <span class="col-lg-4 on-date ip-qwe w-50"><i class="fas fa-calendar-alt"></i>Closing Date </span>
                                                    <span class="col-lg-1">:</span>
                                                    <span class="col-lg-7"  ><?php echo e(date('d-m-Y',strtotime($allrequests->closing_date))); ?></span></p>
                                            </div>
                                         </div>
                                    </div>
                                </div>
                                <div class="specifications" style="padding: 10px 0px 0;">
                                    <h6>Specifications</h6>
                                    <p><?php echo e($allrequests->product_information); ?></p>
                                    <div class="quote-new">
                                        <div class="quote-amt">
                                            <p>Urgency : <span ><?php if($allrequests->quote_urgency == '1'): ?> Urgent <?php elseif($allrequests->quote_urgency == '2'): ?> Not Urgent <?php elseif($allrequests->quote_urgency == '3'): ?> Ready stock <?php endif; ?></span></p>
                                        </div>
                                        <div>
                                            <div class="quote-btns">
                                              <div>
                                                    <a href="<?php echo e(url('vendors/acceptbid')); ?>/<?php echo e($allrequests->quoteId); ?>/<?php echo e($allrequests->buyer_id); ?>" class="btn common-btn green-btn">Place your bid</a>
                                                </div>
                                              <div>
                                                    <a href="<?php echo e(url('vendors/rejectbid')); ?>/<?php echo e($allrequests->quoteId); ?>/<?php echo e($allrequests->buyer_id); ?>/<?php echo e($allrequests->product_id); ?>" onclick="return confirm('Are you sure?')"><button class="btn common-btn green-btn">Not Interested</button></a>
                                                </div>
                                          </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> 
                    <?php } ?>


                        </div>
                    </div>
                    <?php if(count($all_requests) == '0'){ ?>
                        <div class="col-lg-12 col-md-6 col-sm-12 col-xs-12">
                            <div class="product-display">
                                <ul>
                                    <li>
                                        <div class="details">
                                            <div>
                                                <h6>
                                                No Data available
                                                </h6>
                                            </div>


                                        </div>
                                    </li>


                                </ul>
                            </div>
                        </div>
                    <?php } ?>
                    <?php }else{ ?>
                         <div class="wraper">
                                    <div class="product-display">
                                        <ul>
                                            <li>
                                                <div class="details">
                                                    <div>
                                                        <h6>
                                                       Please register with manufacturer to access the feature.
                                                        </h6>
                                                    </div>


                                                </div>
                                            </li>


                                        </ul>
                                    </div>
                                </div>
                 <?php } ?>  
                </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/vendors/quote_requests.blade.php ENDPATH**/ ?>