@extends('procurement::layouts.master') @section('title',$component->description) @section('content') @if($component->needs_attention)
Needs Attention — this part is flagged for sourcing/review soon.
@csrf @method('PATCH')
@endif

{{ $component->description }} @if($component->is_custom_device) Custom Device@endif @if(!$component->needs_attention)
@csrf @method('PATCH')
@endif

Edit Revisions Price History ← Back
@if($component->image_path)
{{ $component->description }}
@endif
Component Details
Home Project
{{ $component->project->name ?? '—' }}
Ref Designator
{{ $component->ref_designator ?: '—' }}
Category
{{ ucwords(str_replace('_',' ',$component->category ?? '—')) }}
Part Number
{{ $component->part_number ?: '—' }}
Supplier
{{ $component->supplier ?: '—' }}
Supplier Part #
{{ $component->supplier_part_number ?: '—' }}
@if($component->website)
Supplier Link
Link
@endif
Status
@php $sb = ['active'=>'success','obsolete'=>'danger','under_review'=>'warning']; @endphp {{ ucwords(str_replace('_',' ',$component->status)) }}
Used In
@if($component->project) @endif @foreach($component->projectLines as $line) @endforeach @if(!$component->project && $component->projectLines->isEmpty()) @endif
Project Ref Designator Qty/Bd
{{ $component->project->name }} home {{ $component->ref_designator ?: '—' }} {{ $component->qty_per_board }}
{{ $line->project->name }} {{ $line->ref_designator ?: '—' }} {{ $line->qty_per_board }}
Not attached to any project
Manufacturer
@if($component->manufacturer)
Name
{{ $component->manufacturer->name }}
Country
{{ $component->manufacturer->country ?: '—' }}
@else

No manufacturer set

@endif
Manufacturer Link
@if($component->manufacturer_url) Datasheet @elseif($component->manufacturer?->website) Visit @else—@endif
Manufacturer Price
{{ $component->manufacturer_price !== null ? '$'.number_format($component->manufacturer_price,4) : '—' }}
Alternate Parts
@forelse($component->alternates as $alt) @empty @endforelse
Part # Manufacturer Supplier
{{ $alt->part_number }} @if($alt->description)
{{ $alt->description }}@endif
@if($alt->manufacturer) {{ $alt->manufacturer->name }} @if($alt->manufacturer->country)
{{ $alt->manufacturer->country }}@endif @if($alt->manufacturer->website)
Link @endif @else—@endif
@if($alt->supplier) {{ $alt->supplier->name }} @if($alt->supplier_part_number)
{{ $alt->supplier_part_number }}@endif @else—@endif
No alternate parts
Cost & Sourcing
Qty / Board
{{ $component->qty_per_board }}
Unit Cost
${{ number_format($component->unit_cost,4) }} {{ $component->currency }}
Line Cost
${{ number_format($component->line_cost,4) }}
MOQ
{{ $component->moq }}
Replenish Qty
{{ $component->replenish_qty ?: '—' }}
Lead Time
@if($component->lead_time_weeks >= 8) {{ $component->lead_time_weeks }}w @else {{ $component->lead_time_weeks ?: '—' }}w @endif
Country of Origin
{{ $component->country_of_origin ?: '—' }}
HS Code
{{ $component->hs_code ?: '—' }}
Tariff Rate
{{ $component->tariff_rate > 0 ? $component->tariff_rate.'%' : '—' }}
Tariff Cost
{{ $component->tariff_rate > 0 ? '$'.number_format($component->tariff_cost,4) : '—' }}
Stock
@if($component->stock)
On Hand
{{ $component->stock->qty_on_hand }}
Reserved
{{ $component->stock->qty_reserved }}
Available
{{ $component->stock->qty_available }}
Bin Location
{{ $component->stock->bin_location ?: '—' }}
Last Count
{{ $component->stock->last_counted_at?->format('M j, Y') ?? '—' }}
@else

No stock record

@endif
Approved Vendor List
@forelse($component->avl as $a) @empty @endforelse
Supplier Status
{{ $a->supplier->name }} {{ ucfirst($a->status) }}
No AVL entries
@if($component->detailed_description)
Detailed Description

{{ $component->detailed_description }}

@endif @if($component->notes)
Notes

{{ $component->notes }}

@endif
Quotes
@forelse($component->quotes as $quote) {{-- data-pf-value: a @empty @endforelse
Vendor Contact Unit Price Qty Break Lead Time Quote Date Valid Until Status AttachmentNotes
{{ $quote->vendor_label }} @if($quote->supplier)
{{ $quote->supplier->name }}@endif
{{ $quote->contact_name ?: '—' }}{{ $quote->contact_email ? ' <'.$quote->contact_email.'>' : '' }} {{ $quote->unit_price !== null ? '$'.number_format($quote->unit_price,4).' '.$quote->currency : '—' }} {{ $quote->qty_break ?? '—' }} {{ $quote->lead_time_weeks !== null ? $quote->lead_time_weeks.'w' : '—' }} {{ $quote->quote_date?->format('M j, Y') ?? '—' }} {{ $quote->valid_until?->format('M j, Y') ?? '—' }}
@csrf @method('PATCH')
@if($quote->file_path) {{ Str::limit($quote->file_name,20) }} @else—@endif {{ Str::limit($quote->notes,40) ?: '—' }}
@csrf @method('DELETE')
No quotes recorded yet — add one below.
Photos & Video
@forelse($component->media as $m)
@if($m->media_type === 'video') @else {{ $m->caption ?? $component->description }} @endif @if($m->caption)
{{ $m->caption }}
@endif
@csrf @method('DELETE')
@empty

No photos or videos yet.

@endforelse
@if($component->is_custom_device)
Design Files
@forelse($component->designFiles as $df) @empty @endforelse
FileSizeUploaded ByDateNotes
{{ $df->file_name }} {{ $df->file_size_human }} {{ $df->uploaded_by ?: '—' }} {{ $df->created_at->format('M j, Y') }} {{ Str::limit($df->notes,40) ?: '—' }}
@csrf @method('DELETE')
No design files uploaded yet.
@endif @include('procurement::components.purchase_history') @endsection