@extends('admin.layouts.master') @section('title', $product->name_ar) @section('page_title', $product->name_ar) @section('breadcrumbs') @endsection @section('content')
{{-- Left column: media --}}
{{ $product->name_ar }}
@if($product->name_en)

{{ $product->name_en }}

@endif {{ $product->sku }} @if($product->barcode){{ $product->barcode }}@endif {{ $product->status === 'active' ? __('admin.active') : __('admin.inactive') }} @if($product->is_featured) مميز@endif
@php $gallery = $product->getMedia('gallery'); @endphp @if($gallery->count())
معرض الصور
@foreach($gallery as $img) @endforeach
@endif
{{-- Right column: details + tabs --}}

تفاصيل المنتج

@can('products.edit') {{ __('admin.edit') }} @endcan @can('products.delete') @endcan
{{ __('admin.categories') }}{{ $product->category?->name_ar ?? '—' }}
{{ __('admin.brands') }}{{ $product->brand?->name ?? '—' }}
{{ __('admin.units') }}{{ $product->unit?->name ?? '—' }}
النوع{{ ['finished' => 'منتج جاهز', 'manufactured' => 'تصنيع', 'service' => 'خدمة'][$product->type] ?? $product->type }}
الأبعاد (ط×ع×ا){{ $product->length_cm ?? '—' }} × {{ $product->width_cm ?? '—' }} × {{ $product->height_cm ?? '—' }} سم
الوزن{{ $product->weight_kg ?? '—' }} كجم
الخامات @forelse($product->materials as $m) {{ $m->name_ar ?: $m->name }} @empty — @endforelse
الألوان @forelse($product->colors as $c) {{ $c->name }} @empty — @endforelse
الأسعار
سعر التكلفة{{ format_money($product->cost_price) }}
سعر البيع{{ format_money($product->sale_price) }}
أقل سعر بيع{{ $product->min_sale_price !== null ? format_money($product->min_sale_price) : '—' }}
سعر الجملة{{ $product->wholesale_price !== null ? format_money($product->wholesale_price) : '—' }}
هامش الربح{{ number_format($product->profit_margin, 2) }}%
المخزون والضمان
تتبع المخزون{{ $product->track_stock ? 'نعم' : 'لا' }}
الحد الأدنى{{ $product->min_stock }}
الحد الأقصى{{ $product->max_stock ?? '—' }}
الضمان{{ $product->warranty_months ? $product->warranty_months.' شهر' : '—' }}
مدة التوريد{{ $product->lead_time_days ? $product->lead_time_days.' يوم' : '—' }}
@if($product->description)
الوصف
{!! nl2br(e($product->description)) !!}
@endif
{{-- Variants --}}

متغيرات المنتج

@can('products.edit')
@endcan
@if($product->variants->count() === 0)

لا توجد متغيرات بعد.

@else @foreach($product->variants as $v) @endforeach
صورة SKU الاسم اللون المقاس سعر البيع الحالة {{ __('admin.actions') }}
@if($v->image) @else — @endif {{ $v->sku }} {{ $v->name ?? '—' }} @if($v->color) {{ $v->color->name }} @else — @endif {{ $v->size ?? '—' }} {{ $v->sale_price !== null ? format_money($v->sale_price) : '—' }} @if($v->is_active) {{ __('admin.active') }} @else {{ __('admin.inactive') }} @endif @can('products.edit') @endcan
@endif
@include('admin.products._variant_modal', ['product' => $product]) @endsection @push('scripts') @include('admin._partials.crud_scripts') @endpush