@extends('app-new') @push('head-script') @endpush @section('content')

{{trans('leave/leave.leave_details')}}

{{trans('leave/leave.employee')}} : {{ (!is_null($leave->user_id)) ? ucwords($leave->user->name) : '-' }}
{{trans('leave/leave.leave_type')}} : {{ (!is_null($leave->leave_type_id)) ? ucwords($leave->leaveType->type_name) : '-' }}
{{trans('leave/leave.leave_status')}} : {{ (!is_null($leave->leave_status)) ? ucwords($leave->leave_status) : '-' }}
{{trans('leave/leave.apply_date_time')}} : {{ (!is_null($leave->created_at)) ? $leave->created_at : '-' }}
{{trans('leave/leave.leave_duration')}} : {{ (!is_null($leave->duration)) ? ucwords($leave->duration) : '-' }}
@if ($leave->duration=='multiple') @else @endif @if ($leave->leave_status!='pending') @endif
{{trans('common/common.from_date')}}: {{ (!is_null($leave->start_date)) ? $leave->start_date : '-' }}
{{trans('common/common.to_date')}}: {{ (!is_null($leave->end_date)) ? $leave->end_date : '-' }}
{{trans('common/common.date')}}: {{ (!is_null($leave->start_date)) ? $leave->start_date : '-' }}
{{ucwords($leave->leave_status)}} {{trans('leave/leave.by')}}: {{ ucwords($leave->action_by) }}
{{ucwords($leave->leave_status)}} {{trans('leave/leave.date_time')}}: {{ $leave->action_datetime }}
{{trans('leave/leave.reason_for_absence')}}: {{ (!is_null($leave->reason)) ? $leave->reason : '-' }}
@if ($leave->leave_status=='pending')
{{ csrf_field() }}
@endif @if($leave->files)

{{trans('common/common.attachment')}}

@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") avatar img @elseif($attachment->mime_type=="application/pdf") avatar img @else avatar img @endif

{{$attachment->file_name}}

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