@extends('layouts.admin-simple') @section('title', 'View Allocation') @section('breadcrumb') @endsection @section('page-title')

{{ $allocation->allocation_number }}

{{ $allocation->project ? $allocation->project->project_name : '-' }}

print Print arrow_back Back
@endsection @section('content')
Allocation Details
Allocation #{{ $allocation->allocation_number }}
Project{{ $allocation->project ? $allocation->project->project_name : '-' }}
Division{{ $allocation->division ? $allocation->division->name : '-' }}
Purpose{{ $allocation->purpose ?? '-' }}
Requested By{{ $allocation->requester ? $allocation->requester->name : '-' }}
Allocated By{{ $allocation->allocatedBy ? $allocation->allocatedBy->name : '-' }}
Status @php $colors = ['pending_approval' => 'warning', 'partially_allocated' => 'info', 'allocated' => 'success']; $labels = ['pending_approval' => 'Pending Allocation', 'partially_allocated' => 'Partially Allocated']; @endphp {{ $labels[$allocation->status] ?? ucfirst(str_replace('_', ' ', $allocation->status)) }}
@if($allocation->rejection_reason)
Rejection Reason: {{ $allocation->rejection_reason }}
@endif @if($allocation->notes)

Notes: {{ $allocation->notes }}

@endif
Summary

{{ $allocation->items->count() }}

Total Assets
Created {{ $allocation->created_at ? $allocation->created_at->format('M d, Y H:i') : '-' }}
Allocated Assets
@foreach($allocation->items as $i => $item) @endforeach
#Asset CodeAsset NameCategoryConditionAllocatedAction
{{ $i + 1 }} {{ $item->fixedAsset ? $item->fixedAsset->asset_code : '-' }} {{ $item->fixedAsset ? $item->fixedAsset->asset_name : '-' }} {{ $item->fixedAsset && $item->fixedAsset->category ? $item->fixedAsset->category->category_name : '-' }} {{ ucfirst($item->condition_at_allocation ?? '-') }} @if($item->is_allocated) Yes @else No @endif @if(!$item->is_allocated && in_array($allocation->status, ['pending_approval', 'partially_allocated', 'approved'], true)) @can('warehouse.fixed-asset-allocations.allocate')
@csrf
@endcan @else - @endif
@endsection @push('styles') @endpush @push('scripts') @endpush