Файловый менеджер - Редактировать - /home/clickysoft/public_html/calvary-p2.clickysoft.net/storage/framework/views/431431c317c33714163a577278ff94d7.php
Назад
<?php $__env->startSection('title', 'Lunch Items'); ?> <style> .title-tip { position: absolute; width: 100%; padding: 7px 10px 15px; top: -50px; background-color: #707070; border-radius: 5px; color: #fff; display: none; transition: 0.6s all ease-in-out; z-index: 1; } .title-tip.active { display: block } .tip-btn { cursor: pointer; background-color: transparent; border: 0; text-align: left; } .title-tip p { margin-bottom: 0; font-size: 15px; padding: 15px 0px 0px; } .tip-close { position: absolute; top: 2px; right: 6px; z-index: inherit; cursor: pointer; } </style> <?php $__env->startSection('content'); ?> <?php $currentYear = \Carbon\Carbon::now()->format('Y'); $nextYear = \Carbon\Carbon::now()->addYear(1)->format('Y'); $preSchoolDescription = 'The PA is thrilled to announce that In-N-Out will be offered on special days throughout the 2023-2024 school year! On the special In-N-Out days, Pre-School 3 & Pre-School 4 students will have the opportunity to stay at school until 12:30pm for lunch. The In-N-Out lunches will be the following dates: Monday, 10/02; Friday, 10/20; Wednesday, 11/29; Friday, 01/19; Friday, 2/09; Wednesday 03/06; Wednesday, 03/27; Friday, 04/19; & Friday, 05/17. All In-N-Out lunches will be served with a drink and chips.'; $sibling = \Illuminate\Support\Facades\Session::get('user_cart')['siblings'][request()->segment(2)]; $sibling_items = array_column($sibling['items'] ?? [], 'itemId'); $new_sibling_items = []; foreach ($sibling['items'] ?? [] as $s_i) { $new_sibling_items[] = $s_i['slot'] . '_' . $s_i['itemId']; } ?> <section class="lunch-program-sec"> <div class="container"> <div class="row"> <div class="col-md-12"> <div class="lps-head lme-head lmw-head"> <h3>Lunch Menu for <?php echo e(ucfirst($sibling['grade_title'])); ?></h3> <?php if($sibling['school_title'] !== 'Pre School'): ?> <p>**You MUST order both an (A) & (B) option; they can be different things or the same thing.** </p> <?php endif; ?> </div> </div> </div> <div class="wizard"> <div class="row justify-content-center"> <div class="col-md-12 col-lg-12 col-xl-10"> <div class="tab-buttons"> <?php $__currentLoopData = $hotLunchMenu; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $menu): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php $explodedTitle = explode('-', $menu->title); if (trim(end($explodedTitle)) === 'B') { continue; } ?> <div class="tab-button" data-target="step<?php echo e($key + 1); ?>"> <div class="tbs-hd-main"> <div class="tbs-hd"> <h4><?php echo e($menu->vendor->name); ?></h4> <p> (<?php echo e($menu->vendor->sub_heading); ?>) </p> </div> <div> <span class="tab-arrow"> <svg xmlns="http://www.w3.org/2000/svg" width="61.5" height="15.035" viewBox="0 0 61.5 15.035"> <g id="Icon_feather-arrow-right" data-name="Icon feather-arrow-right" transform="translate(40.336 -6.439)"> <path id="Path_7596" data-name="Path 7596" d="M7.5,18h60" transform="translate(-47.086 -4.043)" fill="none" stroke="#707070" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" /> <path id="Path_7597" data-name="Path 7597" d="M18,7.5l6.457,6.457L18,20.414" transform="translate(-4.043)" fill="none" stroke="#707070" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" /> </g> </svg> </span> </div> </div> </div> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </div> </div> </div> <?php $__currentLoopData = $hotLunchMenu; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $menu): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php $explodedTitle = explode('-', $menu->title); $tag = 'A'; $isCombo = false; if (trim(end($explodedTitle)) === 'A') { $isCombo = true; } elseif (trim(end($explodedTitle)) === 'B') { $isCombo = false; $tag = 'B'; } ?> <?php if($tag == 'B') continue; ?> <div id="step<?php echo e($key + 1); ?>" class="twb-content" data-combo="<?php echo e($isCombo); ?>"> <div class="lunches-main"> <div class="lunch-des"> <h4><?php echo e($menu->vendor->name); ?></h4> <p><?php echo $menu->vendor->description; ?></p> </div> <div class="d-flex justify-content-center mb-5"> <div class="my-child-button "> <input type="checkbox" class="vendor-check" name="<?php echo e(\Illuminate\Support\Str::slug($menu->vendor->name)); ?>" id="<?php echo e(\Illuminate\Support\Str::slug($menu->vendor->name)); ?>"> <label for="<?php echo e(\Illuminate\Support\Str::slug($menu->vendor->name)); ?>">My Child Does Not Want <?php echo e($menu->vendor->name); ?></label> </div> </div> <div class="day-double monday"> <div class="day-hd"> <h4><?php echo e($menu->title); ?></h4> </div> <?php $__currentLoopData = $menu->items->chunk(6); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $items): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php $__currentLoopData = $items; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $k => $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php if($loop->first): ?> <div class="grid-container"> <?php endif; ?> <div class="item-card"> <div class="item-card-overlay"></div> <div class="item-card-thumb"> <img src="<?php echo e($item->vendorItem?->firstImage()); ?>" alt="N/A" class="img-fluid"> </div> <div class="item-card-content"> <div class="position-relative tip-main"> <button class="tip-btn"> <?php echo e(Str::limit($item->vendorItem->name, 30)); ?> </button> <div class="title-tip"> <i class="fa fa-times tip-close"></i> <p> <?php echo e($item->vendorItem->name); ?> </p> </div> </div> <div class="price-addcart"> <div class="prc-price"> <h5>+$<?php echo e($item->vendorItem->price); ?></h5> </div> <div class="crt-check"> <?php $item_exists = in_array('A_' . $item->item_id, $new_sibling_items) || in_array( 'FIESTA FEAST_' . $item->item_id, $new_sibling_items, ) || in_array( 'Various Days_' . $item->item_id, $new_sibling_items, ); ?> <input type="radio" class="item-checkbox" name="item<?php echo e($menu->id); ?>" id="ct<?php echo e($item->item_id); ?>" value="<?php echo e($item->item_id); ?>" <?php if($item_exists): echo 'checked'; endif; ?> onchange="addMenu( this, '<?php echo e(addslashes($menu->title)); ?>', '<?php echo e($tag); ?>', '<?php echo e(addslashes($item->vendorItem?->firstImage())); ?>', '<?php echo e(addslashes($item->vendorItem?->name)); ?>', '<?php echo e($item->vendorItem?->price); ?>', <?php echo e($menu->id); ?>, '<?php echo e(trim(str_replace(' ', '', $tag))); ?>-<?php echo e(str_replace(' ', '', addslashes($menu->title))); ?>-<?php echo e($k); ?>' )"> <label class="addcrt-btn" for="ct<?php echo e($item->item_id); ?>"> <i class="add fa fa-plus" aria-hidden="true"></i> <i class="check fa fa-check" aria-hidden="true"></i> </label> </div> </div> </div> </div> <?php if($loop->last): ?> </div> <?php endif; ?> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </div> <?php if($isCombo): ?> <?php ($secondMenu = $hotLunchMenu[$key + 1] ?? []); ?> <?php if($secondMenu): ?> <div class="day-double monday"> <div class="day-hd"> <h4><?php echo e($secondMenu->title); ?></h4> </div> <?php $__currentLoopData = $secondMenu->items->chunk(6); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $items): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php $__currentLoopData = $items; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $k => $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php if($loop->first): ?> <div class="grid-container"> <?php endif; ?> <div class="item-card"> <div class="item-card-overlay"></div> <div class="item-card-thumb"> <img src="<?php echo e($item->vendorItem?->firstImage()); ?>" alt="N/A" class="img-fluid"> </div> <div class="item-card-content"> <div class="position-relative tip-main"> <button class="tip-btn"> <?php echo e(Str::limit($item->vendorItem->name, 30)); ?> </button> <div class="title-tip"> <i class="fa fa-times tip-close"></i> <p> <?php echo e($item->vendorItem->name); ?> </p> </div> </div> <div class="price-addcart"> <div class="prc-price"> <h5>+$<?php echo e($item->vendorItem->price); ?></h5> </div> <div class="crt-check"> <input type="radio" class="item-checkbox" name="item<?php echo e($secondMenu->id); ?>" id="ctt<?php echo e($item->item_id); ?>" value="<?php echo e($item->item_id); ?>" <?php if(in_array('B_' . $item->item_id, $new_sibling_items)): echo 'checked'; endif; ?> onchange="addMenu( this, '<?php echo e(addslashes($secondMenu->title)); ?>', 'B', '<?php echo e(addslashes($item->vendorItem?->firstImage())); ?>', '<?php echo e(addslashes($item->vendorItem?->name)); ?>', '<?php echo e($item->vendorItem?->price); ?>', <?php echo e($secondMenu->id); ?>, '<?php echo e(trim(str_replace(' ', '', 'B'))); ?>-<?php echo e(str_replace(' ', '', addslashes($secondMenu->title))); ?>-<?php echo e($k); ?>' )"> <label class="addcrt-btn" for="ctt<?php echo e($item->item_id); ?>"> <i class="add fa fa-plus" aria-hidden="true"></i> <i class="check fa fa-check" aria-hidden="true"></i> </label> </div> </div> </div> </div> <?php if($loop->last): ?> </div> <?php endif; ?> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <?php endif; ?> </div> <?php endif; ?> </div> </div> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <div class="btn-container"> <button class="prev-btn" aria-label="Back">Back</button> <button class="next-btn" aria-label="Next">Next</button> </div> </div> </div> </section> <?php $__env->stopSection(); ?> <?php $__env->startPush('front-scripts'); ?> <script src="<?php echo e(asset('assets/front/js/global.js')); ?>"></script> <script src="<?php echo e(asset('assets/admin/js/axios.min.js')); ?>"></script> <script src="<?php echo e(asset('assets/admin/js/sweetalert.min.js')); ?>"></script> <script> $(document).ready(function() { //In order to push pre-selected items in sortItem array $('.item-checkbox').trigger('change') //Navigate to the same vendor for item edit const itemId = `<?php echo e(request()->get('item_id')); ?>` if (itemId) { let itemRadio = $(`input[type="radio"][value="${itemId}"]`) let div = itemRadio.closest('.twb-content') div.show() $('.tab-button[data-target=' + (div.attr('id')) + ']').addClass("active"); } else { $("#step1").show(); $(".tab-button:first").addClass("active"); } }) let prevBtn = $(".prev-btn") let nextBtn = $(".next-btn") let slotItem = []; $(document).ready(function() { prevBtn = $(".prev-btn") nextBtn = $(".next-btn") $(".tab-buttons").on("click", ".tab-button", function() { const target = $(this).data("target"); const $currentTab = $(".twb-content:visible"); const $targetTab = $("#" + target); if ($targetTab.index() > $currentTab.index()) { nextStep($currentTab, $targetTab); } else if ($targetTab.index() < $currentTab.index()) { prevStep($currentTab, $targetTab); } updateNextButton(); }); prevBtn.click(function() { const $currentTab = $(".twb-content:visible"); const $prevTab = $currentTab.prev(".twb-content"); prevStep($currentTab, $prevTab); }); nextBtn.click(function() { const $currentTab = $(".twb-content:visible"); let itemValidated = validateItemSelection($currentTab) if (itemValidated) { const $nextTab = $currentTab.next(".twb-content"); if ($nextTab.length === 0) { addToCart('<?php echo e(route('add.to.items', $siblingName)); ?>') } else { nextStep($currentTab, $nextTab); } } }); prevBtn.hide(); $('.vendor-check').on("click", function() { if ($(this).is(':checked')) { $(this).closest('.twb-content').find('input[name="items"]').prop('checked', false).prop( 'disabled', true); $(this).closest('.twb-content').find('.monday').hide(); } else { $(this).closest('.twb-content').find('.monday').show(); $(this).closest('.twb-content').find('input[name="items"]').prop('disabled', false); } }); }); function nextStep($currentTab, $targetTab) { $currentTab.hide(); $targetTab.show(); $(".tab-button").removeClass("active"); $(".tab-button[data-target='" + $targetTab.attr("id") + "']").addClass("active"); prevBtn.show(); // Show prev-btn when moving to next step // Add completed class to current tab button $(".tab-button[data-target='" + $currentTab.attr("id") + "']").addClass("completed"); updateNextButton(); } function prevStep($currentTab, $targetTab) { $currentTab.hide(); $targetTab.show(); $(".tab-button").removeClass("active"); $(".tab-button[data-target='" + $targetTab.attr("id") + "']").addClass("active"); if ($targetTab.attr("id") === "step1") { prevBtn.hide(); } updateNextButton(); } function updateNextButton() { const $currentTab = $(".twb-content:visible"); const $nextTab = $currentTab.next(".twb-content"); if ($nextTab.length === 0) { nextBtn.text("Complete Order"); nextBtn.onclick = () => { addToCart('<?php echo e(route('add.to.items', $siblingName)); ?>') } } else { nextBtn.text("Next"); } } function validateItemSelection($currentTab) { let isCombo = $currentTab.attr('data-combo') let vendorCheck = $currentTab.find('.vendor-check') let checkedBoxes = $currentTab.find('.item-checkbox:checked') let flag = false if (vendorCheck.is(':checked')) { flag = true } else { if (isCombo && checkedBoxes.length !== 2) { swal({ title: "You must select box A & B options OR choose the “I don’t want” option for the vendor.", icon: "error", dangerMode: true, closeOnClickOutside: false }); } else if ((!isCombo) && checkedBoxes.length !== 1) { swal({ title: "You must select an item OR choose the “I don’t want” option for the vendor.", icon: "error", dangerMode: true, closeOnClickOutside: false }); } else { flag = true } } return flag } function addMenu(input, id, slot, img, itemName, price, menuId, inputId) { if ($(input).is(':checked')) { if (slotItem.length > 0) { $.each(slotItem, function(k, v) { if (v?.slot === slot && v?.id === id) { slotItem.splice(k, 1); } }) } let array = { "itemId": $(input).val(), slot, img, itemName, price, menuId, id, inputId }; slotItem.push(array); // slotItem[`${slot}_${array.itemId}`] = array; } } function addToCart(route) { showLoader(); axios.post(route, slotItem) .then(function(response) { hideLoader(); window.location.href = response.data.route; }).catch(function(error) { hideLoader(); swal({ title: error.response.data.msg, icon: "error", dangerMode: true, closeOnClickOutside: false }); }); } // $('.tip-btn').on("click", function(e) { // $('.title-tip').removeClass('active') // $(this).closest('.tip-main').find('.title-tip').addClass('active') // e.stopPropagation() // }); $('.tip-btn').on("mouseover", function(e) { $('.title-tip').removeClass('active'); $(this).closest('.tip-main').find('.title-tip').addClass('active'); e.stopPropagation(); }); $('.tip-main').on("mouseleave", function() { $(this).find('.title-tip').removeClass('active'); }); $('.tip-close').on("click", function() { $('.title-tip').removeClass('active') }) $(document).on("click", function(e) { if ($(e.target).is(".tip-main , .title-tip") === false) { $('.title-tip').removeClass('active') } }); </script> <?php $__env->stopPush(); ?> <?php echo $__env->make('front.layouts.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/clickysoft/public_html/calvary-p2.clickysoft.net/resources/views/front/lunch-program/lunch-items.blade.php ENDPATH**/ ?>
| ver. 1.4 |
Github
|
.
| PHP 8.1.29 | Генерация страницы: 0.01 |
proxy
|
phpinfo
|
Настройка