@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-ticket') && auth()->user()->roles[0]->id !== config('const.roleSuperAdmin')) @endif   Back
@if($leave->status != config('const.leaveStatusApprovedInt'))

Comment

{!! Form::open([ 'route' => ['admin.leave.add-comment'], 'id' => 'addcomment', 'name' => 'addcomment', 'enctype' => 'multipart/form-data', ]) !!} @csrf
{!! Form::label('comment', 'Enter Comment', ['class' => 'form-label', 'for' => 'title']) !!} {!! Form::textarea('comment', Input::old('comment'), [ 'id' => 'v', 'class' => 'form-control', 'placeholder' => 'Enter Comment', 'tabindex' => '5', 'rows' => '6', ]) !!}
{!! Form::close() !!}
@endif
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 @section('scripts') @endsection