ultimatepos/resources/views/user/profile_professional/tabs/leaves.blade.php

37 lines
1.6 KiB
PHP

<div class="up-card">
<div class="up-card__header up-card__header--flex">
<h4>@lang('lang_v1.profile_tab_leaves')</h4>
@if($profile['leaves_url'])
<a href="{{ $profile['leaves_url'] }}" class="btn btn-xs btn-default">@lang('messages.view') @lang('lang_v1.all')</a>
@endif
</div>
<div class="up-card__body">
@if($profile['leave_rows']->isEmpty())
<div class="up-empty-state"><p>@lang('lang_v1.profile_not_enough_data')</p></div>
@else
<div class="table-responsive">
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>@lang('essentials::lang.leave_type')</th>
<th>@lang('lang_v1.start_date')</th>
<th>@lang('lang_v1.end_date')</th>
<th>@lang('lang_v1.holding_status')</th>
</tr>
</thead>
<tbody>
@foreach($profile['leave_rows'] as $leave)
<tr>
<td>{{ optional($leave->leave_type)->leave_type ?: '—' }}</td>
<td>{{ format_date($leave->start_date) }}</td>
<td>{{ format_date($leave->end_date) }}</td>
<td><span class="label label-{{ $leave->status === 'approved' ? 'success' : 'warning' }}">{{ __('essentials::lang.'.$leave->status) }}</span></td>
</tr>
@endforeach
</tbody>
</table>
</div>
@endif
</div>
</div>