@extends('layouts.team') @section('title', 'My leave') @section('content')
Leave year April {{ now()->month >= 4 ? now()->year : now()->year - 1 }} – March {{ now()->month >= 4 ? now()->year + 1 : now()->year }}

My leave

@if(session('warn'))
{{ session('warn') }}
@endif
@foreach($balances as $b)@if($b['total'] > 0)
{{ $b['type']->name }}{{ $b['left'] + 0 }} / {{ $b['total'] + 0 }}
{{ $b['type']->description }}
@endif @endforeach
@csrf

Apply for leave

Leave type
@foreach($types as $t)@endforeach

Sundays and holidays aren’t counted. HR and your manager get a message to approve.

History

@forelse($history as $h)@empty@endforelse
DatesTypeDaysReasonStatus
{{ $h->from_date->format('j M') }}{{ $h->from_date->eq($h->to_date) ? '' : ' – '.$h->to_date->format('j M') }} {{ $h->from_date->format('Y') }}{{ $h->type->name }}{{ $h->days + 0 }}{{ $h->reason }}@if($h->decision_note)
Note: {{ $h->decision_note }}
@endif
@if($h->status === 'pending')
@csrf
@endif
No leave taken yet.
@endsection