<?php $__env->startSection('content'); ?>
    <div class="container-fluid">
        <div class="page-titles">
            <ol class="breadcrumb">
                <li class="breadcrumb-item"><a href="javascript:void(0)">Settings</a></li>
                <li class="breadcrumb-item active"><a href="javascript:void(0)">Configuration Settings</a></li>
            </ol>
        </div>
        <div class="row">
            <div class="col-12">
                <div class="card">
                    <div class="card-primary">
                        <div class="card-header custom-tab-1">
                            <ul class="nav nav-tabs" role="tablist">
                                <li class="nav-item">
                                    <a class="nav-link active" data-toggle="tab" href="#organisation_form"><b>Add Configuration</b></a>
                                </li>
                                <li class="nav-item">
                                    <a class="nav-link" data-toggle="tab" href="#listorgdata"><b>View Configuration</b></a>
                                </li>
                            </ul>
                        </div>
                        <div class="card-body">
                            <div class="default-tab">
                                <div class="tab-content">
                                    <div class="tab-pane fade show active" id="organisation_form" role="tabpanel">
                                        <form id="organisation_form" class="form-horizontal" action="<?php echo e(URL::to('/configuration_settings_post')); ?>" method="post" onsubmit="return validation();" autocomplete="off" enctype="multipart/form-data">
                                            <?php echo e(csrf_field()); ?>  
                                            <div class="form-row">                                          
                                                <div class="form-group col-3">
                                                    <label>Time Out for Ticket</label>
                                                    <input type="number" class="form-control" id="ticket_time_out" name="ticket_time_out" placeholder="Enter Time Out for Ticket">
                                                </div>
                                                <div class="form-group col-3"><br>
                                                    <p style="text-align: left;">Minutes</p>
                                                </div>
                                            </div>
                                            <div class="form-row">        
                                                <div class="form-group col-3">
                                                    <label>Pre Booking Time for Ticket</label>
                                                    <input type="number" class="form-control small" id="pre_ticket_book_time" name="pre_ticket_book_time" placeholder="Enter Pre Booking Time for Ticket">
                                                </div>
                                                <div class="form-group col-3">
                                                    <p style="text-align: left;">Minutes</p>
                                                </div>
                                            </div>  
                                            <div class="form-group">
                                                <label>Mails to which reports has to be send</label>
                                                <input type="text" class="form-control" id="reports_mailto" name="reports_mailto" placeholder="Enter Mails to which reports has to be send">
                                            </div>
                                            <div class="form-group">
                                                <label>Time of the reports to be send</label>
                                                <input type="text" class="form-control" style="width:200px;" id="reports_time" name="reports_time" placeholder="Enter Time of the reports to be send">
                                            </div>  
                                            <div class="form-group">
                                                <label>Children required for a single staff discount</label>
                                                <input type="text" class="form-control" style="width:400px;" id="children_staff_rate" name="children_staff_rate" placeholder="Children required for a single staff discount">
                                            </div> 
                                            <div class="form-row">
                                                <div class="form-group col-3">
                                                    <label>Ticket Booking Maximum Days</label>
                                                    <input type="text" class="form-control" id="ticket_booking_max_days" name="ticket_booking_max_days" placeholder="Ticket Booking Maximum Days" value="90">
                                                </div>
                                                <div class="form-group col-3"><br>
                                                    <p style="text-align: left;">Days</p>
                                                </div>
                                            </div> 
                                            <div class="form-group">
                                                <label>Refund Initiate Time</label>
                                                <input type="text" class="form-control" style="width:400px;" id="refund_initiate_time" name="refund_initiate_time" placeholder="Enter Refund Initialte Tome">
                                            </div>   
                                            <div class="form-group">
                                                <label>Percentage for Differently Abled</label>
                                                <input type="text" class="form-control" style="width:400px;" id="differently_abled_percentage" name="differently_abled_percentage" placeholder="Enter Percentage for Differently Abled">
                                            </div>
                                            <div class="form-group">
                                                <label>Percentage for Packaged User</label>
                                                <input type="text" class="form-control" style="width:400px;" id="packaged_user_percentage" name="packaged_user_percentage" placeholder="Enter Percentage for Packaged User">
                                            </div>                                          
                                            <div class="card-footer">
                                                <button type="submit" class="btn btn-primary">Submit</button>
                                            </div>
                                        </form>
                                    </div>
                                    <div class="tab-pane fade" id="listorgdata">
                                        <div class="table-responsive">
                                            
                                            <table class="display" style="width:100%" id="example">
                                                <thead class="thead-info">
                                                    <tr>
                                                        <th>Slno</th>
                                                        <th>Time Out for Ticket</th>
                                                        <th>Pre Booking Time for Ticket</th>
                                                        <th>Mails to which reports has to be send</th>
                                                        <th>Time of the reports to be send</th>
                                                        <th>Children required for a single staff discount</th>
                                                        <th>Actions</th>
                                                    </tr>
                                                </thead>
                                                <tbody>
                                                    <?php if(count($configurations)==0): ?>
                                                        <tr>
                                                            <td colspan="3"><br><br>
                                                                <div class="alert alert-danger alert-dismissible fade show">
                                                                    <strong>No Configuration Settings Added !!!</strong>
                                                                </div>
                                                                
                                                            </td>
                                                        </tr>
                                                    <?php endif; ?>
                                                    <?php
                                                        $n = 0;
                                                    ?>
                                                    <?php if(isset($configurations)): ?>
                                                        <?php $__currentLoopData = $configurations; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $configuration): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                            <?php  
                                                                $n++;
                                                            ?>
                                                            <tr>
                                                                <td><?php echo e($n); ?></td>
                                                                <td><?php echo e($configuration->ticket_time_out); ?></td>
                                                                <td><?php echo e($configuration->pre_ticket_book_time); ?></td>
                                                                <td><?php echo e($configuration->reports_mailto); ?></td>
                                                                <td><?php echo e($configuration->reports_time); ?></td>
                                                                <td><?php echo e($configuration->children_staff_rate); ?></td>
                                                                <td>
                                                                    <a href="<?php echo e(URL::to('/show_configuration_settings')); ?>/<?php echo e($configuration->id); ?>" title="Update Configuration Settings" class="btn btn-primary shadow btn-xs sharp mr-1"><i class="fa fa-pencil"></i></a>
                                                                </td>
                                                            </tr>
                                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                    <?php endif; ?>
                                                </tbody>
                                            </table>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script type="text/javascript">
        function validation() 
        {
            var x = confirm("Entire Details will be deleted. Are you sure you want to proceed?");
            if (x)
            {
                return true;
            }
            else
            {
                return fasle;
            }
        }
        $(document).ready(function() {
            toastr.options.timeOut = 10000;
            <?php if(Session::has('error')): ?>
                toastr.error('<?php echo e(Session::get('error')); ?>');
            <?php elseif(Session::has('success')): ?>
                toastr.success('<?php echo e(Session::get('success')); ?>');
            <?php endif; ?>
        });
    </script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layout.default', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /var/www/html/ksstmprod/resources/views/Admin/Settings/configuration_settings.blade.php ENDPATH**/ ?>