@extends('adminlte::page') @section('title', 'Manage Assets') @section('content_header')

Asset Management

@can('create assets') Create New Asset @endcan
@stop @section('content')
@if ($message = Session::get('success')) @endif @if(!empty($filterLabel)) @endif @foreach ($assets as $asset) @endforeach
Tag Name Serial No Category Location Department Current Value Status Action
{{ $asset->asset_tag }} {{ $asset->name }} {{ $asset->serial_no ?? 'N/A' }} {{ $asset->category->name ?? 'N/A' }} {{ $asset->location->name ?? 'N/A' }} {{ $asset->department->name ?? 'N/A' }} ₦{{ number_format($asset->current_value, 2) }} @php $statusColors = [ 'active' => 'success', 'disposed' => 'danger', 'under_maintenance' => 'warning', 'transferred' => 'info', 'missing' => 'secondary', 'condemned' => 'dark' ]; $statusColor = $statusColors[$asset->status] ?? 'secondary'; @endphp {{ ucfirst(str_replace('_', ' ', $asset->status)) }}
@can('edit assets') @endcan @can('delete assets')
@csrf @method('DELETE')
@endcan
@stop @section('css') {{-- DataTables CSS --}} @stop @section('js') {{-- DataTables JS --}} @stop