@extends('layouts.app') @section('title', 'Contract Details') @section('content')
Contract Details
Edit Back
Contract Information
Contract Number {{ $contract->contract_number }}
Employee {{ $contract->employee->name }}
Contract Type @php $typeColors = [ 'permanent' => 'primary', 'fixed_term' => 'info', 'probation' => 'warning', 'internship' => 'secondary', ]; @endphp {{ $contract->contract_type_label }}
Start Date {{ $contract->start_date->format('d M Y') }}
End Date @if($contract->end_date) {{ $contract->end_date->format('d M Y') }} @if($contract->isExpired()) Expired @elseif($contract->isExpiringSoon()) Expiring Soon @endif @else No end date (Permanent) @endif
Status @if($contract->status) Active @else Inactive @endif
Signed Date {{ $contract->signed_at ? $contract->signed_at->format('d M Y') : '-' }}
Position & Compensation
Department {{ $contract->position?->department?->department_name ?? '-' }}
Position {{ $contract->position?->position_name ?? '-' }}
Salary @if($contract->salary) Rp {{ number_format($contract->salary, 0, ',', '.') }} @else - @endif
Benefits @if($contract->contractBenefits && count($contract->contractBenefits) > 0)
    @foreach($contract->contractBenefits as $contractBenefit)
  • {{ $contractBenefit->benefit->benefit_name }} @if($contractBenefit->value) (Rp {{ number_format($contractBenefit->value, 0, ',', '.') }}) @endif @if($contractBenefit->notes)
    {{ $contractBenefit->notes }} @endif
  • @endforeach
@else - @endif

Created: {{ $contract->created_at->format('d M Y H:i') }}
Updated: {{ $contract->updated_at->format('d M Y H:i') }}
Contract Summary
{{ $contract->contract_type_label }}
{{ $contract->employee->name }}

{{ $contract->position?->position_name ?? 'No Position' }}

@if($contract->end_date) @php $daysRemaining = now()->diffInDays($contract->end_date, false); @endphp @if($daysRemaining < 0)
Contract expired {{ abs($daysRemaining) }} days ago
@elseif($daysRemaining <= 30)
{{ $daysRemaining }} days remaining
@else
{{ $daysRemaining }} days remaining
@endif @else
Permanent Contract
@endif
@endsection