@extends('layouts.app-hr')
@section('content')
    <?php Fun::lang()?>
    <div class="top-header">
        <ol class="breadcrumb">
            <li><a href="#">{{__('administrator.Dashboard')}}</a></li>
            <li><a href="{{route('hr-employee.index')}}">{{__('administrator.resign')}}</a></li>
        </ol>
    </div>
    <div class="page">
        <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.resign')}}</h3>
                        </div>

                    </div>
                </div>
            </div>
        </div>
        {!! Form::model($emp, ['method' => 'PATCH','route' => ['hr-resign.update', $id]]) !!}
        <div class="row">
            <div class="col-sm-12">
                <div class="master-form">
                    <div class="title-note">
                        <h3><span class="fa fa-exclamation-triangle"></span> {{__('administrator.resign')}}
                            <i>({{__('administrator.fields_in_red_are_required')}})</i></h3>
                    </div>
                    @php
                        $emp = \App\User::find($id);
                    @endphp
                    <div class="form-group col-sm-12 col-xs-12">
                        <div class="col-sm-3 col-xs-12 ">
                            <label class=""  for="name">{{__('administrator.code')}}</label>
                        </div>
                        <div class="col-sm-8">
                            {!! Form::text('code', $emp->code, array('class' => 'form-control','disabled','required')) !!}
                        </div>
                    </div>
                    <div class="form-group col-sm-12 col-xs-12">
                        <div class="col-sm-3 col-xs-12 ">
                            <label class=""  for="name">{{__('administrator.employee')}}</label>
                        </div>
                        <div class="col-sm-8">
                            {!! Form::text('emp_id', $emp->name, array('class' => 'form-control','disabled','required')) !!}
                        </div>
                    </div>
                    <div class="form-group col-sm-12 col-xs-12">
                        <div class="col-sm-3 col-xs-12 ">
                            <label class="required"  for="name">{{__('administrator.resign_date')}}</label>
                        </div>
                        <div class="col-sm-8">
                            {!! Form::text('resign_date', null, array('class' => 'form-control date_picker','required')) !!}
                        </div>
                    </div>
                    <div class="form-group col-sm-12 col-xs-12">
                        <div class="col-sm-3 col-xs-12 ">
                            <label class="required"  for="name">{{__('administrator.reason')}}</label>
                        </div>
                        <div class="col-sm-8">
                            {!! Form::text('reason', null, array('class' => 'form-control ','required')) !!}
                        </div>
                    </div>
                    <div class="form-group col-sm-12 col-xs-12">
                        <div class="col-sm-3 col-xs-12 ">
                            <label class="required"  for="name">{{__('administrator.status')}}</label>
                        </div>
                        <div class="col-sm-8">
                            {!! Form::select('status',['1' => 'Active',
                                                       '0' => 'Inactive'], null,
                                                       array('class' => 'form-control select2','required')) !!}
                        </div>
                    </div>
                    <div class="form-group col-sm-12 col-xs-12">
                        <div class="col-sm-3 col-xs-12 ">
                            <label class="required"  for="name">{{__('administrator.type')}}</label>
                        </div>
                        <div class="col-sm-8">
                            {!! Form::select('type',['proper_resign' => 'Proper Resign',
                                                    'termination' => 'Termination',
                                                    'dismiss' => 'Dismiss',
                                                    'other' => 'Other'] ,null,
                                                    array('class' => 'form-control select2','required')) !!}
                        </div>
                    </div>


                    <div class="col-sm-11 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>
        </div>
        {!! Form::close() !!}
    </div>
@endsection




