@extends('dashboard.admin.layouts.master') @php $activeTab = request('tab', 'personal'); if ($activeTab === 'contracts') { $activeTab = 'job'; } $nameAr = old('name.ar', $employee->getTranslation('name', 'ar')); $nameEn = old('name.en', $employee->getTranslation('name', 'en')); $displayName = $employee->getTranslation('name', 'en') ?: $employee->getTranslation('name', 'ar'); $allowanceRows = old('allowances', collect($salaryProfile?->allowances ?? [])->map(fn ($allowance) => [ 'allowance_type_id' => $allowance->allowance_type_id, 'name' => $allowance->getTranslations('name'), 'calculation_type' => $allowance->calculation_type, 'value' => $allowance->value, 'is_taxable' => $allowance->is_taxable, 'is_recurring' => $allowance->is_recurring, 'effective_from' => optional($allowance->effective_from)->format('Y-m-d'), 'effective_to' => optional($allowance->effective_to)->format('Y-m-d'), 'notes' => $allowance->notes, ])->values()->all() ?? []); $allowanceRows[] = ['name' => ['ar' => '', 'en' => ''], 'calculation_type' => 'fixed', 'is_taxable' => false, 'is_recurring' => true]; $deductionRows = old('deductions', collect($salaryProfile?->deductions ?? [])->map(fn ($deduction) => [ 'deduction_type_id' => $deduction->deduction_type_id, 'name' => $deduction->getTranslations('name'), 'calculation_type' => $deduction->calculation_type, 'value' => $deduction->value, 'is_recurring' => $deduction->is_recurring, 'effective_from' => optional($deduction->effective_from)->format('Y-m-d'), 'effective_to' => optional($deduction->effective_to)->format('Y-m-d'), 'notes' => $deduction->notes, ])->values()->all() ?? []); $deductionRows[] = ['name' => ['ar' => '', 'en' => ''], 'calculation_type' => 'fixed', 'is_recurring' => true]; $bankAccountRows = old('bank_accounts', collect($bankAccounts)->map(fn ($bankAccount) => [ 'bank_name' => $bankAccount->bank_name, 'branch_name' => $bankAccount->branch_name, 'account_name' => $bankAccount->account_name, 'account_number' => $bankAccount->account_number, 'iban' => $bankAccount->iban, 'swift_code' => $bankAccount->swift_code, 'currency_code' => $bankAccount->currency_code, 'is_primary' => $bankAccount->is_primary, 'is_active' => $bankAccount->is_active, 'notes' => $bankAccount->notes, ])->values()->all()); $bankAccountRows[] = ['currency_code' => 'EGP', 'is_primary' => false, 'is_active' => true]; @endphp @section('content')

{{ $displayName ?: $employee->code }}

{{ $employee->code }} | {{ ucfirst($employee->employment_status) }}
Back
@csrf @method('PUT')
@error('code')
{{ $message }}
@enderror
@error('candidate_id')
{{ $message }}
@enderror
@error('employment_status')
{{ $message }}
@enderror
@error('name.ar')
{{ $message }}
@enderror
@error('name.en')
{{ $message }}
@enderror

Job Assignment

@csrf @method('PUT')
is_active))>

Contracts

@csrf
@forelse($contracts as $contract) @empty @endforelse
Number Type Period Status Actions
{{ $contract->contract_number ?: '-' }} {{ $contract->contractType?->name ?? '-' }} {{ optional($contract->start_date)->format('Y-m-d') ?: '-' }} → {{ optional($contract->end_date)->format('Y-m-d') ?: 'Open' }} {{ ucfirst($contract->status) }}
@csrf @method('DELETE')
No contracts recorded yet.
@csrf @method('PUT')

Salary Profile

is_current ?? true))>

Allowances

@foreach($allowanceRows as $index => $row)
@endforeach

Deductions

@foreach($deductionRows as $index => $row)
@endforeach

Bank Accounts

@foreach($bankAccountRows as $index => $row)
@endforeach
Attendance setup comes in the attendance module.
This tab is reserved for shifts, attendance rules, and daily attendance logs.

Add Document

@csrf

Document Register

@forelse($documents as $document) @empty @endforelse
Type Title Expiry Status Actions
{{ strtoupper($document->document_type) }} {{ $document->title ?: '-' }}
{{ $document->file_path }}
{{ optional($document->expiry_date)->format('Y-m-d') ?: '-' }} {{ $document->is_active ? 'Active' : 'Inactive' }}
@csrf @method('DELETE')
No documents uploaded yet.

Record Transfer

@csrf

Record Secondment

@csrf

Transfer History

@forelse($transfers as $transfer) @empty @endforelse
DateMovementReasonActions
{{ optional($transfer->effective_date)->format('Y-m-d') ?: '-' }} {{ $transfer->fromBranch?->name ?? '-' }} / {{ $transfer->fromDepartment?->name ?? '-' }} → {{ $transfer->toBranch?->name ?? '-' }} / {{ $transfer->toDepartment?->name ?? '-' }} {{ $transfer->reason ?: '-' }}
@csrf @method('DELETE')
No transfers recorded yet.

Secondment History

@forelse($secondments as $secondment) @empty @endforelse
PeriodDestinationStatusActions
{{ optional($secondment->start_date)->format('Y-m-d') ?: '-' }} → {{ optional($secondment->end_date)->format('Y-m-d') ?: 'Open' }} {{ $secondment->toBranch?->name ?? '-' }} / {{ $secondment->toDepartment?->name ?? '-' }} {{ ucfirst($secondment->status) }}
@csrf @method('DELETE')
No secondments recorded yet.

Status History

@forelse($statusHistories as $statusHistory) @empty @endforelse
DateChangeReasonNotes
{{ optional($statusHistory->effective_date)->format('Y-m-d') ?: '-' }} {{ ucfirst($statusHistory->previous_status) }} → {{ ucfirst($statusHistory->new_status) }} {{ $statusHistory->reason ?: '-' }} {{ $statusHistory->notes ?: '-' }}
No status changes recorded yet.
@endsection @section('js') {!! JsValidator::formRequest('App\Http\Requests\Admin\HR\Employee\UpdateEmployeeRequest', '#EmployeePersonalForm') !!} {!! JsValidator::formRequest('App\Http\Requests\Admin\HR\Employee\UpdateEmployeeRequest', '#EmployeeJobForm') !!} {!! JsValidator::formRequest('App\Http\Requests\Admin\HR\Employee\StoreEmployeeContractRequest', '#EmployeeContractForm') !!} {!! JsValidator::formRequest('App\Http\Requests\Admin\HR\Employee\UpdateEmployeeSalaryProfileRequest', '#EmployeeSalaryProfileForm') !!} {!! JsValidator::formRequest('App\Http\Requests\Admin\HR\Employee\StoreEmployeeDocumentRequest', '#EmployeeDocumentForm') !!} {!! JsValidator::formRequest('App\Http\Requests\Admin\HR\Employee\StoreEmployeeTransferRequest', '#EmployeeTransferForm') !!} {!! JsValidator::formRequest('App\Http\Requests\Admin\HR\Employee\StoreEmployeeSecondmentRequest', '#EmployeeSecondmentForm') !!} @endsection