KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.4.41 (Ubuntu)
System : Linux vmi1525618.contaboserver.net 5.4.0-105-generic #119-Ubuntu SMP Mon Mar 7 18:49:24 UTC 2022 x86_64
User : www-data ( 33)
PHP Version : 8.2.12
Disable Function : NONE
Directory :  /var/www/leadai/leadai.co.in/storage/framework/views/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/leadai/leadai.co.in/storage/framework/views/1398b2d87b554dde8f4f801120b75ab838b7a2b3.php
<?php $__env->startSection('content'); ?>
    <!-- begin::main content -->
    <style>
  /* Styles for tabs */
  .tab {
    display: inline-block;
    padding: 12px 26px;
    cursor: pointer;
    
    background-color: #E6EAED;
    margin-right: -4px; /* Remove spacing between tabs */
  }

  /* Style for highlighted tab */
  .tab.active {
    background-color: white;
  }

  /* Content area style */
  .tab-content {
    
    padding: 20px;
    border-radius: 0 0 5px 5px;
    display: none; /* Hide all content areas by default */
  }

  /* Show active content area */
  .tab-content.active {
    display: block;
  }
  .form-group {
    margin-bottom: 1rem;
    margin-bottom: 30px !important;
}
.form-group input, .form-group select{
    height:42px;
    padding-top:10px 25px !important;
}
.form-group label, .tab{
    font-size:13px !important;
}
.company-save-btn{
    position:fixed;
    bottom:0;left:250px;
    background-color:white;
    border-top:1px solid #ccc;
}
.inner-border{
    border:-2px solid #ddd !important;
}
@media  only screen and (max-width: 768px) {
    .company-save-btn{
    position:fixed;
    bottom:0;left:0px;
    background-color:white;
    border-top:1px solid #ccc;
}
}
.d-none{
    display:none !important;
}
</style>

    <main class="main-content px-0">

        <div class="container">

            <!-- begin::page header -->
            <div class="page-header m-0 border-0">
                <h3> <?php echo e(__('message.add')); ?> <?php echo e(__('message.course')); ?></h3>
                <nav aria-label="breadcrumb">
                    <ol class="breadcrumb">
                        <li class="breadcrumb-item"><a href="<?php echo e(asset('dashboard')); ?>"><?php echo e(__('message.dashboard')); ?></a></li>
                        <li class="breadcrumb-item" aria-current="page"><a href="<?php echo e(asset('products')); ?>"><?php echo e(__('message.product')); ?></a></li>
                        <li class="breadcrumb-item active" aria-current="page"><?php echo e(__('message.add')); ?></li>
                    </ol>
                </nav>
            </div>
            <!-- end::page header -->

            <div class="row py-5">
                <div class="col-md-12">

                    <?php if (isset($component)) { $__componentOriginal8a5ba9c90b64d384232e9948b1023e746ba08e74 = $component; } ?>
<?php $component = $__env->getContainer()->make(App\View\Components\FlashMessage::class, []); ?>
<?php $component->withName('flashMessage'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal8a5ba9c90b64d384232e9948b1023e746ba08e74)): ?>
<?php $component = $__componentOriginal8a5ba9c90b64d384232e9948b1023e746ba08e74; ?>
<?php unset($__componentOriginal8a5ba9c90b64d384232e9948b1023e746ba08e74); ?>
<?php endif; ?>
                    <div class="card border-0">
                        
                        <div class="card-body py-0 border">
                            <form action="<?php echo e(asset('edit-products')); ?>" method="post" enctype="multipart/form-data">
                                <div class="row">
                                    <div class="col-md-6 py-3 pt-5">
                                        <?php echo csrf_field(); ?>
                                        <input type="hidden" name="product_id" value="<?php echo e($product->id); ?>">
                                        <div class="form-group d-flex justify-content-between align-items-center ">
                                            <label for="name" class="col-md-4"><?php echo e(__('message.product')); ?>  <?php echo e(__('message.name')); ?> <span class="text-danger">*</span></label>
                                            <div class="col-md-8 px-0">
                                                <input type="text" value="<?php echo e($product->name); ?>" class="form-control" name="name" id="name">
                                                <?php if($errors->has('name')): ?>
                                                    <div class="error">
                                                        <?php echo e($errors->first('name')); ?>

                                                    </div>
                                                <?php endif; ?>
                                            </div>
                                           

                                        </div>
                                       
                                       
                                        
                                        

                                        <div class="form-group  d-flex justify-content-between align-items-center">
                                            <label for="sale_price" class="col-md-4"><?php echo e(__('message.sale')); ?> <?php echo e(__('message.price')); ?></label>
                                            <div class="col-md-8 px-0">
                                                <input type="text" class="form-control " value="<?php echo e($product->sale_price); ?>" name="sale_price" id="phone" >

                                                <?php if($errors->has('sale_price')): ?>
                                                    <div class="error">
                                                        <?php echo e($errors->first('sale_price')); ?>

                                                    </div>
                                                <?php endif; ?>
                                            </div>

                                        </div>
                                        
                                         
                                         
                                                                     
                                           
                                    </div>
                                    
                                </div>
                                

                                    <div class="py-5" style="z-index:50;position:absolute" >
                                        <div class="py-3 px-5 w-100 company-save-btn " >
                                            <button type="submit" class="btn btn-success-lux"><i class="fa fa-check"></i>&nbsp <?php echo e(__('message.save')); ?></button>
                                        </div>
                                    </div>
                                 
                                
                            </form>
                        </div>
                    </div>



                </div>

            </div>

        </div>

    </main>
    <!-- end::main content -->
<?php $__env->stopSection(); ?>
<?php $__env->startPush('footer-script'); ?>
    <!-- begin::select2 -->
    <link rel="stylesheet" href="<?php echo e(asset('public/admin/vendors/select2/css/select2.min.css')); ?>" type="text/css">
    <script src="<?php echo e(asset('public/admin/vendors/select2/js/select2.min.js')); ?>"></script>
    <!-- end::select2 -->
    <script>
       
        $(document).ready(function() {
            $('#js-example-basic-roles').select2({});


            $(".product_type").click(function() {
            
                if ($(this).prop("checked")) {
                    
                    $(".quantity-box").removeClass('d-none');
                }
               
            });
            $(".service_type").click(function() {
            
                if ($(this).prop("checked")) {
                    
                    $(".quantity-box").addClass('d-none');
                }
               
            });

        });

        $("#billing_country").on("change",function(){
            var company_id = $(this).val();
            stateFetch(company_id,"billing_state"); 
        });

        $("#location_country").on("change",function(){
            var company_id = $(this).val();
            stateFetch(company_id,"location_state");                
        });

        

        function stateFetch(company_id,appendState)
        {
            $.ajax({
                    type: "post",
                    headers: {
                        'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
                    },
                    data: {
                        "id": company_id
                    },
                    url: "<?php echo e(asset('fetch-state')); ?>",
                    dataType: "html",
                    success: function(result) 
                    {
                        $("#"+appendState).html("");
                        var allData = JSON.parse(result);
                        if(allData.message=="success")
                        {
                            var data = allData.data;
                            var i;
                            var dOption = "<option selected disabled>--Select--</option>";
                            $("#"+appendState).append(dOption);
                            for(i=0;i<data.length;i++)
                            {
                                var option = `<option value="${data[i].id}">
                                                ${data[i].state_name}
                                                </option>
                                `;
                                $("#"+appendState).append(option);
                            }
                        }
                        else
                        {
                            console.log("failed");
                        }
                    },
                    error:function(xhr,error,status)
                    {
                        console.log(JSON.parse(xhr.responseText));
                    }
                });
        }

        //location city code
        $("#location_city").on("click",function(){
            //var search = $(this).val();
            $(".location_city_search_box").html("");
            if($(".main-add-city-box").hasClass("d-none"))
            {
                $(".main-add-city-box").removeClass("d-none");
                $(".add-search-city-box").removeClass("d-none");

                var typed_city = `
                            <input type="search" class='form-control border px-2 search-city-val' 
                             style='list-style:none;cursor:pointer;'>`;

               
                            
                $(".add-search-city-box").html(typed_city);
                $(".search-city-val").focus();
                
                $(".search-city-val").on('input',function(){
                    
                    $(".location_city_search_box").removeClass("d-none");
                
                    var search = $(this).val();
                    $.ajax({
                        type: "post",
                        headers: {
                            'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
                        },
                        data: {
                            "search": search
                        },
                        url: "<?php echo e(asset('search-city')); ?>",
                        dataType: "html",
                        success: function(result) 
                        {
                            $(".location_city_search_box").html("");

                        
                                    
                            var allData = JSON.parse(result);
                            if(allData.message=="success")
                            {
                                //$(".location_city_search_box").removeClass('d-none');
                                var data = allData.data;
                                console.log(data);
                                var i;                           
                                        
                                var new_li = `<li class='text-capitalize rounded new_city_add_btn text-white p-2 mb-2' addcity="${search}" style='list-style:none;cursor:pointer;background:grey'>
                                        Add &nbsp"${search}"...</li>`;
                                    $(".location_city_search_box").append(new_li);
                            
                                for(i=0;i<data.length;i++)
                                {
                                    
                                    var li = `<li class='text-capitalize rounded city_name_li bg-dark text-white p-2 mb-2' city='${data[i].city_name}' style='list-style:none;cursor:pointer;background:grey'>
                                        ${data[i].city_name}</li>`;
                                    $(".location_city_search_box").append(li);
                                }
                                $(".city_name_li").click(function(){
                                
                                    var city = $(this).attr('city');
                                    console.log(city);
                                    $("#location_city").val(city);
                                    
                                    $(".location_city_search_box").addClass('d-none');
                                    $(".main-add-city-box").addClass("d-none");
                                    $(".add-search-city-box").addClass("d-none");
                                });
                            }
                            else
                            {
                                console.log("failed");
                                var new_li = `<li class='text-capitalize rounded new_city_add_btn bg-dark text-white p-2 mb-2' addcity="${search}" style='list-style:none;cursor:pointer'>
                                        Add &nbsp"${search}"...</li>`;
                                    $(".location_city_search_box").append(new_li);
                            }

                                $(".new_city_add_btn").click(function(){
                                    var city = $(this).attr('addcity');
                                    var loc_city = $("#location_city").val(city);
                                // alert(loc_city);
                                    //var city_name = $("#b_city_name").val();
                                    addCity(city,"main-add-city-box","location_city");
                                
                                });
                        },
                        error:function(xhr,error,status)
                        {
                            console.log(JSON.parse(xhr.responseText));
                            var new_li = `<li class='text-capitalize rounded new_city_add_btn bg-dark text-white p-2 mb-2' addcity="${search}" style='list-style:none;cursor:pointer'>
                                        Add &nbsp"${search}"...</li>`;
                                    $(".location_city_search_box").append(new_li);
                        }
                    });
                });
            }  
            
            else
            {
                $(".main-add-city-box").addClass("d-none"); 
            }
                

        });
        
        
        //city code
        $("#billing_city").on("click",function(){
           
            //var search = $(this).val();
            $(".billing_city_search_box").html("");
            $(".billing-main-add-city-box").removeClass("d-none");
            $(".billing-add-search-city-box").removeClass("d-none");
           
            var typed_city = `
                            <input type="search" class='form-control innder-border border search-city-val' 
                             style='list-style:none;cursor:pointer'>`;
                            
                $(".billing-add-search-city-box").html(typed_city);
                $(".search-city-val").focus();
            $(".search-city-val").on('input',function(){
                
                $(".billing_city_search_box").removeClass("d-none");
               
                var search = $(this).val();
                $.ajax({
                    type: "post",
                    headers: {
                        'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
                    },
                    data: {
                        "search": search
                    },
                    url: "<?php echo e(asset('search-city')); ?>",
                    dataType: "html",
                    success: function(result) 
                    {
                        $(".billing_city_search_box").html("");

                       
                                
                        var allData = JSON.parse(result);
                        if(allData.message=="success")
                        {
                            //$(".location_city_search_box").removeClass('d-none');
                            var data = allData.data;
                            console.log(data);
                            var i;                           
                                    
                            var new_li = `<li class='text-capitalize rounded new_city_add_btn p-2 mb-2' addcity="${search}" style='list-style:none;cursor:pointer;background:#ddd'>
                                    Add &nbsp"${search}"...</li>`;
                                $(".billing_city_search_box").append(new_li);
                           
                            for(i=0;i<data.length;i++)
                            {
                                
                                var li = `<li class='text-capitalize rounded city_name_li p-2 mb-2' city='${data[i].city_name}' style='list-style:none;cursor:pointer;'>
                                    ${data[i].city_name}</li>`;
                                $(".billing_city_search_box").append(li);
                            }
                            $(".city_name_li").on('mouseover',function(){
                                $(this).css({'background':'#ddd','color':'white'});
                            });
                            $(".city_name_li").on('mouseleave', function(){
                                // Reset background and text color when mouse leaves
                                $(this).css({'background':'','color':''});
                            });
                            $(".city_name_li").click(function(){
                               
                                var city = $(this).attr('city');
                                console.log(city);
                                $("#billing_city").val(city);
                                
                                $(".billing_city_search_box").addClass('d-none');
                                $(".billing-main-add-city-box").addClass("d-none");
                                $(".billing-add-search-city-box").addClass("d-none");
                            });
                        }
                        else
                        {
                            console.log("failed");
                            var new_li = `<li class='text-capitalize rounded new_city_add_btn bg-dark text-white p-2 mb-2' addcity="${search}" style='list-style:none;cursor:pointer'>
                                    Add &nbsp"${search}"...</li>`;
                                $(".billing_city_search_box").append(new_li);
                        }

                            $(".new_city_add_btn").click(function(){
                                var city = $(this).attr('addcity');
                                var loc_city = $("#billing_city").val(city);
                               // alert(loc_city);
                                //var city_name = $("#b_city_name").val();
                                addCity(city,"billing-main-add-city-box","billing_city");
                            
                            });
                    },
                    error:function(xhr,error,status)
                    {
                        console.log(JSON.parse(xhr.responseText));
                        var new_li = `<li class='text-capitalize rounded new_city_add_btn bg-dark text-white p-2 mb-2' addcity="${search}" style='list-style:none;cursor:pointer'>
                                    Add &nbsp"${search}"...</li>`;
                                $(".location_city_search_box").append(new_li);
                    }
                });
            });

            


        });

        
        

        $(".location-add-city-btn").click(function(){
            if($(".location-add-city-box").hasClass("d-none"))
            {
                $(".location-add-city-box").removeClass("d-none");
                $(".location-add-city-box").removeClass("animate__animated animate__fadeOut");
                $(".location-add-city-box").addClass("animate__animated animate__bounceInRight");
                $(".location-add-city-box i").removeClass("fa-plus");
                $(".location-add-city-box i").addClass("fa-minus");
            }
            else
            { 
                
                $(".location-add-city-box").removeClass("animate__animated animate__bounceInRight")    
                $(".location-add-city-box").addClass("animate__animated animate__fadeOut"); 
                $(".location-add-city-box").addClass("d-none");              
                $(".location-add-city-box i").removeClass("fa-minus");
                $(".location-add-city-box i").addClass("fa-plus");
                
            }
            
           
           
        });

        $(".l-city-form-btn").click(function(){
            
            var city_name = $("#l_city_name").val();
            addCity(city_name,"location-add-city-box","location_city");
        });
        

        function addCity(city_name,cityformBox,city_input)
        {
            $.ajax({
                    type: "post",
                    headers: {
                        'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
                    },
                    data: {
                        "city_name": city_name
                    },
                    url: "<?php echo e(asset('add-city')); ?>",
                    dataType: "html",
                    success: function(result) 
                    {
                        console.log(result);
                        var allData = JSON.parse(result);
                        if(allData.message=="success")
                        {
                            $("."+cityformBox).addClass("d-none");
                            $("."+city_input).val(allData.data);
                            
                        }
                        else
                        {
                            //console.log("failed");
                        }
                    },
                    error:function(xhr,error,status)
                    {
                        console.log(JSON.parse(xhr.responseText));
                    }
                });
        }
        
        
    function openTab(tabId) {
        // Get all tabs and hide them
        var tabs = document.querySelectorAll('.tab-content');
        tabs.forEach(function(tab) {
        tab.classList.remove('active');
        });

        // Remove active class from all tabs
        var tabButtons = document.querySelectorAll('.tab');
        tabButtons.forEach(function(button) {
        button.classList.remove('active');
        });

        // Show the clicked tab and add active class
        document.getElementById(tabId).classList.add('active');
        document.querySelector('[onclick="openTab(\'' + tabId + '\')"]').classList.add('active');
    }

    $(".billing-btn-toggle").click(function(){
        if($(".billing-address-main").hasClass('d-none'))
        {
            $(".billing-address-main").removeClass("d-none");
        }
        else
        {
            $(".billing-address-main").addClass("d-none");
        }
    });

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

<?php echo $__env->make('layout', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /var/www/leadai/leadai.co.in/resources/views/products/edit.blade.php ENDPATH**/ ?>

Anon7 - 2021