@extends('layouts.app-hr')

@section('content')
    <?php Fun::lang() ?>
    <?php
        $rand_id = rand(1, 1000) . time() . rand(1, 1000);
    ?>
    <div class="top-header">
        <ol class="breadcrumb">
            <li><a href="#">{{__('administrator.dashboard')}}</a></li>
        </ol>
    </div>
    <div class="container">
        <div class="top-content">
            <div class="row">
                <div class="col-sm-12 col-xs-12">
                    <div class="title-add">
                        <div class="pull-left">
                            <h3>{{__('administrator.take_leave')}}</h3>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        {!! Form::open(array('route' => 'take-leave.store','method'=>'POST','enctype'=>'multipart/form-data')) !!}
        <div class="row">
            <div class="master-form">
                <div class="title-note">
                    <h3><span class="fa fa-exclamation-triangle"></span>
                        {{__('administrator.take_leave')}}
                        <i>({{__('administrator.fields_in_red_are_required')}})</i>
                    </h3>
                </div>
                <div class="form-group col-sm-4 col-md-4 ">
                    <div class="">
                        <strong class="required"  for="name">{{__('administrator.employee')}}</strong>
                        {!! Form::select('emp_id',$emp ,null, array('placeholder' => __('administrator.please_select'),'class' => 'form-control select2','required')) !!}
                    </div>
                </div>
                <div class="form-group col-sm-4 col-md-4 ">
                    @php
						$m = \App\Helpers\IString::getUpperCaseFullName($leave_type);
					@endphp
                    <div class="">
                        <strong class="required">{{__('administrator.leave_type')}}</strong>
                        {!! Form::select('leave_type', $m, null, array('placeholder' => __('administrator.please_select'),'class' => 'form-control select2','required')) !!}
                    </div>
                </div>
                {{-- <div class="form-group col-sm-4 col-md-4 ">
                    <div class="">
                        <strong class="required">Request To</strong>
                        {!! Form::select('request_to', $emp,null, array('placeholder' => __('administrator.please_select'),'class' => 'form-control select2','required')) !!}
                    </div>
                </div> --}}

                <div class="form-group col-sm-4 col-md-4 ">
                    <div class="">
                        <strong class="required">{{__('administrator.from_date')}}</strong>
                        {!! Form::text('from_date', null, array('placeholder' => __('administrator.from_date'),'class' => 'form-control date_picker','autocomplete'=>'off','required')) !!}
                    </div>
                </div>
                <div class="form-group col-sm-4 col-md-4 ">
                    <div class="">
                        <strong class="required">{{__('administrator.to_date')}}</strong>
                        {!! Form::text('to_date', null, array('placeholder' => __('administrator.to_date'),'class' => 'form-control date_picker','autocomplete'=>'off','required')) !!}
                    </div>
                </div>
                <div class="form-group col-sm-4 col-md-4">
                    <div class="">
                        <strong>{{__('administrator.request_date')}}</strong>
                        {!! Form::text('request_date', null, array('placeholder' => __('administrator.request_date'),'class' => 'form-control date_picker','autocomplete'=>'off')) !!}
                    </div>
                </div>
                <div class="form-group col-sm-4 col-md-4">
                    <div class="">
                        <strong class="">{{__('administrator.reason')}}</strong>
                        {!! Form::text('reason', null, array('placeholder' => __('administrator.reason'),'class' => 'form-control','autocomplete'=>'off')) !!}
                    </div>
                </div>
                <br>
                <div class="form-group col-sm-12 col-xs-12">
                    <div class="form-group footer-save">
                        <button type="submit" class=" button_primary pull-right"><span
                                    class="fa fa-save"></span> {{__('administrator.save')}}
                        </button>
                        <button type="button" onClick="history.go(-1)"
                                class=" button_warning pull-right">
                               <span class=" fa fa-arrow-circle-left"></span>
                                    {{__('administrator.back')}}
                        </button>
                    </div>
                </div>
            </div>
        </div>
        {!! Form::close() !!}
    </div>

@endsection


@section('js')

@endsection

