@extends('app') @section('page-title') @if (isset($status))
@endif

Leave Details

@endsection @push('head-script') @endpush @section('content') @section('content')

{{ (!is_null($leave->user_id)) ? ucwords($leave->user->name) : '-' }}

{{ (!is_null($leave->leave_type_id)) ? ucwords($leave->leaveType->type_name) : '-' }}

{{ (!is_null($leave->leave_status)) ? ucwords($leave->leave_status) : '-' }}

{{ (!is_null($leave->created_at)) ? $leave->created_at : '-' }}

{{ (!is_null($leave->duration)) ? ucwords($leave->duration) : '-' }}
@if ($leave->duration=='multiple')

{{ (!is_null($leave->start_date)) ? $leave->start_date : '-' }}

{{ (!is_null($leave->end_date)) ? $leave->end_date : '-' }}
@else

{{ (!is_null($leave->start_date)) ? $leave->start_date : '-' }}
@endif @if ($leave->leave_status!='pending')

{{ ucwords($leave->action_by) }}

{{ $leave->action_datetime }}
@endif

{{ (!is_null($leave->reason)) ? $leave->reason : '-' }}
@if ($leave->leave_status=='pending')
{{ csrf_field() }}
@endif
@if($leave->files)
@if($leave->files) @foreach($leave->getMedia('files') as $attachment)
@if($leave->mime_type=="application/msword" || $leave->mime_type=="appplication/docx" || $leave->mime_type=="appplication/doc") attachment @elseif($attachment->mime_type=="application/pdf") attachment @else attachment @endif

{{$attachment->file_name}}

@endforeach @endif
@endif @if(!empty($leave->attachments))
@foreach($leave->attachments as $attachment)
your image
@endforeach
@endif
@endsection @endsection @push('footer-script') @endpush