@extends('layouts.app') @section('title', 'تفاصيل العقد - DOTS HR Pro') @section('content') @if($contract->is_expiring_soon)
تنبيه: هذا العقد سينتهي خلال {{ $contract->days_remaining }} يوم ({{ $contract->end_date->format('Y/m/d') }})
@endif @if($contract->is_expired)
منتهي: هذا العقد انتهى في {{ $contract->end_date->format('Y/m/d') }}
@endif

بيانات العقد

{{ $contract->contract_number }}
@if($contract->employee){{ $contract->employee->full_name }}@else — @endif
{{ $contract->type_label }}
@php $sc = match($contract->status) { 'active'=>'status-active', 'expired'=>'status-expired', 'terminated'=>'status-expired', 'renewed'=>'status-pending', default=>'' }; @endphp {{ $contract->status_label }} @if($contract->auto_renew) تجديد تلقائي @endif
{{ $contract->start_date?->format('Y/m/d') }}
{{ $contract->end_date?->format('Y/m/d') ?? 'مفتوح (دائم)' }} @if($contract->days_remaining !== null) ({{ $contract->days_remaining }} يوم متبقي) @endif
@if($contract->probation_end_date)
{{ $contract->probation_end_date->format('Y/m/d') }} @if($contract->is_in_probation)في فترة التجربة@endif
@endif
{{ $contract->duration_months ?? '—' }} شهر

البيانات المالية والوظيفية

{{ number_format($contract->salary, 2) }}
{{ number_format($contract->allowances ?? 0, 2) }}
{{ number_format($contract->total_compensation, 2) }}
{{ $contract->job_title ?? '—' }}
{{ $contract->department ?? '—' }}
{{ $contract->notice_period_days ?? 30 }} يوم
@if($contract->terms || $contract->notes)

الشروط والملاحظات

@if($contract->terms)
{{ $contract->terms }}
@endif @if($contract->notes)
{{ $contract->notes }}
@endif
@endif @if($contract->document_path)

ملف العقد

{{ basename($contract->document_path) }}

تحميل
@endif @if($contract->renewedFrom || $contract->renewals->count() > 0)

سجل التجديدات

@if($contract->renewedFrom)

مُجدَّد من: {{ $contract->renewedFrom->contract_number }} @if($contract->renewed_count) (التجديد رقم {{ $contract->renewed_count }}) @endif

@endif @if($contract->renewals->count() > 0)

العقود المُجدَّدة من هذا العقد:

@foreach($contract->renewals as $renewal) @endforeach
رقم العقدالبدايةالنهايةالحالة
{{ $renewal->contract_number }} {{ $renewal->start_date?->format('Y/m/d') }} {{ $renewal->end_date?->format('Y/m/d') ?? 'مفتوح' }} @php $rc = match($renewal->status) { 'active'=>'status-active','expired'=>'status-expired','terminated'=>'status-expired','renewed'=>'status-pending', default=>'' }; @endphp{{ $renewal->status_label }}
@endif
@endif @if($contract->status === 'active')

إنهاء العقد

@csrf
@endif @if($contract->status === 'terminated' && $contract->terminated_at)

بيانات الإنهاء

{{ $contract->terminated_at->format('Y/m/d') }}
{{ $contract->termination_reason }}
@endif @endsection