@php use App\Helpers\Helper; use Request as Input; use Carbon\Carbon; @endphp @extends('layouts.master') @section('title', 'Leave Details') @section('content')
@include('admin.errors.error') @section('breadcrumbs') @endsection

Details

  • Leave Ticket No. #{{ $leave->leave_no }}
  • Start Date : {{ isset($leave->start_date)? Helper::displayDateTimeConvertedWithFormat($leave->start_date, config('const.displayDate')):'' }}
  • End Date: {{ isset($leave->end_date)? Helper::displayDateTimeConvertedWithFormat($leave->end_date, config('const.displayDate')):'' }}
  • Days: {{ isset($leave->days) ? $leave->days : '-' }}
  • Approver: {{ isset($leave->getAssignName) ? $leave->getAssignName->ownerName : '' }}
  • Notes: {{ isset($leave->reason) ? $leave->reason : '' }}

  • Created By: {{ isset($leave->getCreatedByName) ? $leave->getCreatedByName->first_name.' '.$leave->getCreatedByName->last_name : '-' }}
  • Updated By: {{ isset($leave->getUpdatedByName) ? $leave->getUpdatedByName->first_name.' '.$leave->getUpdatedByName->last_name : '-' }}
  • Status: {!! Helper::displayleaveStatus($leave->status) !!}
@if (auth()->user()->can('update-leave') && auth()->user()->roles[0]->id !== config('const.roleSuperAdmin') && $leave->status == config('const.leaveStatusPendingInt')) Edit @endif   Back
Leave History
    @if (count($leave->getLeaveHistory) > 0) @php $i=0; @endphp @foreach ($leave->getLeaveHistory as $key => $history)
  • @if ($history->status_to == null) @endif @if ($history->status_to == config('const.leaveStatusPendingInt')) @endif @if ($history->status_to == config('const.leaveStatusApprovedInt')) @endif @if ($history->status_to == config('const.leaveStatusRejectedInt')) @endif
    @if ($history->status_to == null) {!! Helper::displayLeaveStatus(config('const.leaveStatusPendingInt')) !!} @endif @if ($history->status_to == config('const.leaveStatusPendingInt')) {!! Helper::displayLeaveStatus($history->status_to) !!} @endif @if ($history->status_to == config('const.leaveStatusApprovedInt')) {!! Helper::displayLeaveStatus($history->status_to) !!} @endif @if ($history->status_to == config('const.leaveStatusRejectedInt')) {!! Helper::displayLeaveStatus($history->status_to) !!} @endif @if($key==0) New Update @endif {{ $history->created_at->diffForHumans() }}
    @php $userID = isset($history->getCommenterUser) ? $history->getCommenterUser->id : '' @endphp Avatar
    {{ isset($history->getCommenterUser) ? $history->getCommenterUser->ownerName : '' }}
    {{ isset($history->getCommenterUser->roles) ? $history->getCommenterUser->roles[0]->name : '' }}

    {{ isset($history->comment) ? $history->comment : '' }}

  • @endforeach @endif
@include('admin.confirmalert') @endsection