

<?php $__env->startSection('content'); ?>
<div class="side-title">
    <h3><?php echo e($head ?? ''); ?></h3>
</div>

<div class="border-item">
   
        <div class="form-group col-lg-12">
        <label><?php echo e(__('trainreservations.patient_details')); ?></label>
        <br><br>
        <?php $__currentLoopData = $systemfoods; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
          <label>#<?php echo e($data->name); ?></label>
            <table id="pricing-list-container" style="width:100%;word-break:break-all">
                <thead>
                    <th ><?php echo e(__('trainreservations.meal_name')); ?></th>
                    <th ><?php echo e(__('trainreservations.meal_type')); ?></th>
                    <th ><?php echo e(__('trainreservations.meal_calories')); ?></th>
                    <th ><?php echo e(__('trainreservations.meal_fats')); ?></th>
                    <th ><?php echo e(__('trainreservations.meal_carbohydrates')); ?></th>
                    <th ><?php echo e(__('trainreservations.meal_protein')); ?></th>
                    <th ><?php echo e(__('trainreservations.meal_glycemic')); ?></th>
                    
                </thead>
                <tbody>
                      <?php $__currentLoopData = $data->meals->sortBy('type'); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <tr>
                    <td><?php echo e($row->name); ?></td>
                    <td><?php if($row->type == '1'): ?><?php echo e(__('trainreservations.breakfast')); ?> <?php elseif($row->type == '2'): ?> <?php echo e(__('trainreservations.launch')); ?> <?php elseif($row->type == '3'): ?> <?php echo e(__('trainreservations.dinner')); ?>  <?php else: ?> <?php echo e(__('trainreservations.snakes')); ?> <?php endif; ?></td>
                    <td><?php echo e($row->calories); ?></td>
                    <td><?php echo e($row->fats); ?></td>
                    <td><?php echo e($row->Carbohydrates); ?></td>
                    <td><?php echo e($row->Protein); ?></td>
                    <td><?php echo e($row->glycemic); ?></td>
                    </tr>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </tbody>
            </table> 
            <br><br>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            <?php if(count($reservations)>0): ?>
          
            <h3><?php echo e(__('trainreservations.continue_reservation')); ?></h3>
            <?php $all = $reservation->count ;
                 $remain = $all - $reserved;
            ?>
            <h5><?php echo e(__('trainreservations.remain_reservation') .' : '); ?> <?php if($remain != '0'): ?> <?php echo e($remain); ?> <?php else: ?> <?php echo e(__('trainreservations.notcontinue')); ?> <?php endif; ?></h5>
            <br><br>
            <label><?php echo e(__('trainreservations.compare')); ?></label>
            <table id="pricing-list-container" style="width:100%;">
                <thead>
                    <th>#</th>
                    <th><?php echo e(__('trainreservations.height')); ?></th>
                    <th><?php echo e(__('trainreservations.width')); ?></th>
                    <th><?php echo e(__('trainreservations.wight')); ?></th>
                    <th><?php echo e(__('trainreservations.train')); ?></th>
                    <th><?php echo e(__('trainreservations.trainner')); ?></th>
                    <th><?php echo e(__('trainreservations.day')); ?></th>
                </thead>
                <tbody>
                    <?php $__currentLoopData = $reservations; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <tr>
                    <td><?php echo e($key+1); ?></td>
                    <td><?php echo e($row->height); ?></td>
                    <td><?php echo e($row->width); ?></td>
                    <td><?php echo e($row->weight); ?></td>
                    <td><?php echo e($row->system_physic['name']); ?></td>
                    <td><?php echo e($row->trainner->name); ?></td>
                    <td><?php echo e(date("Y-m-d", strtotime($row->created_at) )); ?></td>
                </tr>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </tbody>
            </table> 
            <br><br>
            
          
            
        
            
            
              
            <?php else: ?>
            <h3><?php echo e(__('trainreservations.new_reservation')); ?></h3>
            <?php endif; ?>
       
        </div>
        <?php if(count($answers) > 0): ?>
        
         <div class="form-group col-lg-12">
              <label><?php echo e(__('trainreservations.compare_questions')); ?></label>
            <table id="pricing-list-container" style="width:100%;">
                <thead>
                    <th>#</th>
                    <th><?php echo e(__('trainreservations.question')); ?></th>
                    <th><?php echo e(__('trainreservations.answer')); ?></th>
                   
                </thead>
                <tbody>
                    <?php $__currentLoopData = $answers; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <tr>
                    <td><?php echo e($key+1); ?></td>
                    <td><?php echo e($row->question->question); ?></td>
                    <td><?php echo e($row->answer); ?></td>
                    </tr>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </tbody>
            </table> 
            <br><br>
         </div>
         <?php endif; ?>
<div class="row">
<?php $__currentLoopData = physical($systemphysic->id); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$system): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<div class="col-lg-12"><h2><?php echo e(__('physicals.physical')); ?> : <?php echo e($key+1); ?></h2></div>
 <div class="form-group col-lg-6">
            <label><?php echo e(__('physicals.name')); ?> </label>
            <input type="text" class="form-control " disabled   value='<?php echo e($system->name); ?>'/>
        </div>

    
           <div class="form-group col-lg-6">
            <label><?php echo e(meta('description', getCurrentLocale()) ?? __('physicals.description')); ?> </label>
            <input type="text" class="form-control " disabled value='<?php echo e($system->description); ?>' />
        </div>
          
        <div class="form-group col-lg-12">
        <?php if(!is_null($system->image)): ?><img style="
    width: 70%;
    height: 250px;
    margin-right:150px;
" src="<?php echo e(asset($system->image)); ?>"><?php endif; ?>
        </div>
        
        
         
          <div class="form-group col-lg-12">
           <?php if(!is_null($system->video)): ?>
<video style="
    width: 70%;
    height: 250px; margin-right:150px;
" controls>
  <source src="<?php echo e(asset($system->video)); ?>" type="video/mp4">
</video>
<?php endif; ?>
        </div>
        
      


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

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

<?php $__env->startSection('inner_js'); ?>
    <!-- Editor JS files -->
    <script type="text/javascript">
    $(document).ready(function(){
    $(document).on('change','#dating',function(){
      
      var doctor = $('#doctor').val();
     
          var dates = $('#dating').val();
        var data = doctor + ','+ dates;
        if(doctor != null)
        $.ajax({
          url : urldating+data,
          type : 'GET',
          data : 'nothing',
          dataType : 'json',
          success:function(data)
          {
              
            $('#table').html(data);
            
          }
        })
    });
    $(document).on('change','#system_food',function(){
     
      var data = $('#system_food').val();
      
        
        if(doctor != null)
        $.ajax({
          url : urlfood+data,
          type : 'GET',
          data : 'nothing',
          dataType : 'json',
          success:function(data)
          {
              
            $('#tablefood').html(data);
            
          }
        })
    });
       $(document).on('change','#system_physical',function(){
      
      var data = $('#system_physical').val();
    
        
        if(doctor != null)
        $.ajax({
          url : urlphysical+data,
          type : 'GET',
          data : 'nothing',
          dataType : 'json',
          success:function(data)
          {

            $('#tablephysical').html(data);
            
          }
        })
    });
  });
    function addanatomy(elem) {
    
  
      var datarow =$(elem).attr('counter');
      
      var newdata = parseInt(datarow)+1; 
      
      $(elem).attr('counter', newdata);
        
        $.ajax({
          url : urlanatomy +datarow,
          type : 'GET',
          data : 'nothing',
          dataType : 'json',
          success:function(data)
          {
            $('#anatomy').append(data);
          }
        })
}
</script>
<script type="text/javascript">
    function addprescription(elem) {
    
  
      var datarow =$(elem).attr('counter');
      
      var newdata = parseInt(datarow)+1; 
      
      $(elem).attr('counter', newdata);
        
        $.ajax({
          url : urlprescription +datarow,
          type : 'GET',
          data : 'nothing',
          dataType : 'json',
          success:function(data)
          {
            $('#prescription').append(data);
          }
        })
}
</script>


            <script src="//cdn.tinymce.com/4/tinymce.min.js"></script>
    <script>
        let route_prefix = "<?php echo e(url(config('lfm.prefix'))); ?>",
            url = "<?php echo e(url('/')); ?>/",
            urlanatomy = "<?php echo e(url('admin/anatomy')); ?>/",
            urlprescription = "<?php echo e(url('admin/prescription')); ?>/",
            urldating = "<?php echo e(url('admin/datingtrain')); ?>/",
            urlfood = "<?php echo e(url('admin/systemfood')); ?>/",
            urlphysical = "<?php echo e(url('admin/systemphysical')); ?>/",
            imagePath = "<?php echo e(asset('')); ?>";
    </script>
    <script src="<?php echo e(asset('assets/admin/js/editor.js')); ?>"></script>
    <script src="<?php echo e(asset('assets/admin/js/lfm.js')); ?>"></script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('admin.layouts.container', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/omaralyomhost/public_html/green_apple/resources/views/admin/patientphysicalreservations/form.blade.php ENDPATH**/ ?>