@extends('backEnd.master') @section('title') @lang('leave.leave_type') @endsection @section('mainContent')
@if (isset($leave_type)) @if (userPermission('leave-type-store')) @endif @endif
@if (isset($leave_type)) {{ Form::open(['class' => 'form-horizontal', 'files' => true, 'route' => ['leave-type-update', $leave_type->id], 'method' => 'PUT', 'enctype' => 'multipart/form-data']) }} @else @if (userPermission('leave-type-store')) {{ Form::open([ 'class' => 'form-horizontal', 'files' => true, 'route' => 'leave-type-store', 'method' => 'POST', 'enctype' => 'multipart/form-data', ]) }} @endif @endif

@if (isset($leave_type)) @lang('leave.edit_leave_type') @else @lang('leave.add_leave_type') @endif

@if ($errors->has('type')) {{ $errors->first('type') }} @endif
@if ($errors->has('max_leaves_allowed')) {{ $errors->first('max_leaves_allowed') }} @endif
@if ($errors->has('applicable_after_work_days')) {{ $errors->first('applicable_after_work_days') }} @endif
is_leave_without_pay ? 'checked' : '' }}>
@if ($errors->has('is_leave_without_pay')) {{ $errors->first('is_leave_without_pay') }} @endif
@php $tooltip = ''; if (userPermission('leave-type-store')) { $tooltip = ''; } else { $tooltip = 'You have no permission to add'; } @endphp
{{ Form::close() }}

@lang('leave.leave_type_list')

@foreach ($leave_types as $leave_type) @endforeach
@lang('common.type') @lang('leave.max_leaves_allowed') @lang('leave.applicable_after_work_days') @lang('leave.is_leave_without_pay') @lang('common.action')
{{ $leave_type->type }} {{ $leave_type->max_leaves_allowed }} {{ $leave_type->applicable_after_work_days }} {{ $leave_type->is_leave_without_pay ? 'Yes' : 'No' }} @if (userPermission('leave-type-edit')) @lang('common.edit') @endif @if (userPermission('leave-type-delete')) @lang('common.delete') @endif
@endsection @include('backEnd.partials.data_table_js')