@if($status != 'need_action')

{{ __('Custodies') }}

@can("custodies create") @endcan
@endif @if(session()->has('error'))
{{ session('error') }}
@endif @if(session()->has('message'))
{{ session('message') }}
@endif @if ($confirmingDeletionId)

{{ __('Confirm Deletion') }}

{{ __('Are you sure you want to delete this custody?') }}

@endif

{{ __('recruitment.custody_delivery_acknowledgement') }}

{{ __('recruitment.custody_delivery_statement', ['name' => auth()->user()->name, 'item' => $acknowledgingCustodyName]) }}

@include('livewire.custody.acknowledgement-details') @error('deliveryAcknowledged')
{{ $message }}
@enderror

{{ __('recruitment.custody_return_acknowledgement') }}

{{ __('recruitment.custody_return_statement', ['name' => auth()->user()->name, 'item' => $acknowledgingCustodyName]) }}

@include('livewire.custody.acknowledgement-details') @error('returnAcknowledged')
{{ $message }}
@enderror
@error('signing')@enderror
@forelse ($custodies as $custody) @empty @endforelse
# {{ __('Name') }} {{ __('Serial number') }} {{ __('Employee') }}/{{ __('Client') }} {{ __('Status') }} {{ __('Handover history') }} {{ __('Delivery Attachment') }} {{ __('Return Attachment') }} {{ __('Actions') }}
{{ $loop->iteration + ($custodies->currentPage() - 1) * $custodies->perPage() }} {{ $custody->name }} {{ $custody->serial_number ?: '—' }} {{ $custody->employee->name ?? ( $custody->client->name ?? '-' ) }} {{ __($custody->status) }} @if($custody->delivered_at)
{{ __('Delivered at') }}: {{ $custody->delivered_at->format('Y-m-d H:i') }}
{{ $custody->deliveryAcknowledgedBy?->name ?? '—' }}
@if($custody->deliveryAcknowledgementDocument) {{ __('recruitment.custody_delivery_acknowledgement') }} @endif @endif @if($custody->return_initiated_at)
{{ __('recruitment.return_handed_over_at') }}: {{ $custody->return_initiated_at->format('Y-m-d H:i') }}
{{ $custody->returnedByEmployee?->name ?? '—' }}
@endif @if($custody->returned_at)
{{ __('Returned at') }}: {{ $custody->returned_at->format('Y-m-d H:i') }}
{{ $custody->returnReceivedBy?->name ?? '—' }}
@if($custody->returnAcknowledgementDocument) {{ __('recruitment.custody_return_acknowledgement') }} @endif @endif @if(!$custody->delivered_at && !$custody->returned_at) — @endif
@if($custody->delivery_attachment_url) {{ __('View') }} @else — @endif @if($custody->return_attachment_url) {{ __('View') }} @else — @endif {{ __('custody.download_form') }} @can('custodies edit') @if($custody->employee_id && ($custody->status === 'pending' || ($custody->status === 'delivered' && !$custody->return_initiated_at))) @endif @if($custody->return_initiated_at && $custody->status === 'delivered') @endif @endcan @can("custodies edit") @if($custody->status === 'delivered' && $custody->return_initiated_at) @endif @if($custody->status !== 'returned') @endif @endcan @can("custodies edit") @if($custody->status !== 'returned' && !$custody->return_initiated_at) @endif @endcan @can('custodies show') @if($custody->status === 'pending' && $custody->employee_id == auth()->id()) @endif @if($custody->status === 'delivered' && $custody->employee_id == auth()->id() && !$custody->return_initiated_at) @endif @endcan @can("custodies delete") @if($custody->status === 'pending') @endif @endcan {{ __('View') }}
{{ __('No custodies found.') }}
{{ $custodies->links() }}
{{-- Transfer Modal --}}