{{-- Main content area --}}
{{-- Basic Information Section --}}

Basic Information

@if($this->getSkuBreakdown())
{!! $this->getSkuBreakdown() !!}
@endif
{{-- Product Name (Full Width) --}}
{{-- Row 1: Brand, SKU Family, Category --}}
@foreach($this->brands as $brand) {{ $brand->name }} @endforeach

Product family SKU for grouping

@foreach($this->categories as $category) {{ $category->name }} @endforeach
{{-- Row 2: Subcategory, UPC/EAN, Release Year --}}
@foreach($this->subcategories as $subcategory) {{ $subcategory->name }} @endforeach

Barcode number

{{-- Row 3: Announced Date, Discontinued Date --}}
{{-- Product Verified Status --}}
{{-- Product Specifications Section --}} @include('admin.inventory-item-edit-specs-section') {{-- Form Actions --}}
@if($this->hasUnsavedChanges()) Unsaved changes @endif
{{-- Right sidebar --}}
{{-- Gather Data Card --}}

Competitor Analyses

Scrape Amazon Sending... Scrape B&H Sending...
@if($this->product->verified)
Product is verified. Individual analysis actions are disabled.
@endif @error('gather')
{{ $message }}
@enderror {{-- Competitor Analysis Data --}} @if($this->product->competitor_analyses && $competitorAnalyses->isNotEmpty())
@foreach($competitorAnalyses as $analysis)

{{ $analysis->name }}

@if(!$this->product->verified) @if($analysis->competitor_data_count > 0) @if(in_array($analysis->id, $expandedAnalyses)) Hide Details @else View Details @endif
Import to Specs Importing... Add data to product specs
@endif
Scrape Data Scraping... Fetch latest product data
Delete Analysis Deleting... Remove this competitor entry
@endif
@if(session()->has('analysis-sent-' . $analysis->id))
{{ session('analysis-sent-' . $analysis->id) }}
@endif @if(session()->has('import-success-' . $analysis->id))
{{ session('import-success-' . $analysis->id) }}
@endif @error('analysis-' . $analysis->id)
{{ $message }}
@enderror @error('import-' . $analysis->id)
{{ $message }}
@enderror
${{ number_format($analysis->price, 2) }} @if($analysis->competitor_data_count > 0) Scraped @endif
{{ $analysis->website_name }} {{ $analysis->created_at->format('M d, Y') }}
{{-- Expandable Competitor Data Section --}} @if(in_array($analysis->id, $expandedAnalyses) && $analysis->competitorData->isNotEmpty())
@foreach($analysis->competitorData as $data) @if($data->data && is_array($data->data))
@foreach($data->data as $specName => $specValue)
{{-- Specification Name --}}
{{ $specName }}
{{-- Specification Value --}}
@php // Clean up the value: decode HTML entities, handle newlines $cleanValue = html_entity_decode($specValue, ENT_QUOTES | ENT_HTML5); // Split by newlines for multi-line values $lines = array_filter(array_map('trim', explode("\n", $cleanValue))); @endphp @if(count($lines) > 1) {{-- Multi-line value --}}
@foreach($lines as $line)
{{ $line }}
@endforeach
@else {{-- Single line value --}}
{{ $cleanValue }}
@endif
@endforeach
{{-- Data timestamp --}}
Scraped on {{ $data->created_at->format('M d, Y \a\t g:i A') }}
@endif @endforeach
@endif
@endforeach
@endif
{{-- Competitor Images Card --}}

Competitor Images

@if($this->product->competitorImages && $this->product->competitorImages->isNotEmpty()) Grab Images Grabbing... @endif @if($this->product->productImages && $this->product->productImages->isNotEmpty()) Delete All Deleting... @endif
{{-- Success Messages --}} @if(session()->has('grab-images-success'))
{{ session('grab-images-success') }}
@endif @if(session()->has('delete-image-success'))
{{ session('delete-image-success') }}
@endif @if(session()->has('delete-all-images-success'))
{{ session('delete-all-images-success') }}
@endif @if(session()->has('reorder-success'))
{{ session('reorder-success') }}
@endif {{-- Error Messages --}} @error('grab-images')
{{ $message }}
@enderror @error('delete-image')
{{ $message }}
@enderror @error('delete-all-images')
{{ $message }}
@enderror @error('reorder-image')
{{ $message }}
@enderror @if(session()->has('toggle-image-success'))
{{ session('toggle-image-success') }}
@endif @error('toggle-image')
{{ $message }}
@enderror {{-- Competitor Images Data --}} @if($this->product->productImages && $this->product->productImages->isNotEmpty())
{{-- Enable/Disable All Buttons --}}
{{ $this->product->productImages->where('is_enabled', true)->count() }} of {{ $this->product->productImages->count() }} enabled
@foreach($this->product->productImages->groupBy('original_filename')->map(fn($group) => $group->sortByDesc(fn($img) => $img->width * $img->height)->first())->sortBy([['is_primary', 'desc'], ['display_order', 'asc']]) as $image)
{{-- Position and Primary Badge --}}
{{ $image->display_order + 1 }} @if($image->is_primary) Primary @else {{-- Set as Primary Button (only for non-primary images) --}} @endif
{{-- Reorder and Enable/Disable Buttons --}}
{{-- Enable/Disable Toggle --}}
{{-- Image Preview --}}
{{ $image->alt_text ?? 'Competitor product image' }}
{{-- Image Details --}}
@if($image->competitorAnalysis)
Source: {{ $image->competitorAnalysis->website_name }}
@endif
Dimensions: @php $allSizes = $this->product->productImages ->where('original_filename', $image->original_filename) ->sortByDesc(fn($img) => $img->width * $img->height) ->map(fn($img) => $img->width . '×' . $img->height) ->unique() ->values(); @endphp {{ $allSizes->join(', ') }}
Size: @php $allFileSizes = $this->product->productImages ->where('original_filename', $image->original_filename) ->sortByDesc(fn($img) => $img->width * $img->height) ->map(fn($img) => number_format($img->file_size / 1024, 1) . ' KB') ->values(); @endphp {{ $allFileSizes->join(', ') }}
Format: {{ pathinfo($image->storage_path, PATHINFO_EXTENSION) }}
{{-- Delete Button --}}
Delete Image Deleting...
@endforeach
@else
No competitor images available
@endif
{{-- Re-scrape Confirmation Modal --}}
Re-scrape Competitor Data? All existing competitor analysis data for this product will be permanently deleted. This action cannot be undone.
Cancel Delete & Re-scrape