
<?php $__env->startPush('styles'); ?>
    <style>
        .d-flex.radio-btn-flex > div {
            min-height: 25px;
        }

        .relation-button {
            align-items: center;
        }

        .common-radio2:empty, .common-radio:empty {
            margin-top: 0;
        }
    </style>
<?php $__env->stopPush(); ?>
<?php $__env->startSection('mainContent'); ?>
    <input type="hidden" name="id" value="<?php echo e($setting->id); ?>">
    <?php echo generateBreadcrumb(); ?>


    <section class="admin-visitor-area up_st_admin_visitor" id="admin-visitor-area">
        <div class="container-fluid p-0">
            <div class="row justify-content-center">
                <div class="col-12">
                    <div class="">
                        <div class="row">
                            <div class="col-lg-12">
                                <div class="white-box">
                                    <div class="main-title mb-25">
                                        <h3 class="mb-0"><?php echo app('translator')->get('appointment.Appointment Setting'); ?>
                                        </h3>
                                    </div>

                                    <form action="<?php echo e(route('appointment.settings.update', $setting->id)); ?>"
                                          method="POST" enctype="multipart/form-data">
                                        <?php echo csrf_field(); ?>
                                        <input type="hidden" name="type" id="profileType" value="profile">

                                        <div class="row">
                                            <div
                                                class="col-lg-6 d-flex relation-button justify-content-between mb-3 justify-content-between">
                                                <p class="text-uppercase mb-0"><?php echo app('translator')->get('appointment.lessons Booked'); ?></p>
                                                <div class="d-flex radio-btn-flex ml-30">
                                                    <div class="me-3">
                                                        <input type="radio" name="lesson_booked" id="lesson_booked_on"
                                                               value="1"
                                                               class="common-radio relationButton" <?php echo e($setting->lesson_booked == 1 ? 'checked':''); ?>>
                                                        <label for="lesson_booked_on"><?php echo app('translator')->get('common.Yes'); ?></label>
                                                    </div>
                                                    <div class="me-3">
                                                        <input type="radio" name="lesson_booked" id="lesson_booked"
                                                               value="0"
                                                               class="common-radio relationButton" <?php echo e($setting->lesson_booked == 0 ? 'checked':''); ?>>
                                                        <label for="lesson_booked"><?php echo app('translator')->get('common.No'); ?></label>
                                                    </div>
                                                </div>
                                            </div>

                                            <div class="col-lg-6 d-flex relation-button justify-content-between mb-3">
                                                <p class="text-uppercase mb-0"> <?php echo app('translator')->get('appointment.Contacted Tutor'); ?>
                                                </p>
                                                <div class="d-flex radio-btn-flex ml-30">
                                                    <div class="me-3">
                                                        <input type="radio" name="popular" id="popular_on" value="1"
                                                               class="common-radio relationButton" <?php echo e($setting->popular == 1 ? 'checked':''); ?>>
                                                        <label for="popular_on"><?php echo app('translator')->get('common.Yes'); ?></label>
                                                    </div>
                                                    <div class="me-3">
                                                        <input type="radio" name="popular" id="popular" value="0"
                                                               class="common-radio relationButton" <?php echo e($setting->popular == 0 ? 'checked':''); ?>>
                                                        <label for="popular"><?php echo app('translator')->get('common.No'); ?></label>
                                                    </div>
                                                </div>
                                            </div>

                                            <div class="col-lg-6 d-flex relation-button justify-content-between mb-3">
                                                <p class="text-uppercase mb-0"> <?php echo app('translator')->get('appointment.Book Trail Lesson'); ?></p>
                                                <div class="d-flex radio-btn-flex ml-30">
                                                    <div class="me-3">
                                                        <input type="radio" name="trail_lesson" id="trail_lesson_on"
                                                               value="1" class="common-radio relationButton"
                                                            <?php echo e($setting->trail_lesson == 1 ? 'checked':''); ?>>
                                                        <label for="trail_lesson_on"><?php echo app('translator')->get('common.Yes'); ?></label>
                                                    </div>
                                                    <div class="me-3">
                                                        <input type="radio" name="trail_lesson" id="trail_lesson"
                                                               value="0"
                                                               class="common-radio relationButton"
                                                            <?php echo e($setting->trail_lesson == 0 ? 'checked':''); ?>

                                                        >
                                                        <label for="trail_lesson"><?php echo app('translator')->get('common.No'); ?></label>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-lg-6 d-flex relation-button justify-content-between mb-3">
                                                <p class="text-uppercase mb-0"> <?php echo app('translator')->get('appointment.Review Section'); ?></p>
                                                <div class="d-flex radio-btn-flex ml-30">
                                                    <div class="me-3">
                                                        <input type="radio" name="review_option" id="review_option_on"
                                                               value="1" class="common-radio relationButton"
                                                            <?php echo e($setting->review_option == 1 ? 'checked':''); ?>>
                                                        <label for="review_option_on"><?php echo app('translator')->get('common.Yes'); ?></label>
                                                    </div>
                                                    <div class="me-3">
                                                        <input type="radio" name="review_option" id="review_option"
                                                               value="0"
                                                               class="common-radio relationButton"
                                                            <?php echo e($setting->review_option == 0 ? 'checked':''); ?>

                                                        >
                                                        <label for="review_option"><?php echo app('translator')->get('common.No'); ?></label>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-lg-6 d-flex relation-button justify-content-between mb-3">
                                                <p class="text-uppercase mb-0"> <?php echo app('translator')->get('appointment.Review Submit'); ?></p>
                                                <div class="d-flex radio-btn-flex ml-30">
                                                    <div class="me-3">
                                                        <input type="radio" name="submit_review" id="review_submit_on"
                                                               value="1" class="common-radio relationButton"
                                                            <?php echo e($setting->submit_review == 1 ? 'checked':''); ?>>
                                                        <label for="review_submit_on"><?php echo app('translator')->get('common.Yes'); ?></label>
                                                    </div>
                                                    <div class="me-3">
                                                        <input type="radio" name="submit_review" id="review_submit"
                                                               value="0"
                                                               class="common-radio relationButton"
                                                            <?php echo e($setting->submit_review == 0 ? 'checked':''); ?>

                                                        >
                                                        <label for="review_submit"><?php echo app('translator')->get('common.No'); ?></label>
                                                    </div>
                                                </div>
                                            </div>

                                            <div class="col-lg-6 d-flex relation-button justify-content-between mb-3">
                                                <p class="text-uppercase mb-0"> <?php echo app('translator')->get('appointment.Showing Number Of Student'); ?></p>
                                                <div class="d-flex radio-btn-flex ml-30">
                                                    <div class="me-3">
                                                        <input type="radio" name="number_of_student"
                                                               id="number_of_student_on"
                                                               value="1" class="common-radio relationButton"
                                                            <?php echo e($setting->number_of_student == 1 ? 'checked':''); ?>>
                                                        <label for="number_of_student_on"><?php echo app('translator')->get('common.Yes'); ?></label>
                                                    </div>
                                                    <div class="me-3">
                                                        <input type="radio" name="number_of_student"
                                                               id="number_of_student"
                                                               value="0"
                                                               class="common-radio relationButton"
                                                            <?php echo e($setting->number_of_student == 0 ? 'checked':''); ?>

                                                        >
                                                        <label for="number_of_student"><?php echo app('translator')->get('common.No'); ?></label>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="row  ">
                                            <div class="col-lg-12 d-flex align-items-center justify-content-center">
                                                <button class="primary-btn small fix-gr-bg profileSettingBtn"><i
                                                        class="ti-check"></i><?php echo app('translator')->get('common.Update'); ?></button>
                                            </div>
                                        </div>
                                    </form>
                                </div>


                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
<?php $__env->stopSection(); ?>
<?php $__env->startPush('scripts'); ?>
    <script>
        (function ($) {
            "use strict";
            $(document).ready(function () {
                $(document).on('click', '.accessBtn', function (e) {
                    e.preventDefault();
                    let url = $('#url').val();
                    let accessType = $("#accessType").val();
                    updateSetting(accessType)
                });
                $(document).on('click', '.profileSettingBtn', function (e) {
                    e.preventDefault();
                    let accessType = $("#profileType").val();
                    updateSetting(accessType)
                });

                function updateSetting(accessType) {
                    let url = $('#url').val();
                    let access = $("input[name='access']:checked").val();
                    let id = $("input[name='id']").val();

                    let lesson_booked = $("input[name='lesson_booked']:checked").val();
                    let popular = $("input[name='popular']:checked").val();
                    let trail_lesson = $("input[name='trail_lesson']:checked").val();
                    let review_option = $("input[name='review_option']:checked").val();
                    let submit_review = $("input[name='submit_review']:checked").val();
                    let number_of_student = $("input[name='number_of_student']:checked").val();


                    formData = {
                        id: id,
                        access: access,
                        type: accessType,
                        popular: popular,
                        trail_lesson: trail_lesson,
                        lesson_booked: lesson_booked,
                        number_of_student: number_of_student,
                        review_option: review_option,
                        submit_review: submit_review,

                    }
                    $.ajax({
                        type: 'post',
                        datatype: 'json',
                        data: formData,
                        url: url + "/appointment/settings/update/" + id,
                        success: function (data) {
                            setTimeout(function () {
                                toastr.success("Operation successful", 'Success', {
                                    timeOut: 5000,
                                });
                            }, 500);
                        },
                        error: function (data) {

                        }
                    });
                }
            });
        })(jQuery);

    </script>
<?php $__env->stopPush(); ?>

<?php echo $__env->make('appointment::layouts.master', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /home/minialms/card.minialms.com/Modules/Appointment/Resources/views/settings/settings.blade.php ENDPATH**/ ?>