Файловый менеджер - Редактировать - /home/clickysoft/public_html/travel-guru.clickysoft.net/storage/framework/views/b92241cb44f04c5840d1a33bd1ef8c9e.php
Назад
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="csrf-token" content="<?php echo e(csrf_token()); ?>"> <title>Travel Gurus - <?php echo $__env->yieldContent('title', 'Default Title'); ?></title> <link rel="icon" type="image/x-icon" href="images/gift-favicon.png" /> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css" integrity="sha384-B0vP5xmATw1+K9KRQjQERJvTumQW0nPEzvF6L/Z6nronJ3oUOFUFpCjEUQouq2+l" crossorigin="anonymous" /> <link href="<?php echo e(asset('assets/front/css/main.css')); ?>" rel="stylesheet" /> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous" /> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.css" integrity="sha512-wR4oNhLBHf7smjy0K4oqzdWumd+r5/+6QO/vDda76MW5iug4PT7v86FoEkySIJft3XA0Ae6axhIvHrqwm793Nw==" crossorigin="anonymous" referrerpolicy="no-referrer" /> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.9.0/slick-theme.css" integrity="sha512-6lLUdeQ5uheMFbWm3CP271l14RsX1xtx+J5x2yeIDkkiBpeVTNhTqijME7GgRKKi6hCqovwCoBTlRBEC20M8Mg==" crossorigin="anonymous" referrerpolicy="no-referrer" /> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.6.0/css/all.min.css" integrity="sha512-Kc323vGBEqzTmouAECnVceyQqyqdsSiqLQISBL29aUW4U/M7pSPA/gEUZQqv1cwx4OnYxTxve5UMg5GT6L4JJg==" crossorigin="anonymous" referrerpolicy="no-referrer" /> <?php echo $__env->yieldPushContent('styles'); ?> </head> <body> <?php echo $__env->make('front.layouts.header', ['is_travel_agent' => $is_travel_agent], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> <?php echo $__env->yieldContent('content'); ?> <form id="logout-form" action="<?php echo e(route('logout')); ?>" method="POST" style="display: none;"> <?php echo csrf_field(); ?> </form> <div id="see-more-detail-agent"></div> <!-- Add hidden inputs for ctRightArrow and ctLeftArrow --> <input type="hidden" id="ctRightArrow" value="<?php echo e(asset('assets/front/images/ct-right.png')); ?>"> <input type="hidden" id="ctLeftArrow" value="<?php echo e(asset('assets/front/images/ct-left.png')); ?>"> <?php echo $__env->make('front.layouts.footer', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/js/bootstrap.bundle.min.js" integrity="sha384-Piv4xVNRyMGpqkS2by6br4gNJ7DXjqk09RmUpJ8jgGtD7zP9yug3goQfGII0yAns" crossorigin="anonymous"> </script> <script src="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.js" integrity="sha512-XtmMtDEcNz2j7ekrtHvOVR4iwwaD6o/FUJe6+Zq+HgcCsk3kj4uSQQR8weQ2QVj1o0Pk6PwYLohm206ZzNfubg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.js"></script> <script> var agentProfileImageUrl = '<?php echo e(route('agent.updateProfileImage')); ?>'; var userProfileImageUrl = '<?php echo e(route('user.updateProfileImage')); ?>'; </script> <script src="<?php echo e(asset('js/custom.js')); ?>"></script> <script src="<?php echo e(asset('js/image-upload.js')); ?>"></script> <script src="<?php echo e(asset('js/agent-modal.js')); ?>"></script> <script src="<?php echo e(asset('assets/admin/vendor/libs/moment/moment.js')); ?>"></script> <script> // MODAL SCRIPT END // MODAL DAYS & TIMING SELECTION SCRIPT BEGIN document.addEventListener("DOMContentLoaded", function() { function populateDaysList() { const daysList = document.getElementById("days-list"); const currentDateSpan = document.getElementById("current-date"); const selectedDateInput = document.getElementById("selected-date"); if (!daysList || !currentDateSpan || !selectedDateInput) return; let today = new Date(); let endDate = new Date(today); endDate.setDate(today.getDate() + 6); // One week from today let days = []; while (today <= endDate) { days.push(new Date(today)); today.setDate(today.getDate() + 1); } daysList.innerHTML = ''; // Clear previous content days.forEach(day => { let dayItem = document.createElement('li'); dayItem.textContent = `${day.toLocaleDateString('en-US', { weekday: 'long' })}`; // Only show the day dayItem.setAttribute('data-date', day.toISOString().split('T')[ 0]); // Store date in ISO format dayItem.addEventListener('click', function() { const selectedItems = daysList.querySelectorAll('li.selected'); selectedItems.forEach(item => item.classList.remove('selected')); this.classList.add('selected'); const selectedDate = new Date(this.getAttribute('data-date')); currentDateSpan.textContent = selectedDate.toLocaleDateString('en-US', { weekday: 'long', month: 'long', day: 'numeric' }); selectedDateInput.value = this.getAttribute( 'data-date'); // Update hidden input with selected date }); daysList.appendChild(dayItem); }); // Set the initial full date format currentDateSpan.textContent = new Date().toLocaleDateString('en-US', { weekday: 'long', month: 'long', day: 'numeric' }); } function populateTimeSlots() { const timingList = document.getElementById("timing-list"); const selectedTimeSlotInput = document.getElementById("selected-time-slot"); if (!timingList || !selectedTimeSlotInput) return; timingList.querySelectorAll('li').forEach(slotItem => { slotItem.addEventListener('click', function() { const selectedItems = timingList.querySelectorAll('li.selected'); selectedItems.forEach(item => item.classList.remove('selected')); this.classList.add('selected'); selectedTimeSlotInput.value = this.getAttribute( 'data-time'); // Update hidden input with selected time slot }); }); } populateDaysList(); // Populate on load populateTimeSlots(); // Populate time slots on load document.body.addEventListener("click", function(e) { if (e.target && e.target.matches("#days-list li")) { const listItems = e.target.parentElement.getElementsByTagName("li"); for (let i = 0; i < listItems.length; i++) { listItems[i].classList.remove("selected"); } e.target.classList.add("selected"); const selectedDate = new Date(e.target.getAttribute('data-date')); document.getElementById("current-date").textContent = selectedDate.toLocaleDateString( 'en-US', { weekday: 'long', month: 'long', day: 'numeric' }); document.getElementById("selected-date").value = e.target.getAttribute( 'data-date'); // Update hidden input } if (e.target && e.target.matches("#timing-list li")) { const listItems = e.target.parentElement.getElementsByTagName("li"); for (let i = 0; i < listItems.length; i++) { listItems[i].classList.remove("selected"); } e.target.classList.add("selected"); document.getElementById("selected-time-slot").value = e.target.getAttribute( 'data-time'); // Update hidden input } }); }); $(document).ready(function() { // Handle date selection using event delegation $(document).on('click', '#days-list li', function() { var selectedDate = $(this).data('date'); var agentId = $('#agent-id').val(); // Retrieve agent ID from hidden input $('#selected-date').val(selectedDate); $('#current-date').text(new Date(selectedDate).toLocaleDateString('en-US', { weekday: 'long', month: 'long', day: 'numeric' })); // AJAX call to fetch booked time slots for the selected date $.ajax({ url: `/agent/${agentId}/booked-timeslots`, type: 'GET', data: { date: selectedDate }, success: function(bookedTimeSlots) { // Reset all time slots $('#timing-list li').removeClass('disabled-timeslot').attr('title', ''); // Disable the booked time slots bookedTimeSlots.forEach(function(timeSlotId) { $('#timing-list li[data-time="' + timeSlotId + '"]') .addClass('disabled-timeslot') .attr('title', 'This time slot is already booked'); }); }, error: function() { alert('Failed to fetch time slots. Please try again.'); } }); }); // Handle time slot selection using event delegation $(document).on('click', '#timing-list li', function() { if (!$(this).hasClass('disabled-timeslot')) { $('#timing-list li').removeClass('selected'); $(this).addClass('selected'); $('#selected-time-slot').val($(this).data('time')); // Store the selected time slot } }); }); // Use event delegation to handle dynamically added elements document.addEventListener('DOMContentLoaded', function() { // Attach event listener to the body document.body.addEventListener('click', function(event) { // Check if the clicked element is the schedule call button if (event.target && event.target.id === 'schedule-call-button') { // Get values from the modal const selectedDate = document.querySelector('#selected-date').value; const selectedTimeSlot = document.querySelector('#selected-time-slot').value; const agentId = document.querySelector('#agent-id').value; const userId = "<?php echo e(auth()->id()); ?>"; // Get logged-in user ID // Check if necessary fields are filled if (!selectedDate || !selectedTimeSlot || !agentId) { showToast('Please select a date, and time slot.', 'info'); return; } // Send AJAX request to save the appointment fetch('<?php echo e(route('saveAppointment')); ?>', { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-CSRF-TOKEN': '<?php echo e(csrf_token()); ?>' }, body: JSON.stringify({ user_id: userId, agent_id: agentId, date: selectedDate, time_slot_id: selectedTimeSlot }) }) .then(response => response.json()) .then(data => { if (data.success) { showToast('Appointment successfully scheduled!', 'success'); $('#exampleModal2').modal('hide'); } else if (data.message === 'already_booked') { showToast( 'This time slot is already booked. Please choose another slot.', 'error'); } else { showToast( 'An error occurred while scheduling the appointment. Please try again.', 'error'); } }) .catch(error => { console.error('Error:', error); showToast('An error occurred. Please try again later.', 'error'); }); } }); function showToast(message, type) { toastr[type](message); } }); // MODAL DAYS & TIMING SELECTION SCRIPT END </script> <?php echo $__env->yieldPushContent('front-scripts'); ?> </body> </html> <?php /**PATH /home/clickysoft/public_html/travel-guru.clickysoft.net/resources/views/front/layouts/master.blade.php ENDPATH**/ ?>
| ver. 1.4 |
Github
|
.
| PHP 8.1.29 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка