@extends('backend.layouts.master') @section('pageTitle') Employee @endsection @section('pageContent')

Employee @if($employee) Update @else Add New @endif

@csrf @if($employee) {{ method_field('PATCH') }} @endif
{{ $errors->first('name') }}
{!! Form::select('designation', AppHelper::EMPLOYEE_DESIGNATION_TYPES, $designation , ['placeholder' => 'Pick a designation', 'class' => 'form-control select2', 'required' => 'true']) !!} {{ $errors->first('designation') }}
{{ $errors->first('qualification') }}
{{ $errors->first('dob') }}
{!! Form::select('gender', AppHelper::GENDER, $gender , ['class' => 'form-control select2', 'required' => 'true']) !!} {{ $errors->first('gender') }}
{!! Form::select('religion', AppHelper::RELIGION, $religion , ['class' => 'form-control select2', 'required' => 'true']) !!} {{ $errors->first('religion') }}
{{ $errors->first('email') }}
{{ $errors->first('phone_no') }}
{{ $errors->first('id_card') }}
{!! Form::select('role_id', $roles, $role , ['placeholder' => 'Pick a type...','class' => 'form-control select2', 'required' => 'true']) !!} {{ $errors->first('role_id') }}
{{ $errors->first('joining_date') }}
{!! Form::select('shift', AppHelper::EMP_SHIFTS, $shift , ['class' => 'form-control select2', 'required' => 'true']) !!} {{ $errors->first('shift') }}
{{ $errors->first('duty_start') }}
{{ $errors->first('duty_end') }}
{{ $errors->first('address') }}
@if($employee && isset($employee->photo)) @endif {{ $errors->first('photo') }}
@if($employee && isset($employee->signature)) @endif {{ $errors->first('signature') }}
{{ $errors->first('order') }}
@if($employee)
{{ $errors->first('leave_date') }}
@endif

@if(!$employee)
{{ $errors->first('username') }}
{{ $errors->first('password') }}
@endif @if($employee && !$employee->user_id)
{!! Form::select('user_id', $users, null , ['placeholder' => 'Pick if needed','class' => 'form-control select2']) !!} {{ $errors->first('user_id') }}
@endif
@endsection @section('extraScript') @endsection