<?php if(in_array('attendance', user_modules()) && in_array('shift_schedule', $activeWidgets) && $sidebarUserPermissions['view_shift_roster'] != 5 && $sidebarUserPermissions['view_shift_roster'] != 'none' && in_array('attendance', user_modules())): ?>
    <div class="col-sm-12">
        <?php if (isset($component)) { $__componentOriginalf463d4507b04ddbb1ec93225959f845404a19c7e = $component; } ?>
<?php $component = App\View\Components\Cards\Data::resolve(['title' => __('modules.attendance.shiftSchedule'),'padding' => 'false','otherClasses' => 'h-200'] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('cards.data'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Cards\Data::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes(['class' => 'mb-3']); ?>
             <?php $__env->slot('action', null, []); ?> 
                <?php if (isset($component)) { $__componentOriginalad6cd9ca0c0f4e557ce8aae8581c3617ecf44480 = $component; } ?>
<?php $component = App\View\Components\Forms\ButtonPrimary::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('forms.button-primary'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Forms\ButtonPrimary::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes(['id' => 'view-shifts']); ?><?php echo app('translator')->get('modules.attendance.shift'); ?>
                 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalad6cd9ca0c0f4e557ce8aae8581c3617ecf44480)): ?>
<?php $component = $__componentOriginalad6cd9ca0c0f4e557ce8aae8581c3617ecf44480; ?>
<?php unset($__componentOriginalad6cd9ca0c0f4e557ce8aae8581c3617ecf44480); ?>
<?php endif; ?>
             <?php $__env->endSlot(); ?>

            <?php if (isset($component)) { $__componentOriginale53a9d2e6d6c51019138cc2fcd3ba8ac893391c6 = $component; } ?>
<?php $component = App\View\Components\Table::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('table'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Table::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
                <?php $__currentLoopData = $currentWeekDates; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $weekDate): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <?php if(isset($weekShifts[$key])): ?>
                        <tr>
                            <td class="pl-20">
                                <?php echo e($weekDate->translatedFormat(company()->date_format)); ?>

                            </td>
                            <td><?php echo e($weekDate->translatedFormat('l')); ?></td>
                            <td>
                                <?php if(isset($weekShifts[$key]->shift)): ?>
                                    <?php if($weekShifts[$key]->shift->shift_name == 'Day Off'): ?>
                                        <span class="badge badge-secondary"><?php echo e($weekShifts[$key]->shift->shift_name); ?>

                                                                </span>
                                    <?php else: ?>
                                        <span class="badge badge-success"
                                              style="background-color:<?php echo e($weekShifts[$key]->shift->color); ?>"><?php echo e($weekShifts[$key]->shift->shift_name); ?>

                                                                </span>
                                    <?php endif; ?>

                                    <?php if(!is_null($weekShifts[$key]->remarks) && $weekShifts[$key]->remarks != ''): ?>
                                        <i class="fa fa-info-circle text-dark-grey" data-toggle="popover" data-placement="top" data-content="<?php echo e($weekShifts[$key]->remarks); ?>" data-html="true" data-trigger="hover"></i>
                                    <?php endif; ?>
                                <?php else: ?>
                                    <?php echo $weekShifts[$key]; ?>

                                <?php endif; ?>
                            </td>
                            <td class="pr-20 text-right">
                                <?php if(isset($weekShifts[$key]->shift)): ?>
                                    <?php if(attendance_setting()->allow_shift_change && !$weekDate->isPast()): ?>
                                        <?php if(!is_null($weekShifts[$key]->requestChange) && $weekShifts[$key]->requestChange->status == 'waiting'): ?>
                                            <div class="task_view">
                                                <a href="javascript:;"
                                                   data-shift-schedule-id="<?php echo e($weekShifts[$key]->id); ?>"
                                                   class="taskView border-right-0 request-shift-change f-11"><?php echo app('translator')->get('modules.attendance.requestPending'); ?></a>
                                            </div>
                                        <?php else: ?>
                                            <div class="task_view">
                                                <a href="javascript:;"
                                                   data-shift-schedule-id="<?php echo e($weekShifts[$key]->id); ?>"
                                                   class="taskView border-right-0 request-shift-change f-11"><?php echo app('translator')->get('modules.attendance.requestChange'); ?></a>
                                            </div>
                                        <?php endif; ?>
                                    <?php else: ?>
                                        --
                                    <?php endif; ?>
                                <?php else: ?>
                                    --
                                <?php endif; ?>

                            </td>
                        </tr>
                    <?php endif; ?>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
             <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginale53a9d2e6d6c51019138cc2fcd3ba8ac893391c6)): ?>
<?php $component = $__componentOriginale53a9d2e6d6c51019138cc2fcd3ba8ac893391c6; ?>
<?php unset($__componentOriginale53a9d2e6d6c51019138cc2fcd3ba8ac893391c6); ?>
<?php endif; ?>
         <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalf463d4507b04ddbb1ec93225959f845404a19c7e)): ?>
<?php $component = $__componentOriginalf463d4507b04ddbb1ec93225959f845404a19c7e; ?>
<?php unset($__componentOriginalf463d4507b04ddbb1ec93225959f845404a19c7e); ?>
<?php endif; ?>
    </div>
<?php endif; ?>
<?php /**PATH /home/surab432/sap.internalcsi.my.id/resources/views/dashboard/employee/widgets/shift_schedule.blade.php ENDPATH**/ ?>