   
<?php $__env->startSection('content'); ?>
<?php
use App\Models\ProductSalesOrder;
?>
        <title><?php echo e(trans('admin.MyAccount')); ?></title>

<?php
use App\Models\MainEComDesign;
use App\Models\SupPagesEComDesign;
$main=MainEComDesign::orderBy('id','desc')->first();
$sub=SupPagesEComDesign::orderBy('id','desc')->first();
?>

 <style>
.page-title-area {
    background-color: <?php echo e($main->Breadcumb_BG_Color); ?> !important;
}
     
    .login-area {
      background-color: <?php echo e($main->Sub_Page_BG_Color); ?> !important;
} 
   
     .login-form form button{
         
         background: <?php echo e($sub->MyAccount_Box_Button_BG_Color); ?> !important;
         color: <?php echo e($sub->MyAccount_Box_Button_Txt_Color); ?> !important;
     }
     
          .login-form form button:hover{
         
         background: <?php echo e($sub->MyAccount_Box_Button_Hover_BG_Color); ?> !important;
         color: <?php echo e($sub->MyAccount_Box_Button_Hover_Txt_Color); ?> !important;
     }
     
     
     .login-form form .form-group .form-control {

    color:  <?php echo e($sub->MyAccount_Box_Input_Txt_Color); ?> !important;
    border: 1px solid  <?php echo e($sub->MyAccount_Box_Input_Border_Color); ?> !important;
     }
         
     .login-form form .form-group label{
         
        color:  <?php echo e($sub->MyAccount_Box_Input_Txt_Color); ?> !important;     
     }
     
     
     
     
     
     .login-form  .row .form-group .form-control {

    color:  <?php echo e($sub->MyAccount_Box_Input_Txt_Color); ?> !important;
    border: 1px solid  <?php echo e($sub->MyAccount_Box_Input_Border_Color); ?> !important;
     }
         
     .login-form  .row .form-group label{
         
        color:  <?php echo e($sub->MyAccount_Box_Input_Txt_Color); ?> !important;     
     }
     
     .cart-table table thead {
    background-color: <?php echo e($main->Table_Header_BG_Color); ?> !important;
    color: <?php echo e($main->Table_Header_Txt_Color); ?> !important;
}
     
     
     .table>tbody {
           background-color: <?php echo e($main->Table_Body_BG_Color); ?> !important;
   
         
     }
     
     .table-striped>tbody>tr:nth-of-type(odd)>* {
       color: <?php echo e($main->Table_Body_Txt_Color); ?> !important;     
     }
     
     .cart-table table tbody tr td {
              color: <?php echo e($main->Table_Body_Txt_Color); ?> !important;      
         
     }
     
</style>

   <!-- Start Page Banner -->
        <div class="page-title-area">
            <div class="container">
                <div class="page-title-content">
                    <h2 style="color: <?php echo e($main->Breadcumb_Txt_Color); ?> !important"><?php echo e(trans('admin.MyAccount')); ?> </h2>

                    <ul>
                        <li><a style="color: <?php echo e($main->Breadcumb_Txt_Color); ?> !important" href="<?php echo e(url('/')); ?>"><?php echo e(trans('admin.Home')); ?></a></li>
                        <li style="color: <?php echo e($main->Breadcumb_Txt_Color); ?> !important"><?php echo e(trans('admin.MyAccount')); ?> </li>
                    </ul>
                </div>
            </div>
        </div>
        <!-- End Page Banner -->

        <!-- Start Login Area -->
        <section class="login-area ptb-50">
            <div class="container">
                <div class="row">
                    <div class="col-lg-12 col-md-12">
                        <div class="login-form mb-30" style="max-width:100%; background: <?php echo e($sub->MyAccount_Box_BG_Color); ?>">
                            <h2 style=" color: <?php echo e($sub->MyAccount_Box_Input_Txt_Color); ?>"><?php echo e(trans('admin.Profile')); ?></h2>
        
                            <form method="post" action="<?php echo e(url('UpdateAccount')); ?>">
                                <?php echo csrf_field(); ?>
                                
                            <div class="row">   
                                <div class="form-group col-md-6">
                                                  <label for="Name"><?php echo e(trans('admin.Name')); ?> </label>
                                    <input type="text" class="form-control"       name="Name" placeholder="<?php echo e(trans('admin.Name')); ?>" value="<?php echo e($User->Name); ?>" required>
                                </div>
        
                                <div class="form-group col-md-6">
                                         <label for="LastName"><?php echo e(trans('admin.Phone')); ?> </label>
                                    <input type="tel" class="form-control" name="Phone" value="<?php echo e($User->Phone); ?>" placeholder="<?php echo e(trans('admin.Phone')); ?>" required>
                                </div>
        
                                <div class="form-group col-md-6">
                                         <label for="CustomerEmail"><?php echo e(trans('admin.Email')); ?></label>
                                    <input type="email" class="form-control"  name="email" placeholder="<?php echo e(trans('admin.Email')); ?>" value="<?php echo e($User->email); ?>" required>
                                </div>
  

                                         <div class="form-group col-md-6">
                                    <label for="CustomerPassword"><?php echo e(trans('admin.Country')); ?></label>
                              <select class="form-control" id="Country" name="country" required>
                                  <option value=""><?php echo e(trans('admin.Country')); ?></option>
                                  <?php $__currentLoopData = $Countris; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $count): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                               <option value="<?php echo e($count->id); ?>" <?php if($count->id == $User->country): ?> selected <?php endif; ?>>
                     <?php echo e(app()->getLocale() == 'ar' ?$count->Arabic_Name :$count->English_Name); ?>

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


                                <button type="submit"><?php echo e(trans('admin.Update')); ?></button>
                                
                            </div>     
                            </form>
                        </div>
                        
                        
<style>
    form .form-group .form-control {
        
      width: 100%;  
      padding: 19px;  
    }
</style>

                    </div>

                    
                     <div class="col-lg-12 col-md-12">
                        <div class="login-form mb-30" style="max-width:100%;background: <?php echo e($sub->MyAccount_Box_BG_Color); ?>">
                            <h2 style=" color: <?php echo e($sub->MyAccount_Box_Input_Txt_Color); ?>"><?php echo e(trans('admin.Change_Password')); ?></h2>
        
                            <form method="post" action="<?php echo e(url('UpdatePassword')); ?>">
                                <?php echo csrf_field(); ?>
                                <div class="form-group">
                     
                                    <input type="password" class="form-control"       name="CurrentPassword" placeholder="<?php echo e(trans('admin.CurrentPassword')); ?>" required>
                                </div>
        
                                <div class="form-group">
                                      
                                    <input type="password" class="form-control" name="password"  placeholder="<?php echo e(trans('admin.New_Password')); ?>" required>
                                </div>
        
                                <div class="form-group">
                   
                                    <input type="password" class="form-control"  name="Confirm_Password" placeholder="<?php echo e(trans('admin.Confirm_Password')); ?>"  required>
                                </div>
  


                                <button type="submit"><?php echo e(trans('admin.Update')); ?></button>
                            </form>
                        </div>
                    </div>
                    
                    
                      <div class="col-lg-12 col-md-12">
                        <div class="login-form mb-30" style="max-width:100%">
                            
                            
                            <div class="row">
                                                 <div class="col-md-8">
                            <h2 style=" color: <?php echo e($sub->MyAccount_Box_Input_Txt_Color); ?>"><?php echo e(trans('admin.Addresses')); ?></h2>  
                                </div>
                                
                            <div class="col-md-4">
                                

  <button style="    background-color:  <?php echo e($main->Table_Button_BG_Color); ?> !important;border-color:  <?php echo e($main->Table_Button_BG_Color); ?> !important; color:  <?php echo e($main->Table_Button_Txt_Color); ?> !important;" class="btn btn-primary" type="button" data-bs-toggle="collapse" data-bs-target="#collapseExample" aria-expanded="false" aria-controls="collapseExample">
 
      
      <?php echo e(trans('admin.Add_New_Address')); ?>

  </button>
                                </div>
                 
        </div>





  <div class="cart-table table-responsive">
                        <table class="table table-striped table-hover table-bordered  table-responsive">
  <thead>
    <tr>
   <th><?php echo e(trans('admin.Name')); ?></th>
                                                                        <th><?php echo e(trans('admin.Governrate')); ?></th>
                                                                        <th><?php echo e(trans('admin.City')); ?></th>
                                                                        <th><?php echo e(trans('admin.Place')); ?></th>
                                                                         <th><?php echo e(trans('admin.Street')); ?></th>    
                                                                         <th><?php echo e(trans('admin.Buliding')); ?></th>    
                                                                         <th><?php echo e(trans('admin.Floor')); ?></th>    
                                                                         <th><?php echo e(trans('admin.Flat')); ?></th>    
                                                                         <th><?php echo e(trans('admin.Special_Mark')); ?> </th>    
                                                                         <th><?php echo e(trans('admin.Location')); ?> </th>    
                                                                         <th><?php echo e(trans('admin.Address_Details')); ?> </th>    
                                                                         <th><?php echo e(trans('admin.Actions')); ?> </th>    
    </tr>
  </thead>
  <tbody>
   
                 <?php $__currentLoopData = $Addresses; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $cust): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>                                
                                             <tr> 
                            <td>
                         <?php echo e($cust->Address_Name); ?>

                                </td>
                                <td>
                          <?php if(!empty($cust->Governrate)): ?>  
                                    
                           <?php echo e(app()->getLocale() == 'ar' ?$cust->Governrate()->first()->Arabic_Name :$cust->Governrate()->first()->English_Name); ?>             
                                    
                                    <?php endif; ?>
                                </td>
                            <td>
                          <?php if(!empty($cust->City)): ?>  
                                
                      <?php echo e(app()->getLocale() == 'ar' ?$cust->City()->first()->Arabic_Name :$cust->City()->first()->English_Name); ?>                
                                <?php endif; ?>
                                </td>

                                <td>
                          <?php if(!empty($cust->Place)): ?>  
                                    
                      <?php echo e(app()->getLocale() == 'ar' ?$cust->Place()->first()->Arabic_Name :$cust->Place()->first()->English_Name); ?>                    
                                    
                                    <?php endif; ?>
                               </td>

                                <td>
                             <?php echo e($cust->Street); ?>

                               </td>
                                <td>
                         <?php echo e($cust->Buliding); ?>

                               </td>
                                <td>
                       <?php echo e($cust->Floor); ?>

                               </td>
                                <td>
                      <?php echo e($cust->Flat); ?>

                               </td>
                                <td>
                           <?php echo e($cust->Special_Mark); ?>

                               </td>
                                <td>
                        <?php echo e($cust->Location); ?>

                               </td>
                                <td>
                             <?php echo e($cust->Details); ?>

   
                               </td>

                                <td>
                  
                                                        
<button  type="button" class="btn btn-default" data-bs-toggle="modal" data-bs-target="#edit<?php echo e($cust->id); ?>">
 <i style="background:<?php echo e($main->Table_Button_BG_Color); ?>;color:  <?php echo e($main->Table_Button_Txt_Color); ?> !important;    padding: 10px;border-radius: 30%;" class="bx bx-edit-alt"></i>
</button>             
                                 
<button  type="button" class="btn btn-default" data-bs-toggle="modal" data-bs-target="#delete<?php echo e($cust->id); ?>">
   <i style="background:<?php echo e($main->Table_Button_BG_Color); ?>;color:  <?php echo e($main->Table_Button_Txt_Color); ?> !important;    padding: 10px;border-radius: 30%;" class="bx bx-trash-alt"></i>
</button>


                                </td>

                             </tr>                            
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>                                
                                                          
      
  </tbody>
</table>
                            </div>
                            
 
                            
                        </div>
                    </div>
                    
                    
                           <div class="col-lg-12 col-md-12  collapse " id="collapseExample">
                                          <div class="login-form mb-30" style="max-width:100%;background: <?php echo e($sub->MyAccount_Box_BG_Color); ?>" >
                            <h2 style=" color: <?php echo e($sub->MyAccount_Box_Input_Txt_Color); ?>"> <?php echo e(trans('admin.Add_New_Address')); ?></h2>
             
                                <div class="row">
                                <form method="post" action="<?php echo e(url('UpdateAddress')); ?>">
                                    <?php echo csrf_field(); ?>
                                    
                                    
                                 <div class="row">        
                                <div class="form-group col-md-4">
                                    <input type="text" name="Address_Name" class="form-control" placeholder="<?php echo e(trans('admin.Address_Name')); ?>" required>
                                </div>
        
                                <div class="form-group col-md-4">
                                    <input type="text" name="StreetAdd" class="form-control" placeholder="<?php echo e(trans('admin.Street')); ?>" required>
                                </div>
        
                                <div class="form-group col-md-4">
                                    <input type="text" name="BulidingAdd" class="form-control" placeholder="<?php echo e(trans('admin.Buliding')); ?>" required>
                                </div>
        
                        
                                        <div class="form-group col-md-4">
                                    <input type="text" name="FloorAdd" class="form-control" placeholder="<?php echo e(trans('admin.Floor')); ?>" required>
                                </div>
        
                                
                                
                                        <div class="form-group col-md-4">
                                    <input type="text" name="FlatAdd" class="form-control" placeholder="<?php echo e(trans('admin.Flat')); ?>" required>
                                </div>          
                                    
                                    <div class="form-group col-md-4">
                                    <input type="text" name="Special_MarkAdd" class="form-control" placeholder="<?php echo e(trans('admin.Special_Mark')); ?>">
                                </div>       
                                    
                                    <div class="form-group col-md-6">
                                    <input type="text" name="LocationAdd" class="form-control" placeholder="<?php echo e(trans('admin.Location')); ?>">
                                </div>        
                                    
                                    
                                    <div class="form-group col-md-6">
                                    <input type="text" name="Address_DetailsAdd" class="form-control" placeholder="<?php echo e(trans('admin.Address_Details')); ?>" required>
                                </div>       
                                    
                                               <div class="form-group col-md-4">
                                    <label for="CustomerPassword"><?php echo e(trans('admin.Governrate')); ?></label>
                              <select class="form-control" name="GovernrateAdd"  id="Governrate"  required>
                                  <option value=""><?php echo e(trans('admin.Country')); ?></option>
                                  <?php $__currentLoopData = $Governrates; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $count): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                               <option value="<?php echo e($count->id); ?>" <?php if($count->id == $User->country): ?> selected <?php endif; ?>>
                     <?php echo e(app()->getLocale() == 'ar' ?$count->Arabic_Name :$count->English_Name); ?>

                               </option>      
                                  <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                              </select>                       	
                                </div>     
                                    
                                    
                                                        <div class="form-group col-md-4">
                                    <label for="CustomerPassword"><?php echo e(trans('admin.City')); ?></label>
                              <select class="form-control" name="CityAdd"  id="City"  required>
                   
                              </select>                       	
                                </div>   
                                    
                                    
                                                                     <div class="form-group col-md-4">
                                    <label for="CustomerPassword"><?php echo e(trans('admin.Place')); ?></label>
                              <select class="form-control" name="PlaceAdd"  id="Place"  required>
                   
                              </select>                       	
                                </div>   

                                    
                                    
        
                                <button type="submit"><?php echo e(trans('admin.Update')); ?></button>
                                    </div>
                            </form>
  </div>

                               </div>
                    </div>
                    
                    
                           <div class="col-lg-12 col-md-12">
                        <div class="login-form mb-30" style="max-width:100%">
                            
           
                            <h2 style=" color: <?php echo e($sub->MyAccount_Box_Input_Txt_Color); ?>"><?php echo e(trans('admin.My_Orders')); ?></h2>  
      <div class="cart-table table-responsive">
                        <table class="table table-striped table-hover table-bordered table-responsive">
  <thead class="thead-dark">
    <tr>
         <th><?php echo e(trans('admin.Code')); ?></th>
                               <th><?php echo e(trans('admin.Date')); ?></th>
                                                                        <th><?php echo e(trans('admin.Status')); ?></th>
                                                                        <th><?php echo e(trans('admin.Total_Price')); ?></th>
                                                                        <th><?php echo e(trans('admin.Products')); ?></th>
                                                                        <th><?php echo e(trans('admin.Address')); ?></th>                                         
                        </tr>
                      </thead>
                      <tbody>
                    
          <?php $__currentLoopData = $Orders; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $ord): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>                                
                                        <tr>
                                    <td><?php echo e($ord->Code); ?></td>        
                                    <td><?php echo e($ord->Date); ?></td>        
                                    <td>
                                    <?php if($ord->Delivery_Status == 0): ?>
                                     <?php echo e(trans('admin.Pending')); ?>   
                                    <?php elseif($ord->Delivery_Status == 1): ?>
                                      <?php echo e(trans('admin.Processing')); ?>  
                                    <?php elseif($ord->Delivery_Status == 2): ?>
                                     <?php echo e(trans('admin.Recived')); ?>   
                                    <?php endif; ?>    
                                    </td> 
                                            
                                     <td><?php echo e($ord->Total_Price); ?></td>       
                                     <td>
                 
                                <button type="button" class="btn btn-default" style="    background-color:  <?php echo e($main->Table_Button_BG_Color); ?> !important;border-color:  <?php echo e($main->Table_Button_BG_Color); ?> !important; color:  <?php echo e($main->Table_Button_Txt_Color); ?> !important;" data-bs-toggle="modal" data-bs-target="#default-example-modal-center-open<?php echo e($ord->id); ?>">
    <?php echo e(trans('admin.Products')); ?>

</button>           
                                         
                                     </td>    
                                            
                                                    <td>
             
                                <button type="button" class="btn btn-default" style="    background-color:  <?php echo e($main->Table_Button_BG_Color); ?> !important;border-color:  <?php echo e($main->Table_Button_BG_Color); ?> !important; color:  <?php echo e($main->Table_Button_Txt_Color); ?> !important;" data-bs-toggle="modal" data-bs-target="#Address<?php echo e($ord->id); ?>">
    <?php echo e(trans('admin.Address')); ?>

</button>                        
                                         
                                     </td>                
                                            
                                        </tr> 
                                   
                                                                        
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>   
  </tbody>
</table>
                            </div> 
                           <?php echo e($Orders->Links()); ?>

 
                            
                        </div>
                    </div>
                    
                    
                  
                    
                </div>
            </div>
        </section>
        <!-- End Login Area -->



<style>
    #Governrate{
        display: block !important;
    }     #lang{
        display: block !important;
            background: none;
    color: white;
    border: none;
        
    }     #coun{
        display: block !important;
            background: none;
    color: white;
    border: none;
    }      #Country{
        display: block !important;
    }  
      #City{
        display: block !important;
    }        #gov{
        display: block !important;
    }        #cit{
        display: block !important;
    }        #pla{
        display: block !important;
    }  
    
    #Place{
        display: block !important;
    }

    .nice-select{
        display: none !important;
    }
</style>

<!-- Pagination -->
<style> 
.page-item disabled,
.page-link,
.page-item active,
.page-item
    {
    		    background: <?php echo e($main->Pagination_BG_Color); ?> !important;
   color: <?php echo e($main->Pagination_Txt_Color); ?> !important;    
    }

    .page-item.active .page-link{
          		    background: <?php echo e($main->Pagination_Active_BG_Color); ?> !important;
   color: <?php echo e($main->Pagination_Active_Txt_Color); ?> !important;    
border-color:<?php echo e($main->Pagination_Active_Txt_Color); ?> !important;
        
    }

</style>

<!-- Modal -->
<style>
.modal-content {
    background: <?php echo e($main->Modal_BG_Color); ?> !important;
    
    }
    
    .modal-title,.modal-header .btn-close{
        
   color: <?php echo e($main->Modal_Txt_Color); ?> !important;       
    }
    
    .modal-footer button {
        
     background: <?php echo e($main->Modal_Button_BG_Color); ?> !important;
        
   color: <?php echo e($main->Modal_Button_Txt_Color); ?> !important;       
    }
    
     .modal-footer a {
        
     background: <?php echo e($main->Modal_Button_BG_Color); ?> !important;
        
   color: <?php echo e($main->Modal_Button_Txt_Color); ?> !important;       
    }
</style>





      <?php $__currentLoopData = $Orders; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $ord): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>  
                                                                        
                        <!-- Modal Products -->
<div class="modal fade" id="default-example-modal-center-open<?php echo e($ord->id); ?>" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog modal-xl">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="exampleModalLabel">         <?php echo e(trans('admin.Products')); ?> </h5>
        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
      </div>
           <?php
                $details=ProductSalesOrder::where('SalesOrder',$ord->id)->get();                         
                ?>         
      <div class="modal-body">
               <div class="mt-3">
                           <div class="cart-table table-responsive">
                            <table id=""
                            class="table table-bordered table-hover table-striped table-responsive">
                            <thead>
                                <tr>
                                    <th><?php echo e(trans('admin.Image')); ?> </th>
                                    <th><?php echo e(trans('admin.Name')); ?> </th>
                                    <th><?php echo e(trans('admin.Qty')); ?> </th>
                                    <th><?php echo e(trans('admin.Price')); ?> </th>
                                    <th><?php echo e(trans('admin.Total')); ?> </th>
                                </tr>
                            </thead>
                            <tbody id="">
                                <?php $__currentLoopData = $details; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $detail): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <tr>
                                    <td style="    width: 15%;">
                            <?php if(!empty($detail->Product()->first()->Image)): ?>            
                        <img src="<?php echo e(URL::to($detail->Product()->first()->Image)); ?>" style="width: 50%; height: 50%" class="img-fluid"> 
                            <?php endif; ?>            
                                    </td>
       
                                    <td>
                                        
                                        
                                   <?php echo e(app()->getLocale() == 'ar' ?$detail->Product()->first()->P_Ar_Name :$detail->Product()->first()->P_En_Name); ?>                   
                                    
                                    
                                <?php if(!empty($detail->V1)): ?>   
                                        
                              <?php echo e(app()->getLocale() == 'ar' ?$detail->V1()->first()->Name :$detail->V1()->first()->NameEn); ?>                 
                                        
                                        <?php endif; ?> 
                                  <?php if(!empty($detail->V2)): ?>    
                                        
                                <?php echo e(app()->getLocale() == 'ar' ?$detail->V2()->first()->Name :$detail->V2()->first()->NameEn); ?>                     
                                        
                                        <?php endif; ?>          
                                    </td>
  
                                    <td><?php echo e($detail->Qty); ?></td>
                                    <td><?php echo e($detail->Price); ?></td>
                                    <td><?php echo e($detail->Total); ?></td>


                                </tr>
                                 <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </tbody>
                        </table>
                        </div>
                         <div class="cart-table table-responsive">
                        <table class="table table-bordered table-hover table-striped mt-4">
                            <tbody>
                                <tr>
                                     <td><?php echo e(trans('admin.Sub_Total')); ?></td>
                                    <td><?php echo e($ord->Total_Price - ($ord->CuponCode + $ord->Shipping)); ?></td>
                                    
                                    <td><?php echo e(trans('admin.Cupon_Code')); ?></td>
                                    <td><?php echo e($ord->CuponCode); ?></td>
                                    
                                    <td><?php echo e(trans('admin.Shipping')); ?></td>
                                    <td><?php echo e($ord->Shipping); ?></td>
                                    
                                    <td><?php echo e(trans('admin.Grand_Total')); ?></td>
                                    <td><?php echo e($ord->Total_Price); ?></td> 
                            
                                </tr>
                            </tbody>
                        </table>
                        </div>
                        </div>
      </div>
      <div class="modal-footer">
            <button type="button" class="btn btn-secondary" data-bs-dismiss="modal" ><?php echo e(trans('admin.Close')); ?></button>
 
      </div>
    </div>
  </div>
</div>



                                        
                                <!-- Modal Address -->
<div class="modal fade" id="Address<?php echo e($ord->id); ?>" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog modal-xl">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="exampleModalLabel">       <?php echo e(trans('admin.Address')); ?> </h5>
        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
      </div>
      <div class="modal-body">
          <div class="cart-table table-responsive">
                            <table id=""
                            class="table table-bordered table-hover table-striped table-responsive">
                            <thead>
                                <tr>
                                    <th><?php echo e(trans('admin.Name')); ?> </th>
                                    <th><?php echo e(trans('admin.Email')); ?> </th>
                                    <th><?php echo e(trans('admin.Phone')); ?> </th>
                                    <th><?php echo e(trans('admin.Other_Phone')); ?> </th>
                                    <th><?php echo e(trans('admin.Address_Name')); ?> </th>
                                    <th><?php echo e(trans('admin.Special_Mark')); ?> </th>
                                    <th><?php echo e(trans('admin.Street')); ?> </th>
                                    <th><?php echo e(trans('admin.Buliding')); ?> </th>
                                    <th><?php echo e(trans('admin.Floor')); ?> </th>
                                    <th><?php echo e(trans('admin.Flat')); ?> </th>
                                    <th><?php echo e(trans('admin.Governrate')); ?> </th>
                                    <th><?php echo e(trans('admin.City')); ?> </th>
                                    <th><?php echo e(trans('admin.Place')); ?> </th>
                                    <th><?php echo e(trans('admin.Location')); ?> </th>
                                    <th><?php echo e(trans('admin.Address_Details')); ?> </th>

                                </tr>
                            </thead>
                            <tbody id="">
                      <tr>
                        <td><?php echo e($ord->Name); ?></td>  
                        <td><?php echo e($ord->Email); ?></td>  
                        <td><?php echo e($ord->Phone); ?></td>  
                        <td><?php echo e($ord->OtherPhone); ?></td>  
                        <td><?php echo e($ord->Address_Name); ?></td>  
                        <td><?php echo e($ord->Special_MarkAdd); ?></td>  
                        <td><?php echo e($ord->StreetAdd); ?></td>  
                        <td><?php echo e($ord->BulidingAdd); ?></td>  
                        <td><?php echo e($ord->FloorAdd); ?></td>  
                        <td><?php echo e($ord->FlatAdd); ?></td>  
                        <td>
                            <?php if(!empty($ord->Governrate)): ?>
                            
               <?php echo e(app()->getLocale() == 'ar' ?$ord->Governrate()->first()->Arabic_Name :$ord->Governrate()->first()->English_Name); ?>                 
                        
                            <?php endif; ?>
                          </td>  
                        <td>
                             <?php if(!empty($ord->City)): ?>
                           <?php echo e(app()->getLocale() == 'ar' ?$ord->City()->first()->Arabic_Name :$ord->City()->first()->English_Name); ?>     
                            <?php endif; ?>
                               </td>  
                        <td>
                             <?php if(!empty($ord->Place)): ?>
                            <?php echo e(app()->getLocale() == 'ar' ?$ord->Place()->first()->Arabic_Name :$ord->Place()->first()->English_Name); ?>     
                            <?php endif; ?>
                      
                          </td>  
                        <td><?php echo e($ord->LocationAdd); ?></td>  
                        <td><?php echo e($ord->Address_DetailsAdd); ?></td>  
                      </tr>
                            </tbody>
                        </table>
                        </div>
      </div>
      <div class="modal-footer">
            <button type="button" class="btn btn-secondary" data-bs-dismiss="modal" ><?php echo e(trans('admin.Close')); ?></button>

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


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

   <?php $__currentLoopData = $Addresses; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $cust): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>    

<!-- Modal Delete-->
<div class="modal fade" id="delete<?php echo e($cust->id); ?>" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="exampleModalLabel"> <?php echo e(trans('admin.Delete')); ?></h5>
        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
      </div>
      <div class="modal-body">
          <?php echo e(trans('admin.RUSWDT')); ?> <strong><?php echo e($cust->Address_Name); ?></strong>
      </div>
      <div class="modal-footer">
            <button type="button" class="btn btn-secondary" data-bs-dismiss="modal" ><?php echo e(trans('admin.No')); ?></button>
                              <a href="<?php echo e(url('DeleteMyAddress/'.$cust->id)); ?>"  class="btn btn-primary"> <?php echo e(trans('admin.Yes')); ?></a>
      </div>
    </div>
  </div>
</div>



<!-- Modal Edit-->
<div class="modal fade" id="edit<?php echo e($cust->id); ?>" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog modal-xl">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="exampleModalLabel"> <?php echo e(trans('admin.Edit')); ?></h5>
        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
      </div>
    <form action="<?php echo e(url('EditMyAddress')); ?>" method="post">
        <?php echo csrf_field(); ?>
        <input type="hidden" name="ID" value="<?php echo e($cust->id); ?>">
      <div class="modal-body">
          <div class="login-form mb-30" style="max-width:100%; background: <?php echo e($sub->MyAccount_Box_BG_Color); ?>">  
         <div class="row">
        <div class="form-group  col-md-4">
            <label><?php echo e(trans('admin.Address_Name')); ?></label>
       <input type="text" name="Address_Name" class="form-control" value="<?php echo e($cust->Address_Name); ?>" placeholder="<?php echo e(trans('admin.Address_Name')); ?>" required>
                                </div>
        
                                <div class="form-group  col-md-4">
                                   <label><?php echo e(trans('admin.Street')); ?></label>    
                                    <input type="text" name="StreetAdd" class="form-control" value="<?php echo e($cust->Street); ?>" placeholder="<?php echo e(trans('admin.Street')); ?>" required>
                                </div>
        
                                <div class="form-group  col-md-4">
                                       <label><?php echo e(trans('admin.Buliding')); ?></label>
                                    <input type="text" name="BulidingAdd" class="form-control" value="<?php echo e($cust->Buliding); ?>" placeholder="<?php echo e(trans('admin.Buliding')); ?>" required>
                                </div>
        
                        
                                        <div class="form-group  col-md-4">
                                               <label><?php echo e(trans('admin.Floor')); ?></label>
                                    <input type="text" name="FloorAdd" class="form-control" value="<?php echo e($cust->Floor); ?>" placeholder="<?php echo e(trans('admin.Floor')); ?>" required>
                                </div>
        
                                
                                
                                        <div class="form-group  col-md-4">
                                               <label><?php echo e(trans('admin.Flat')); ?></label>
                                    <input type="text" name="FlatAdd" class="form-control" value="<?php echo e($cust->Flat); ?>" placeholder="<?php echo e(trans('admin.Flat')); ?>" required>
                                </div>          
                                    
                                    <div class="form-group  col-md-4">
                                           <label><?php echo e(trans('admin.Special_Mark')); ?></label>
                                    <input type="text" name="Special_MarkAdd" class="form-control" value="<?php echo e($cust->Special_Mark); ?>" placeholder="<?php echo e(trans('admin.Special_Mark')); ?>">
                                </div>       
             
             
                                    
                                    <div class="form-group  col-md-6">
                                           <label><?php echo e(trans('admin.Location')); ?></label>
                                    <input type="text" name="LocationAdd" class="form-control" value="<?php echo e($cust->Location); ?>" placeholder="<?php echo e(trans('admin.Location')); ?>">
                                </div>        
                                    
                                    
                                    <div class="form-group col-md-6">
                                           <label><?php echo e(trans('admin.Address_Details')); ?></label>
                                    <input type="text" name="Address_DetailsAdd" class="form-control" value="<?php echo e($cust->Details); ?>" placeholder="<?php echo e(trans('admin.Address_Details')); ?>" required>
                                </div>       
                                    
                                               <div class="form-group  col-md-4">
                                    <label for="CustomerPassword"><?php echo e(trans('admin.Governrate')); ?></label>
                              <select class="form-control Governrate" name="GovernrateAdd" id="gov"   required>
                                  <option value=""><?php echo e(trans('admin.Governrate')); ?></option>
                                  <?php $__currentLoopData = $Governrates; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $count): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                               <option value="<?php echo e($count->id); ?>" <?php if($count->id == $cust->Governrate): ?> selected <?php endif; ?>>
                     <?php echo e(app()->getLocale() == 'ar' ?$count->Arabic_Name :$count->English_Name); ?>

                               </option>      
                                  <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                              </select>                       	
                                </div>     
                                    
                                    
                                                        <div class="form-group  col-md-4">
                                    <label for="CustomerPassword"><?php echo e(trans('admin.City')); ?></label>
                              <select class="form-control City" name="CityAdd" id="cit"   required>
                   <option value="<?php echo e($cust->City); ?>">
                                  
                                  <?php echo e(app()->getLocale() == 'ar' ?$cust->City()->first()->Arabic_Name :$cust->City()->first()->English_Name); ?>

                                  </option>
                              </select>                       	
                                </div>   
                                    
                                    
                                                                     <div class="form-group  col-md-4">
                                    <label for="CustomerPassword"><?php echo e(trans('admin.Place')); ?></label>
                              <select class="form-control Place" name="PlaceAdd" id="pla"   required>
                              <option value="<?php echo e($cust->Place); ?>">
                                  
                                  <?php echo e(app()->getLocale() == 'ar' ?$cust->Place()->first()->Arabic_Name :$cust->Place()->first()->English_Name); ?>

                                  </option>
                              </select>                       	
                                </div>   
      
          
          
          </div>
          </div>
      </div>
      <div class="modal-footer">
            <button type="button" class="btn btn-secondary" data-bs-dismiss="modal" ><?php echo e(trans('admin.Close')); ?></button>
            <button type="submit" class="btn btn-default" ><?php echo e(trans('admin.Submit')); ?></button>
      </div>
        </form>    
    </div>
  </div>
</div>

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





<?php $__env->stopSection(); ?> 
<?php $__env->startPush('js'); ?>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>

<!-- Filter Governrate and City !-->
<script>
   $(document).ready(function() {
   
       $('#Governrate').on('change', function(){
           var countryId = $(this).val();
           if(countryId) {
               $.ajax({
                   url: 'GovernrateFilterr/'+countryId,
                   type:"GET",
                   dataType:"json",
                   beforeSend: function(){
                       $('#loader').css("visibility", "visible");
                   },
   
                   success:function(data) {
   
                       $('#City').empty();
   
                       $.each(data, function(key, value){
   
             $('#City').append('<option value="'+ key +'">' + value + '</option>');
  
                           
                       });
                       
                      var CIITY = $('#City').val();  
                         $.ajax({
                   url: 'CityFilterr/'+CIITY,
                   type:"GET",
                   dataType:"json",
                   beforeSend: function(){
                       $('#loader').css("visibility", "visible");
                   },
   
                   success:function(data) {
   
                       $('#Place').empty();
   
                       $.each(data, function(key, value){
   
             $('#Place').append('<option value="'+ key +'">' + value + '</option>');
                           
                       });
                       
       
                   },
                   complete: function(){
                       $('#loader').css("visibility", "hidden");
                   }
               });
                       
                       
                       
                   },
                   complete: function(){
                       $('#loader').css("visibility", "hidden");
                   }
               });
           } else {
   
               $('select[name="states"]').empty();
           }
   
       });
   
   });
    
   $(document).ready(function() {
   
   
           var countryId = $('#Governrate').val();
           if(countryId) {
               $.ajax({
                   url: 'GovernrateFilterr/'+countryId,
                   type:"GET",
                   dataType:"json",
                   beforeSend: function(){
                       $('#loader').css("visibility", "visible");
                   },
   
                   success:function(data) {
   
                       $('#City').empty();
   
                       $.each(data, function(key, value){
   
             $('#City').append('<option value="'+ key +'">' + value + '</option>');
                           
                       });
                       
                     var CIITY = $('#City').val();  
                         $.ajax({
                   url: 'CityFilterr/'+CIITY,
                   type:"GET",
                   dataType:"json",
                   beforeSend: function(){
                       $('#loader').css("visibility", "visible");
                   },
   
                   success:function(data) {
   
                       $('#Place').empty();
   
                       $.each(data, function(key, value){
   
             $('#Place').append('<option value="'+ key +'">' + value + '</option>');
                           
                       });
                       
       
                   },
                   complete: function(){
                       $('#loader').css("visibility", "hidden");
                   }
               });
                              
                       
                       
                       
                   },
                   complete: function(){
                       $('#loader').css("visibility", "hidden");
                   }
               });
           } else {
   
               $('select[name="states"]').empty();
           }
   
   
   });  
    
    
 $('#City').on('change', function(){
      var CIITY = $('#City').val();  
                         $.ajax({
                   url: 'CityFilterr/'+CIITY,
                   type:"GET",
                   dataType:"json",
                   beforeSend: function(){
                       $('#loader').css("visibility", "visible");
                   },
   
                   success:function(data) {
   
                       $('#Place').empty();
   
                       $.each(data, function(key, value){
   
             $('#Place').append('<option value="'+ key +'">' + value + '</option>');
                           
                       });
                       
       
                   },
                   complete: function(){
                       $('#loader').css("visibility", "hidden");
                   }
               });
                       
     
 });
    
</script>


<script>
   $(document).ready(function() {
   
       $('.Governrate').on('change', function(){
           var countryId = $(this).val();
           if(countryId) {
               $.ajax({
                   url: 'GovernrateFilterr/'+countryId,
                   type:"GET",
                   dataType:"json",
                   beforeSend: function(){
                       $('#loader').css("visibility", "visible");
                   },
   
                   success:function(data) {
   
                       $('.City').empty();
   
                       $.each(data, function(key, value){
   
             $('.City').append('<option value="'+ key +'">' + value + '</option>');
  
                           
                       });
                       
                      var CIITY = $('.City').val();  
                         $.ajax({
                   url: 'CityFilterr/'+CIITY,
                   type:"GET",
                   dataType:"json",
                   beforeSend: function(){
                       $('#loader').css("visibility", "visible");
                   },
   
                   success:function(data) {
   
                       $('.Place').empty();
   
                       $.each(data, function(key, value){
   
             $('.Place').append('<option value="'+ key +'">' + value + '</option>');
                           
                       });
                       
       
                   },
                   complete: function(){
                       $('#loader').css("visibility", "hidden");
                   }
               });
                       
                       
                       
                   },
                   complete: function(){
                       $('#loader').css("visibility", "hidden");
                   }
               });
           } else {
   
               $('select[name="states"]').empty();
           }
   
       });
   
   });
    
   $(document).ready(function() {
   
   
           var countryId = $('.Governrate').val();
           if(countryId) {
               $.ajax({
                   url: 'GovernrateFilterr/'+countryId,
                   type:"GET",
                   dataType:"json",
                   beforeSend: function(){
                       $('#loader').css("visibility", "visible");
                   },
   
                   success:function(data) {
   
                       $('.City').empty();
   
                       $.each(data, function(key, value){
   
             $('.City').append('<option value="'+ key +'">' + value + '</option>');
                           
                       });
                       
                     var CIITY = $('.City').val();  
                         $.ajax({
                   url: 'CityFilterr/'+CIITY,
                   type:"GET",
                   dataType:"json",
                   beforeSend: function(){
                       $('#loader').css("visibility", "visible");
                   },
   
                   success:function(data) {
   
                       $('.Place').empty();
   
                       $.each(data, function(key, value){
   
             $('.Place').append('<option value="'+ key +'">' + value + '</option>');
                           
                       });
                       
       
                   },
                   complete: function(){
                       $('#loader').css("visibility", "hidden");
                   }
               });
                              
                       
                       
                       
                   },
                   complete: function(){
                       $('#loader').css("visibility", "hidden");
                   }
               });
           } else {
   
               $('select[name="states"]').empty();
           }
   
   
   });  
    
    
 $('.City').on('change', function(){
      var CIITY = $('#City').val();  
                         $.ajax({
                   url: 'CityFilterr/'+CIITY,
                   type:"GET",
                   dataType:"json",
                   beforeSend: function(){
                       $('#loader').css("visibility", "visible");
                   },
   
                   success:function(data) {
   
                       $('.Place').empty();
   
                       $.each(data, function(key, value){
   
             $('.Place').append('<option value="'+ key +'">' + value + '</option>');
                           
                       });
                       
       
                   },
                   complete: function(){
                       $('#loader').css("visibility", "hidden");
                   }
               });
                       
     
 });
    
</script>


<?php $__env->stopPush(); ?>
<?php echo $__env->make('site.index', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /Applications/MAMP/htdocs/laravel/ERP/resources/views/site/MyAccount.blade.php ENDPATH**/ ?>