@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')
| Number |
Type |
Period |
Status |
Actions |
@forelse($contracts as $contract)
| {{ $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) }} |
|
@empty
| No contracts recorded yet. |
@endforelse
Attendance setup comes in the attendance module.
This tab is reserved for shifts, attendance rules, and daily attendance logs.
| Type |
Title |
Expiry |
Status |
Actions |
@forelse($documents as $document)
| {{ strtoupper($document->document_type) }} |
{{ $document->title ?: '-' }} {{ $document->file_path }} |
{{ optional($document->expiry_date)->format('Y-m-d') ?: '-' }} |
{{ $document->is_active ? 'Active' : 'Inactive' }} |
|
@empty
| No documents uploaded yet. |
@endforelse
| Date | Movement | Reason | Actions |
@forelse($transfers as $transfer)
| {{ optional($transfer->effective_date)->format('Y-m-d') ?: '-' }} |
{{ $transfer->fromBranch?->name ?? '-' }} / {{ $transfer->fromDepartment?->name ?? '-' }} → {{ $transfer->toBranch?->name ?? '-' }} / {{ $transfer->toDepartment?->name ?? '-' }} |
{{ $transfer->reason ?: '-' }} |
|
@empty
| No transfers recorded yet. |
@endforelse
| Period | Destination | Status | Actions |
@forelse($secondments as $secondment)
| {{ 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) }} |
|
@empty
| No secondments recorded yet. |
@endforelse
| Date | Change | Reason | Notes |
@forelse($statusHistories as $statusHistory)
| {{ optional($statusHistory->effective_date)->format('Y-m-d') ?: '-' }} |
{{ ucfirst($statusHistory->previous_status) }} → {{ ucfirst($statusHistory->new_status) }} |
{{ $statusHistory->reason ?: '-' }} |
{{ $statusHistory->notes ?: '-' }} |
@empty
| No status changes recorded yet. |
@endforelse
@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