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

@if (isset($apply_leave)) @lang('leave.edit_apply_leave') @else @lang('leave.add_apply_leave') @endif

@if ($errors->has('apply_date')) {{ $errors->first('apply_date') }} @endif
@if ($errors->has('student_id')) {{ $errors->first('student_id') }} @endif
@if ($errors->has('leave_type')) {{ $errors->first('leave_type') }} @endif
@if ($errors->has('leave_from')) {{ $errors->first('leave_from') }} @endif
@if ($errors->has('leave_to')) {{ $errors->first('leave_to') }} @endif
@if ($errors->has('reason')) {{ $errors->first('reason') }} @endif
@if ($errors->has('attach_file')) {{ $errors->first('attach_file') }} @endif
@php $tooltip = ''; if (userPermission('parent-leave-store')) { $tooltip = ''; } else { $tooltip = 'You have no permission to add'; } @endphp
{{ Form::close() }}

@lang('leave.leave_list')

@foreach ($apply_leaves as $apply_leave) @endforeach
@lang('student.student') @lang('common.type') @lang('common.from') @lang('common.to') @lang('leave.apply_date') @lang('common.status') @lang('common.action')
{{ $apply_leave->student->full_name }} @if ($apply_leave->leaveDefine != '' && $apply_leave->leaveDefine->leaveType != '') {{ $apply_leave->leaveDefine->leaveType->type }} @endif {{ $apply_leave->leave_from != '' ? dateConvert($apply_leave->leave_from) : '' }} {{ $apply_leave->leave_to != '' ? dateConvert($apply_leave->leave_to) : '' }} {{ $apply_leave->apply_date != '' ? dateConvert($apply_leave->apply_date) : '' }} @if ($apply_leave->approve_status == 'P') @endif @if ($apply_leave->approve_status == 'A') @endif @if ($apply_leave->approve_status == 'C') @endif @if (userPermission('parent-view-leave-details-apply')) @lang('common.view') @endif @if ($apply_leave->approve_status == 'P') @if (userPermission('parent-leave-edit')) @lang('common.edit') @endif @if (userPermission('parent-leave-delete')) @lang('common.delete') @endif @endif
@endsection @include('backEnd.partials.data_table_js') @include('backEnd.partials.date_picker_css_js')