Viewing file: 5652307ce7db09c399d28c3002d42576.php (9.71 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php $__env->startSection('title'); ?> Assign Workout Plan <?php $__env->stopSection(); ?>
<?php $__env->startSection('extra-css'); ?> <link rel="stylesheet" href="<?php echo e(asset('plugins/datatables-bs4/css/dataTables.bootstrap4.min.css')); ?>"> <link rel="stylesheet" href="<?php echo e(asset('plugins/datatables-responsive/css/responsive.bootstrap4.min.css')); ?>">
<style> .w-100{ width: 100%; } .list-style-none{ list-style: none; background: whitesmoke; padding: 7px 20px; border-radius: 5px; } input[type=checkbox]{ display: block !important; } .task-preview-section{ width: 100%; } #previewImage{ width: 100%; } video{ width: 100%; } </style> <?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?> <!-- Main content --> <section class="content"> <div class="row"> <div class="col-12"> <div class="card"> <div class="card-header"> <h2 class="card-title"><?php echo app('translator')->get('Assign Workout Plan'); ?></h2> </div> <!-- /.card-header --> <div class="card-body table-body"> <div class="row"> <div class="col-md-8"> <?php if(isset($customer_workout_plan) && $customer_workout_plan): ?>
<p>Workout Plan Information</p> <div class="mt-3"> <h5><?php echo e($customer_workout_plan->meal_plan->title); ?></h5> </div> <?php if($customer_workout_plan->customer_workout_sections): ?> <div class="mt-3"> <?php $__currentLoopData = $customer_workout_plan->customer_workout_sections; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $s_key=>$section): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <div class="card mt-3"> <div class="card-header text-center"> <h6><?php echo e(isset($section->title)?$section->title:''); ?></h6> </div> <div class="card-body"> <?php $__currentLoopData = $section->customer_workout_tasks; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$task): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <ul class="list-style-none">
<li> <strong>Task: </strong> <?php echo e(isset($task->workout_task->name)?$task->workout_task->name:''); ?>
</li> <li><strong>Repetation and set: </strong> <?php echo e(isset($task->repetation_and_set)?$task->repetation_and_set:''); ?></li> <li> <strong>Rest Time: </strong> <?php echo e(isset($task->rest_time)?$task->rest_time:''); ?>
</li> </ul> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </div> </div> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </div> <?php endif; ?>
<?php else: ?> <div class="card"> <div class="card-body text-center"> <h5><?php echo e(trans('No plan assigned')); ?></h5> </div> </div> <?php endif; ?> </div>
<div class="col-md-4"> <div class="meal-plan-section"> <table class="w-100 table"> <thead> <th><?php echo e(trans('Name')); ?></th> <th><?php echo e(trans('Action')); ?></th> </thead>
<tbody> <?php $__currentLoopData = $workout_plans; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $workout_plan): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <tr> <td><?php echo e($workout_plan->title); ?></td> <td> <?php if(isset($customer_workout_plan) && $customer_workout_plan && $customer_workout_plan->plan_id==$workout_plan->id): ?> <button class="btn btn-primary disabled btn-sm" disabled><?php echo e(trans('Change')); ?></button> <?php else: ?> <button data-message="<?php echo e(trans('Are you sure you want to change workout plan')); ?>" data-action="<?php echo e(route('admin.change.workout.plan')); ?>" data-input={"plan_id":"<?php echo e($workout_plan->id); ?>","customer_id":"<?php echo e($customer->id); ?>"} data-toggle="modal" data-target="#modal-confirm" class="btn btn-primary btn-sm" type="button"><?php echo app('translator')->get('admin.form.button.change'); ?> </button> <?php endif; ?> </td> </tr> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </tbody> </table> </div> </div> </div> </div> <!-- /.card-body --> </div> <!-- /.card --> </div> <!-- /.col --> </div> <!-- /.row --> </section> <!-- /.content -->
<!-- Modal --> <div class="modal fade" id="previewModal" data-backdrop="static" data-keyboard="false" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true"> <div class="modal-dialog modal-dialog-centered modal-lg" role="document"> <div class="modal-content"> <div class="modal-header bg-white"> <button type="button" class="close pause_video" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <div class="modal-body"> <div class="task-preview-section"> <div class="section-video">
</div>
<img id="previewImage" alt=""> </div> </div> </div> </div> </div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('extra-scripts'); ?>
<script> "use strict"; $(document).on('click', '.preview_task', function(e){ const type=$(this).attr('data-type'); const file=$(this).attr('data-path');
if(type && type=='mp4'){ $('#videoTag').removeClass('d-none'); $('.section-video').html(`<video id="videoTag" controls autoplay> <source src="${file}" type="video/mp4"></video>`) }else{ $('#videoTag').addClass('d-none'); $('#previewImage').attr('src', file); }
$('#previewModal').modal('show'); });
$(document).on('click', '.pause_video', function(e){ $('#videoTag').get(0).pause(); }); </script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.admin', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/picotech/domains/fitness.picotech.app/public_html/resources/views/admin/customers/workout_plan.blade.php ENDPATH**/ ?>
|