@extends('layouts.master') @section('title', 'PetroERP- An ERP for Petrol Pumps') @section('content')
@include('partials.heading', ['heading1' => 'Applied Leaves', 'heading2' => 'List'])
{{-- Apply Leave --}} @if(count($leaves)>0)
@foreach($leaves as $leave) @endforeach
Employee Name Leave Type From Date To Date No. Of Days Status Action
{{$leave->employeeName}} {{$leave->leaveTypeName}} {{date("d M Y", strtotime($leave->fromDate))}} {{date("d M Y", strtotime($leave->toDate))}} {{$leave->noOfDays}} @if($leave->status == 'P') Pending @elseif($leave->status == 'D') Disapproved @elseif($leave->status == 'A') Approved @elseif($leave->status == 'C') Cancelled @elseif($leave->status == 'V') Availed @endif {!! Form::open(['action' => ['LeavesController@approve', $leave->id], 'method'=>'GET']) !!} {{Form::hidden('_method', 'approve')}} {{Form::button('', array('class'=>'btn btn-success btn-xs confirmApprove', 'type'=>'submit')) }} {!! Form::close() !!} {!! Form::open(['action' => ['LeavesController@disapprove', $leave->id], 'method'=>'GET']) !!} {{Form::hidden('_method', 'disapprove')}} {{Form::button('', array('class'=>'btn btn-danger btn-xs confirmDisapprove', 'type'=>'submit')) }} {!! Form::close() !!} @if($leave->status == 'A' || $leave->status == 'V') {!! Form::open(['action' => ['LeavesController@availed', $leave->id], 'method'=>'GET']) !!} {{Form::hidden('_method', 'availed')}} {{Form::button('', array('class'=>'btn btn-primary btn-xs confirmAvail', 'type'=>'submit')) }} @else {{Form::button('', array('class'=>'btn btn-primary btn-xs confirmAvail', 'disabled'=>'true', 'type'=>'submit')) }} @endif {!! Form::close() !!}
{{$leaves->links()}}
@else

No Existing Leaves in the Database

@endif
@endsection