Files
new_raffles/Modules/Employee/resources/views/employee/partials/leave.blade.php
2025-07-27 17:40:56 +05:45

60 lines
2.1 KiB
PHP

<div class="card">
<div class="card-body">
<div class="d-flex justify-content-between mb-3">
<h5 class="card-title">Leave</h5>
<div class="">
{{-- <a href="javascript:void(0);" class="btn btn-sm btn-success float-end1" data-bs-toggle="modal" data-bs-target="#leaveModal"><i
class="ri-edit-box-line align-bottom"></i> Apply Leave</a> --}}
</div>
</div>
<!-- Small Tables -->
<table class="display table-sm table-bordered align-center buttons-datatables1 table" style="width:100%">
<thead>
<tr>
<th>Leave Type</th>
<th>Dates</th>
<th>Status</th>
</tr>
</thead>
<tbody>
@forelse ($leaves as $key => $leave)
<tr>
<td>
<div class="d-flex align-items-center">
<div class="">
<h5 class="fs-12 fw-medium my-1">
{{ optional($leave->leaveType)->name }} <span class="text-danger">({{ $leave->total_days }}
days)</span>
</h5>
<span class="fs-10 text-danger text-bold">{{ $leave->getDuration() }}</span>
</div>
</div>
</td>
<td>
@foreach ($leave->start_date as $dates)
@foreach ($dates as $date)
<li class="fs-12">{{ $date }}</li>
@endforeach
@endforeach
</td>
<td>
<span class="badge bg-{{ $leave->status_name['color'] }}">
{!! $leave->status_name['status'] !!} </span>
<p class="text-info fs-10 mb-0">{{ optional($leave->approveBy)->name }}</p>
<p class="text-muted fs-10">{!! $leave->description !!}</p>
</td>
</tr>
@empty
<tr>
<td colspan="7" class="text-center"> No Leave Found</td>
</tr>
@endforelse
</tbody>
</table>
</div>
<!--end card-body-->
</div>
@include('employee::partials.leave-modal')
{{-- @include('lead::lead.section.followup.form') --}}