<?php $__env->startSection('title'); ?>
    <?php echo e(__('leave')); ?> <?php echo e(__('settings')); ?>

<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
    <div class="content-wrapper">
        <div class="page-header">
            <h3 class="page-title">
                <?php echo e(__('manage').' '.__('leave')); ?> <?php echo e(__('settings')); ?>

            </h3>
        </div>
        <div class="row">
            <div class="col-md-12 grid-margin">
                <div class="card">
                    <div class="card-body">
                        <form class="pt-3 section-create-form" id="create-form" action="<?php echo e(route('leave-master.store')); ?>" method="POST" novalidate="novalidate">
                            <div class="row">
                                <div class="form-group col-sm-12 col-md-3">
                                    <label><?php echo e(__('total_leaves_per_month')); ?> <span class="text-danger">*</span></label>
                                    <input name="leaves" type="number" min="0" max="30" placeholder="<?php echo e(__('total_leaves_per_month')); ?>" class="form-control" required/>
                                </div>

                                <div class="form-group col-md-4 col-sm-12">
                                    <label for="roll-number-order"><?php echo e(__("holiday_days")); ?> <span class="text-danger">*</span></label>
                                    <?php echo Form::select('holiday_days[]', ["Sunday" => "Sunday", "Monday" => "Monday", "Tuesday" => "Tuesday", "Wednesday" => "Wednesday", "Thursday" => "Thursday", "Friday" => "Friday", "Saturday" => "Saturday"], $settings['holiday_days'] ?? '', ['required','class' => 'form-control select2-dropdown select2-hidden-accessible','multiple']); ?>

                                </div>

                                <div class="form-group col-sm-12 col-md-3">
                                    <label for=""><?php echo e(__('session_year')); ?> <span class="text-danger">*</span></label>
                                    <?php echo Form::select('session_year_id', $sessionYear, null, ['required','class' => 'form-control', 'placeholder' => __('session_year')]); ?>

                                </div>

                                <div class="form-group col-sm-12 col-md-2 mt-4">
                                    <input class="btn btn-theme" id="create-btn" type="submit" value=<?php echo e(__('submit')); ?>>
                                </div>
                            </div>
                            
                        </form>
                    </div>
                </div>
            </div>
            <div class="col-md-12 grid-margin stretch-card">
                <div class="card">
                    <div class="card-body">
                        <h4 class="card-title">
                            <?php echo e(__('list')); ?> <?php echo e(__('leaves')); ?> <?php echo e(__('settings')); ?>

                        </h4>
                        <table aria-describedby="mydesc" class='table' id='table_list'
                               data-toggle="table" data-url="<?php echo e(route('leave-master.show',[1])); ?>"
                               data-click-to-select="true" data-side-pagination="server"
                               data-pagination="true" data-page-list="[5, 10, 20, 50, 100, 200]"
                               data-search="true" data-toolbar="#toolbar" data-show-columns="true"
                               data-show-refresh="true" data-fixed-columns="true" data-fixed-number="2"
                               data-fixed-right-number="1" data-trim-on-search="false"
                               data-mobile-responsive="true" data-sort-name="id"
                               data-sort-order="desc" data-maintain-selected="true"
                               data-query-params="queryParams" data-show-export="true"
                               data-export-options='{"fileName": "leave-master-list-<?= date('d-m-y') ?>","ignoreColumn": ["operate"]}'>
                            <thead>
                            <tr>
                                <th scope="col" data-field="id" data-sortable="true" data-visible="false"><?php echo e(__('id')); ?></th>
                                <th scope="col" data-field="no"><?php echo e(__('no.')); ?></th>
                                <th scope="col" data-field="leaves"><?php echo e(__('leaves')); ?></th>
                                <th scope="col" data-field="holiday"><?php echo e(__('holiday')); ?></th>
                                <th scope="col" data-field="session_year.name"><?php echo e(__('session_year')); ?></th>
                                <th scope="col" data-field="operate" data-events="leaveSettingsEvents"><?php echo e(__('action')); ?></th>
                            </tr>
                            </thead>
                        </table>
                    </div>
                </div>
            </div>
            <!-- Modal -->
            <div class="modal fade" id="editModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
                <div class="modal-dialog" role="document">
                    <div class="modal-content">
                        <div class="modal-header">
                            <h5 class="modal-title" id="exampleModalLabel"><?php echo e(__('edit').' '.__('leave')); ?> <?php echo e(__('settings')); ?></h5>
                            <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                                <span aria-hidden="true">&times;</span>
                            </button>
                        </div>
                        <form class="pt-3 section-edit-form" id="edit-form" action="<?php echo e(url('section')); ?>" novalidate="novalidate">
                            <input type="hidden" name="id" id="id" value=""/>
                            <div class="modal-body">
                                <div class="row">
                                    <div class="form-group col-sm-12 col-md-12">
                                        <label><?php echo e(__('total_leaves_per_month')); ?> <span class="text-danger">*</span></label>
                                        <input name="leaves" type="number" min="0" max="30" placeholder="<?php echo e(__('total_leaves_per_month')); ?>" id="edit_leaves" class="form-control" required/>
                                    </div>
    
                                    <div class="form-group col-md-12 col-sm-12">
                                        <label for="roll-number-order"><?php echo e(__("holiday_days")); ?> <span class="text-danger">*</span></label>
                                        <?php echo Form::select('holiday_days[]', ["Sunday" => "Sunday", "Monday" => "Monday", "Tuesday" => "Tuesday", "Wednesday" => "Wednesday", "Thursday" => "Thursday", "Friday" => "Friday", "Saturday" => "Saturday"], $settings['holiday_days'] ?? '', ['required','class' => 'form-control select2-dropdown select2-hidden-accessible','multiple', 'id' => 'edit_holiday_days']); ?>

                                    </div>
    
                                    <div class="form-group col-sm-12 col-md-12">
                                        <label for=""><?php echo e(__('session_year')); ?> <span class="text-danger">*</span></label>
                                        <?php echo Form::select('session_year_id', $sessionYear, null, ['required','class' => 'form-control', 'placeholder' => __('session_year'), 'id' => 'edit_session_year_id']); ?>

                                    </div>
                                </div>
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-secondary" data-dismiss="modal"><?php echo e(__('close')); ?></button>
                                <input class="btn btn-theme" type="submit" value=<?php echo e(__('submit')); ?> />
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/mimeld/myschool.mimeld.com/resources/views/leave/leave_master.blade.php ENDPATH**/ ?>