@extends('layouts.main') @section('page-title') {{ __('Edit Employee') }} @endsection @section('page-breadcrumb') {{ __('Edit Employee') }} @endsection @section('page-action')
@endsection @section('content')
@if(!empty($employee)) {{ Form::model($employee, ['route' => ['employee.update', $employee->id], 'method' => 'PUT', 'enctype' => 'multipart/form-data']) }} @else {{ Form::open(['route' => ['employee.store'], 'method' => 'post', 'enctype' => 'multipart/form-data']) }} @endif @if(!empty($user->id)) @endif
{{ __('Personal Detail') }}
{!! Form::label('name', __('Name'), ['class' => 'form-label']) !!}* {!! Form::text('name',!empty($user->name) ? $user->name : '', ['class' => 'form-control', 'required' => 'required']) !!}
{!! Form::label('phone', __('Phone'), ['class' => 'form-label']) !!}* {!! Form::text('phone', null, ['class' => 'form-control','required' => 'required']) !!}
{!! Form::label('dob', __('Date of Birth'), ['class' => 'form-label']) !!}* {!! Form::date('dob', null, ['class' => 'form-control ','required' => 'required','placeholder'=>"Select Date of Birth",'max'=>date('Y-m-d')]) !!}
{!! Form::label('gender', __('Gender'), ['class' => 'form-label']) !!}*
gender == 'Male' ? 'checked' : '' : '' }}>
gender == 'Female' ? 'checked' : '' : '' }}>
{!! Form::label('address', __('Address'), ['class' => 'form-label']) !!}* {!! Form::textarea('address', null, ['class' => 'form-control', 'rows' => 2,'required' => 'required']) !!}
@if (!in_array(\Auth::user()->type, \Auth::user()->not_emp_type)) {!! Form::submit('Update', ['class' => 'btn-create btn-xs badge-blue radius-10px float-right']) !!} @endif
@if (\Auth::user()->type != 'employee')
{{ __('Company Detail') }}
@csrf
{!! Form::label('employee_id', __('Employee ID'), ['class' => 'form-label']) !!} {!! Form::text('employee_id', $employeesId, ['class' => 'form-control', 'disabled' => 'disabled']) !!}
{{ Form::label('branch_id', !empty(company_setting('hrm_branch_name')) ? company_setting('hrm_branch_name') : __('Branch'), ['class' => 'form-label']) }}* {{ Form::select('branch_id', $branches, null, ['class' => 'form-control', 'required' => 'required', 'placeholder' => __('Select '.(!empty(company_setting('hrm_branch_name')) ? company_setting('hrm_branch_name') : __('select Branch')))]) }}
{{ Form::label('department_id', !empty(company_setting('hrm_department_name')) ? company_setting('hrm_department_name') : __('Department'), ['class' => 'form-label']) }}* {{ Form::select('department_id',$departments, null, ['class' => 'form-control', 'id' => 'department_id', 'required' => 'required','placeholder' => __('Select '.(!empty(company_setting('hrm_department_name')) ? company_setting('hrm_department_name') : __('Department')))]) }}
{{ Form::label('designation_id', !empty(company_setting('hrm_designation_name')) ? company_setting('hrm_designation_name') : __('Designation'), ['class' => 'form-label']) }}* {{ Form::select('designation_id',$designations, null, ['class' => 'form-control', 'id' => 'designation_id', 'required' => 'required','placeholder' => __('Select '.(!empty(company_setting('hrm_designation_name')) ? company_setting('hrm_designation_name') : __('Designation')))]) }}
{!! Form::label('company_doj', 'Company Date Of Joining', ['class' => 'form-label']) !!}* {!! Form::date('company_doj', null, ['class' => 'form-control ','required' => 'required','placeholder'=>"Select Date Of Joining"]) !!}
@if(module_is_active('CustomField') && !$customFields->isEmpty())
@include('customfield::formBuilder', ['fildedata' => isset($employee->customField) ? $employee->customField : ''])
@endif
@else
{{ __('Company Detail') }}
{{ !empty(company_setting('hrm_branch_name')) ? company_setting('hrm_branch_name') : __('Branch') }} {{ !empty($employee->branch) ? $employee->branch->name : '' }}
{{ !empty(company_setting('hrm_department_name')) ? company_setting('hrm_department_name') : __('Department') }} {{ !empty($employee->department) ? $employee->department->name : '' }}
{{ !empty(company_setting('hrm_designation_name')) ? company_setting('hrm_designation_name') : __('Designation') }} {{ !empty($employee->designation) ? $employee->designation->name : '' }}
{{ __('Date Of Joining') }} {{ company_date_formate($employee->company_doj) }}
@endif
@if (\Auth::user()->type != 'employee')
{{ __('Document') }}
@foreach ($document_types as $key => $document)
@php $employeedoc = !empty($employee->documents)?$employee->documents()->pluck('document_value','document_id'):[]; @endphp
@if (!empty($employeedoc[$document->id])) @endif
@endforeach
{{ __('Bank Account Detail') }}
{!! Form::label('account_holder_name', __('Account Holder Name'), ['class' => 'form-label']) !!} {!! Form::text('account_holder_name', null, ['class' => 'form-control']) !!}
{!! Form::label('account_number', __('Account Number'), ['class' => 'form-label']) !!} {!! Form::number('account_number', null, ['class' => 'form-control']) !!}
{!! Form::label('bank_name', __('Bank Name'), ['class' => 'form-label']) !!} {!! Form::text('bank_name', null, ['class' => 'form-control']) !!}
{!! Form::label('bank_identifier_code', __('Bank Identifier Code'), ['class' => 'form-label']) !!} {!! Form::text('bank_identifier_code', null, ['class' => 'form-control']) !!}
{!! Form::label('branch_location', __('Branch Location'), ['class' => 'form-label']) !!} {!! Form::text('branch_location', null, ['class' => 'form-control']) !!}
{!! Form::label('tax_payer_id', __('Tax Payer Id'), ['class' => 'form-label']) !!} {!! Form::text('tax_payer_id', null, ['class' => 'form-control']) !!}
@else
{{ __('Document Detail') }}
@php $employeedoc = $employee->documents()->pluck('document_value', __('document_id')); @endphp @foreach ($document_types as $key => $document) @endforeach
{{ __('Bank Account Detail') }}
{{ __('Account Holder Name') }} {{ $employee->account_holder_name }}
{{ __('Account Number') }} {{ $employee->account_number }}
{{ __('Bank Name') }} {{ $employee->bank_name }}
{{ __('Bank Identifier Code') }} {{ $employee->bank_identifier_code }}
{{ __('Branch Location') }} {{ $employee->branch_location }}
{{ __('Tax Payer Id') }} {{ $employee->tax_payer_id }}
@endif @if (\Auth::user()->type != 'employee')
@endif
{!! Form::close() !!}
@endsection @push('scripts') @endpush