 <?php $__env->startSection('title','Leave'); ?> <?php $__env->startSection('content'); ?><p class="text-sm font-semibold text-blue-600">SELF SERVICE</p><h1 class="text-3xl font-black">Leave Requests</h1><div x-data="{open:false}" class="mt-6"><button @click="open=true" class="btn btn-primary">Apply for leave</button><div x-cloak x-show="open" class="mt-4 card p-5"><form method="POST" action="<?php echo e(route('leave.store')); ?>" class="grid gap-3 sm:grid-cols-2"><?php echo csrf_field(); ?><select name="leave_type_id" class="rounded-xl border-slate-200"><?php $__currentLoopData = $types; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $t): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><option value="<?php echo e($t->id); ?>"><?php echo e($t->name); ?></option><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?></select><input type="date" name="start_date" class="rounded-xl border-slate-200" required><input type="date" name="end_date" class="rounded-xl border-slate-200" required><textarea name="reason" class="rounded-xl border-slate-200 sm:col-span-2" placeholder="Reason" required></textarea><button class="btn btn-primary w-fit">Submit</button></form></div></div><div class="mt-6 card overflow-x-auto"><table class="w-full text-sm"><thead class="bg-slate-50 text-left"><tr><th class="p-4">From</th><th class="p-4">To</th><th class="p-4">Days</th><th class="p-4">Status</th></tr></thead><tbody><?php $__currentLoopData = $requests; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $r): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><tr class="border-t"><td class="p-4"><?php echo e($r->start_date->format('d M Y')); ?></td><td class="p-4"><?php echo e($r->end_date->format('d M Y')); ?></td><td class="p-4"><?php echo e($r->days); ?></td><td class="p-4"><span class="badge"><?php echo e($r->status); ?></span></td></tr><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?></tbody></table></div><?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /Users/macbook/Desktop/crm/softsuite-cms/resources/views/leaves/index.blade.php ENDPATH**/ ?>