@extends('layout.layout') @section('content')
{{-- Include alert component for success/error messages --}} @include('components.alert')
{{-- Updated Title --}}
Asset Inventory
{{-- Updated 'Add New' button link and text --}} Add New Asset
{{-- Filtering/Search Section --}}
@if (request()->filled('status') || request()->filled('search')) @endif
@if ($assets->isNotEmpty())
@foreach ($assets as $asset) @endforeach
Name Product Serial Number Vendor Cost Acquired On Status Actions
{{ $asset->name }} @foreach(explode(',', $asset->product) as $product) {{ trim($product) }} @endforeach {{ $asset->serial_number }} @foreach(explode(',', $asset->vendor) as $vendor) {{ trim($vendor) }} @endforeach ${{ number_format($asset->purchase_cost, 2) }} {{ \Carbon\Carbon::parse($asset->acquisition_date)->format('Y-m-d') }} {!! $asset->is_currently_in_use == "in_use" ? 'In Use' : '' !!} {!! $asset->is_currently_in_use == "in_store"? 'In Store' : '' !!} {!! $asset->is_currently_in_use == "in_repair" ? 'In Repair' : '' !!} {{-- View Button --}} {{-- Edit Button --}}
{{-- Pagination Links --}}
{{ $assets->links() }}
@else

No assets found matching the criteria.

Add First Asset
@endif
@endsection