<?php $__env->startSection('title'); ?>
    Time Entries
<?php $__env->stopSection(); ?>

<?php $__env->startSection('page_css'); ?>
    <link rel="stylesheet"
          href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-daterangepicker/2.1.24/daterangepicker.css">
    <link rel="stylesheet" href="<?php echo e(mix('assets/style/css/dashboard.css')); ?>">
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
    <div class="container-fluid">
        <div class="animated fadeIn">
            <?php echo $__env->make('flash::message', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
            <div class="page-header">
                <h3 class="page__heading">Time Entries</h3>
                <div class="filter-container">
                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('manage_time_entries')): ?>
                        <div class="mr-2">
                        <label for="projects" class="lbl-block"><b>User</b></label>
                        <?php echo Form::select('drp_user',$users,Auth::id(),['id'=>'filterUser','class'=>'form-control','style'=>'min-width:150px;hight:35', 'placeholder' => 'All']); ?>

                    </div>
                    <?php endif; ?>
                    <div class="mr-2">
                        <label class="lbl-block"><b>Project</b></label>
                        <?php echo Form::select('drp_project', $projectsForFilter, null, ['id' => 'filter_project', 'class'=>'form-control', 'placeholder' => 'All']); ?>

                    </div>
                    <div class="mr-2">
                        <label for="projects" class="lbl-block"><b>Activity Type</b></label>
                        <?php echo Form::select('drp_activity',$activityTypes,null,['id'=>'filterActivity','class'=>'form-control','style'=>'min-width:150px;hight:35', 'placeholder' => 'All']); ?>

                    </div>
                    <div class="mr-3">
                        <label for="projects" class="lbl-block"><b>Date</b></label>
                        <div id="time_range" class="time_range">
                            <i class="far fa-calendar-alt"
                               aria-hidden="true"></i>&nbsp;&nbsp;<span></span> <b
                                    class="caret"></b>
                        </div>
                    </div>
                    <div class="mr-2" style="margin-top: 20px;">
                        <div class="btn-group" role="group">
                            <button id="timeEntriesActions" type="button" class="btn btn-primary dropdown-toggle"
                                    data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                                Actions
                            </button>
                            <div class="dropdown-menu" aria-labelledby="timeEntriesActions"
                                 x-placement="bottom-start"
                                 style="position: absolute; transform: translate3d(0px, 35px, 0px); top: 0px; left: 0px; will-change: transform;">
                                <a href="#" class="dropdown-item filter-container__btn" id="new_entry"
                                   data-toggle="modal"
                                   data-target="#timeEntryAddModal">New Time Entry</a>
                                <a href="javascript:void(0)" class="dropdown-item filter-container__btn"
                                   id="copyTodayEntry">Copy Today Activity</a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-lg-12">
                    <div class="alert alert-danger" style="display: none" id="tmValidationErrorsBox"></div>
                    <div class="card">
                        <div class="card-body">
                            <?php echo $__env->make('time_entries.table', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                            <div class="pull-right mr-3">

                            </div>
                        </div>
                        <?php echo $__env->make('time_entries.modal', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                        <?php echo $__env->make('time_entries.edit_modal', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                    </div>
                </div>
            </div>
        </div>
    </div>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('page_js'); ?>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.20.1/moment.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-daterangepicker/2.1.24/daterangepicker.js"></script>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('scripts'); ?>
    <script>
        let taskUrl = '<?php echo e(url('tasks')); ?>/';
        let timeEntryUrl = "<?php echo e(url('time-entries')); ?>/";
        let projectsURL = "<?php echo e(url('projects')); ?>/";
        let getTaskUrl = "<?php echo e(url('get-tasks')); ?>/";
        let canManageEntries = "<?php echo e((Auth::user()->can('manage_time_entries')) ? true : false); ?>";
        let copyTodayActivity = "<?php echo e(url('copy-today-activity')); ?>/";
    </script>
    <script src="<?php echo e(mix('assets/js/time_entries/time_entry.js')); ?>"></script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /Users/dev/Documents/WebDevProjects/infy-tracker/resources/views/time_entries/index.blade.php ENDPATH**/ ?>